Modern Control Engineering

(Chris Devlin) #1
aa

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

MATLAB Program 5–17


t = 0:0.05:10;


A = [0 1 0;0 0 1;-10 -17 -8];


B = [0;0;0];


C = [1 0 0];


D = [0];


y = initial(A,B,C,D,[2;1;0.5],t);


plot(t,y)


grid


title('Response to Initial Condition')


xlabel('t (sec)')


ylabel('Output y')


Output

y

t (sec)

Response to Initial Condition

0.5

1

1.5

2

2.5

0
012345678910

Figure 5–34
Responsey(t)to
initial condition.


By defining the state variables as

we obtain the following state-space representation for the system:

A possible MATLAB program to obtain the response y(t)is given in MATLAB Program 5–17.
The resulting response curve is shown in Figure 5–34.

y=[ 1 0 0 ]C


x 1
x 2
x 3

S


C


x# 1
x# 2
x# 3

S = C


0

0

- 10

1

0

- 17

0

1

- 8

SC


x 1
x 2
x 3

S, C


x 1 ( 0 )
x 2 ( 0 )
x 3 ( 0 )

S =C


2

1

0.5

S


x 3 =y$

x 2 =y#

x 1 =y
Free download pdf