Primers · Math

Flying on the Sphere

On October 14, 2026, the account Mathematica (@mathemetica) posted a one page poster titled “Quadrotor Control Dynamics” that compresses an entire research field into four blocks of equations: how a quadcopter, a machine with four spinning rotors and six ways to move, is steered by mathematics that refuses to describe its orientation with ordinary angles. The poster is the geometric control framework of Taeyoung Lee, Melvin Leok, and N. Harris McClamroch, published in 2010, and its closing line is the whole thesis: the mathematics does not approximate the sphere; it works on the sphere itself. This primer rebuilds that framework live, so you can tip the drone over yourself and watch the controller’s error signal behave in ways no angle ever would.

Researched October 2026  ·  MathEngineering
A quadcopter drone drawn in ink, tilted steeply as it recovers from being upside down, with a large circle and a trajectory arc behind it

The brief

A quadrotor has four inputs, the thrusts of its four rotors, and six freedoms: three of position and three of orientation. It cannot push itself sideways; to move sideways it must tilt, so position and orientation are one coupled problem, not two. Orientation is where the trouble lives. A drone’s attitude is a rotation, and the set of all rotations, the special orthogonal group (SO(3)), is a curved space, topologically a sphere with its antipodes glued. Every flat description of it tears somewhere: Euler angles hit gimbal lock, where two of the three angles stop being separately defined, and quaternions cover the space twice, which lets a controller unwind, rotating a full extra turn to fix a small error. In 2000, Sanjay Bhat and Dennis Bernstein proved this is not a failure of cleverness: no smooth, continuous feedback law can stabilize attitude globally on SO(3), because the space itself forbids it. The geometric answer is to stop flattening. Define the model, the errors, and the control law directly with the rotation matrix, on the manifold itself, and accept the strongest result topology allows: attraction from every attitude except a set of measure zero. The sentence to remember: do not flatten the sphere and then steer; steer on the sphere.

Figure 1: tip it over

The controller never sees an angle. It sees two quantities built from the rotation matrices, defined in the equations below: the attitude error vector eR, whose length is the sine of the tilt angle, and the error energy Ψ (psi), which is 1 minus the cosine. Tip the drone and watch them disagree. The pull the controller feels, eR, grows to 90 degrees and then fades, reaching exactly zero upside down, even as the error energy peaks. That dead point is not a bug in this controller; Bhat and Bernstein’s theorem says every smooth controller has one somewhere.

The attitude lab: one tilt, two error signals
Tilt from upright
Red curve Ψ, the error energy, 0 to 2Gray curve |eR|, the pull, 0 to 1

The recovery button runs the real moment law, reduced to this one tilt axis and integrated live: the moment is minus a gain times eR, minus a gain times the angular velocity error, exactly the spring and damper structure of the full law in the equations below. Gains are the ones George Washington University’s Flight Dynamics and Control Laboratory (FDCL) publishes for its 1.5 kilogram quadrotor; the inertia is illustrative. Park the drone at exactly 180 degrees and Recover does nothing at all, which is the theorem making itself visible.

The equations

First in words: the drone is a rigid body. Its position moves with its velocity; its velocity is pushed by gravity and by one thrust force that always points along the body’s own up axis, because the rotors are bolted to the frame; its orientation evolves by rotating with its angular velocity; and its angular velocity obeys the Euler equation of rigid body motion, driven by one moment vector. Then the real thing, with the posture written as a rotation matrix R whose columns are the body axes seen from the world:

$$\dot{x} = v, \qquad m\,\dot{v} = \tau R e_3 - m g e_3, \qquad \dot{R} = R\hat{\Omega}, \qquad J\dot{\Omega} + \Omega \times J\Omega = M$$
x position, v velocitym massτ total rotor thrust, a scalarR rotation matrix, body to worlde₃ the up axis (0, 0, 1)g gravity, 9.81 m/s²Ω angular velocity, written in the body frameΩ̂ the hat map: the skew matrix with Ω̂ y = Ω × y for every yJ inertia matrixM moment vector from the rotors

The poster that prompted this primer draws its third axis pointing down, which flips the signs of the gravity and thrust terms; the physics is identical. Nothing here is an approximation of the sphere: R is the attitude, all nine numbers of it, constrained to stay a rotation. The configuration space, position plus attitude, is the special Euclidean group (SE(3)), and the model lives on it globally, with no chart and no singularity.

The errors are built from the matrices themselves. Compare the current attitude R with the commanded attitude RC by forming RC transposed times R, take its skew symmetric part, and read off a vector with the vee map, the inverse of the hat map:

$$e_R = \tfrac{1}{2}\big(R_C^{\mathsf{T}} R - R^{\mathsf{T}} R_C\big)^{\vee}, \qquad \Psi = \tfrac{1}{2}\,\mathrm{tr}\big(I - R_C^{\mathsf{T}} R\big), \qquad e_\Omega = \Omega - R^{\mathsf{T}} R_C\, \Omega_C$$
eR attitude error vectorRC commanded attitude, ΩC its angular velocityΨ error energy, 0 when aligned, 2 when exactly upside downtr trace, the sum of the diagonalI the identity matrixeΩ angular velocity error∨ the vee map, inverse of the hat map

Check it on one axis: tilt the drone 30 degrees from a level command. Then eR is the sine of the tilt about that axis, (0.500, 0, 0) for a roll, and Ψ is 1 minus the cosine, 0.134. No angles were consulted to get either number, and both are exactly what Figure 1 plots.

The control law comes in two coupled loops. The position loop computes the force it wishes physics would apply, using the position error ex = x − xd and velocity error ev; the component of that force along the body’s up axis is what the rotors can actually deliver right now, so it sets the thrust. The attitude loop builds a moment that first cancels the gyroscopic term Ω × JΩ and the transport terms from the moving command, then applies a spring and a damper to the geometric errors:

$$F = -k_x e_x - k_v e_v + m g e_3 + m \ddot{x}_d, \qquad \tau = F \cdot R e_3$$ $$M = -k_R\, e_R - k_\Omega\, e_\Omega + \Omega \times J\Omega - J\big(\hat{\Omega}\, R^{\mathsf{T}} R_C\, \Omega_C - R^{\mathsf{T}} R_C\, \hat{\Omega}_C\big)$$
F the force the position loop wantskx, kv position and velocity gainsxd desired position, dots are time derivativeskR, kΩ attitude and angular velocity gainsthe first two terms of M are the spring and damper; the rest is exact cancellation of the rigid body’s own gyroscopic coupling

Finally, thrust and moment are wishes; the rotors are the reality. One constant matrix, the allocation matrix, converts between the four rotor forces and the four wishes. Here it is exactly as the poster prints it:

$$\begin{bmatrix} \tau \\ M_1 \\ M_2 \\ M_3 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 1 & 1 \\ 0 & -d & 0 & d \\ d & 0 & -d & 0 \\ -c & c & -c & c \end{bmatrix} \begin{bmatrix} f_1 \\ f_2 \\ f_3 \\ f_4 \end{bmatrix}$$
f₁ to f₄ the four rotor thrustsd the arm length, center to rotorc the reaction torque coefficient: a spinning rotor drags the frame the other way, which is where yaw comes fromread it by rows: thrust is the sum; roll and pitch are differences across the frame; yaw is the difference between the two diagonal pairs

The matrix is invertible, so the controller runs it backwards: given the thrust and moment it wants, it solves for the four rotor forces, and each force is produced by spinning that rotor at the square root of force over its thrust coefficient. Four motors, four wishes, one linear solve, every control cycle.

How it works

Figure 2: one control cycle, end to end

The worked example, with the FDCL laboratory’s published gains for its 1.5 kilogram quadrotor (mass 1.5, position gain 7.0, velocity gain 3.0, attitude gain 0.55). The drone hangs level, 0.3 meters to one side of its target and 0.2 meters above it, at rest. Tap through one pass of the loop.

Sense, want, tilt, spring, split

Figure 3: the allocation lab

The allocation matrix, playable. Set the four rotor thrusts and read off the thrust and moments they produce, for the same 1.5 kilogram machine (hover needs 3.68 newtons per rotor, since its weight is 14.7 newtons). The arm length d is 0.25 meters and the reaction coefficient c is 0.02; those two are illustrative airframe numbers, labeled as such. Rotor positions match the matrix: f₁ right, f₂ rear, f₃ left, f₄ front, viewed from above.

Four rotor forces in, thrust and moments out
b₂ front b₁ f₄3.68 N f₁3.68 N f₂3.68 N f₃3.68 N
f₁, right rotor
f₂, rear rotor
f₃, left rotor
f₄, front rotor

Notice what the presets prove: roll and pitch keep total thrust at exactly the hover value while producing a pure moment, and yaw produces its moment with no roll or pitch at all, paid for entirely by reaction torque, the c row. The matrix is the whole mixer; production autopilots generalize the same idea into an effectiveness matrix per airframe.

Timeline

Tap the card, swipe, or use the arrows.

Key voices

Where leaders think this goes

Positions as of October 2026, each attributed to its source.

Where they agree

Where they split

Takeaways

A quadcopter is steered by four numbers and understood on a curved space. The geometric controllers that define the field never flatten attitude into three angles: they build errors, thrust, and moments out of the rotation matrix itself, pay for it with one unavoidable upside down equilibrium, and in exchange recover cleanly from attitudes that break chart based controllers. The live arguments have moved on to planning, switching, and learning; nobody is arguing about whether the sphere is real.

Keep exploring

Sources

    Built from @mathemetica’s poster post and the primary literature it summarizes; the poster is a summary, so the 2010 Conference on Decision and Control paper and its arXiv companion are the sources of record for the framework. Sign conventions: the poster draws its third axis pointing down, this page uses the up axis, which flips the signs of the gravity and thrust terms only. Mass and gains in the worked examples are the FDCL laboratory’s published values for its 1.5 kilogram quadrotor (its open source parameter file); the arm length d = 0.25 meters and reaction coefficient c = 0.02 in Figure 3 are illustrative airframe numbers and are labeled as such wherever they appear. Figure 1 integrates the real moment law reduced to a single tilt axis, with an illustrative inertia of 0.02 kg m²; the full law acts on all three axes at once. The 2010 paper’s page range is cited as 5420 to 5425 in most references; Leok’s own bibliography lists 5420 to 5426. PX4 details are from PX4’s public documentation and source as of October 2026.