I'm asking here another question in relation to my previous one.

I would like to know how would one proceed when you want to control a heavy robot with differential wheel drive. When it comes to sending PWM values, I cannot control the robot, i.e, I cannot make the robot go into a straight line.

Another issue would be, braking the robot. Think 100Kg at its maximum weight, so It will have a LOT of momentum and inertia. Knowing this, what would you do to control its movement, with a differential drive system, and how would you control is breaking?

Note: This isn't to be considered as a hobby project. Think of this as the best way to implement it.


One answer: Closed loop systems and/or sensor fusions

You can't just send the right commands to the motor and expect that the robot will act exactly as expected. Think about a very very small difference in the torque produced by your two motors that received two identical PWM signal (due to motor manufacturing tolerances). One will go slightly faster than the other and the robot will run along a circle (very big, but still a circle) instead of a straight line. The answer to this problem is closed loop control. Your motors, or your wheels will have encoders. And your control system will receive the signals from the encoders and will react in a way that ensure that your wheels are doing exactly what you expect them to do.

But in the case of an autonomous robot, this in not enough. Think about having a wheel that is slightly bigger than the other, because of wearing, or just due to manufacturing tolerances. Or think about a wheel that slips a little bit on the floor. In this case you don't know anymore for sure where you are. This method is called odometry or dead reckoning. In order to solve this, you have to use sensors that adds knowledge about your environment to your system. (Vision, proximity sensor, bumpers, magnetometer, gyroscopes, etc). Then, advanced algorithms are used to use the best of every sensor at each time step.

  • \$\begingroup\$ What possible disadvantages can I get using encoders?? I suppose there will be a delay in the robot's response, since the motor pids will have to adjust the PWM to the desired speed, correct? \$\endgroup\$
    – Mikea15
    Mar 20 '14 at 14:24
  • \$\begingroup\$ The disadvantages is the increased complexity: you have to wire the encoders and decode the quadrature signals (usually the micro controller have a dedicated module for this). There is always a delay: Even computation takes some time! Control theory in not that simple. Especially when focused on discreet system (not simple analog PID translated into the digital world, but algorithms that uses the full power of digital computations). You could there take into account the various delays and this will not be an issue anymore. Throwing a PID and manually tuning 3 values won't make it here. \$\endgroup\$
    – Blup1980
    Mar 20 '14 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.