gwordal

Lesson 1 of 5 · 20 min

How a quadcopter flies

A quadcopter has no wings, no rudder and no flaps. Everything it does, climbing, tilting, turning, hovering, comes from one thing: changing the speed of four motors. Once you see how those four speeds combine, the rest of drone engineering (sensors, control loops, flight controllers) is just a way to choose the right four numbers a few hundred times per second.

Thrust against weight

Gravity pulls the drone down with a force equal to its weight, W = m * g. For a 1.2 kg drone:

W = 1.2 kg * 9.81 m/s^2 = 11.77 N

To hover, the four propellers must together push up with exactly that force. Split evenly, each motor provides:

T_motor = 11.77 N / 4 = 2.94 N, which is about 300 g of thrust (1 gram-force is 0.00981 N).

If total thrust is bigger than weight, the drone climbs. If smaller, it sinks. That single balance is how you control altitude: throttle moves all four motors together.

Thrust itself grows with the square of rotor speed: T = kT * w^2, where w is rotation speed and kT is a constant that depends on the propeller. Doubling the speed gives four times the thrust. You will use this fact in lesson 2 to estimate hover throttle.

Why the motors spin in alternating directions

A spinning propeller pushes air one way, so the air pushes back on the propeller. Besides lift, there is a twisting reaction, a torque Q = kQ * w^2, that tries to rotate the whole frame the opposite way. A helicopter fixes this with a tail rotor. A quadcopter fixes it with symmetry:

  • two diagonal motors spin clockwise (CW)
  • the other two diagonal motors spin counter-clockwise (CCW)

At equal speeds the CW torques and the CCW torques are equal and opposite, so the net twist on the frame is zero. The drone does not spin on its own. The propellers are different too: a CW motor needs a propeller with the opposite blade angle to a CCW motor, otherwise it would push air upward the wrong way.

Roll, pitch and yaw by differential thrust

Instead of moving surfaces, the drone tilts by making some motors push harder than others.

  • Roll (tilt left or right): speed up the motors on one side, slow down the other side.
  • Pitch (nose up or down): speed up the front pair, slow down the rear pair.
  • Yaw (turn on the spot): speed up one diagonal pair and slow down the other pair. Total thrust stays constant, but the unbalanced reaction torques turn the frame.

Tilting is also how the drone moves sideways. If the frame leans forward, part of the thrust points forward and the drone accelerates that way, which is why every position controller is built on top of an attitude controller.

For an X frame with Betaflight-style numbering, the table shows the sign each command has on each motor. Positive roll means right side down, positive pitch means nose up, positive yaw means a clockwise turn seen from above. A CCW propeller pushes its reaction torque on the frame clockwise, so speeding up CCW motors turns the drone clockwise.

MotorPositionSpinRollPitchYaw
M0front rightCCW-1+1+1
M1rear rightCW-1-1-1
M2rear leftCCW+1-1+1
M3front leftCW+1+1-1

Each column sums to zero, so roll, pitch and yaw commands never change the total thrust. Only the throttle does.

Drag to orbit
Drag the roll, pitch and throttle sliders and watch which motors would speed up.

X or plus

On a plus frame the motors sit on the axes: one in front, one behind, one left, one right. Pitch uses only the front and rear motors, roll uses only the left and right motors. On an X frame the motors sit on the diagonals and every motor takes part in every axis.

Why is X more popular? Take a 450 mm frame, so each motor is 225 mm from the centre. Change each active motor's thrust by dT to roll the drone:

  • Plus: two motors, each at an arm of 0.225 m. Torque = 2 * 0.225 * dT = 0.45 * dT.
  • X: four motors, each at an arm of 0.225 * sin(45 deg) = 0.159 m. Torque = 4 * 0.159 * dT = 0.64 * dT.

The X layout gives 0.64 / 0.45 = 1.41 times more roll torque for the same per-motor change, and it also leaves the front free for a camera. Plus frames are simpler to reason about and still common on research platforms.

Notice also how weak yaw is. The twisting torque per newton of thrust is small: for typical small props kQ / kT is around 0.016 m. At 2.94 N, one motor's reaction torque is 0.016 * 2.94 = 0.047 N*m, about ten times smaller than the roll lever arm provides. This is why yaw on a quadcopter always feels slower than roll and pitch.

The mixer in code

A mixer converts four commands (throttle, roll, pitch, yaw) into four motor outputs. All values are normalised, throttle from 0 to 1, the others from -1 to 1.

// Motor order: 0 front-right (CCW), 1 rear-right (CW),
//              2 rear-left (CCW),   3 front-left (CW)
const float ROLL_SIGN[4]  = { -1, -1, +1, +1 };
const float PITCH_SIGN[4] = { +1, -1, -1, +1 };
const float YAW_SIGN[4]   = { +1, -1, +1, -1 };

void mix(float throttle, float roll, float pitch, float yaw, float out[4]) {
  for (int i = 0; i < 4; i++) {
    float m = throttle
            + roll  * ROLL_SIGN[i]
            + pitch * PITCH_SIGN[i]
            + yaw   * YAW_SIGN[i];
    out[i] = constrain(m, 0.0, 1.0);   // a motor cannot go below 0 or above 1
  }
}

void setup() {
  Serial.begin(115200);
  float out[4];
  mix(0.5, 0.1, 0.0, 0.0, out);        // hover throttle, roll right a little
  for (int i = 0; i < 4; i++) Serial.println(out[i]);
}

void loop() {}

The same idea in Python, plus the hover calculation from the start of this lesson:

G = 9.81
mass = 1.2                      # kg
weight = mass * G               # N
per_motor = weight / 4
print(f"weight {weight:.2f} N, per motor {per_motor:.2f} N")

ROLL  = (-1, -1, +1, +1)
PITCH = (+1, -1, -1, +1)
YAW   = (+1, -1, +1, -1)

def mix(throttle, roll, pitch, yaw):
    out = []
    for r, p, y in zip(ROLL, PITCH, YAW):
        m = throttle + roll * r + pitch * p + yaw * y
        out.append(min(1.0, max(0.0, m)))
    return out

print(mix(0.5, 0.1, 0.0, 0.0))   # right motors 0.4, left motors 0.6
print(mix(0.5, 0.0, 0.0, 0.05))  # CCW motors 0.55, CW motors 0.45

With roll 0.1, the right motors drop to 0.4 and the left motors rise to 0.6. The sum is still 4 * 0.5 = 2.0, so the drone keeps its altitude while it leans to the right.

Check yourself

Why does a quadcopter use two CW and two CCW propellers?

Check yourself

A 1.5 kg drone must hover. About how much thrust must each of the four motors produce?