Modern Control Engineering

(Chris Devlin) #1
aa

184 Chapter 5 / Transient and Steady-State Response Analyses

In this expression a zero is padded. Note that if zeros are padded, the dimensions of


“num” vector and “den” vector become the same. An advantage of padding zeros is that


the “num” vector and “den” vector can be directly added. For example,


num + den = [0 2 25] + [1 4 25]


= [1 6 50]


Ifnumandden(the numerator and denominator of the closed-loop transfer function)


are known, commands such as


step(num,den), step(num,den,t)


will generate plots of unit-step responses (tin the step command is the user-specified time.)


For a control system defined in a state-space form, where state matrix A, control


matrixB, output matrix C, and direct transmission matrix Dof state-space equations are


known, the command


step(A,B,C,D), step(A,B,C,D,t)


will generate plots of unit-step responses. When tis not explicitly included in the step


commands, the time vector is automatically determined.


Note that the command step(sys)may be used to obtain the unit-step response of a


system. First, define the system by


sys = tf(num,den)


or


sys = ss(A,B,C,D)


Then, to obtain, for example, the unit-step response, enter


step(sys)


into the computer.


When step commands have left-hand arguments such as


[y,x,t] = step(num,den,t)


[y,x,t] = step(A,B,C,D,iu)


[y,x,t] = step(A,B,C,D,iu,t) (5–36)


no plot is shown on the screen. Hence it is necessary to use a plotcommand to see the


response curves. The matrices yandxcontain the output and state response of the sys-


tem, respectively, evaluated at the computation time points t.(yhas as many columns as


outputs and one row for each element in t. xhas as many columns as states and one row


for each element in t.)


Note in Equation (5–36) that the scalar iuis an index into the inputs of the system


and specifies which input is to be used for the response, and tis the user-specified time.


If the system involves multiple inputs and multiple outputs, the stepcommand, such as


given by Equation (5–36), produces a series of step-response plots, one for each input


and output combination of


(For details, see Example 5–3.)


y=Cx+Du


x# =Ax+Bu


Openmirrors.com

Free download pdf