You are on page 1of 38

Chp.

3
State Variable Models
Dynamical Systems

State Space Representation


Transfer Function

Realization
Examples

Mathematical relations between


observed quantities

System
INPUT

OUTPUT

System

INPUT

OUTPUT

INPUT

OUTPUT
System

Controller

Controller

Plant

OPERATING POINT, LINEARIZATION

A=[0 -3;1 -2]

sys1=ss(A,B,C,D);
>> t=0:0.01:10;
>> u1=zeros(1,1001);
>> u1(1:end)=1;
>> u2=sin(t);
>> u3=sin(10*t);
>> u4=0*t;
>> x0=[1 1];
>> [y,T,x]=lsim(sys1,u1,t,x0);
>> plot(T,x(:,1)
grid
>> plot(T,x(:,2))
>> grid

A=
0 -3
1 -2
>> B=[2;0]
B=
2
0
>> C=[0 3];D=0;
g=tf(sys1)

Transfer function:
6
------------s^2 + 2 s + 3

unit step
sinusoidal
zero input
initial condition

g=tf([2 8 6],[1 8 16 6])


Transfer function:
2 s^2 + 8 s + 6
---------------------s^3 + 8 s^2 + 16 s + 6
>> sys1=ss(g)

t=0:0.01:10;
u1=zeros(1,1001);
u1(1:end)=1;
u2=sin(t);
u3=sin(10*t);
u4=0*t;
x0=[1 1 0];
[y,T,x]=lsim(sys1,u1,t,x0);
plot(T,x(:,1))
>> [y,T,x]=lsim(sys1,u3,t,x0);
>> plot(T,x(:,1))
>> xlabel('t (sec)')
>> ylabel('x_1')
>> grid

a=
x1 x2 x3
x1 -8 -4 -1.5
x2 4 0 0
x3 0 1 0
b=
u1
x1 2
x2 0
x3 0
c=
x1 x2 x3
y1 1 1 0.75
d=
u1
y1 0
Continuous-time model.

You might also like