MLTE03 · Week 10 · Lecture + Lab

Team Case Study & Project Kickoff

The complete classical autopilot · launch the final project · 整合與項目啟動

Flight Dynamics & Intelligent Control Technologies
Everything from Weeks 1–9 flies one mission — then we find what it can't do.

Recap → today

Nine weeks, one autopilot

  • Wk 1–4: frames → 6-DOF model → quadrotor mixing → linearization.
  • Wk 5–7: attitude → position/altitude → LQR — it flies.
  • Wk 8–9: estimate the state; track trajectories under wind.
  • Today: assemble it all into one mission, then break it.
You have built, across Labs 1–6, a complete cascade autopilot that flies from an estimated state. The team case study is the capstone: fly a full mission and measure how well.

Today's goals

By the end of today you can…

  • Run the complete autopilot on a full mission (take-off → waypoints → land) from estimated state, under wind.
  • Quantify baseline performance: tracking RMSE, max tilt, and motor saturation.
  • Identify a concrete limitation of the classical controller — the gap your project will close.
  • Lab Submit the team case study (capstone) and choose your final-project mission.

The whole picture

The complete control stack

   mission ─►┌───────────┐  pos,yaw  ┌──────────────┐  φ_d,θ_d,T ┌─────────────┐ τ ┌────────┐
  (traj)     │ guidance  ├──────────►│ OUTER position├──────────►│ INNER attitude├──►│ mixer  ├─► motors
             └───────────┘           └──────────────┘           └─────────────┘   └────────┘
                                            ▲ x̂  (pos,vel,att)         ▲ x̂ (att,rates)
                                            └──────────┬───────────────┘
                                   ┌────────────────────────────┐  noisy IMU + GPS
                                   │  INSGPS: comp.filter + KF   │◄──── sensors ◄── plant
                                   └────────────────────────────┘
  

Guidance (Wk 9) → position loop (Wk 6) → attitude loop (Wk 5) → mixer (Wk 3), all closed on the estimate (Wk 8). LQR (Wk 7) is the optimal alternative to the inner/outer PD gains.

Team case study

Fly the full mission, on the estimate

from quadsim import Simulator, QuadParams
from quadsim.controllers import CascadePID
from quadsim.estimators import EstimatedStateController
from quadsim.dynamics import hover_state
from quadsim import trajectories as traj
import numpy as np

p = QuadParams(); sim = Simulator(p)
ctrl = EstimatedStateController(CascadePID(p), p)        # full stack, on x̂
mission = traj.waypoints([(0,0,1),(2,0,1.5),(2,2,1.5),(0,2,1),(0,0,1)])
log = sim.run(hover_state(position=(0,0,1.0)), ctrl, reference=mission,
              t_final=30.0, wind=lambda t: np.array([2.5, 0.0, 0.0]))   # strong gust
print("mission RMSE:", round(log.position_rmse(), 3), "m")   # ~1.3 m — it struggles

Then render the 3-D strobe and tracking error: plotting.plot_pose_strobe(log), plot_tracking_error(log).

Engineering judgment

Measure — don't eyeball

  • Tracking RMSE \( \sqrt{\tfrac1N\sum\lVert \mathbf p-\mathbf p_{\text{ref}}\rVert^2} \) — overall accuracy.
  • Max tilt \( \max\sqrt{\phi^2+\theta^2} \) — did it hit the 30° safety clamp?
  • Motor saturation — fraction of steps with \( f_i=f_{\max} \) (check log.f).
  • Steady-state drift under wind — where the fixed-gain controller leaks.
These four numbers are your baseline. The final project must beat one of them with an intelligent method — so measure them honestly now.

The kickoff

Where classical control runs out

  • Disturbance: fixed-gain PID/LQR drifts under sustained wind or a payload change — no adaptation.
  • Constraints: it doesn't plan around tilt/thrust limits — it just saturates and loses authority.
  • Aggression: on fast trajectories, feedback lags; no look-ahead.
Each gap maps to a method in Weeks 11–14: MPC plans around constraints & previews the path; RL learns a policy and can be made robust by domain randomization. Pick the gap that bugs you most.

40% of the grade

The final project

Brief. Improve the classical baseline on one mission with one intelligent method (MPC or RL), and show it beats the baseline on a metric (tracking, disturbance rejection, or constraint satisfaction).
Deliverables. Working code in quadsim · a research-style report · an in-class presentation · a live demo of it flying. Graded primarily on the working controller.
  • Proposal today: your mission + the baseline limitation + the method you'll try.
  • Wks 11–14 give you the tools; Wk 15 is the presentation & demo.

Second half · hands-on

Capstone lab + proposal

  • Fly the full mission on the estimate under wind; collect the four baseline metrics.
  • Write the team case study (the capstone) — your accumulated autopilot, with plots.
  • Draft your final-project proposal: mission + limitation + intended method.
  • Deliverable: the team case study (integrating the six labs) + a one-page proposal. ⭐ graded.

Open the Week 10 lab sheet →

Wrap-up

What to remember

  • The flight-dynamics half is one autopilot: guidance → position → attitude → mixer, on the estimate.
  • Assess it with numbers: RMSE, max tilt, saturation, drift — that's your baseline.
  • The limitation you find is the seed of your final project.
  • Next week: Model Predictive Control — plan around constraints and preview the path.

Refs: the six labs · final-project brief · case-study brief · CONVENTIONS.md.