Topic: Ballbot project
(Read 2 times)
Jun 23, 2011, 11:58 am
This is my first post on these forums. Over the summer i am working on a ballbot project for my university at Nottingham. This involves an inverted pendulum body balancing on a children's bowling ball. The robot has already been designed previously, what i have to do is set up the electronics and get the thing to self-balance.
So far i have all the matlab code and the simulink file for the ballbot and the simulation works. The ballbot itself uses a 5 degree's of freedom IMU to send roll speed, and x/y accelerations to the computing unit. (encoders may be looked at later on so tracking of the robot can be achieved).
A kalman filter is used to estimate and reduce the noise of the state variables which are not all exactly measured from the IMU. These are the body angle, ball angle, body roll speed, ball roll speed and the motor current.
The estimated state then passes through a LQR which minimizes a cost function to give an output voltage (opposite to what was previously applied) to the motor. There are two motors (in the x and y plane). The simulation is simply replicated for the other motor as it is assumed they are symmetric about the vertical center of axis.
All of this produces an accurate balancing of the robot in simulation. What i am looking to find out is if the Arduino boards would be capable of processing the kalman filter and lqr? The frequency that the discrete kalman filter runs at on simulink is 100Hz.
We do have access to compact rio hardware and labview but the ballbot is intended to be used for open days and as such with the expensive nature of the NI components it may be difficult to tie them up in one design to be used a lot.
Ideally if an Arduino board (maybe the mega?) could work it would be perfect as it could remain on the ballbot.
Thanks for any help,
I love Arduino
Re: Ballbot project
Jun 23, 2011, 09:12 pm
the ballbot is a dream for every robot builder. Your work is very very interesting.
In my previous works I used the Kalman filter and a PID control to make a self balancing robot.
I think that only an Arduino Uno or an Arduino Duemilanove is enough.
In my tests the whole cycle, with Kalman and PID control, was made in 4-5 ms. So the frequency is 200hz.
The most heavy elaboration is the communication with serial port to print values, for examples acceleration value or something else. My advise is to use always the max speed (115.200).
For the execution time the best is the complementary filter instead of Kalman filter. The results in my experience are similar. I made same tests about it (
The text is in italian, but google translate is your friend.
For the LQR control, I don't understand. The LQR gains are calculated with the Matlab, so they are constants. Or you are speaking about on-line dinamic calculation of LQR coefficients ?