The aircraft's short-period pitch dynamics are integrated from a linearized 2-state model in angle of attack α and pitch rate q (all angles in radians internally):
α̇ = q − Ẑα·α
q̇ = M̂α·α + M̂q·q + M̂δe·δe
θ̇ = q
The aerodynamic derivatives M̂α, M̂q, Ẑα (stability/damping) and M̂δe (elevator control power) all scale with dynamic pressure, Q = ½ρ(h)V², normalized to a reference condition as Q̂ = Q/Qref — using an exponential atmosphere ρ(h) = ρ₀·e−h/8500m:
M̂α = M̂α0·Q̂ M̂q = M̂q0·Q̂ M̂δe = M̂δe0·Q̂ Ẑα = Ẑα0·Q̂
A pitch-attitude-hold autopilot commands the elevator as δe = Kp·(θcmd − θ) − Kd·q. Because the plant's control power M̂δe grows linearly with Q̂, a fixed Kp, Kd tuned at the reference condition (Q̂ = 1) produces a loop gain that scales with Q̂ too — at high speed / low altitude (large Q̂) the loop over-amplifies and the pitch response overshoots and oscillates; at low speed / high altitude (small Q̂) the same gains barely move the elevator and the response goes sluggish.
Gain scheduling cancels this by dividing the gains by the measured Q̂: Kp = Kp0/Q̂, Kd = Kd0/Q̂, so the loop gain Kp·M̂δe = Kp0·M̂δe0 stays constant across the whole flight envelope — the classic dynamic-pressure gain-scheduling design used on real fly-by-wire pitch autopilots.
This 2D companion runs both controllers side by side on identical copies of the aircraft, fed the same commanded pitch and flight condition, so the divergence is visible directly instead of requiring a toggle: the strip chart plots both pitch traces against the commanded pitch, and the two side-view silhouettes pitch independently.
- Commanded pitch — the attitude setpoint θcmd both autopilots try to hold.
- Airspeed / Altitude — set the flight condition; together they determine Q̂ and hence how badly the fixed-gain controller mistunes itself.
- Reset both attitudes — zeroes α, q, θ for both aircraft without changing the flight condition.