There’s a particular misconception that I’ve come across a few times now.
People admit they might need help with adjusting their autopilot settings to properly fly their UAV. But if you bring up “aero tuning,” they quickly say that’s unnecessary. They’ve already gone through their design, the aero is just fine.
This shows a well-intentioned misunderstanding of the role that aerodynamics plays in a UAV program. Everyone knows that aerodynamic analysis matters for the initial design: generating enough lift, reducing drag, predicting your performance, all of that. So when someone hears aero tuning, it’s all too easy to think that means refining the design even more, getting the last +4% efficiency through hyper-accurate CFD or something. And it makes sense to reject that. Why would you want to intentionally slow down your small team by tasking them with all that effort?
But that’s not necessarily what aero tuning means. I call the work to get more efficiency and optimization design refinement. Aero tuning, on the other hand, is using the known aerodynamic characteristics of your UAV to help the autopilot figure out how to fly your airplane. And this is a critical step on your way to reliably and safely flying your UAV.
What is an autopilot actually doing?
Most (if not all) of the autopilots available these days function primarily based on rates of motion. They contain a particular kind of accelerometer, called an inertial measurement unit (IMU), that senses the autopilot’s rotation in space and the rate of said rotation. Since the autopilot is installed in the aircraft, that means the IMU is sensing the aircraft’s rotation, velocity, and acceleration in space in all three axes, and determines its response based on the rate of that motion.
For example, let’s say the autopilot feels the aircraft starting to roll to its right, which would be recorded as a positive rate of roll. The autopilot wants to keep the aircraft relatively level in flight so it tries to correct this roll by deflecting the ailerons a few degrees. Maybe the aircraft has pretty small ailerons, so this only brings the roll rate to zero. The autopilot senses the aircraft still isn’t at that initial attitude, so it commands an increasingly large aileron deflection until it gets a negative rate of roll, which brings it back to its original level flight.
I’m not a controls engineer, so I’m a little fuzzy on the specifics, but each control loop has settings that control the behavior of that rate-based response. This includes settings for how much past behavior influences the current response (for example, slowly increasing the response to account for a consistent undershoot), settings for how future errors are predicted and how much they influence the control output, and many others. When someone says they’re tuning an autopilot, or “tuning the gains,” these are the settings being finessed.
To tune these settings, you of course need to try a configuration and see what the resulting flight looks like. You could do this through a number of actual flights with real hardware to gradually narrow in on the right settings. But that requires time, effort, and personnel, and risks the few flight assets you may have.
Or….
You could test and refine the settings in a simulation environment that replicates the aircraft’s flight, saving time and substantially reducing the risk to real aircraft.
Aero feeds simulations feeds control tuning
This is where the aerodynamics come in: the more accurately your sim environment matches real-world behavior, the more trustworthy and defensible your gains settings become.
A sim environment uses the same aerodynamic coefficients that we generate for our design and performance prediction activities. It then plugs these into the equations of motion to “fly” the aircraft in the computer. As a simple example, if you tell the sim your aircraft’s weight and provide its lift coefficient curve, the sim will calculate and use the airspeed required to keep the aircraft in level flight.
The exact information that goes into a simulation environment heavily depends on what autopilot is being used, since most of them have their own sim options. Autopilot software on the level of PX4 often just needs a few key numbers: for example, to capture lift behavior, PX4’s sim might only need the alpha of zero lift, the slope of the lift curve, and the maximum allowable CL.
On the other hand, more complex sims like the one for Applied Navigation’s Quattro autopilot can accept higher-fidelity databases of coefficients. In this case the sim can take a full vector of alpha versus lift coefficient, allowing for more nuanced behavior close to stall, and even account for nonzero beta angles as well.
There are a handful of basic physical models you need for any sim. You need a representation of your vehicle’s aerodynamics in all six forces and moments, which gives you the lift, drag, and rotational moments at any time. You need to provide the effect of control surface deflections on the vehicle’s behavior, like how much the elevator pitches the vehicle up or down as it deflects. And you need a model for how the propulsion system moves the vehicle, at the very least some trend of thrust with throttle setting. There’s a good amount of variation in how you can set these up so I’ll go more in-depth next time.
Even if you only add these foundational aerodynamic models, it should represent your aircraft pretty darn well. You should be able to take care of a lot of your initial tuning in the computer and save real-world flights for when you have more confidence in your controls settings. This alone substantially reduces your risk and helps you prep your aircraft for successful flight faster.
More predictable flight through more detailed modeling
But that’s not where it ends. If you decide to put time and effort into improving your simulation’s fidelity and adding secondary physical effects, you can begin to solve more specific and focused control problems. As an example, accounting for the effect of Reynolds number changes on wing aerodynamics can help refine low-speed control.
I’ve talked about this some before, but as airspeed decreases beyond a certain point, the underlying physics of the airflow starts to vary from what exists at cruise speeds. The biggest change is in lift: your wing generates less lift for every angle of attack, but the stall angle of attack also decreases, which narrows the flyable angle range.
These effects only really matter during aircraft landing or recovery, but adding that extra detail to the landing logic can help. An aircraft I worked on used to have a gentle wing-rocking “waddle” as it came in to land. Adding extra detail to the sim environment and capturing the wing’s Reynolds number effects helped the controls engineers finesse the tuning and remove that behavior. The result was the aircraft maintaining a nice, smooth, level attitude for the full transition to landing. It made operators a little less nervous, and also looked more impressive to observers—definitely a win all around.
Call it self-promotion, but I’d argue this is one of the reasons it’s helpful to have someone on your team who’s good at aerodynamic analysis, but also understands how that analysis fits into the entire UAV development process beyond just the initial design. They know how aero feeds control logic, they can make the aero models, and they can manipulate them to help give the controls engineers an even better stage for their own work.
And in the end, you get better, more predictable flight characteristics with fewer crashed birds. What’s not to love?