Skip to content

Latest commit

 

History

History
105 lines (86 loc) · 5.4 KB

File metadata and controls

105 lines (86 loc) · 5.4 KB

Labs_Coursework — Modern Control Theory

State and disturbance observers for nonlinear systems. Four laboratory works built around classical and recent observer designs, plus a course work on an immersion- and invariance-based disturbance observer with safe control. Every figure in the reports is a live simulation result produced by the code in this repository.

Contents

Item Topic Method Plant(s) Code
Lab 1 Parameter-estimation observers GPEBO + DREM Academic 2nd-order nonlinear system; multimachine power system (generator voltages) MATLAB
Lab 2 Reduced-order and adaptive estimation GPEBO / DREM Power system (rotor speeds); anaerobic-digestion bioreactor (biomass) MATLAB
Lab 3 Nonlinear observer synthesis Kazantzis–Kravaris (Lyapunov auxiliary theorem) Two 2nd-order nonlinear systems MATLAB
Lab 4 Hybrid observer [KKL + PEB]O (Yi–Ortega–Zhang) Academic non-reconstructable example; Ćuk DC–DC converter MATLAB
Course Work Disturbance observer + safe control Immersion & Invariance DOB, CBF-QP safety filter Control-affine example; 2-link robot manipulator Python

Tasks, execution, conclusions

Lab 1 — GPEBO + DREM. Build a Parameter-Estimation-Based Observer and its generalized form, combine it with Dynamic Regressor Extension and Mixing to estimate states from the output. Applied to a nonlinear system (with and without input) and to a two-machine power system. The estimation error converges to zero in all cases; DREM decouples the regressor and gives clean scalar adaptation.

Lab 2 — GPEBO for physical plants. A reduced-order observer reconstructs generator rotor speeds from measurable electrical power; a GPEBO+DREM observer estimates unmeasured biomass concentrations in an anaerobic digester. The adaptation gain gamma is swept to show the speed/robustness trade-off; higher gain accelerates convergence at the cost of transient peaking.

Lab 3 — Kazantzis–Kravaris. Solve the observer PDE from Lyapunov's auxiliary theorem, implement the resulting nonlinear observer, and verify convergence on a lecture example and on the original Kazantzis–Kravaris academic system. State estimates track the true states after the transient.

Lab 4 — [KKL+PEB]O. Implement the hybrid observer that fuses a Kazantzis–Kravaris/ Luenberger part with a Parameter-Estimation-Based part. The academic example is observable by neither part alone but is reconstructed by the hybrid. The averaged Ćuk converter model is estimated under measurement noise using a fixed-step RK4 integration.

Course Work — I&I disturbance observer + safe control. An immersion- and invariance-based disturbance observer estimates matched/unmatched disturbances for control-affine systems; its estimate feeds a tracking controller protected by a Control-Barrier-Function quadratic-program safety filter. Validated on a 2-link manipulator: states stay inside the safe set, the disturbance estimate converges, and tracking holds. Extended studies sweep observer gain, input-gain mismatch, and three noise bands to characterize robustness.

Project structure

Labs_Coursework/
├── Lab1/                      GPEBO + DREM
│   ├── lab1_acad.m            academic nonlinear system
│   ├── lab1_power.m           multimachine power system (voltages)
│   ├── Report_Lab1.docx
│   └── fig_*.png
├── Lab2/                      GPEBO for power system + bioreactor
│   ├── lab2_power.m           rotor-speed observer
│   ├── lab2_reactor.m         bioreactor, gamma sweep
│   ├── Report_Lab2.docx
│   └── fig_*.png
├── Lab3/                      Kazantzis–Kravaris observer
│   ├── lab3.m
│   ├── Report_Lab3.docx
│   └── fig_*.png
├── Lab4/                      [KKL+PEB]O hybrid observer
│   ├── lab4.m                 academic example (A) + Ćuk converter (B)
│   ├── Report_Lab4.docx
│   └── fig_*.png
└── CourseWork/                I&I disturbance observer + CBF safe control
    ├── code/
    │   ├── iidob_core.py      observer/controller core (Gauss–Legendre quadrature)
    │   ├── iidob_robot.py     2-link manipulator model + CBF-QP filter
    │   ├── run_fig2.py … run_fig4.py, run_ext.py   experiments and figures
    │   └── cwstyle.py         shared plotting style
    ├── figures/               generated figures (+ eq/ rendered equations)
    └── CourseWork.docx

Technology stack

  • MATLAB — labs 1–4. Stiff/non-stiff ODE integration (ode45, ode15s), fixed-step RK4, figure export via exportgraphics.
  • Python 3 — course work. NumPy, SciPy (solve_ivp, LSODA), Matplotlib; Gauss–Legendre quadrature for the immersion integrals; a hand-rolled active-set CBF-QP solver.
  • Reports — DOCX, one per item, with embedded simulation figures.

Running

MATLAB labs — run the entry function from each folder, e.g.:

cd Lab1; lab1_acad; lab1_power

Course work — from CourseWork/code (figures are written to ../figures):

python run_fig2.py && python run_fig3.py && python run_fig4.py && python run_ext.py

Each MATLAB script writes its figures next to itself (fileparts(mfilename('fullpath'))), so the labs run from any checkout location without editing paths.