Modern Control Engineering

(Chris Devlin) #1
aa

210 Chapter 5 / Transient and Steady-State Response Analyses

MATLAB 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 Condition

t Sec

0 0.5 1 1.5 2 2.5 3

State Variables

x^1

and

x^2

3

− 3

− 2

− 1

0

1

2

x 1

x 2

Figure 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= 0

Then 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


Openmirrors.com

Free download pdf