Hi All,
I plan on building my own autonomous UAV from scratch. I'm using the following IMU: http://www.sparkfun.com/products/10183
Right now, I have two main issues.
1) My accelerometer picks up way too much vibration noise from the motors. The raw data is essentially useless unless I heavily filter the data. I do not want to filter the data so much as I'm doing a lot of floating point math and it kills the rise time constant of the accelerometer. There MUST be a better way to make my accelerometer noise immune. What are the best techniques for removing accelerometer vibration noise?
2) I want my UAV to have a very, very good idea of where it is. I'm talking absolute position. But if my gyroscope and accelerometer are reading noise from various sources, it will be difficult to calculate where exactly it is. What are the best techniques for making sensors "noise immune" and calculating absolute position without GPS dead reckoning?
Thank you for your time.
Tags:
If you haven't yet, carefully study the algorithms and approaches of other autopilot AHRSs which faced and dealt with the gyro/accel noise issue -- as well as many subsequent issues.
I suggest starting with MatrixPilot since it is well documented--the theory, etc., in PDF form. There are others. ArduPilot is an implementation of the same algorithm. CHR-6dm AHRS uses an Extended Kalman Filter. You might look at the MARG approach of Seb Madgwick (I've not looked at it and am unfamiliar with it but I gather it's another good approach).
Your statements lead me to believe you're where I was a year and a half ago. I've had the good fortune to learn quite a bit about MatrixPilot, Kalman filtering, Digital Signal Processing, and related AHRS topics in the process of developing an autonomous ground vehicle. Best of luck!
Permalink Reply by Paul Triantafyllou on May 2, 2012 at 12:26pm Thank you for your reply. I will investigate MatrixPilot and its documentation. I currently have a long list of things I want to learn and master, Kalman filtering and digital signal processing being among them. It's sort of like an easter egg hunt for information but I'm sure I'll get there eventually. Maybe a year and a half from now.
If you have any documentation or articles or anything that really helped you in your search for knowledge over the past year or so I would love to hear about it. I'm looking to learn *everything*. I'm an electrical engineering major, so while I have a solid background there is still plenty I have to learn.
Ok... umm... wow, I've looked at SO much. Let's see.... oh, here's a great tutorial on digital signal processing. http://www.dspguide.com/pdfbook.htm Very easy to understand.
Some commonly suggested papers for Kalman Filtering (a common approach to sensor fusion and noise reduction):
Not sure what your math skills are like. I was never one of those intuitive math types. I had to work hard to grasp the big picture. I'm fine with concepts but translating between concepts and math is a challenge. My education is in Computer Engineering and I always did much better in CS courses and digital logic courses than analog EE courses :) The higher engineering math tended to be tough most of the time. But, I've managed to dust off old memories and form new ones and have a much better grasp of things wrt Kalman Filtering.
One thing that helped me regain some skills with matrix algebra was using GNU Octave (free tool that is comparable to Matlab) and doing simulations and implementing kalman filters. The matrix thing is becoming second nature at long last.
Here's a bit more difficult to read but more apropos papers on KF for a UAV.
http://www.cel.usyd.edu.au/people/guoqiang.mao/UserFiles/File/publi...
http://www.iaeng.org/publication/WCE2010/WCE2010_pp1509-1514.pdf
Also, shameless plug, I have a robotics blog and I've covered some topics that may be of interest: behavior of magnetometers, gyros, other sensors. I plan to share what I know about Kalman Filtering (that shouldn't take long... j/k), etc. http://www.bot-thoughts.com/ I try to keep things understandable and targeted at intermediate hobbyists.
The MatrixPilot .pdf files (here) are quite interesting to read and are understandable. It can set you up to sort of grok the flavor of math that seems to pop up with navigation and sensor problems like these.
Permalink Reply by Brett Smith on July 22, 2012 at 1:06am
Permalink Reply by Paul Triantafyllou on July 22, 2012 at 8:55pm Hi Brett,
Unfortunately I never found a solution. I've taken a short break from UAVs and I've focused my attention on image processing and computer vision for the time being.
The gentlemen above provided links that should get you closer to where you want to be. I believe you will need to delve deep into Kalman filtering in order to cut through your noise issue. Also, consider mechanical dampening methods such as foam or pads.
Best of luck. If you do happen to find something that works, please post it here so that future UAV enthusiasts who are searching the web can find their way as well.
I found Kalman filtering for a 3D AHRS solution to be very math-intensive and for me very difficult. I'd spend my time working on dealing with the vibration mechanically long before diving into Kalman Filtering. Also, the ArduPilot DCM-based algorithm addresses noise and is conceptually simpler and such.
Permalink Reply by Brett Smith on July 24, 2012 at 8:30am I tried to get a grasp of the Kalman filter, but it quickly became too complicated. I looked into a DCM; it seems doable on an arduino board, but I still don't have my head around it.
Good news is: I set up a very basic complementary filter last night, and it reduced just about all the mechanical noise that foam did not! An excellent link for the complementary filter has been floating around this site, but I'll repost it :http://web.mit.edu/scolton/www/filter.pdf
I am refreshing at about 50 hertz with a couple issues: If I exceed 65~75 degrees the filter stops reporting data all together. If I plug in the GPS to the same 5v source as my accelerometer/gyroscope, this will throw my data far out of the acceptable range. I suspect the issue lies with how I convert G's to degrees( before I had the complementary filter running the accelerometer would crap out at about 85-90 degrees. I assume because of the arcsin function).
If I can't get to the source of the issue, I might just set up the reset pin of the arduino board so that if my data stops flowing the board just resets. If you like I could post my code here.
Interested in seeing the code (or link to pastebin or something). If there's an error maybe we can spot it.
Permalink Reply by Brett Smith on July 24, 2012 at 7:35pm void loop(){
Accel();
float pitch = real_x; //should converts accelerometer 8 bit to degrees
pitch *= .0078; //i don't know where i got all these constants
pitch *= .5; // this may be because i am running it on 5v
pitch = asin(pitch); // i think this is where my code craps out because as pitch goes to 1 arcsin is indetermined
pitch *= 180/3.14159; //converts to radians
float roll = real_y; //same thing for the roll
roll *= .0078;
roll *= .5;
roll = asin(roll);
roll *= 180/3.14159;
Gyro();
pitchRate /=1000;
float integralX = (pitchRate*dt); //calculates how much the accelerometer should have changed
float lowPassX = pitch*(0.02);
float highPassX = prevPitch + integralX;
highPassX *= 0.98;
pitch = highPassX + lowPassX;
prevPitch = pitch;
rollRate /=1000;
float integralY = rollRate*dt;
float lowPassY = roll*.02;
float highPassY = prevRoll + integralY;
highPassY *= 0.98;
roll = highPassY + lowPassY;
prevRoll = roll;
long now = millis();
int cycle = now -last;
last = now;
Serial.print(pitch);
Serial.print(" ");
Serial.print(roll);
Serial.print(" ");
Serial.println(cycle);
if(pitch > 45||roll<45||pitch ==0.00){
fallback();
digitalWrite(9,HIGH);
}
if(roll>45||roll<45||roll ==0.00){
digitalWrite(9, HIGH);
}
}
How can I set it up so that i don't loose values as the sensor approach perpendicular to the ground??
Permalink Reply by Paul Triantafyllou on July 24, 2012 at 6:42pm The Kalman filter slide made me laugh out loud. Informative PDF, thank you.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.686 members
185 members
6 members
129 members
87 members
© 2013 Created by Chris Anderson.
Powered by
