# IMU based acceleration parameters for differential drive robot

I have a differential drive robot whose motors are virtually quiet while driving on a completely flat surface, but the motors make a lot of noise when on a incline. This is likely due to the correction required to maintain speed with the high inertial load where the robot cannot accelerate fast enough for the PID to keep up.

But I noticed that some of the noise is related to acceleration, and the higher the acceleration, the smaller the amount of noise I hear, or the smaller the time the same level of noise lasts (up to a certain acceleration limit, otherwise the motors get really noisy again).

I am trying to find out of how to use an IMU that I have a available in order to change the acceleration based on how steep the path's incline is.

Any documentation (papers, tutorials, etc) about motion planning related to this topic that you can point me to?

• can you clarify the second paragraph a little bit more? as it stands, the term "acceleration" is confusing. does the noise decrease when going downhill (acceleration is more and the motor power needs to be decreased?) do you wish to solve the noise problem with this question, or do you only want to learn about control strategies under different environments (that possibly also help the health of the motors). – Gürkan Çetin May 16 '15 at 13:45
• IMU integration is something expensive, and maybe not necessary, how do you currently control the speed of the vehicle? – Gürkan Çetin May 16 '15 at 13:48
• What is your motor/drive train arrangement? It sounds to me kind of like a backlash issue. – Chuck Jul 15 '15 at 23:37
• Here's a video that shows some RC backlash, look about a minute in. Keep watching for the difference gear mesh can make. Also might be stepper motors exacerbating the issue. – Chuck Jul 15 '15 at 23:55
• Please post a kinematic model of your robot and the control loop, including all parameters. – Bending Unit 22 Aug 14 '15 at 12:34

Plan A: get IMU chip and read the raw register data. Read data is easy. Using data is hard.

Plan B: use FreeIMU library that does 'data fusion' that combine raw data from multiple sensors and present user with a much reliable, stable and easy-to-use data in a roll, pitch yaw format.

(about 60% toward the end) Video showing roll, pitch and yaw as displayed on pc screen https://www.youtube.com/watch?v=4Dmbr4XDnSM

There are dozens of similar videos. like https://www.youtube.com/watch?v=jSUULyOchKY which explain a bit about the working principle, etc.

Use Arduino MCU board as it is low cost and has plenty examples.

Hope this helps

• This answer is beside the point: OP isn't looking for an IMU, or low-level IMU data processing. He already has one (and I assume he knows how to get usable data from it). – Martin Oct 20 '14 at 9:12

Normally, the integral term of a PID handles something like the incline. This takes time to build up error, and as you noticed in your application it is taking some time for the PID to decide to output the proper amount of force when you first encounter the incline.

My guess is that the simplest way to fuse the IMU data would be to use it as a replacement for (or augmentation of) the integral term in your calculation. Rather than accumulate error over time, the IMU could give you a more instantaneous value.