Control System Toolbox

Key Features

  • Transfer-function, state-space, zero-pole-gain, and frequency-response models of linear systems
  • Step response, Nyquist plot, and other time-domain and frequency-domain tools for analyzing stability and performance
  • Automatic tuning of PID, gain-scheduled, and arbitrary SISO and MIMO control systems
  • Root locus, Bode diagrams, LQR, LQG, and other classical and state-space design techniques
  • Model representation conversion, continuous-time model discretization, and low-order approximation of high-order systems
Control System Designer app (top) to interactively analyze, design, and tune controllers. Available tools include root locus, Bode, and step response plots (bottom).

Creating and Manipulating Linear Models

Linear control techniques are the foundation of control system design and analysis. Control System Toolbox™ lets you create and manipulate the linear models of your control system.

Creating Models

All standard model representations are supported, including transfer function, zero-pole-gain, explicit and descriptor state-space, and frequency-response data. Linear models can be SISO or MIMO, and continuous or discrete. You can represent PID controllers as PID objects. In addition, you can accurately model and simulate systems with time delays, including feedback loops with delays.

Control System Toolbox enables you to create and work with collections of linear models and model arrays. You can use model arrays to represent and analyze sensitivity to parameter variations or to validate a controller design against several plant models. You can also approximate nonlinear dynamics using linear parameter-varying (LPV) systems. The toolbox lets you simulate such systems using LPV System block.

Building a model of your plant is usually the first step in designing a control system. If no linear model is available, you can build one by fitting test data using System Identification Toolbox™, or by linearizing a Simulink® model using Simulink Control Design™. Once you have created a linear model, you can use Control System Toolbox to analyze it and design a controller.

Linear models from Control System Toolbox can be used in other control design products, such as Robust Control Toolbox™ and Model Predictive Control Toolbox™.

MATLAB code for creating and analyzing a feedback loop with controller C and plant model G. The plant is modeled as a first-order transfer function with a delay of T seconds.

Interconnecting and Transforming Models

Control System Toolbox provides commands for:

  • Performing arithmetic on linear models
  • Building complex block diagrams by connecting simple models in series, parallel, or feedback
  • Discretizing continuous-time models
  • Decomposing models into slow-fast and stable-unstable components
  • Performing coordinate transformations for state-space models
Model interconnections of linear systems: from simple series and parallel connections, to complex block diagrams.

Reducing Model Order

Control System Toolbox provides an app and functions for computing low-order approximations of high-order models. Using the Model Reducer app, you can simplify high-order linear models while preserving model dynamics that are important to your application. You can remove states with low energy contributions, select significant modes, and cancel close pole/zero pairs. You can also compare the original and reduced models using time and frequency domain plots.

Approximate nonlinear Simulink model with a low-order linear model.

Analyzing Models

Control System Toolbox provides an app and functions for analyzing linear models. Using the Linear System Analyzer app, you can view and compare the time and frequency responses of several linear models at once. You can also inspect key performance parameters, such as rise time, settling time, maximum overshoot, and stability margins. Available plots include step response, impulse response, Bode, Nichols, Nyquist, singular value, and zero-pole. You can simulate the response to user-defined inputs and initial conditions to further investigate system performance.

The Linear System Analyzer app for analyzing linear models in the time and frequency domains. You can compare several linear models at once using a variety of time-domain and frequency-domain plots.

Designing and Tuning Control Systems

Control System Toolbox lets you systematically tune control system parameters using SISO and MIMO design techniques. You can also design Kalman filters.

Tuning PID Controllers

Control System Toolbox provides tools for manipulating and tuning PID controllers through the PID Tuner app or command-line functions. You can:

  • Use PID objects to represent continuous-time or discrete-time PID controllers in standard or parallel form
  • Automatically tune PID gains to balance performance and robustness
  • Specify tuning parameters, such as desired response time and phase margin

If a linear model of the plant is not available, you can identify a plant model from measured input-output data directly in the PID Tuner app using System Identification Toolbox.

Design PID controllers using Control System Toolbox.
Identify a plant model from measured input-output data and use this model to tune PID Controller gains.
Tuning a PID controller C, defined by the equation, with the PID Tuner app. You can automatically calculate an initial design and then interactively adjust the response time to recompute PID gains.

Tuning SISO Controllers

The Control System Designer app lets you design and analyze SISO control systems. You can:

  • Design common control components, such as PIDs, lead/lag networks, and notch filters
  • Graphically tune SISO loops using classical tools, such as root locus, Bode diagrams, and Nichols charts
  • Monitor closed-loop responses and performance requirements in real time while tuning your controller
  • Evaluate design factors, such as choice of sample time and controller complexity

In addition to standard model representations, such as transfer function and frequency-response data, the Control System Designer app supports systems with time delays. You can also work with several plant models simultaneously to evaluate your control design for different operating conditions.

Simulink Control Design extends Control System Toolbox by enabling you to tune controllers in Simulink that consist of several SISO loops. You can close SISO loops sequentially, visualize loop interactions, and iteratively tune each loop for best overall performance. Simulink Control Design lets you export the tuned parameters directly to Simulink for further design validation through nonlinear simulation.

When used with Simulink Design Optimization™, the Control System Designer app lets you optimize the control system parameters to enforce time-based and frequency-based performance requirements. When used with Robust Control Toolbox, the app lets you automatically shape open-loop responses using H-infinity algorithms.

In addition to the Control System Designer app, you can use the Control System Tuner app to tune SISO controllers in both MATLAB® and Simulink. The Control System Tuner app automatically tunes controller parameters to meet time-domain and frequency-domain requirements.

Design control systems with the Control System Designer app.
Design and analyze a controller for different operating points of a nonlinear plant simultaneously.

Tuning MIMO Controllers

Most embedded control systems have a fixed architecture with simple tunable elements such as gains, PID controllers, or low-order filters. Such architectures are easier to understand, implement, schedule, and retune than complex centralized controllers. Control System Toolbox provides functions and the Control System Tuner app for modeling and tuning these decentralized control architectures. You can:

  • Specify tunable elements such as gains, PID controllers, fixed-order transfer functions, and fixed-order state-space models
  • Combine tunable elements with ordinary linear time-invariant (LTI) models to create a tunable model of your control architecture
  • Specify and visualize tuning requirements such as tracking performance, disturbance rejection, noise amplification, closed-loop pole locations, and stability margins
  • Automatically tune the controller parameters to satisfy the must-have requirements (design constraints) and to best meet the remaining requirements (objectives)
  • Validate controller performance in the time and frequency domains

The toolbox also lets you tune one controller against a set of plant models. This enables you to design a controller that will be robust to changes in plant dynamics due to variations in operating conditions, and also able to sensor or actuator failures.

In addition to tuning fixed-structure MIMO controllers, Control System Toolbox supports established state-space methods for MIMO design, including LQR/LQG and pole-placement algorithms. It also provides tools for designing observers, including Kalman filters.

Automatically tune a multivariable flight control system using the Control System Tuner app.
Tune a fixed-structure controller for multiple operating modes of the plant.

Tuning Gain-Scheduled Controllers

Gain scheduling is a linear technique used for controlling nonlinear or time-varying plants. This technique involves computing linear approximations of the plant at various operating conditions, tuning controller gains at the operating condition, and scheduling controller gains as the plant changes operating conditions. Control System Toolbox provides tools for automatically computing gain schedules for fixed-structure control systems. You can:

  • Automatically trim and linearize Simulink models at multiple operating conditions (using Simulink Control Design)
  • Parameterize controller gain surfaces as functions of scheduling variables
  • Construct a linear parameter-varying (LPV) model representing the system throughout its operating range
  • Specify tuning requirements such as tracking and disturbance rejection
  • Automatically tune gain surface coefficients to satisfy tuning requirements at all operating conditions
  • Update parameters of the Simulink Look Up Table or Interpolation blocks implementing the controller with tuned gain values
Generate smooth gain schedules for a three-loop autopilot.