Author Topic: multiple IMU for improved accuracy?  (Read 3006 times)

mariocaptain

  • Newbie
  • *
  • Posts: 3
    • View Profile
multiple IMU for improved accuracy?
« on: April 03, 2014, 03:29:22 PM »
Hi Lauszus and all,

I am trying to build an arduino-based self balancing scooter and finding this project is really a bless. I would like to  base my code upon the balanduino's code, but for now understanding the existing code will take me quite some time, as I am all new to this IMU thingy and stuff...

Anyway, I've been thinking about these and would be grateful if any comment is offered:
- What would be the difference in performance (accuracy & smoothness of movement) between DC motors with encoder (like the Balanduino) and those "conventional" DC motors without an encoder? (Yes I know Segway's motors have encoders in them)
- I have read in some paper that using multiple IMU's (e.g. 3-5) will help improve the accuracy. Specifically, I remember some paper I've read claims that using n IMU's (an take the average of all readings after filtering) will help reduce the error by n-root. What would be your comments, is that true and is it worth implementing?

Thanks in advance for any advice offered!

Dave

Ahmed

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: multiple IMU for improved accuracy?
« Reply #1 on: April 03, 2014, 05:09:27 PM »
Without encoders you won't be able to determine the position error, which wouldn't be that important if you're driving the scooter yourself. It is basicly used to allow the robot to return to its position if pushed away from it (called back to spot by the balanduino guys).

However, the encoders allow you to correct/calibrate for differences in speed between the DC motors, because even if you buy identical motors there will be a difference between them. Finally, using the encoders you can determine the wheels position and velocity, which can be used to allow the robot to balance on sloped surfaces automatically without knowing the slope/balance angle, a feature which is not in the balanduino but you will definitely need in a self balancing scooter unless you don't plan on going up or down any ramps on it.

It is possible to use more IMUs and use some sort of filtering algorithm to combine their signal and get a more accurate reading for the angle. But that would not be necessary unless you have extreme vibrations or balancing on a really rough surface without any sort of damping suspension on the wheels to lessen the vibrations. Also that would require a more powerful microprocessor or microcontroller because the ATmega on the balanduino or a similar arduino microcontroller would not be powerful enough in my opinion to combine them. Otherwise as you can see from the balanduino, one 6 axis IMU is enough and you should be able to get a smooth and accurate signal after using a complementary or kalman filter.

mariocaptain

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: multiple IMU for improved accuracy?
« Reply #2 on: April 03, 2014, 05:45:39 PM »
Hi Ahmed,

On the encoder, I've been thinking along the same line but not so sure. Your answer makes perfect sense to me, thanks.

Now on the IMU's, yes you are right that the Balanduino uses only one and it is doing a pretty great job at keeping itself balanced. Maybe I am a bit of a perfectionist but I have observed that the Segway (yes I know its an expensive piece of high-tech software & hardware) when it stands on it own, it is completely stationary, while the balanduino still jitters a little around the balance point on the table.Improvement for rider's experience and safety could be desirable. Without much indepth knowledge in the field, I can only account the difference for the number of IMU's used (5 vs 1) apart from difference in algorithms. Not sure how weight distribution, wheel size etc may contribute to this.

Now to implement these IMU's, my thought would be to have them run separately and independently, each controlled by a separate Arduino (or a standalone Atmega for that matter), and communicate with the main MCU via serial. Since the main MCU will have only one hardware serial port (115200 bps capable) I am still calculating if software serial at a much lower speed will be fast enough for this implementation.


Ahmed

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: multiple IMU for improved accuracy?
« Reply #3 on: April 03, 2014, 06:30:21 PM »
In my opinion; The main reason the balanduino jitters when balancing is because of the following reasons:
1) It is using an 8 bit 10Mhz micro-controller running a PID controller instead of a more advanced form of full state feedback control like optimal control or LQR control, which is probably what is used on the segway with a more powerful microprocessor.
2) The PID gains are not correctly tuned on your robot, lowering the proportional gain and the integral gain will help decrease the jitter a little bit, specially on fully charged batteries. My gains for example are Kp=7.5 Ki=2 and Kd=3 I think.
3) Gear backlash inside the DC motor gearbox and high motor rotor inertia and mechanical stiction because of the 1:30 reduction ratio, which can be avoided by using a pulley belt/chain link drive system instead on your scooter, this is a very big factor.

There are other factors I am sure, but from the few weeks I've had my balanduino, this is what I have determined to be the main factors causing the jittery behavior. Also note that the balanduino is a pretty short robot with little mass (low inertia), when using a taller robot with a relatively faster drive electric motors, balancing without jittering should be easier in my opinion.
« Last Edit: April 04, 2014, 12:16:49 AM by Ahmed »

mariocaptain

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: multiple IMU for improved accuracy?
« Reply #4 on: April 06, 2014, 05:33:44 PM »
Hi Ahmed,

Thanks to your advice, I have been researching a little more indepth about motor encoders and PID and it makes a lot of sense to me now that a precise robot cannot go without these.

I also agree on the point about backlash but since I have already bought geared motors, I will try and see what well-tuned PID can achieve.

Thanks for the knowledge and for pointing me in the right direction.

Dave