Monday, March 5, 2012

Current Status from Cody

I'd like to post a project status update. It's been a busy few weeks, and we are finally reaching the point where we are able to write software for the hardware. Luke has been working hard on the PCB that we will use for flight control, and I've been trying to get a handle on the math behind the quadrotor.

Quadrotor dynamics are very complex. It's difficult because you have four motors, all pointed in the same direction, and that's it. But yet the vehicle can move on three axes in translational motion, and can rotate about another three axes. A quadrotor must be able to convert the four motor inputs into a these six different (and often conflicting) motions.

The simplest case is hovering in a single location. Effectively, this means that the translational waxes are ignored. To hover, a quadrotor must produce a total amount of thrust equal to the weight of the vehicle. Using the classic equation

F = ma
we can rewrite it for our vehicle

F1 + F2 + F3 + F4 = mg

This says that the total thrust from the motors (also known as the force of the motors) must be equal to the mass of the vehicle multiplied by the gravity.

The system is complicated by the fact that a quadrotor will need to be able to balance itself in flight. If a gust of wind blows from the side and rolls the quadrotor, it will no longer be a stable hover. The vehicle will need to increase the speed of some motors and decrease the speed of others so that the vehicle is rotated back into a vertical hovering state.

There is still a problem: each motor is producing torque on the body as well as thrust. This is manifested by the motor "attempting" to rotate the body due to the spinning mass of the motor and propeller, and the air resistance the propeller encounters. On a quadrotor frame we have two motors spinning clockwise and two spinning counter clockwise, and the torques cancel each other out. But if a motor speed in increased to account for a tilt, then it's torque on the frame will increase as well, causing the whole body to rotate.

And so now, when a gust of wind blows on the frame, we have to somehow correct the tilt without allowing the torque to yaw the frame. At other times we may want to yaw without tilting, and sometimes we want to do both simultaneously.  But there is so much more beyond just the basic thrust, tilt, and yaw: we have to account for many factors such as free stream velocity (or air, in layman's terms) through the propellers, blade flapping, sensor failure, and the many small equations that support the main equations.

One of the most important things that is required to have a stable platform is to accurately characterize the chosen motor and propeller unit that will be flown. There are two equations that rely on this:



[If your browser is like mine and is messing up the equations, then the first is K_T = T / (rho*n^2*D^4) and the second is K_Q = Q / (rho*n^2*D^5) ]

These two equations relate the motor speed (n) to the thrust (T) or torque (Q). Thrust and torque are proportional to a few constants as well: the rotor diameter D, the density of air rho, and a motor specific constant K. It's this constant K that we need to measure.

The test stand that we are building will be able to not only measure the output torque and thrust of the motor, but also the current consumption, voltage supplied, rotational speed, air density, and temperature of the motor body. These extra statistics will allow us to confirm that the relationship between thrust/torque and rotational speed is indeed exponential, and to allow the system to perform self health checks. For example, if a motor is consuming 30A of current and only moving at 5000RPM, and on the test bench the temperature was 90C, then the system can assume that the motor is likely overheating and take steps to account for it.

Over the past few weeks I've been working every day on this project, with as much as 10 hours a day devoted to it. There are so many different facets to this project that it is exhausting. I have worked on everything from the math, to reviewing the control board, to deciding the best method for writing the code, to designing the thrust/torque test stand, to working on all the project organization components. Luke and I have both been going full throttle on this, and it is exhausting.

The project is going fairly well. It's a bit slow since there is so much involved, but we are definitely getting a very good understanding of the complete system, from electronic components to the high level software. There aren't any major blocks in our path except time. We have so many different facets to focus on that we are constantly busy and working hard.