You are on page 1of 4

ELE 4201 Control Systems Laboratory

Laboratory: III Title: Analysis of Dynamic Systems Unit Step Response curves Objectives: To have each student become familiar with MATLAB by engaging
in exercises to investigate unit step responses for state space systems. For a control system defined in state-space form, where state matrix A, control matrix B, output matrix C, and direct transmission matrix D of state space equations are known, the command step(A,B,C,D) will generate plots of unit step responses. The time vector is automatically determined when t is not explicitly included in the step commands. Note that the command step(sys) may be used to obtain the unit-step response of a system. First, we define the system by sys = tf(num,den) or sys = ss(A,B,C,D) Then to obtain for example the unit-step response, we 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) no plot is shown on the screen. Hence, it is necessary to use a plot command to see the response curves. The matrices y and x contain the output and state response of the system, respectively, evaluated at the computation time points t.(y has as many

columns and one row for each element in t; x has as many columns as states and one row for each element in t.) Note in the left-handed arguments the scalar iu is an index into the inputs of the system and specifies which input is to be used for the response; t is the userspecified time. If the system involves multiple inputs and multiple outputs, the step command, as given for the left-handed arguments produces a series of step response plots, one for each input and output combination of . x = Ax + Bu y = Cx + Du Example I Obtain the unit-step response curves of the system x1 = -1 x2 = 6.5 y1 = 1 y2 = 0 -1 0 0 1 x1 x2 x1 x2 1 1 0 0 1 0 0 0 u1 u2 u1 u2

We will derive an expression of the transfer function. The system is defined by . x = Ax + Bu y = Cx + Du The transfer matrix G(s) is a matrix that relates Y(s) and U(s) as follows: Y(s) = G(s)U(s) Taking the Laplace Transforms of the state-space equations, we obtain sX(s) x(0) = AX(s) + BU(s) Y(s) = CX(s) + DU(s) In deriving the transfer matrix, we assume that x(0) = 0. Then, we get: X(s) = (sI A)-1 BU(s) Substituting into the output, we obtain: Y(s) = [C(sI A)-1 B + D]U(s) Thus, the transfer function matrix G(s) is given by G(s) = C(sI A)-1 B + D
2

The transfer matrix G(s) for the given system then becomes G(s) = 1 0 s + 1 1 -1 1 1 0 1 6.5 s 1 0

= 1/s2 + s + 6.5

-1 6.5

1 1 s +1 1

= 1/s2 + s + 6.5

s- 1

s s +7.5 6.5

Hence, Y1(s) = (s - 1)/s2 + s + 6.5 Y2(s) = (s + 7.5)/s2 + s + 6.5 s/s2 + s + 6.5 6.5/s2 + s + 6.5 U1(s) U2(s)

Since this system involves two inputs and two outputs, four transfer functions may be defined depending on which signals are considered as input and output. Note that when considering the signal u1 as the input, we assume that signal u2 is zero and vice versa. The four transfer functions are: Y1(s)/U1(s) = (s - 1)/s2 + s + 6.5,Y1(s)/U2(s) = s/s2 + s + 6.5 Y2(s)/U1(s) = (s + 7.5)/s2 + s + 6.5, Y2(s)/U2(s) = 6.5/s2 + s + 6.5 The four individual unit-step response curves can be plotted with the command step(A,B,C,D) MATLAB program: >> A = [-1 -1; 6.5 0]; >> B = [1 1;1 0]; >> C = [1 0;0 1]; >> D = [0 0;0 0]; >> step(A,B,C,D) Did you obtain the four response curves as stated?

To plot two step response curves for the input u1 in one diagram and two step response curves for the input u2 in another diagram, we may use the commands step(A,B,C,D,1) and step(A,B,C,D,2) MATLAB plots the desired step-response curves. Enter matrices A,B,C, and D >> A = [-1 -1;6.5 0]; >> B = [1 1;1 0]; >> C = [1 0;0 1]; >> D = [0 0;0 0]; To plot step response curves when the input is u1 >> step(A,B,C,D,1) >> grid >> title(Step Response Plots: Input = u_1 (u_2 = 0)) >> text(3.4, -0.05,Y1) >> text(3.4, 1.4, Y2) Plot step response curves when input is u2 >> step(A,B,C,D,2) >> grid >> title (Step Response Plots: Input = u_2(u_1 = 0)) >> text(3,0.14,Y1) >> text(2.8,1.1,Y2) Did you obtain two separate plots: For u1 input (u2 = 0) and for u2 input (u1 = 0)?

You might also like