11 views

Uploaded by Mohamad ZulFadhli

plotting system responses (CS)

- Modeling and Simulation
- Motivation Contents
- himat_ex
- Control Engineering
- Lecture 21
- Output Regulation of the Simplified Lorenz Chaotic System
- Control Systems II Eee Notes
- Compensator Design for Speed Control of DC Motor by Root Locus Approach using MATLAB
- 7_Stability2013
- 1-s2.0-S0921889014002309-main
- 190579070-Control-Systems-Engineering.pdf
- lec32
- Plotting System Responses - MATLAB Simulink.pdf
- Lecture 8
- 10. AZOJETE 15(2) 304-313.pdf
- Geta 2nd Order
- HW1 Solutions
- Non Min Phase
- Research on Frequency Response of CE-BJT and CS-MOSFET
- 215461 Syl Lab Us 2557

You are on page 1of 11

This example shows how to plot the time and frequency responses of

SISO and MIMO linear systems.

Open Script

Time Responses

For illustration purposes, create the following third-order transfer function:

sys = tf([8 18 32],[1 6 14 24])

sys =

8 s^2 + 18 s + 32

----------------------s^3 + 6 s^2 + 14 s + 24

Continuous-time transfer function.

You can plot the step and impulse responses of this system using the step and impulse commands:

subplot(2,1,1)

step(sys)

subplot(2,1,2)

impulse(sys)

You can also simulate the response to an arbitrary signal, for example, a sine wave, using the lsim command. The

input signal appears in gray and the system's response in blue.

2 of 11

clf

t = 0:0.01:4;

u = sin(10*t);

lsim(sys,u,t)

You can use the plotting commands with continuous or discrete TF, SS, or ZPK models. For state-space models,

you can also plot the unforced response from some given initial state, for example:

A = [-0.8 3.6 -2.1;-3 -1.2 4.8;3 -4.3 -1.1];

B = [0; -1.1; -0.2];

C = [1.2 0 0.6];

D = -0.6;

G = ss(A,B,C,D);

x0 = [-1;0;2]; % initial state

initial(G,x0)

grid

Frequency Responses

Frequency-domain analysis is key to understanding stability and performance properties of control systems. Bode

plots, Nyquist plots, and Nichols chart are three standard ways to plot and analyze the frequency response of a

linear system. You can create these plots using the bode, nichols, and nyquist commands. For example:

sys = tf([8 18 32],[1 6 14 24])

sys =

8 s^2 + 18 s + 32

----------------------s^3 + 6 s^2 + 14 s + 24

Continuous-time transfer function.

bode(sys)

grid

3 of 11

4 of 11

nyquist(sys)

grid

nichols(sys)

grid

5 of 11

The poles and zeros of a system contain valuable information about its dynamics, stability, and limits of

performance. For example, consider the feedback loop in Figure 1 where

For the gain value k = 0.7, you can plot the closed-loop poles and zeros using pzmap:

s = tf('s');

G = -(2*s+1)/(s^2+3*s+2);

k = 0.7;

T = feedback(G*k,1);

pzmap(T)

grid, axis([-2 0 -1 1])

The closed-loop poles (marked by blue x's) lie in the left half-plane so the feedback loop is stable for this choice of

gain k. You can read the damping ratio of the closed-loop poles from this chart (see labels on the radial lines). Here

the damping ratio is about 0.7, suggesting a well-damped closed-loop response as confirmed by:

clf

step(T)

To further understand how the loop gain k affects closed-loop stability, you can plot the locus of the closed-loop

poles as a function of k:

6 of 11

7 of 11

rlocus(G)

grid

Clicking where the locus intersects the y axis reveals that the closed-loop poles become unstable for k = 1.51. So

the loop gain should remain smaller than 1.5 for closed-loop stability.

Response Characteristics

Right-clicking on response plots gives access to a variety of options and annotations. In particular, the

8 of 11

Characteristics menu lets you display standard metrics such as rise time and settling time for step responses, or

peak gain and stability margins for frequency response plots.

Using the example from the previous section, plot the closed-loop step response:

step(T)

Now, right-click on the plot to display the Peak Response and Settling Time Characteristics, and click on the blue

dots to read the corresponding overshoot and settling time values:

All commands mentioned so far fully support multi-input multi-output (MIMO) systems. In the MIMO case, these

commands produce arrays of plots. For example, the step response of the two-input, two-output system

sys = rss(3,2,2);

sys.A = [-0.5 -0.3 -0.2 ; 0 -1.3

is a 2-by-2 array of plots where each column shows the step response of a particular input channel:

step(sys)

If desired, you can group all four responses on a single plot by right-clicking on the plot and selecting the I/O

Grouping -> All submenu. The resulting plot is shown below.

9 of 11

10 of 11

The following additional plots are useful for analyzing MIMO systems:

Singular value plot (sigma), which shows the principal gains of the frequency response

sigma(sys)

grid

11 of 11

Comparing Systems

You can plot multiple systems at once using any of the response plot commands. You can assign a specific color,

marker, or line style to each system for easy comparison. Using the feedback example above, plot the closed-loop

step response for three values of the loop gain k in three different colors:

k1 = 0.4;

T1 = feedback(G*k1,1);

k2 = 1;

T2 = feedback(G*k2,1);

step(T,'b',T1,'r',T2,'g')

legend('k = 0.7','k = 0.4','k = 1')

- Modeling and SimulationUploaded bydigiblood
- Motivation ContentsUploaded byJaishree Chauhan
- himat_exUploaded byAngel Nuñez Pacheco
- Control EngineeringUploaded byMohamed Riyaaz
- Lecture 21Uploaded byPao Yap
- Output Regulation of the Simplified Lorenz Chaotic SystemUploaded byijctcmjournal
- Control Systems II Eee NotesUploaded bymindsharp
- Compensator Design for Speed Control of DC Motor by Root Locus Approach using MATLABUploaded byIRJET Journal
- 7_Stability2013Uploaded byRalu Damian
- 1-s2.0-S0921889014002309-mainUploaded byBụi Đường
- 190579070-Control-Systems-Engineering.pdfUploaded byNeel Jha
- lec32Uploaded byWin Alfalah Nasution
- Plotting System Responses - MATLAB Simulink.pdfUploaded bypqockq
- Lecture 8Uploaded byMpaphi Map'z Dambe
- 10. AZOJETE 15(2) 304-313.pdfUploaded byAZOJETE UNIMAID
- Geta 2nd OrderUploaded bysimu84
- HW1 SolutionsUploaded byAtiyeGuengoer
- Non Min PhaseUploaded byagrothendieck
- Research on Frequency Response of CE-BJT and CS-MOSFETUploaded byDrilonii
- 215461 Syl Lab Us 2557Uploaded byNumkang Kang
- CS Qpaper CIAT-II UpdatedUploaded byanuj1166
- lqrUploaded byAndrea Guidi
- 201053112919993Uploaded byTanesan Wyot
- FCS LAB-1 ppt.pptxUploaded bymuhammad
- [7]_2013_06495741.pdfUploaded byJitender Kaushal
- AssignmentsUploaded byRiya Singh
- prjtsUploaded byGanguri Sankar
- Experiment No. 02Uploaded byfahadfiaz
- 00388132Uploaded byNarasimhan Ramanujam
- Ch32b Final Exam 2000Uploaded byNguyễn Tiến Dũng

- IEEE_06410489.pdfUploaded byتپل خسته
- Segmentation Structure and Segmentation StrategyUploaded bysubhojit banerjee
- Abstract for allUploaded byMadhanMohanReddy
- Commissioning Handbook Key1c6Uploaded bysabilas
- GSM Over SatelliteUploaded bynguyenduke83
- Circuit.cellar.037.Aug.1993Uploaded bysarah kaya
- Sg Certified Advanced AdministratorUploaded bybrahmi_xyz
- HVAC Design SourcebookUploaded byMahmoud Gwaily
- brocade-dcx-8510-faqUploaded bySarathkumar Sethunarayanan
- Information Security NotesUploaded byAbhinav Dixit
- Summer Internship Report (2)Uploaded bySirawit Hansethasuk
- phys101_fall2011_ch15Uploaded byGabriel Tijs Toledo Verwest
- 18580_Hardjito2005Uploaded byJorgeVillanueva
- 2010 Spinner Coil-Suspension Fork Manual 01Uploaded byPiotr Pit Zajlich
- 13a-Motori a Combustione Interna - Dr. B.M. Vaglieco, Ing. C. Beatrice - ProvvvisoriaUploaded byRoberto Gustavo Manitio Arteaga
- Technician Power Electronics Systems(1)Uploaded bySuraj Singh
- Charge-Sensitive PreamplifierWith Continuous ResetUploaded byGaus87
- PexFlex - LogstorUploaded byZeljko Ristic
- logo.docUploaded bySadman Sameer
- BHELComputer ScienceUploaded byManjunath Itagi
- Morroco Paper.Uploaded byDaniel Hackinmade
- These.W.attardUploaded bymbassi81
- Audera User Manual AEP CAEPUploaded byshel29
- A New Simulator for JOSEPHSON Circuits With Lossy Transmission LinesUploaded byBishnu B Adhikari
- 2-AASUploaded bypulkit chugh
- NB-263Uploaded byrouzi
- 3D WebUploaded byshin_conan
- TurbomMAX Installation and ServicingUploaded bydacrys
- Addressing Modes of 8086Uploaded byMalgireddy Ravireddy
- M18_CHIWF34_402C.pdfUploaded byxaker