How I Developed the Scout Flight Controller, Part 1: Quadcopter Flight Dynamics

Tim Hanewich
4 min readJul 24, 2023

--

This article is part of a series documenting the development of a custom quadcopter flight controller from scratch. For a list of the other related articles, please refer to the introductory article found here.

As mentioned in the introduction to the Scout Flight Controller, a flight controller plays a vital role in the operation of any multicopter drone. Serving as the “brain” of a quadcopter, the flight controller performs rapid mid-flight adjustments to the thrust of each motor, ensuring stable flight while responding to the pilot’s inputs.

Fixed-Wing Aviation

In traditional fixed-wing aviation, airplanes benefit from passive aerodynamics. The presence of aerodynamic elements such as wings, ailerons, flaps, elevators, stabilizers, and rudders allows airplanes to maintain stable flight. Pilots can alter the flight trajectory or attitude of the aircraft by adjusting the angles of these elements. The airflow over these elements generates lift, enabling the aircraft to maintain stable flight.

Airplanes use aerodynamic elements to control airflow

Quadcopter Aviation

However, the principles of fixed-wing aviation do not apply to quadcopters, as they lack any inherent aerodynamic elements. Unlike airplanes, quadcopters solely rely on the thrust generated by multiple motors to stay airborne. Specifically, a quadcopter controls its attitude by adjusting the thrust levels of its four motors, as depicted below:

Quadcopters control attitude by varying the thrust applied to each motor

By using the flight dynamics illustrated above, the quadcopter can control its pitch, roll, and yaw.

At first glance, it might seem intuitive to program a flight controller based on these basic principles. For example, if the pilot wants to pitch forward, the thrust on the front two motors should be decreased while increasing the thrust on the back two motors. Similarly, rolling to the right would involve increasing the thrust on the left motors and decreasing it on the right motors. If you’re anything like me when I embarked on this project, this approach may appear to be a sufficient solution. However, this would be a mistake.

Although it may seem that applying equal thrust to all four motors would result in stable, level flight, this assumption is far from accurate. Even the slightest misalignment in weight distribution, wind conditions, or motor speeds can introduce chaotic instability. Moreover, despite using identical make and model motors, minute differences in each unit’s build will result in slightly varied thrust levels. These slight discrepancies would lead to highly unstable flight conditions.

Unfortunately, quadcopters are inherently unstable for these reasons. They constantly need to balance the thrust among all four motors, finding the perfect mixture to achieve the desired attitude set by the pilot. In this context, “constantly” means numerous adjustments per second. Many off-the-shelf flight controllers perform these mid-flight adjustments at an astonishing rate of several thousand times per second! In my case, I have programmed the Scout Flight Controller to execute this adjustment loop at a frequency of 250 hertz, corresponding to 250 adjustments per second.

In other words, a quadcopter flight controller constantly compares the desired attitude of the pilot against the actual attitude of the vehicle. In uses methods we will get into later in this series to determine what level of thrust to apply to each motor to meet the desires of the pilot, and it does so at rapid speeds (250 times per second in Scout’s case).

This system — the flight controller — is what I’ve developed from scratch.

Flight Control Modes

Quadcopter flight controllers primarily operate in one of two distinct “flight modes”:

The first mode is known as angle mode. In this mode, when the pilot releases the attitude stick, the quadcopter automatically maintains a parallel orientation to the ground, with a 0 degree pitch and roll angle. Pushing the stick all the way forward will cause the quadcopter to pitch forward until it reaches the maximum allowable attitude angle. The quadcopter will retain this position until the pilot adjusts the input again.

The second mode is rate mode, also referred to as acro mode or gyro mode. This mode represents a more advanced form of flight. In rate mode, the quadcopter does not measure its precise angle in relation to the ground. Instead, it focuses solely on tracking the rate of rotation in each of the three axes and compares it to the pilot’s desired rate of rotation in those same axes. For example, pushing the stick forward prompts the quadcopter to pitch forward continuously until the pilot releases the stick, at which point the quadcopter seeks to maintain its existing attitude. Unless there is a deliberate change in attitude by the pilot, the quadcopter will retain the attitude previously set by the pilot. This means that if the pilot desires a level orientation, they need to manually readjust the quadcopter — it will not automatically level itself. While rate mode presents a more challenging control scheme, it enables higher performance, greater maneuverability, and is exclusively used in FPV drone racing.

The Scout Flight Controller implements the rate mode functionality.

Next Chapter

We have now gained an understanding of how a quadcopter flight controller achieves the desired attitude by continually comparing the quadcopter’s actual attitude with the desired attitude, making rapid adjustments to the thrust of each motor to attain the desired attitude or rate of attitude change.

Now, let’s explore how the quadcopter monitors its attitude and rate of attitude change, which brings us to the essential role of the gyroscope. Continue reading in the next chapter here!

--

--

Tim Hanewich
Tim Hanewich

Written by Tim Hanewich

Technical Specialist @ Microsoft

No responses yet