Continues from → Project 07: Lead-Lag Compensator Design
Classical Control Systems | Frequency Response | Bode Plot | Nyquist Criterion | MATLAB | Aerospace Engineering
This repository contains my eighth independent control systems project — a frequency-domain re-investigation of the aircraft pitch control system, using Bode and Nyquist analysis to independently verify the stability results found across Projects 05–07.
"Does frequency-domain analysis agree with the pole-domain stability results from Projects 05–07 — and what does it reveal about the compensators that time-domain analysis alone missed?"
Answer: Yes, exactly — and it exposes a gap between stability and performance that root locus never showed directly.
Projects 04–07 established, in the time and pole domains, that the aircraft pitch plant is unstable and that no classical SISO controller can simultaneously satisfy transient and steady-state specs. Project 08 re-examines the same plant and the same four controllers through the frequency domain:
- Bode analysis of the uncompensated plant — quantify exactly how unstable
- Bode comparison of all four controllers — Single Lead, Lead–Lead, Lead–Lead–Lag, Optimizer
- Nyquist analysis of the uncompensated plant — independent stability verification
- Nyquist analysis of all four compensated systems — confirm closed-loop stability
All four stages trace back to the same root cause.
G(s) = (−1.282s + 1.282) / (s³ + 1.935s² + 0.987s + 0.179)
| Property | Value |
|---|---|
| RHP Zero | s = +1 (non-minimum phase) |
| Phugoid Poles | −0.3336 ± 0.1730j (dominant, lightly damped) |
| Short Period Pole | −1.2679 (fast, heavily damped) |
| Gain Margin (from P05) | K = 0.46 |
L(s) = G(s)
| Metric | Value | Meaning |
|---|---|---|
| Gain Margin | −6.74 dB | Already past the critical gain condition |
| Phase Margin | −47.16° | Already past the −180° phase boundary |
The catch: both margins are negative. This isn't "marginally stable" — the loop has already crossed the instability boundary at the gain crossover frequency, before any controller is applied.
C_Lead = 0.616 (s+2) / (s+0.5)
C_Lead-Lead = 1.47×10⁻⁴ (s+2)(s+4) / [(s+0.5)(s+0.8)]
C_Lead-Lead-Lag = 0.583 (s+2)(s+4)(s+0.25) / [(s+0.5)(s+0.8)(s+1)]
C_Optimizer = 1.2599 (s+2.166)(s+4.045)(s+0.4004) / [(s+0.6056)(s+0.5187)(s+0.4230)]
| System | Gain Margin | Phase Margin |
|---|---|---|
| Original Plant | −6.74 dB | −47.16° |
| Single Lead | +9.08 dB | +121.95° |
| Lead–Lead | +94.29 dB | ∞ |
| Lead–Lead–Lag | +17.53 dB | ∞ |
| Optimizer | +16.95 dB | ∞ |
PM = ∞ is not "infinite stability." For Lead–Lead, Lead–Lead–Lag, and the Optimizer, the open-loop magnitude never crosses 0 dB in the evaluated range, so MATLAB has no finite gain-crossover frequency to measure phase margin at.
Trend: the lead-lead system's 94.29 dB gain margin comes from a heavily attenuated magnitude response — huge stability margin, poor control authority. This is the same tracking collapse identified in Project 07, now visible directly in the frequency domain.
Stability criterion: Z = N + P
| Quantity | Value |
|---|---|
| P (unstable open-loop poles) | 0 |
| Negative real-axis crossing | ≈ −2.17 |
| N (clockwise encirclements of −1+j0) | 2 |
| Z (unstable closed-loop poles) | 2 |
This matches the negative GM/PM exactly, and matches the Project 05 root-locus result where the phugoid poles cross into the RHP for K > 0.46 — three independent methods, same answer.
| System | P | N | Z | Stability |
|---|---|---|---|---|
| Original Plant | 0 | 2 | 2 | Unstable |
| Single Lead | 0 | 0 | 0 | Stable |
| Lead–Lead | 0 | 0 | 0 | Stable |
| Lead–Lead–Lag | 0 | 0 | 0 | Stable |
| Optimizer | 0 | 0 | 0 | Stable |
Every compensator pulls the Nyquist contour clear of the critical point. Zero encirclements, zero unstable closed-loop poles, across the board.
| Controller | Settling Time | Overshoot | GM | PM | Nyquist Z | Both Specs? |
|---|---|---|---|---|---|---|
| Lead–Lead (P07) | 9.51 s | 0.625% | +94.29 dB | ∞ | 0 | ❌ (tracking) |
| Lead–Lead–Lag (Test E) | 14.46 s | 7.41% | +17.53 dB | ∞ | 0 | ❌ (ts) |
| Optimizer (Best) | 5.71 s | 1.66% | +16.95 dB | ∞ | 0 | ❌ (SSE) |
Stability is universally achieved by Project 08. Not one controller across five projects has met OS < 10%, ts < 10s, and meaningful steady-state tracking at the same time.
1. The uncompensated plant is unstable by three independent measures — root locus (P05), Bode margins, and Nyquist encirclements — all in exact agreement.
2. Every compensator from Projects 06–07 restores closed-loop stability when re-verified in the frequency domain: zero Nyquist encirclements across all four designs.
3. A large stability margin does not imply good performance. The Lead–Lead controller's 94.29 dB gain margin coexists with the worst tracking of any compensated design — stability and performance are separate design axes.
4. The RHP zero at s = +1 is the structural cause of the phase lag limiting phase margin and usable bandwidth — the same root cause identified across Projects 04–07, now confirmed directly in the frequency response.
5. Classical compensation can always be pushed to restore stability, but it cannot remove the fundamental bandwidth ceiling imposed by the RHP zero. Breaking that ceiling requires state-space methods (Projects 09–11).
- Commercial autopilots (777/A350-class): use Bode and Nyquist checks on pitch-attitude and pitch-rate loops before any controller is certified for flight.
- Military fighters (F-16/F-22-class): frequency-domain margins define how aggressively a statically unstable airframe can be tuned before risking instability.
- UAV pitch control: bandwidth and margin trade-offs identified here directly limit how tightly a UAV autopilot loop can be closed.
- Teknofest VLR Rocket: frequency-response margins will be used to assess attitude-loop robustness as mass properties shift during burn — motivating the state-space and Kalman filter work in Projects 09–11.
✅ Project 01 — Mass-Spring-Damper Analysis
✅ Project 02 — DC Motor Modeling
✅ Project 03 — PID Speed Control
✅ Project 04 — Aircraft Pitch Control
✅ Project 05 — Root Locus Design
✅ Project 06 — Lead Compensator Investigation
✅ Project 07 — Lead–Lag Compensator Design
✅ Project 08 — Frequency Response Analysis ← YOU ARE HERE
→ Project 09 — State-Space Modeling
→ Project 10 — Pole Placement Control
→ Project 11 — LQR Optimal Control
→ Project 12 — Kalman Filter Design
→ Project 13 — UAV Attitude Control
→ Project 14 — Rocket Attitude Control
→ Project 15 — Satellite Attitude Control
→ Project 16 — Missile Guidance and Control
→ Project 17 — Integrated Flight Control System
- MATLAB R2024b
- Control System Toolbox
Zohaib Imtiaz Aerospace Engineering Student | Teknofest VLR Team — Flight Control
This project is released under the MIT License.
