Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

🎛️ Control Systems Lab — MATLAB

MATLAB License Labs Status

MATLAB scripts for Control Systems laboratory exercises covering transfer function analysis, step response characterization, frequency-domain techniques, root locus design, and PID controller tuning.


✨ Features

  • 📐 Transfer Function Analysis — Define, manipulate, and analyze system TFs
  • 📈 Step Response — Time-domain performance metrics (rise time, overshoot, settling time)
  • 📊 Bode Plots — Frequency response: magnitude and phase diagrams
  • 🎯 Root Locus — Pole trajectory analysis for gain variation
  • 🔄 Nyquist Plots — Stability assessment via Nyquist criterion
  • 🎛️ PID Controller Design — Proportional-Integral-Derivative tuning
  • Laplace Transforms — Symbolic inverse Laplace and ODE solutions
  • 📍 Pole-Zero Maps — System stability visualization

📁 Project Structure

control-systems-lab-matlab/
├── README.md
├── .gitignore
├── lab1_transfer_functions.m # TF analysis, partial fractions, Laplace, ODE
└── labs_comprehensive.m # Labs 1–5: step response, Bode, root locus, PID, Nyquist

🚀 Getting Started

Prerequisites

  • MATLAB R2020a or later
  • Control System Toolbox
  • Symbolic Math Toolbox

How to Run

  1. Clone this repository:
    git clone https://github.com/q-ms8/control-systems-lab-matlab.git
  2. Open MATLAB and run:
    >> lab1_transfer_functions
    >> labs_comprehensive

📋 Lab Exercises

Script Topics Covered Key MATLAB Functions
lab1_transfer_functions.m Partial fraction decomposition, transfer function step response, pole-zero mapping, inverse Laplace transforms, ODE solutions residue(), tf(), step(), pzmap(), ilaplace(), syms
labs_comprehensive.m Lab 1: System modeling with TFs Lab 2: Step response & performance specs Lab 3: Bode plot analysis Lab 4: Root locus design Lab 5: PID controller design & Nyquist plots tf(), step(), stepinfo(), bode(), rlocus(), nyquist(), pid()

🧮 Key Concepts

Transfer Function

A system's input-output relationship in the s-domain:

G(s) = Y(s) / X(s) = (bmsm + ... + b1s + b0) / (ansn + ... + a1s + a0)

Step Response Specifications

Metric Description
Rise Time (tr) Time to go from 10% to 90% of final value
Overshoot (Mp) Peak value above steady-state (%)
Settling Time (ts) Time to stay within ±2% of final value
Steady-State Error (ess) Final offset from desired value

Stability Criteria

  • Bode: Gain margin > 0 dB and phase margin > 0° at crossover frequencies
  • Nyquist: Number of encirclements of (−1, 0) determines closed-loop stability
  • Root Locus: All closed-loop poles must be in the left-half s-plane

📊 Sample Outputs

  • 📈 Step response curves with annotated rise time, overshoot, and settling time
  • 📊 Bode magnitude and phase plots with stability margins
  • 🌀 Root locus diagrams showing pole migration with gain
  • 🔄 Nyquist contour plots for stability analysis
  • 📍 Pole-zero maps for system characterization

📝 License

This project is licensed under the MIT License — see the LICENSE file for details.

About

Control Systems Lab in MATLAB — transfer functions, step response, Bode plots, root locus, PID design, Nyquist, and Laplace transforms

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /