Sensor Noises Analysis of a Quadcopter
The project was my bachelor thesis project with the initial goal to control a quadcopter to hover. I was warned that it would be hard initially, but I learned a good lesson about practical aspects of robotics besides theoretical aspects.
What is a quadcopter?
It is a flying vehicle, having four rotors in a plane (I thought so at the beginning. Then I got an old DragonFly without the controller, sensors, and motor drivers. So, I borrowed a microcontroller, an IMU and built a motor driver circuit. In a few months (after a few burned MOSFETs), I had a quadcopter (or I assumed so). Shortly afterward, I realized that this "quadcopter" would never fly again. I had serious issues with the hardware components, and as a novice, I was not able to pinpoint what is the biggest bottleneck, but looking back again, the main issues were:
damaged propellers and worn gear transmission (always replace propellers if they are deformed or damaged)
using DC motors: they generate strong vibrations compared to brushless motors (like my old and heavily used DC motors)
IMU sensors were precise but highly sensitive to vibrations (don't just pick a sensor from the shelf)
The noisy drone
control theory is part of robotics, but there is more behind it
picking good hardware is as important as choosing control method and software implementation
always look for the easiest solution to overcome an issue e.g. change the hardware, pick another method ...
analyze the problem, try to solve it and then analyze why and how your solution influenced the whole system
robots do brake, burn and go crazy when edge-cases are not covered :)
I declared that this drone is not going to hover again, but I still wanted to figure out if I could fix the unknown hardware issues using the theory. I observed increased noise on the IMU measurements, so I changed the project direction to analyze sensor noise and apply filters on it. The preliminary approach and results of my thesis about noise handling are discussed in my student paper at AQTR (pdf link).
Discussion of the issues and approaches:
The IMU sensor should be for flying vehicles, because in my case I experienced a huge mechanical noise in the sensors data. As mentioned in the publication, the sensors uses three different measurements form a gyroscope, accelerometer, and magnetometers to compute the orientation angles with the DCM mathematical algorithm. The algorithm and the sensor worked perfectly when the sensor was resting or hand held. As soon as the motors of the "dron" were turned, imens noise appeared on the sensor ±10 ° difference between the real and measured orientation angles. The source of the error was the high frequency vibrations generated on the frame while the rotors are spinning with high speed. This measurement noise made impossible to control the pitch or roll angle of the "drone" using a PID.
So I decided to filter out the noise. (Bad decision! If possible just replace the faulty components like actuators, propellers, and even try different sensors).
Mechanical Noise filtering:
I tried two type of filtering methods: mechanical and software filtering. First the mechanical filter was built and tested. The first idea was to move the sensor as close as possible to the center of mass of the "drone" and to damp vibrations with some soft materials which were placed under the sensor (rubber, silicon, sponge). I placed an extra weight between the sensor and the vibration damper because the sensor was to light. This wasn't a good solution, although it reduced slightly the noise. The next idea worked slightly better. I suspended the sensor with threads from its four corners and the box was supported from below with a sponge. Funny solution, but it was a small improved.
The simplest way to remove noise is the low-pass filter. It is easy to implement but it is essential to know the characteristics of the noise, like frequency and amplitude. I suggest to use a tool like MatLab toolbox for signal analysis and to implement a high order filter, minimum 10th degree and finite impulse response mode.
I focused more on another filter, the Kalman estimator. This requires some more in depth knowledge from system theory. The Kalman filter works for linear systems, so I had to identify the system and obtain the parameters experimentally. Based on step response and stair response analysis the system proved to be non linear. For a more in depth system identification I analyzed the frequency response with a Bode Plot.
Reference to student paper: Előd Páll, Quadrocopter Control Experimen, 2012 IEEE International Conference on Automation, Quality and Testing, Robotics, Cluj-Napoca, ISBN: 978-973-662-731-6