Control Systems - University of Cape Town

An introductory control systems course, which is intended to delivery fundamental concepts with the use of interactive MATLAB Live Scripts.
Updated 5 May 2024


Open in MATLAB Online

Curriculum Module

Created with MATLAB R2023a. Compatible with MATLAB R2023a and later releases.

2023 © Arnold Pretorius (University of Cape Town, Department of Mechanical Engineering, Faculty of Engineering and the Built Environment)

Description of content

This teaching package contains content for the course “Control Systems”, which is based heavily within based in MATLAB Live Scripts. The teaching package comprises the following:

  1. A set of interactive Course Notes, based in MATLAB Live Scripts.
  2. A set of static PDF exports of the Course Notes.
  3. A set of Virtual Labs, based in MATLAB Live Scripts.
  4. A Project, which is based in MATLAB Live Scripts and Simulink.

The content of this package is intended for undergraduate students with little to no experience with MATLAB. MATLAB is a programming and numeric computing platform developed by MathWorks.

The intention of this package is to introduce students to the fundamentals of Control Systems in an interactive manner, providing both rigorous theoretical development, along with guided demonstration and emulated practical exercises. This is made possible by making use of MATLAB Live Scripts which incorporate formatted text, LaTeX equations, imagery, and interactive code blocks.

Important points to take note

  • The weekly Virtual Labs contain questions that are meant to be answered within a Learning Management System (LMS), which for the University of Cape Town is Amathuba (an LMS based on D2L Brightspace).

  • Worked solutions for the Virtual Labs and Project are available and will be provide upon kind request and verification of station.

  • Every week there is an online quiz within the LMS, which is intended to gauge the students familiarity with the content from the previous week. While the quizzes are for marks, the students are allowed to attempt the quizzes any number of times and receive instant feedback about their incorrect answers. These quizzes can be provided upon kind request.

  • The University of Cape Town has a Campus Wide License which enables all staff members, students, and visitors to use the full suite of MATLAB products. This allows for easy access to the tools to every students from everywhere in the world. Students can use MATLAB directly in the web browser with MATLAB Online which is connected to MATLAB Drive, which gives every students 20Gb of space in the cloud.

  • Students are required to complete the MATLAB Onramp before engaging in the Course Notes and Virtual Labs.

Snapshots of the teaching package

Table of contents found in each Chapter

Combination of static images, formatted text, and LaTeX equations

Information-rich code outputs

Design methods via the Nichols chart

Neatly sectioned and formatted content

Multi-coloured block diagrams

Simulink quadcopter control project

Interactive code blocks


The course content can be approached in one of two ways:

  1. Click on Open in MATLAB Online. This will allow you to access the content online in your web browser through MATLAB Online.
  2. Download all files and access the MATLAB content from the desktop app.

Live Scripts

The Course Notes Live Scripts are presented as an interactive textbook with numbered sections.

Live Scripts are divided into sections and contain interactive Live Script controls which include buttons, checkboxes, sliders, and dropdown menus. Feel free to interact with these controls as well as typing in your own code snippets. You can run each section within a Live Script individually.

The Live Scripts are intended to be executed in sections. This can be achieved by pressing the Run Section button within the MATLAB interface, or CNTRL/CMD+ENTER.


Course Notes

  • Chapter 1 - Introduction
  • Chapter 2 - Signals and systems
  • Chapter 3 - Block diagrams
  • Chapter 4 - Modelling the Laplace domain
  • Chapter 5 - Prediction of system response
  • Chapter 6 - System characterisation
  • Chapter 7 - Frequency response techniques
  • Chapter 8 - Feedback control systems
  • Chapter 9 - Stability of closed-loop systems
  • Chapter 10 - Steady-state error
  • Chapter 11 - Transient design specifications
  • Chapter 12 - Frequency-domain design
  • Chapter 13 - Digital control systems

Virtual Labs

  • Virtual Lab 1 - Mass-spring-damper system
  • Virtual Lab 2 - Armature-controlled DC motor
  • Virtual Lab 3 - Torsional mass-spring-damper system
  • Virtual Lab 4 - System characterisation
  • Virtual Lab 5 - Underdamped second-order systems
  • Virtual Lab 6 - Closed-loop stability
  • Virtual Lab 7 - Steady-state error
  • Virtual Lab 8 - Design specifications


  • Project - Attitude control of a quadcopter

Learning goals

The objective of this course is to provide an introduction to control systems engineering. This comprises:

  • Mathematical modelling in the frequency domain
  • Converting governing linear differential equations by means of the Laplace transform
  • Transfer functions
  • Block diagrams and block diagram algebra
  • Stability via the s-plane
  • Frequency response of systems
  • Frequency-domain analysis and design methods
  • Z-transforms and programming equations for digital control
  • Accounting for digital sampling effects.

Suggested Prerequisites

This course requires a strong basis in vector calculus, linear algebra, and differential equations.

Additional Resources

Introduction to MATLAB

MATLAB Onramp - Learn the essentials of MATLAB through this free, two-hour introductory tutorial on commonly used features and workflows.

Educator Resources

We invite educators interested in this course material to go through the resources links provided below:



The license for this module is available in the LICENSE file in this repository.


This Curriculum Module was developed through the support of MathWorks. Special thanks to Dr. Marco Rossi from MathWorks.

Cite As

Arnold Pretorius (2024). Control Systems - University of Cape Town (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!


Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes

Updated title.


To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.