Geometric control¶
This reference derives geometric position and attitude tracking for an underactuated multirotor: NED/FRD dynamics, desired attitude and derivatives, and the classical physical moment law. Controller-specific interfaces and normalization are covered in the implementation pages.
Frames, rotation, and units¶
The local world frame is NED: North, East, Down. The aircraft body frame is FRD: Forward, Right, Down. Both are right-handed. Position \(x\) and velocity \(v\) are in NED; angular velocity \(\Omega\) is in the current FRD body frame. \(R=[b_1\ b_2\ b_3]\) maps body vectors into NED, so \(b_3=R e_3\) is the current body-down direction in world coordinates. Here \(e_3=(0,0,1)^\top\).
A scalar-first unit quaternion \((w,x,y,z)\) can represent this FRD-to-NED rotation. State arriving from another convention must be transformed explicitly before using these equations; see the hardware frame conversion.
| Symbol | Meaning | Frame / units |
|---|---|---|
| \(x,v\) | Measured position and velocity | NED; m, m/s |
| \(x_d,v_d,a_d,j_d,s_d\) | Desired position through snap | NED; m through m/s⁴ |
| \(\psi_d,\dot\psi_d,\ddot\psi_d\) | Desired yaw and derivatives | About NED down; rad, rad/s, rad/s² |
| \(R,R_d\) | Actual/desired body-to-world rotation | Dimensionless |
| \(\Omega,\Omega_d\) | Actual/desired attitude angular velocity | Current/desired FRD; rad/s |
| \(m,J,g\) | Mass, body inertia, standard gravity | kg, FRD kg·m², 9.80665 m/s² |
| \(A,f,M\) | Force vector, collective thrust, body moment | NED N, scalar N, FRD N·m |
For heading and absolute NED positions in the toolkit, see Trajectories.
Rigid-body model¶
For parallel upward-thrust rotors, neglecting aerodynamic drag and other external forces:
Positive collective thrust \(f\) acts opposite body down. At level hover, \(f=mg\), so acceleration is zero. Rotation follows
The hat map \(z\mapsto\widehat z\) turns a vector into its cross-product matrix: \(\widehat z\,y=z\times y\). Its inverse is the vee map: \((\widehat z)^\vee=z\). For a matrix \(B\) that is only numerically skew-symmetric, apply vee to its skew part \(\tfrac12(B-B^\top)\). The superscript \(^\vee\) below denotes the inverse hat map, not a transpose or exponent.
These are physical dynamics. A normalized PX4 thrust/torque command is not automatically the physical \(f,M\) in these equations; a calibration or adapter connects the two.
Translation and gravity compensation¶
Define tracking errors with measured minus desired sign:
Choose the kinematic acceleration command
then the gravity-compensated force vector
\(a_{\mathrm{cmd}}\) is a kinematic acceleration request in m/s²; \(A\) is a physical force in newtons and points upward at hover. The scalar gains \(k_x\) and \(k_v\) have units N/m and N·s/m. Dividing them by mass gives gains in s⁻² and s⁻¹. The actual native and Offboard translation implementations compute \(B=A/m=a_{\mathrm{cmd}}-ge_3\) directly using these normalized gains; they do not first construct and then divide physical force. The Offboard physical-wrench adapter and physical-force diagnostic multiply by mass only at their respective output boundaries. The acceleration handoff explains which of these quantities PX4 accepts at that interface.
If attitude tracks the desired thrust direction exactly and thrust is feasible, the model gives \(\dot v=a_{\mathrm{cmd}}\). With attitude error or actuator limits, it need not. This difference also matters in analytic feedforward.
Desired attitude from force and heading¶
The desired body-down axis must point opposite the force:
Construct a right-handed orthonormal basis:
\(b_{1c}\) is the horizontal heading used to choose the remaining rotation about the thrust axis. When tilted, \(b_{1d}\) is the compatible body-forward axis rather than an arbitrary independent horizontal vector. The construction is undefined at zero force or when \(b_{3d}\) and \(b_{1c}\) are parallel. Near either singularity, normalization is poorly conditioned. An implementation must detect this; the equations do not supply an alternate heading solution.
Analytic force derivatives¶
Let the smooth reference provide desired jerk \(j_d=x_d^{(3)}\) and snap \(s_d=x_d^{(4)}\). The following analytic force derivatives use model acceleration and jerk, avoiding finite differences of noisy acceleration estimates. They are valid on smooth reference segments; a discontinuous step does not acquire finite classical derivatives at its boundary.
Project onto the current body axis:
Then
For the second derivative, measured body angular velocity gives
and therefore
These expressions use an unconstrained projected thrust model, rather than measured motor thrust or actuator-saturated output. Their accuracy depends on the rigid-body model and state estimate; they do not compensate for propulsion dynamics or saturation.
Differentiate the desired basis¶
Apply the same analytic normalization rule to \(-A\) and to \(b_{3d}\times b_{1c}\). For any vector \(z(t)\) with \(\rho=\|z\|\) and \(n=z/\rho\):
The heading derivatives are
Product rules give the derivatives of \(b_{3d}\times b_{1c}\) and then \(b_{1d}=b_{2d}\times b_{3d}\). For example, a second cross-product derivative includes \(2\dot b_{2d}\times\dot b_{3d}\). Assemble \(\dot R_d\) and \(\ddot R_d\) from those column derivatives.
Desired attitude angular velocity and acceleration are
The omitted \(\dot R_d^\top\dot R_d\) term is symmetric, so it does not contribute to the vee result. \(\Omega_d\) is in the desired body frame; it is not a feedback-corrected rate command. Desired angular velocity requires first force/heading derivatives; desired angular acceleration also requires second derivatives. These formulas need no finite differences.
Rotation errors and feedforward¶
\(R\) and \(R_d\) rotate current and desired body-frame vectors into NED. Define
\(Q\) maps a vector expressed in the desired FRD frame into the current FRD frame. With measured current-body angular velocity \(\Omega\) and desired-body rate \(\Omega_d\):
The rotation error \(e_R\) is a three-vector, not an angle measured in Euler coordinates. The rate error \(e_\Omega\) compares both rates in the same frame. The time derivative of the mapped desired rate gives
This is angular acceleration feedforward in the current body frame (rad/s²). It is the derivative of the desired rate after transport into the moving current-body frame. A cascaded body-rate controller may instead use \(Q\Omega_d\) with attitude feedback; that is a different control boundary.
Classical geometric moment law¶
For the rigid-body model above, the Lee et al. (2010) geometric tracking law is
Here \(J\) is the vehicle inertia about its center of mass in FRD. With radians dimensionless, physical attitude gain \(K_R\) has units N·m and angular-rate gain \(K_\Omega\) has units N·m·s. The result \(M\) is a body moment in N·m. The gyroscopic term compensates rotational coupling, and the final term supplies desired angular-acceleration feedforward. The Offboard physical geometric implementation evaluates this law before adapting the requested wrench. The normalized geometric implementation uses a different rotational law; its dimensionless torque is not \(M\).
As on SO(3) generally, the geometric attitude error has critical rotations near 180°; the law is not globally free of attitude ambiguities. Actuator limits, estimator error, and propulsion-model mismatch are additional practical limitations.
Collective thrust and normalization¶
The physical collective command projects force onto the current thrust axis:
It equals \(\|A\|\) only when the current and desired thrust axes align. A negative projected value is incompatible with an upward-only rotor model. The rigid-body derivation alone does not enforce nonnegative thrust, maximum rotor thrust, or feasible moments.
An actuator/interface mapping must connect physical \(f\) [N] and \(M\) [N·m] to real hardware or a simulator. PX4-normalized thrust and torque are dimensionless interface coordinates. The hover-thrust mapping and the physical-wrench adapter are distinct implementation choices; neither follows automatically from the geometric moment equation.
References and implementation¶
Taeyoung Lee, Melvin Leok, and N. Harris McClamroch, “Geometric tracking control of a quadrotor UAV on SE(3)”, CDC 2010, pp. 5420–5425, DOI: 10.1109/CDC.2010.5717652, provides the geometric error definitions (Eqs. 10–11) and physical moment law. The moment is Eq. (16) in the published CDC paper and Eq. (13) in arXiv v1. The toolkit's NED/FRD signs must be read with the equations above.
The code also identifies FDCL geometric-control commit f5fcb51 for analytic basis/force derivatives. The toolkit's normalized torque law is a separate implementation choice; the original paper does not define PX4's normalized interface.
Implementation: force_dynamics.cpp, attitude_reference.cpp, Offboard SE3, and Onboard SE3.