aaSection 5–5 / Transient-Response Analysis with MATLAB 211MATLAB 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')
Outputyt (sec)Response to Initial Condition0.511.522.50
012345678910Figure 5–34
Responsey(t)to
initial condition.
By defining the state variables aswe 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 3S
C
x# 1
x# 2
x# 3S = C
0
0
- 10
1
0
- 17
0
1
- 8
SC
x 1
x 2
x 3S, 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