Lesson 13-Control System Modeling and Time-Domain Analysis

Introduction

Welcome to the thirteenth article in our comprehensive MATLAB course series. In the previous two articles, we introduced Simulink and explored its block libraries and modeling basics. Now we’re going to dive into one of the most important application areas of MATLAB and Simulink: control systems engineering.

Control systems are everywhere. Every time you drive a car, the engine control unit adjusts the fuel injection to maintain the desired speed. Every time you fly in an airplane, the autopilot adjusts the control surfaces to maintain the desired altitude and heading. Every time you use a thermostat, a simple control system turns the heater on and off to maintain the desired temperature. From the massive to the microscopic, control systems enable machines to operate automatically, reliably, and efficiently.

MATLAB and its Control System Toolbox provide an incredibly powerful environment for analyzing, designing, and simulating control systems. Whether you’re working with simple PID controllers or advanced modern control techniques like LQR and Kalman filtering, MATLAB has the tools you need. And when combined with Simulink for system-level simulation, you have a complete toolchain for control system development.

In this article, we’re going to explore the fundamentals of control system modeling and time-domain analysis. We’ll learn how to create and manipulate LTI (Linear Time-Invariant) models in MATLAB using transfer functions, state-space representations, and zero-pole-gain models. We’ll learn how to convert between these representations, how to analyze time responses (step response, impulse response, etc.), and how to determine stability from pole locations. We’ll dive into state-space models in more depth, exploring why state-space is more general than transfer functions and how to design modern controllers like LQR (Linear Quadratic Regulator).

By the end of this article, you’ll have a solid foundation in control system modeling and time-domain analysis using MATLAB. You’ll understand how to create LTI models, how to analyze their time-domain properties, and how to design basic controllers. This knowledge will serve as the foundation for the next article, where we’ll explore frequency-domain analysis and root locus design. Let’s begin our journey into the fascinating world of control systems.

Control Systems in MATLAB: The Control System Toolbox

The Control System Toolbox is a MATLAB toolbox that provides algorithms and tools for systematically analyzing, designing, and tuning linear control systems. It’s the go-to toolbox for control engineers working in MATLAB. If you’re serious about control systems, this toolbox is essential.

What’s in the Control System Toolbox?

The Control System Toolbox includes functions for:

  1. Creating LTI models: tf(), zpk(), ss(), frd() (transfer function, zero-pole-gain, state-space, frequency response data).
  2. Converting between model representations: tf(), zpk(), ss() (when called with an LTI model as input).
  3. Analyzing time responses: step(), impulse(), lsim(), initial().
  4. Analyzing frequency responses: bode(), nyquist(), nichols(), sigma().
  5. Analyzing stability and poles/zeros: pole(), zero(), pzmap(), rootlocus().
  6. Designing controllers: pidtune(), pid(), lqr(), lqg(), kalman().
  7. Model interconnections: series(), parallel(), feedback(), connect().
  8. Linearization: linearize() (for linearizing nonlinear Simulink models).

We’ll cover many of these functions in this article. For a complete list, type doc control in the MATLAB Command Window.

LTI (Linear Time-Invariant) Systems: The Foundation

The Control System Toolbox works with LTI (Linear Time-Invariant) systems. LTI systems are a class of systems that satisfy two key properties:

  1. Linearity: If the input is a*u₁(t) + b*u₂(t), the output is a*y₁(t) + b*y₂(t). (Superposition and scaling hold.)
  2. Time-invariance: If the input u(t) produces output y(t), then the input u(t-τ) produces output y(t-τ). (The system’s behavior doesn’t change over time.)

LTI systems are described by linear differential equations (continuous-time) or linear difference equations (discrete-time) with constant coefficients. They can be represented in several equivalent forms:

  • Transfer function: Y(s)/U(s) = G(s) (Laplace domain)
  • Zero-pole-gain: G(s) = K * (s - z₁)(s - z₂)... / (s - p₁)(s - p₂)...
  • State-space: dx/dt = Ax + Bu, y = Cx + Du

The Control System Toolbox can work with all these representations and convert between them seamlessly.

Checking for the Control System Toolbox

Before we begin, let’s verify that you have the Control System Toolbox installed. In the MATLAB Command Window, type:

ver control

If you see “Control System Toolbox” in the list, you’re good to go. If not, you’ll need to install it (or use a campus or workplace license that includes it).

Membership Required

You must be a member to access this content.

View Membership Levels

Already a member? Log in here
Share your love