Dynamic model of differential drive robot

Typically: "How do I... ", "How can I... " questions
Post Reply
ptiza_v_nebe
Posts: 3
Joined: 16 Jul 2018, 08:02

Dynamic model of differential drive robot

Post by ptiza_v_nebe »

This is the robot
Image

I'm designing controller for orientation. This means both wheels rotate in opposite direction, so the whole plattform rotates too.

Image

For seek of studying dynamics and better controller design I make an attempt to reflect the system with a model in the form of differential equation. The outcome is:

Differential equation
Image

This approach takes account of the wheel standing on ground what causing that it will be slower because of the overall moment of inertia. Thats why "J" in denumerator is is so "strange"

Solution (After integrating. W_Target:=W_Wheel)
Image

Now making step response with Matlab+VREP. Target wheel angle velocity is w_Target = 3 s^-1, M_Motor=1Nm. Result:
Image

All fine, the theoretical calculation (Solution above) will approximatly result in the same time as measured of t_Target = 0,198s

But if I change the torque in Motors to 2Nm for some magical reason the measured time is shorter as calculated. As if the moment of inertia changes,

Image

Why is this happening? How the engine exactly works besides that a joint get a moment until it reaches target velocity?
Did I forgot something in the differential equation?

Sim Engine: ODE
dt = 1.0ms
Very accurate
Matlab is triggering the vrep sim steps
VREP Version 3.5
Using joint callback function for controlling the joints

wheel angle velocity is calculated with numeric derivation of position:

Code: Select all

rightVelocity = (actualPositionRight - lastPositionRight)/(actualTime - lastTime)


Thank you!

coppelia
Site Admin
Posts: 10338
Joined: 14 Dec 2012, 00:25

Re: Dynamic model of differential drive robot

Post by coppelia »

Hello,

this is directly linked to the physics engine you use, and how that engine performs in the given conditions (i.e. masses, inertias, other settings, etc.). Did you try switching to another engine? If yes, are the results similar? Switching to another engine and comparing results is always the first thing to do, in order to exclude (or try to exclude) effects that are specific to the given engine.

Cheers

ptiza_v_nebe
Posts: 3
Joined: 16 Jul 2018, 08:02

Re: Dynamic model of differential drive robot

Post by ptiza_v_nebe »

I now tried all engines. All engines has the same behavioral, but the vortex engine because of its fine-granular precision gave some clue about what is happening.

Here you see two step responses in one figure:
Image

Blue - plattform is on the ground.
Red - wheels rotating in air.

You see at the beginning this strange curve in the blue figure? Its slope is the "same" as of the red (air).
If I observe how the behaviour of whole plattform at the beginning of simulation is, I see some bumping/bouncing. My thesis is that there is little air between wheel and ground and this is causing this strange difference of calculated and measured times. And if the force is much higher then 1Nm, the time that wheels rotate in air is much bigger.

Is there some way to place the contact area of wheels exactly on the ground? So no bumping/bouncing can occur?
Or generally prevent this bumping/bouncing

coppelia
Site Admin
Posts: 10338
Joined: 14 Dec 2012, 00:25

Re: Dynamic model of differential drive robot

Post by coppelia »

Are you sure the initial part of the curve is not due to slipping (i.e. you have static and dynamic friction coefficients. At first, the mode might be in dynamic friction).
Otherwise, try to lower the wheels slightly below the ground level. You might however still experience the same effect. Depending on the used physics engine, you can also try to adjust some of the material properties that might influence the behaviour (Bullet: restitution coefficient or custom collision margin, ODE: max. contacts, soft ERP, soft CFM, Vortex: restitution threshold, restitution, compiance, adhesive force, etc.)

Cheers

Post Reply