Modern Control Engineering

(Chris Devlin) #1

aa


Section 5–5 / Transient-Response Analysis with MATLAB 189

MATLAB Program 5–3


wn = 5;


damping_ratio = 0.4;


[num0,den] = ord2(wn,damping_ratio);


num = 5^2*num0;


printsys(num,den,'s')


num/den =


25


S^2+4s+ 25


Another way to write a text or texts in the plot is to use the gtextcommand. The


syntax is


gtext('text')


When gtextis executed, the computer waits until the cursor is positioned (using a


mouse) at the desired position in the screen. When the left mouse button is pressed,


the text enclosed in simple quotes is written on the plot at the cursor’s position. Any


number of gtextcommands can be used in a plot. (See, for example, MATLAB


Program 5–15.)


MATLAB Description of Standard Second-Order System. As noted earlier, the


second-order system


(5–40)


is called the standard second-order system. Given vnandz, the command


printsys(num,den) or printsys(num,den,s)


printsnum/denas a ratio of polynomials in s.


Consider, for example, the case where vn=5radsec and z=0.4. MATLAB Program


5–3 generates the standard second-order system, where vn=5radsec and z=0.4.


Note that in MATLAB Program 5–3, “num 0” is 1.


G(s)=


v^2 n


s^2 + 2 zvn s+v^2 n


Obtaining the Unit-Step Response of the Transfer-Function System. Let us


consider the unit-step response of the system given by


G(s)=


25


s^2 +4s+ 25

Free download pdf