Tangent-state linearization
δxk+1=Aδxk+Bδuk A free body's local state error has 12 coordinates.
Raw quaternion subtraction gives the wrong representation.
LQR objective
k∑δxk⊤Qδxk+δuk⊤Rδuk Weights encode units and priorities.
Feedback gain
K=(R+B⊤PB)−1B⊤PA δu=−Kδx The eigenvalues of A−BK provide a local discrete-time check.
Scalar example
xk+1=xk+uk, Q=R=1
P≈1.618, K≈0.618
Closed-loop multiplier: 0.382
Robot examples
Cart-pole upright balance.
Quadrotor hover with scalar-first quaternions.
Large errors and saturation need nonlinear rollout tests.
Trajectory optimization
Shooting optimizes controls through a rollout.
Transcription introduces states and dynamics constraints.
Reading: MIT LQR MIT trajectory optimization