Phase 09 · 21 lessons
Signals, Systems & Control
A first course in signals and systems and a first and second course in automatic control, at the level of MIT 6.003, 16.06 and 16.30/16.31, taught through aerospace control loops and organised around one idea: model, analyse, design, verify. Every lesson writes the plant model with its assumptions, analyses it in the time domain and the frequency domain, designs something, and checks every main result by an independent route. The checks include convolution against FFT multiplication, a reduced transfer function against a simulation of the unreduced block diagram, a Bode plot against the steady state of a simulated sine test, and an aliasing prediction against the FFT of a sampled tone. Root-locus points must satisfy the angle condition, Nyquist encirclements must agree with the closed-loop poles, and a Riccati solution must agree with scipy.linalg.solve_continuous_are and with its own residual. A describing-function prediction is compared with a simulated limit cycle, unconstrained MPC with the Riccati recursion, and in lesson 21 an identified model against your own closed-loop measurement.
Lessons
- P09.01computational Signals & Systems Build it: Signal toolkit (elementary signals, energy and power, even/odd parts, time shift and scale; tests for linearity, time invariance, causality, memory and BIBO stability)
- P09.02computational Convolution & Impulse Response Build it: Discrete convolution from scratch (direct sum against FFT; continuous convolution by Riemann sum; an RC IMU front end and a first-order servo)
- P09.03computational Transfer Functions & Block Diagrams Build it: Block diagram reducer (series, parallel, feedback; poles, zeros, DC gain; a pitch-attitude loop by hand and by code)
- P09.04computational Time Response & Poles Build it: Step response analyzer (rise, peak, overshoot, settling; ζ–ω_n formulas; dominant poles; the effect of a zero; partial fractions)
- P09.05computational Frequency Response & Bode Plots Build it: Bode plotter from scratch (exact and asymptotic, unwrapped phase; checked against a simulated sine test)
- P09.06computational Sampling & Aliasing Build it: Anti-aliasing filter design (alias calculator, Butterworth prototype, order selection for an IMU vibration line, sinc reconstruction)
- P09.07computational Digital Filters Build it: FIR and IIR from scratch (windowed sinc, moving average, prewarped bilinear IIR, difference equations)
- P09.08computational Feedback & Steady-State Error Build it: Cruise controller (airspeed hold: system type, error constants, disturbance rejection, S and T)
- P09.09computational Root Locus Build it: Root locus plotter (asymptotes, breakaway, jω crossings by Routh; gain for a damping target on an altitude hold)
- P09.10computational Nyquist & Stability Margins Build it: Nyquist plotter and margins (indented contour, winding number, Z = N + P; gain, phase and delay margins)
- P09.11computational PID Design & Tuning Build it: Pitch-attitude PID with anti-windup (derivative filter, saturation, clamping and back-calculation; Ziegler–Nichols and pole placement)
- P09.12computational Lead-Lag Compensation Build it: Loop shaping a servo (lead for phase margin at a target crossover, lag for steady-state error)
- P09.13computational State-Space Models Build it: State space from ODEs (companion and modal forms, similarity transforms, TF ↔ state space both ways)
- P09.14computational Controllability & Observability Build it: Rank tests (controllability and observability matrices, PBH, Gramians; a reaction-wheel satellite with a failed wheel or sensor)
- P09.15computational Pole Placement & Observers Build it: Full-state feedback and a Luenberger observer (Ackermann from scratch, duality, separation)
- P09.16computational LQR Build it: Riccati solver and LQR design (Hamiltonian eigenvectors and Newton–Kleinman; guaranteed margins; Bryson's rule; satellite attitude)
- P09.17computational Digital Control Build it: Discretisation and the z-transform (ZOH by the augmented matrix exponential, Tustin, matched pole-zero; sample-rate and delay effects on a pitch loop)
- P09.18computational Robustness & Uncertainty ★ Build it: Sensitivity functions and an H∞ introduction (Ms, Mt, disk margins, multiplicative uncertainty and the small-gain test, H∞ norm by sweep and by Hamiltonian bisection, the Bode sensitivity integral)
- P09.19computational Nonlinear Control Basics Build it: Lyapunov and feedback linearisation (Lyapunov equation, region-of-attraction estimate, describing functions of saturation and relay with limit-cycle prediction)
- P09.20computational Model Predictive Control ★ Build it: Linear MPC from scratch (condensed QP, equivalence with finite- and infinite-horizon LQR, input and rate constraints by an active-set QP; receding horizon on an altitude hold)
- P09.21physical experiment Home Lab: Servo Feedback Control 🔬 Build it: Close the loop on a servo or small motor; identify a model from a step test; design a P or PI gain; predict, measure and compare rise time, overshoot and settling
By the end you can:
- classify signals and systems, and convolve;
- write and reduce transfer functions, and read time and frequency responses;
- design anti-aliasing and digital filters;
- analyse feedback for steady-state error and disturbance rejection;
- sketch and compute root loci, apply the Nyquist criterion and read gain, phase and delay margins;
- design and tune a PID with anti-windup, and shape a loop with lead and lag;
- build state-space models, test controllability and observability, place poles and design observers;
- solve the LQR Riccati equation, discretise a controller and budget its sample rate and delay;
- quantify robustness with sensitivity peaks and the small-gain test, and analyse simple nonlinear loops;
- write a linear MPC with constraints;
- close a real feedback loop on a hobby servo or a small motor at home.
You get a tested Python module for each of these. The mathematics is not new: Phases 01–03 supplied the linear algebra, the Laplace and Fourier transforms and the numerical methods, and Phase 04 the circuits and the bench microcontroller. What is new is systems thinking: signals as objects, LTI systems as operators, feedback, stability and design. The aerospace loops recur across lessons: a pitch-attitude autopilot, a control-surface servo actuator, an altitude hold, an IMU's anti-aliasing and digital filtering, and a reaction-wheel satellite. Each is a representative model stated as typical, never a specific vehicle's data.
One lesson has a physical experiment (marked 🔬): the servo feedback home lab. A learner without the kit completes it with the synthetic dataset supplied, which is labelled synthetic wherever it appears; a simulation is never presented as a measurement. Every other lesson's part 4 is a computational experiment, such as a parameter sweep, a sensitivity study, a method comparison, or an analysis of a synthetic dataset clearly labelled synthetic (the IMU and gyro records of lessons 06 and 07). Lessons 18 and 20 are marked ★: they go beyond a first control course, and no other lesson lists them as a prerequisite.
Lesson ids are P09.01 to P09.21. Each lesson's metadata table gives its exact prerequisites, and every lesson's metadata table reads:
| Time | unmeasured |
|---|
The Time row stays unmeasured until pilots measure it. No time estimate is given here for the same reason.
Prerequisites
Phases 00–05 (no later phase is assumed), in particular:
P00.13(safety for home experiments) andP00.14(measurement, calibration and uncertainty) for lesson 21;P01.13(linear systems),P01.14(rank) andP01.16(eigenvalues) for the state-space lessons;P02.02(second-order ODEs),P02.03(forced response and resonance),P02.04(systems of ODEs),P02.05(the matrix exponential) andP02.06(linearisation);P02.07(complex numbers and phasors),P02.08(the Laplace transform),P02.09(Fourier series) andP02.10(the Fourier transform and the FFT) for lessons 01–07 and 10, and the describing functions of lesson 19;P02.19(random processes) for the observer-noise study of lesson 15;P03.05(RK4) andP03.06(adaptive and stiff integrators) for the simulations, andP03.14andP03.15(unconstrained and constrained optimisation) for lessons 16, 20 and 21;P04.10(AC circuits and RC filters) for lessons 02 and 06, andP04.15(the electronics bench lab, its microcontroller and its safety box) for lesson 21.
Skill checks before starting: you can find the roots of a quadratic and the eigenvalues of a 2 × 2 matrix by hand, take the Laplace transform of e^{−at} and invert a partial-fraction expansion, compute the magnitude and angle of a complex number such as (1 + jω/a)⁻¹, write a second-order ODE as two first-order ones, and propagate an uncertainty through a product.
The project kit
The kit lives in projects/p09-servo-control/. It holds:
bom.yaml: three cost tiers,minimum_cost,recommendedandenhanced, with dated price ranges, reusing the microcontroller, breadboard, potentiometer, multimeter and battery holder ofp04-electronics-bench;safety.md: the full safety box;procedure.md, with the firmware listing and the four pre-run tests;report-template.md;data/README.md: the raw-data format, with the seeded synthetic dataset indata/synthetic/.
Read safety.md before buying anything and again before every session. The kit's safety.md is authoritative. The limits below summarise the hard rules that every version of this kit must keep, and nothing in the kit may relax them. The prediction, with its uncertainty, is written down and dated before the loop is first closed, raw data are never edited, and the report states which numbers were measured, which were computed, and which are synthetic.
p09-servo-control(folder, lesson 21). The p04 microcontroller closes a loop on either a hobby micro servo with its feedback wiper brought out to the ADC (Option A, PI control) or a small DC gear motor on a low-voltage motor-driver module with a potentiometer on its shaft (Option B, P control with dead-zone compensation). You run open-loop step tests, identify a first-order or integrator model with a stated fit method, design the gain, date the predicted rise time, overshoot and settling time, then close the loop, measure and compare. Hard limits (every limit ofp04-electronics-benchstill applies):- battery or USB power only, never mains;
- motor (or servo) supply ≤ 6 V, measured before every session (four NiMH or three alkaline cells, never four fresh alkaline cells);
- one motor or micro servo, stall current ≤ 500 mA, with a 0.5 A resettable fuse in the pack's + lead;
- nothing on the shaft except a light pointer arm (≤ 5 g, ≤ 80 mm): no propellers, no fans, no blades, no wheels;
- fingers, hair and loose sleeves clear of the shaft while the loop is running;
- a software duty limit (|u| ≤ 0.6) or command limit (±60°), a travel limit and a stop button in the firmware, tested (stop, limit, sign and travel-limit tests, logged) before the first closed-loop run, and never removed or raised;
- the first closed loop of each session at half the designed gain with a small step.
Nothing in this phase involves mains voltage, propellers, flight, lithium-cell charging, or anything attached to a moving shaft beyond the pointer. Every IMU, gyro and servo record outside lesson 21's own measurements is synthetic and seeded. A report without a completed safety box and the logged pre-run tests is not graded.
Running the code
From the repo root, pytest curriculum/phase-09/lesson-NN- tests your starter/main.py. AEFS_IMPL=solution pytest curriculum/phase-09/lesson-NN- runs the same tests against the reference solution in solutions/phase-09/lesson-NN-. Tests check properties rather than single numbers:
- each lesson's independent check (for example, FFT against direct convolution, simulation of the unreduced diagram, a simulated sine test, the angle condition, Z = N + P against the closed-loop poles, the ARE residual, step invariance at the samples, a describing-function prediction against a simulated limit cycle, unconstrained MPC against the Riccati recursion);
- agreement with the SciPy oracle (
scipy.signalandscipy.linalgroutines such aslti,step,bode,freqz,butter,cont2discrete,place_poles,solve_continuous_are,solve_discrete_are,solve_continuous_lyapunov,expm), which appears only in the tests; - limiting cases (K → 0 and K → ∞, ζ = 0 and ζ = 1, ω → 0 and ω → ∞, a pure delay, a zero input);
- superposition, time invariance and residual identities (S + T = 1, Riccati and Lyapunov residuals);
- dimensional sanity, and convergence with step size where a numerical method is used.
Everything in the tested code is implemented from scratch in NumPy; scipy.integrate.solve_ivp is used for nonlinear simulation where a lesson says so, and the python-control package is not used anywhere. Anything random is seeded. Tests need no network and write files only to a temporary directory. python scripts/check_lessons.py checks every lesson's structure.
The exam and the mini-project
Phase exam and mini-project: assessments/phase-09/. The exam has four parts:
- Part A, concepts: signals and systems, transforms and sampling, feedback and robustness, and state space, estimation, optimal and nonlinear control.
- Part B, analysis by hand: every lesson from 01 to 20, on a gyro front end, a pitch-attitude autopilot, an elevator servo, a roll loop, an IMU's anti-aliasing filter, a satellite attitude hold, an altitude hold and an unstable airframe.
- Part C, computation: a tested unconstrained-MPC gain function checked against the Riccati recursion, and an end-to-end analysis of a servo design with your own lesson functions (margins, sensitivity peak, discretisation with delay, step metrics).
- Part D, engineering interpretation: its first question asks you to interpret your own
p09-servo-controlmeasurement; a seeded synthetic dataset is supplied for learners without a kit. Its second question reviews a synthetic flight-control design sheet for wrong margins, aliasing and disturbance errors, and tests the servo kit's safety limits.
The exam has not been piloted, so no time limit is suggested. Choose one in advance and record it. Results are reported per competency: (1) reasoning, (2) analysis, (3) computation, (4) interpretation. The worked solutions and pass thresholds are in solutions/phase-09/exam/. The mini-project is the servo feedback report from lesson 21, graded with the rubric. Seeded unseen cases for the computational lessons are planned in parameterized-cases/. Outcomes are recorded as practice completed, self-assessed mastery or externally reviewed mastery. None of these is a credential, and nothing in this phase qualifies anyone to design, tune or approve the control software of a real aircraft or spacecraft.
References: the phase's reference map is references/phase-09.md; it lists, for each lesson, the verified free sources with exact lecture, topic and section titles, what to extract, and the gaps the lessons fill with original instruction. Every required reading is free. The signals-and-systems lessons use the MIT 6.003 lecture notes (@mit-ocw-6-003-signals-and-systems) and the MIT 18.03 lectures (@mit-ocw-18-03-differential-equations). The classical-control lessons use MIT 16.06 (@mit-ocw-16-06-principles-of-automatic-control) and MIT 16.30 (@mit-ocw-16-30-feedback-control-systems). The state-space lessons use 16.30, MIT 6.011 (@mit-ocw-6-011-signals-systems-and-inference) and MIT 18.06 (@mit-ocw-18-06-linear-algebra). LQR, robustness and MPC use 16.30 and the MIT 16.323 lecture notes (@mit-ocw-16-323-principles-of-optimal-control). Supplementary-free sources: MIT 6.341 (@mit-ocw-6-341-discrete-time-signal-processing) for filters, MIT 6.243J (@mit-ocw-6-243j-dynamics-of-nonlinear-systems) for nonlinear systems, the NASA F-8 digital fly-by-wire report (@nasa-tn-d-7843-f8-digital-fly-by-wire) for flight context, and two texts that are free to read but not openly licensed and are therefore linked only, never copied: Smith's Scientist and Engineer's Guide to DSP (@smith-dsp-guide, personal use) and Rawlings, Mayne and Diehl's Model Predictive Control (@rawlings-mayne-diehl-mpc-2nd-edition, all rights reserved). The SciPy documentation (@scipy-userguide) documents the oracle routines. The home lab uses @micropython-docs and @sparkfun-learn-tutorials. Each lesson's references row names the exact sections; paid textbooks appear only as optional further study in the map. The curriculum links to every source and writes its own explanations.