Sort by

### Building a model of an RC helicopter

I've spent the last few years as an undergrad at MIT working on human factors issues related to quadrotors and their operators. Since this project wasn't about controls or vehicle development, we purchased aircraft from UAV vendors. The experience was less than ideal. In particular, the cost of the vehicles was about \$6k, which given the components,

just seemed outrageous when an RC helicopter can get down to \$50. In light of how wonderfully unregulated the world of amateur UAV work is compared to industry or academia, I have been thinking about what it would take to do better myself. In particular, our human factors research indicated that systems with a human in the loop didn't need to be nearly as stable and precise in their movements as we had thought. So with this is in mind, I started to design a vehicle.

To be honest, controllers are kinda magical to me. I had to learn some basics when I took 6.01 at MIT, but I was overjoyed when that unit ended. Three years have since passed, and I now only have vague memories of something about poles, a letter 's', and graphs of underdamped oscillatory systems.

So I am starting an experiment. I have an RC helicopter, barely enough skill to keep it from crashing, Matlab, and a pile of Arduino and RC-related electronics. My first goal will be to give myself automated height control of the vehicle.

(Please note: as someone without a controls or aeroastro bone in my body, if I'm doing this hilariously wrong, please let me know.)

My strategy looks like this:

1. Attach an Arduino, ArduIMU, and RC receiver together on the aircraft.
2. Code up an integrator loop running on the ArduIMU to provide a dead reckoning estimate of Z motion.
3. Log a timestamped series of readings matching the aircraft height to throttle inputs.
4. Apply Matlab and rub vigorously.
5. Repeat step 4 every few days until satisfied.

Step 4 and 5 really mean this: develop a model of the aircraft behavior that matches the real world. I'm assuming that the vehicle is a point mass with two forces acting on it, gravity and thrust. If this really is the case, then given a functional relationship between the RC throttle command and thrust, I can sum the forces, use Newton's first law, integrate the acceleration, and provide a model of the expected Z behavior. Since I have the logged Z behavior to compare it to, I can see whether my predicted behavior matches the real behavior of the vehicle. In a picture:

If the model matches the real work reasonably well, then there is cake! If it doesn't, then I go back to my Matlab pit of despair and see what I did wrong. Once I have this model, then I can do something scary like design a controller. Which might look like this:

At least two demons lurk in these diagrams: delays and linearity. I would be thrilled to discover that there is insignificant lag in the forward portion of this controller and the thrust is a linear function of some maximum thrust value. I suspect that these assumptions will be mostly, but not completely, true. Fortunately, they may be good enough that I am satisfied with the results, and I don't need to mess with it any further.

My parts are ordered, I have a trip to take this weekend, and then I will be back on spring break to see how well it works!