# Mixed mode, close loop, position control > Tank like & polar control

13 years 8 months ago #29525061 by PyB
Hi,

I\'m planning to do a project, remote controling my lawn mower, in a tank style design (left & right independant motor driven wheels, middle of the \'robot\' is middle of the 2 wheels axis X=(xl+xr)/2 Y=(yl+yr)/2

I intend to control the robot, not using the position of each wheel, but using a (X, Y, theta) triplet (where theta is angle)

The control of the bot will then be done thaough a distance (dDelta) and and angle commmand (dThetha), thus I will use 2 PIDs to control for one the angle and the other the distance. Commands to the wheel are then formed by summing/substracting the issued results.

Is the mixed mode functioning like that, or is it still controling 1 motor each, if so, what is the difference when the normal (non mixed) way of working ?

PyB

13 years 8 months ago #29525062 by cosma
In mixed mode, you give a forward/reverse level and a left/right level. Motor is applied to both motors to create a tank-like steering.

The math is much simpler than yours. Attached is an XLS showing the applied power to each motor based on the Fwd/Rev and L/R commands.

13 years 8 months ago #29525064 by PyB
can not you see the attached chart.

13 years 8 months ago #29525067 by cosma
Input(%) Output(%)
F/R L/R M1 M2
0 0 0 0
0 30 30 -30
30 30 60 0
60 30 90 30
100 30 100 40
0 60 60 -60
30 60 90 -30
60 60 100 -20
100 60 100 -20
0 100 100 -100
30 100 100 -100
60 100 100 -100
100 100 100 -100
0 -30 -30 30
30 -30 0 60
60 -30 30 90
100 -30 40 100
0 -60 -30 30
30 -60 -30 90
60 -60 -20 100
100 -60 -20 100
0 -100 -100 100
30 -100 -100 100
60 -100 -100 100
100 -100 -100 100

13 years 8 months ago #29525068 by PyB
Thanks,

This i understand, but how do that goes with PIDs filter in close loop ?

When in clode mode, you control in position mode (not giving motor power but position reference)

what I do not understand is how the 2 PIDs in the AX series are working in this specific mixed mode position mode, feeling that it can not be a PID per motor, as they are controlled font/Rear (distance and Left/right (Theta)...

Am I missing something.
PyB

13 years 8 months ago #29525069 by cosma
The pid applies to the actual speed of each wheel.

So if a motor is told to go to 50%, this will make it go and maintain that speed.

Tank steering has a lot of friction, so in open loop you cant even be sure that the motor is turning if, for example it is told to go to 10% and the other motor is at 0%.

13 years 8 months ago #29525070 by PyB
Ok I think I understood.

Closed loop, mixed mode is only valid in speed control
then we set the speed command, and the AX3550 PIDs takes care of making sure it is the right one...

OK then I somehow have to think different ways for my application, thanks a lot for your help.

PyB