Optimal Control + State Estimation

Aerial Control Lab

Nonlinear quadcopter dynamics, LQR hover control, and Kalman fusion in one polished sandbox.

Aerial Control Lab
Blue-gold quadcopter controls studio
LQR Kalman 6-DOF
Simulation View

Hover Recovery With Live Estimation

Blue frame = true vehicle, gold ghost = estimated state, gold reticle = target. Insets show top-down and elevation views.

Stabilizing
Control Deck
Telemetry
Position Error 0.00 m
Attitude Error 0.0 deg
Wind Force 0.0 N
Settling Hint Recovering
Controller LQR
Route Mode Off
Settling Time Tracking...

How long it took this recovery window to get back inside the hover band.

Peak Error 0.00 m

Largest position miss during the current recovery or route segment.

Estimate RMS 0.00 m

Average gap between the true vehicle and the Kalman state estimate.

Effort Peak 0.00

Largest control burst used to recover, useful for LQR vs PID comparison.

Last LQR Run

Run the guided demo to capture a clean LQR recovery sample.

Last PID Run

Switch to PID or use the guided demo to generate a baseline.

Comparison Verdict

Capture both an LQR run and a PID run to generate a direct recovery comparison.

Motor Command
Estimated vs True Error
Control Effort
Altitude / Route Progress
Guided Demo + Notes
Guided Demo Ready

Start the controls walkthrough

This guided run stages a clean comparison sequence: LQR recovery, disturbance rejection, PID baseline behavior, then route tracking.

Shortcuts
R Reset G Gust M Mode T Target O Route Space Pause D Demo E Export

The true dynamics are integrated nonlinearly with quaternions, while the controller and estimator operate on a hover linearization. That separation keeps the physics expressive while letting you feel how optimal control and state estimation work in practice.

  • Rotor mixer with saturation and realized torque reconstruction
  • Optional PID baseline for side-by-side controller feel
  • Motor spool lag and route playback for less toy-like behavior
  • Live Q/R tuning for controller and filter behavior
  • Noisy sensor fusion for position, attitude, and angular-rate estimates
What to notice

LQR should usually settle faster with a smoother effort story because it is optimizing a full state-error cost. PID is a strong baseline, but it reacts more locally and tends to overshoot or work harder when the same gust hits.