it uses information from tilt sensors (gyroscope and accelerometer) to adjust the propeller speed based on an equation that models the physical system (inertia, damping, motor dynamics, etc...). This project is aimed at balancing a quadcopter....which will take a lot more time, but I'll keep working on that!

Finding the transfer Function of the motor+propeller is interesting: To find the GAIN (Force Output/ PWM input) of the motor+propeller, I mounted the motor on a 2' stick and set it on a digital scale. I measured the lift force output at different input PWM. The slope of this curve is the gain: = (0.0865N)/(1°PWM). Next I found the dynamics of the motor+propeller (i.e how much time it takes the motor to accelerate up to full speed). I used a high speed camera at 240fps, and gave the motor a step input (a sudden increase in PWM) and turned on a little LED. I looked at the footage and counted the frames between the LED light activation and the propeller getting up to full speed. This is approximately the settling time, which is ~0.3secs. I used matlab to make a first-order TF that has the same gain and acceleration characteristics: 0.0865 / (0.8*s + 1)

I made an Free-body diagram that included the moments of inertia. I could use these equations in Matlab to begin making a P, PI and PID controller.

I used the arduino to measure angle error (accelerometer), and the angular velocity (gyroscope).. It inputs that sensor info, runs it through the equation and outputs the PWM for the motors..... The real P,I,D settings that were optimal were much different than what I calculated in matlab.... anyway I'll post the writeup somewhere.... hopefully I can improve this and start making my own full 6-DOF quadcopter controller!!!

Loading more stuff…

Hmm…it looks like things are taking a while to load. Try again?

Loading videos…