jueves, 27 de diciembre de 2012

Let`s do the Maths!

Let me tell you one thing: I'm not a mathematician. But to implement an holonomic platform, you must  understand first how it moves.

We will consider a platform with 3 wheels. In this case, 3 wheels are mounted in a circle, at 120 degrees one from the other.

Like in this one:

Moving lineally:
Let's analyze first how to move lineally. As you can see, this kind of platform can move in any direction. So, there is no front / rear part. It can move in any direction (0 to 360 degreees) from his start point. Image yourself looking forward and walking forward, but a little to the left each step.

In order to make a lineal movement, each wheel of our platform must turn at a certain speed. The sum of the 3 speed vectors will determine the direction and speed of our platform.

See what happens with a graphic:

Our requested Speed has a certain magnitude and a certain angle. (Remember polar coordinates?) In our case, we want to move at a velocity of 10, with an angle of 15º. To achieve this movement, our wheels (the thick colored vectors) must provide the indicated speeds. (6,44 for the wheel 1, 1,725 for the 2nd and 4,714 for the 3rd.) If we add those vectors together we see that they created the requested speed.

It is interesting to see that wheel 1 is moving in the opposite direction of wheels 2 and 3. Furthermore, the speed of Wheel 1 is equal to the sum of wheels 2 and 3. This is necessary to avoid momentum. If this is not accomplished, the platform will turn.

We don't need to calculate the direction of each wheel: they are mounted fix at certain degrees. So, how can we calculate the speed of each wheel?

This is the formula:
Speed_Whl(n) = 2/3 Rq_Speed cos(Rq_Angle - Whln_Angle)

Speed_Whl(n) = Speed of the Wheel n
Rq_Speed = Total Requested Speed
Rq_Angle = Requested Moving Angle
Whln_Angle = Angle of that wheel (0, 120 or 240 degrees)

In our case:
Speed Whl(1) = 2/3 . 10 . cos (15 - 0)     = 6,4395
Speed Whl(2) = 2/3 . 10 . cos (15 - 120) = -1,7255
Speed Whl(3) = 2/3 . 10 . cos (15 - 240) = -4,714

The sign will determine the turning direction of the wheel.

You can take your calculator and try the formula with the values on the graphic above or, even better, you can go one step further and simulate it!

I use Geogebra for simulating this kind of systems. You can download the program here: http://www.geogebra.org/cms/en. It's light, it's easy and yes, it's for free!

Here you can download my simulation. Just install Geogebra and then load the simulation. If you click and drag the point representing the requested speed you will see the changes in the rest of the values.

Turning is easy. All you have to do is to apply a certain speed to all 3 Wheels, in the same direction. The platform will turn around his center point.

Mixed Movement:
It is perfectly possible to apply both types of movement at once. As a result, the platform will describe a circle with a big radius.
Zero turning & Lineal Speed  make the platform move in a line.
Zero Lineal Speed & Turning Speesd makes the platform turn around his center point.
Any other combination creates a proportional circular movement.

I went a little fast on this topic, but I hope you understand this explanation!

No hay comentarios:

Publicar un comentario