Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📐 Digital Control Laboratory

Course: Digital Control Systems — Electrical Engineering
Environment: MATLAB / Simulink
Topics: Z-transform, discrete-time design, frequency response, PID/lead-lag controllers


🗂️ Lab Overview

Lab Topic Files
Lab 2 Z-Transform & Discrete-Time Basics Lab2/lab2_ztransform.m
Lab 3 Frequency Response & Bode Analysis Lab3/lab3_bode.m
Lab 4 PID Controller Design Lab4/lab4_pid.m
Lab 5 Lead-Lag Compensator Design Lab5/lab5_lead_lag.m
Lab 6 Closed-Loop Sensitivity & Robustness Lab6/lab6_sensitivity.m

🔬 Lab 2 — Z-Transform & Discrete-Time Analysis

Objective: Analyse discrete-time signals using Z-transform, compare with continuous-time equivalents.

Key operations performed:

  • Forward/inverse Z-transform via iztrans and manual partial fractions
  • Pole-zero mapping (pzmap) to verify stability
  • Step response comparison: continuous vs. sampled system

🔬 Lab 3 — Frequency Response & Bode Analysis

Objective: Design a discrete controller satisfying gain/phase margin specs using Bode plots.

Key operations performed:

  • Open-loop Bode plot (bode) with margin analysis (margin)
  • Lead compensator placement to meet φₘ ≥ 45°
  • Closed-loop verification: step, bode(feedback(...))

🔬 Lab 4 — PID Controller Design

Objective: Design a discrete PID controller and analyse step response performance.

Parameter Value
Rise Time < 0.5 s
Overshoot < 10 %
Settling Time < 2 s

Key operations performed:

  • Ziegler-Nichols tuning in discrete domain
  • Anti-windup implementation
  • Root-locus analysis (rlocus) to verify pole placement

🔬 Lab 5 — Lead-Lag Compensator Design

Objective: Design a cascaded lead-lag compensator to improve transient and steady-state response.

Key operations performed:

  • Phase-lead design for bandwidth improvement
  • Phase-lag design for steady-state error reduction
  • Combined lead-lag: series(C_lead, C_lag)
  • Sensitivity / complementary-sensitivity plot

🔬 Lab 6 — Closed-Loop Sensitivity & Robustness

Objective: Analyse sensitivity functions and verify robustness margins.

Key operations performed:

  • Mixed sensitivity design: minimise ‖Wp·S‖∞
  • Bode plot of S (sensitivity) and T (complementary sensitivity)
  • lsim with step + sinusoidal disturbance to validate rejection

🛠️ How to Run

% In MATLAB, navigate to the lab folder and run:
run('Lab2/lab2_ztransform.m')
run('Lab3/lab3_bode.m')
% ... etc.

📎 Notes

  • All scripts require MATLAB R2021a or later with the Control System Toolbox
  • Simulink models (.slx) are included where applicable
  • Results match those submitted in the formal lab reports

About

MATLAB lab experiments in Root Locus, lead compensator, state-space PID and Simulink

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages