aa210 Chapter 5 / Transient and Steady-State Response AnalysesMATLAB Program 5–16
t = 0:0.05:3;
A = [0 1;-10 -5];
B = [0;0];
C = [0 0];
D = [0];
[y,x] = initial(A,B,C,D,[2;1],t);
x1 = [1 0]*x';
x2 = [0 1]*x';
plot(t,x1,'o',t,x1,t,x2,'x',t,x2)
grid
title('Response to Initial Condition')
xlabel('t Sec')
ylabel('State Variables x1 and x2')
gtext('x1')
gtext('x2')
Response to Initial Conditiont Sec0 0.5 1 1.5 2 2.5 3State Variablesx^1andx^23− 3− 2− 1012x 1x 2Figure 5–33
Response curves to
initial condition.EXAMPLE 5–10 Consider the following system that is subjected to the initial condition. (No external forcing
function is present.)Obtain the response y(t)to the given initial condition.y(0)=2, y#(0)=1, y$(0)=0.5
y%+8y$+17y# +10y= 0Then the command “initial” can be used as shown in MATLAB Program 5–16 to obtain
the response to the initial condition. The response curves x 1 (t)andx 2 (t)are shown in
Figure 5–33. They are the same as those shown in Figure 5–32.
Openmirrors.com