77
S Wongsa 1 CONTROL SYSTEM DESIGN USING MATLAB MATLAB provides several tools for control design. These tools include Simulink Control System Toolbox Real-Time Workshop Simscape Simulink Control Design Stateflow , which can be used to support each stage of the development, from plant modelling to deployment through automatic code generation. The flexibility of the tools makes them one of the first choices, if not the first, in control design for control engineers around the world. This document is purposed to provide you the introduction of what Control System Toolbox can do in the design of LTI (Linear Time Invariant) systems. In general, there are four steps of control design: plant modelling and analysis, controller designs, verifying and refining your designs, and deploying them. Here we focus on the modelling and design parts by simulation. 1. PLANT MODELLING AND ANALYSIS You can build a linear model of your plant with the use of physical model, or fitting test data using System Identification Toolbox if the physical model is not available. Either model can be imported into Control System Toolbox as an object. Once a model is created, you can use the toolbox to analyse and control it. Some MATLAB command-line functions for modelling and analysis of LTI systems are listed in Table 1. Using these commands, 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, percent overshoot, and stability margins. Table 1 Examples of MATLAB commands for modelling and analysis of LTI systems Command Description Creation of LTI models tf Create a transfer function model. ss Create a state-space model. zpk Create a zero/pole/gain model. Data extraction tfdata Extract numerator(s) and denominator(s). ssdata Extract state-space matrices. zpkdata Extract zero/pole/gain data. Conversions tf Conversion to transfer function. ss Conversion to state space. zpk Conversion to zero/pole/gain. c2d Continuous to discrete conversion. d2c Discrete to continuous conversion. Model dynamics pole, eig System poles pzmap pole-zero map dcgain DC gain damp Natural frequency and damping of system poles pade Pade approximation of time delays. Time response step Step response. Impulse Impulse response.

Control System Design of LTI Systems Using MATLAB

Embed Size (px)

Citation preview

Page 1: Control System Design of LTI Systems Using MATLAB

S Wongsa 1

CONTROL SYSTEM DESIGN USING MATLAB

MATLAB provides several tools for control design. These tools include

• Simulink

• Control System Toolbox

• Real-Time Workshop

• Simscape

• Simulink Control Design

• Stateflow

, which can be used to support each stage of the development, from plant modelling to deployment

through automatic code generation. The flexibility of the tools makes them one of the first choices, if

not the first, in control design for control engineers around the world.

This document is purposed to provide you the introduction of what Control System Toolbox

can do in the design of LTI (Linear Time Invariant) systems. In general, there are four steps of

control design: plant modelling and analysis, controller designs, verifying and refining your designs,

and deploying them. Here we focus on the modelling and design parts by simulation.

1. PLANT MODELLING AND ANALYSIS

You can build a linear model of your plant with the use of physical model, or fitting test data

using System Identification Toolbox if the physical model is not available. Either model can be

imported into Control System Toolbox as an object. Once a model is created, you can use the toolbox

to analyse and control it. Some MATLAB command-line functions for modelling and analysis of LTI

systems are listed in Table 1. Using these commands, 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, percent overshoot, and stability margins.

Table 1 Examples of MATLAB commands for modelling and analysis of LTI systems

Command Description

Creation of LTI models

tf Create a transfer function model.

ss Create a state-space model.

zpk Create a zero/pole/gain model.

Data extraction

tfdata Extract numerator(s) and denominator(s).

ssdata Extract state-space matrices.

zpkdata Extract zero/pole/gain data.

Conversions

tf Conversion to transfer function.

ss Conversion to state space.

zpk Conversion to zero/pole/gain.

c2d Continuous to discrete conversion.

d2c Discrete to continuous conversion.

Model dynamics

pole, eig System poles

pzmap pole-zero map

dcgain DC gain

damp Natural frequency and damping of system poles

pade Pade approximation of time delays.

Time response

step Step response. Impulse Impulse response.

Page 2: Control System Design of LTI Systems Using MATLAB

S Wongsa 2

lsim Response to arbitrary inputs.

Initial Response of state-space system with given initial state.

Frequency response

bode Bode plot of the frequency response.

nyquist Nyquist plot.

nichols Nichols chart.

margin Gain and phase margins.

System interconnections

parallel Generalized parallel connection.

series Generalized series connection.

feedback Feedback connection of two systems.

2. CONTROL DESIGN

For designing SISO control systems, you can use command-line and GUI tools of

Control System Toolbox. Some MATLAB command-line functions for control design are listed in

Table 2. The MATLAB control design GUI, known as the SISO Design Tool, facilitates the design of

compensators for single-input, single output feedback loops. It lets your rapidly perform control

design tasks, such as manipulating closed-loop dynamics using root locus techniques, adding

compensator poles and zeros, and adjusting phase and gain margins.

Table 2 Classical control design tools.

Command Description

rlocus Root locus plot.

rlocfind Interactive root locus gain determination.

zgrid Generate z-plane grid lines for a root locus or pole-zero map.

acker SISO (single-input-single-output) pole placement.

place MIMO (multiple-input-multiple-output) pole placement.

In what follows, examples of digital control designs using MATLAB Control Toolbox are

provided. These examples are obtained and available freely on internet. You are strongly

recommended to try on all examples by yourself and read the references for more details.

Part I: Design using MATLAB command-line tools, taken from [1].

Example I Cruise control

Example II DC motor speed control

Example III DC motor position control

Example IV Ball and Beam problem using PID Control

Part II : Design using SISO Design Tool, taken from [2].

Example V Bode diagram design (DC motor)

Example VI Root-locus design (Electrohydraulic servomechanism)

Page 3: Control System Design of LTI Systems Using MATLAB

S Wongsa 3

REFERENCES

1. Carnegie Mellon, Digital Control Tutorial, Control Tutorials for Matlab.

Available: http://www.engin.umich.edu/group/ctm/digital/digital.html

2. Control System Toolbox 8.5, Mathworks, Inc.

Available: http://www.mathworks.com/access/helpdesk/help/toolbox/control/

3. F. Haugen, Tutorial for Control System Toolbox for MATLAB, October 11, 2003.

Available: http://techteach.no/publications/control_system_toolbox/

Page 4: Control System Design of LTI Systems Using MATLAB

����������� ������������

�������������� ������������������ ����� ��� �������� ������ �����������

Page 5: Control System Design of LTI Systems Using MATLAB
Page 6: Control System Design of LTI Systems Using MATLAB
Page 7: Control System Design of LTI Systems Using MATLAB
Page 8: Control System Design of LTI Systems Using MATLAB
Page 9: Control System Design of LTI Systems Using MATLAB
Page 10: Control System Design of LTI Systems Using MATLAB
Page 11: Control System Design of LTI Systems Using MATLAB
Page 12: Control System Design of LTI Systems Using MATLAB

��������������������������������

�������������� ������������������ ����� ��� �������� ����� �����������

Page 13: Control System Design of LTI Systems Using MATLAB
Page 14: Control System Design of LTI Systems Using MATLAB
Page 15: Control System Design of LTI Systems Using MATLAB
Page 16: Control System Design of LTI Systems Using MATLAB
Page 17: Control System Design of LTI Systems Using MATLAB
Page 18: Control System Design of LTI Systems Using MATLAB
Page 19: Control System Design of LTI Systems Using MATLAB
Page 20: Control System Design of LTI Systems Using MATLAB
Page 21: Control System Design of LTI Systems Using MATLAB

�������������������� � ������������

�������������� ������������������ ����� ��� �������� ������ �����������

Page 22: Control System Design of LTI Systems Using MATLAB
Page 23: Control System Design of LTI Systems Using MATLAB
Page 24: Control System Design of LTI Systems Using MATLAB
Page 25: Control System Design of LTI Systems Using MATLAB
Page 26: Control System Design of LTI Systems Using MATLAB
Page 27: Control System Design of LTI Systems Using MATLAB
Page 28: Control System Design of LTI Systems Using MATLAB
Page 29: Control System Design of LTI Systems Using MATLAB

���������������������������������

�� �������������

�������������� ������������������ ����� ��� �������� ���� ������ !����

Page 30: Control System Design of LTI Systems Using MATLAB
Page 31: Control System Design of LTI Systems Using MATLAB
Page 32: Control System Design of LTI Systems Using MATLAB
Page 33: Control System Design of LTI Systems Using MATLAB
Page 34: Control System Design of LTI Systems Using MATLAB
Page 35: Control System Design of LTI Systems Using MATLAB
Page 36: Control System Design of LTI Systems Using MATLAB
Page 37: Control System Design of LTI Systems Using MATLAB
Page 38: Control System Design of LTI Systems Using MATLAB
Page 39: Control System Design of LTI Systems Using MATLAB

���������������� ��������� �������������

�������������� ����������"����� ������ ������" ��� ������� ������� �������� #�$%&'()%'����

Page 40: Control System Design of LTI Systems Using MATLAB
Page 41: Control System Design of LTI Systems Using MATLAB
Page 42: Control System Design of LTI Systems Using MATLAB
Page 43: Control System Design of LTI Systems Using MATLAB
Page 44: Control System Design of LTI Systems Using MATLAB
Page 45: Control System Design of LTI Systems Using MATLAB
Page 46: Control System Design of LTI Systems Using MATLAB
Page 47: Control System Design of LTI Systems Using MATLAB
Page 48: Control System Design of LTI Systems Using MATLAB
Page 49: Control System Design of LTI Systems Using MATLAB
Page 50: Control System Design of LTI Systems Using MATLAB
Page 51: Control System Design of LTI Systems Using MATLAB
Page 52: Control System Design of LTI Systems Using MATLAB
Page 53: Control System Design of LTI Systems Using MATLAB
Page 54: Control System Design of LTI Systems Using MATLAB
Page 55: Control System Design of LTI Systems Using MATLAB
Page 56: Control System Design of LTI Systems Using MATLAB
Page 57: Control System Design of LTI Systems Using MATLAB
Page 58: Control System Design of LTI Systems Using MATLAB
Page 59: Control System Design of LTI Systems Using MATLAB

������������������������ ����

��������������� ����� ������� ������������������ ����������"����� ������ ������" ��� ������� ������� �������� #�$%&'(*�'����

Page 60: Control System Design of LTI Systems Using MATLAB
Page 61: Control System Design of LTI Systems Using MATLAB
Page 62: Control System Design of LTI Systems Using MATLAB
Page 63: Control System Design of LTI Systems Using MATLAB
Page 64: Control System Design of LTI Systems Using MATLAB
Page 65: Control System Design of LTI Systems Using MATLAB
Page 66: Control System Design of LTI Systems Using MATLAB
Page 67: Control System Design of LTI Systems Using MATLAB
Page 68: Control System Design of LTI Systems Using MATLAB
Page 69: Control System Design of LTI Systems Using MATLAB
Page 70: Control System Design of LTI Systems Using MATLAB
Page 71: Control System Design of LTI Systems Using MATLAB
Page 72: Control System Design of LTI Systems Using MATLAB
Page 73: Control System Design of LTI Systems Using MATLAB
Page 74: Control System Design of LTI Systems Using MATLAB
Page 75: Control System Design of LTI Systems Using MATLAB
Page 76: Control System Design of LTI Systems Using MATLAB
Page 77: Control System Design of LTI Systems Using MATLAB