Motor control with feedback

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
Benutzeravatar
ft-ninja
Beiträge: 113
Registriert: 01 Nov 2010, 14:26
Wohnort: Inner Mongolia
Kontaktdaten:

Motor control with feedback

Beitrag von ft-ninja » 24 Jan 2012, 14:06

Hello folks!

I'm wondering is there a command block in the ROBO Pro that provides closed loop speed control mode for motors connected to outputs M1-M4?
==
ft-ninja

vleeuwen
Beiträge: 1567
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Motor control with feedback

Beitrag von vleeuwen » 24 Jan 2012, 16:23

How you mean?
There are several sensors input so you are able to create your own closed loop control inside RoboPro.
However there is no standard fischertechnik speed sensor.

Suggestion 1) , take a small toy motor (for example the small ft-motor) and use it as generator.
The voltage is a measurement for the speed (rectifier + capacitor).
Use one of the I input in the analogue voltage mode.
Now you only need to develop a good algorithm in RoboPro to create the closed control loop.

Don't make it too fast, <10Hz; this to avoid instability.

Suggestion 2)
With a switch:
Use a counter and a timer to measure the number of count /sec.
If the number of counts is too high, lower the speed or the opposite.

Benutzeravatar
ft-ninja
Beiträge: 113
Registriert: 01 Nov 2010, 14:26
Wohnort: Inner Mongolia
Kontaktdaten:

Re: Motor control with feedback

Beitrag von ft-ninja » 24 Jan 2012, 16:48

Thanks for the ideas.

Perhaps it's possible to use motors with integrated encoders to get the speed feedback for closed loop control. I only doubt about the program cycle time stability. Does the TXC provides constant program cycle. The cycle time highly influences the result of the speed calculation algorithm that uses pulse counter value.
==
ft-ninja

vleeuwen
Beiträge: 1567
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Motor control with feedback

Beitrag von vleeuwen » 24 Jan 2012, 19:07

With a USB connection the refresh cycle time of the TA is +/-10ms.
Normaly you will need 1 or 2 cycles to responds.

With BT between 15 en 35 ms or higher. This has to do with the natur of BT, it is design for streaming applications not for (semi) real time control egineering.
Rules of the thumb with BT is 50 ms

So the control loop need to be slow les than 5 Hz.

ftDirk
Beiträge: 71
Registriert: 28 Okt 2011, 18:28

Re: Motor control with feedback

Beitrag von ftDirk » 24 Jan 2012, 19:36

@ft-ninja:
Perhaps it's possible to use motors with integrated encoders to get the speed feedback for closed loop control.
Do you know the ft encoder motors (part no. 135485) with encoder cable (part no. 137125)?
Gruß ftDirk

vleeuwen
Beiträge: 1567
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: Motor control with feedback

Beitrag von vleeuwen » 24 Jan 2012, 22:34

@ftDirk,
As yu probabely know, the encoder motor makes use of the fast counters.
The fast counters are part of th eextended motor control black box. (M1/C1, M2/C2, M3/C3, M4/C4)
The extended motor control is already a kind of close loop control which is running localy on the TX-C below TA level.
From the perspective of above TA level (FtMscLib and RoboPro) the extended motor control is a black box.

The fast counters (1 kKz sample rate, 500 Hz counter speed maximum under ideal situation) are to fast for the TA.

These facts make that the encoder motor is not suitable for closed loop control system at RoboPro level.
But you can add a hardware divider between the encoder pulse output. This to lower the counter speed below the de 25 Hz.
In that case the fast counter state is usable at RoboPro level.

Antworten