The project was my bachelor's thesis project with the initial goal of controlling a quadcopter to hover. I was warned that it would be hard initially, but I learned a good lesson about the practical aspects of robotics, besides the 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 the biggest bottleneck was, 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 the 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 to it. The preliminary approach and results of my thesis about noise handling are discussed in my student paper at AQTR (pdf link).
The IMU sensor should be for flying vehicles, because in my case, I experienced a huge mechanical noise in the sensor's data. As mentioned in the publication, the sensors use three different measurements from 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 handheld. As soon as the motors of the "drone" were turned on, an immense 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 were spinning at high speed. This measurement noise made it 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 types 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 too light. This wasn't a good solution, although it slightly reduced 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 improvement.
Software filters:
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 using a tool like MatLab toolbox for signal analysis and to implement a high-order filter, a minimum 10th degree and finite impulse response mode.
I focused more on another filter, the Kalman estimator. This requires some more in-depth knowledge of 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 nonlinear. 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
Use-case application of Environmental Constraint Exploitation for robotic surface treatment
Motion Generation With Contact-Based Environmental Constraints (Thesis link)
Human-like grasping from piles leveraging granular Environmental Constraints
Reactive motion planning with contact events
Assistive robotics with POMDP online solver
Inverted rotary pendulum controlled with an optimistic planning algorithm
Vision-based autonomous navigation for railway inspection with a UAV
UAV sensor noises and system identification
Pick and place Matlab application with a Melfa RV-2AJ arm
A Five-bar mechanism with Matlab UI and control for drawing