Professional Documents
Culture Documents
z1(s)+z2(s)
R=1;
L=.25;
C=4;
n=1;
d=[L*C R*C 1];
s=tf(n,d)
1
------------s^2 + 4 s + 1
n=sqrt(1/(L*C))= 50
=(R/2)*sqrt(C/L)
t=0:20;
y=1+.0774*exp(-3.732*t)1.0774*exp(-.2679*t);
Vi Rx1 Lx 1 x 2
Cx 2 x1
R
1
1
x1 x 2 Vi
L
L
L
1
x 2 x1
C
x 1
-3.7321
-0.2679
State Equations
x1 4 x1 4 x2 4u
x 2 .25 x1
y x2
u=1
dif.m
function c= dif(t,x);
A=[-4 -4; 0.25 0];
B=[4;0];
c=A*x+B;
x0=([0;.0]);
ts=[0 20];
[t,x]=ode23('dif',ts,x0);
Copy this in command
window
1
0.9
Plot(t,x)
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
10
12
14
16
18
20
plot(x(:,1),x(:,2))
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Simple Pendulum
Simple Pendulum
Assume m=g=1
sin 0
x1 x2 ;
x 2 sin x1
function c= pend(t,x);
c=[x(2);-sin(x(1))];
ts=[0 20];
x0=[.5;-.5];
[t,x]=ode23('pend', ts,x0);
plot(t,x)
plot(x(:,1),x(:,2))
a
a0 y b0u
n 1
1
dt n
dt n1
dt
d n1 y
xn n1
dt
dy
x2
dt
d2y
x 2 2 x3
dt
d3y
x 3 3 x4
dt
x1
x2
dny
x n n a0 x1 a1 x2 an1 xn b0u
dt
x 1
x
2
x 3
x n1
x
n
0
0
a0
1
0
0
0
1
0
0
0
1
0
0
0
0
a1
0
a2
0
a3
0
a4
x1
x
2
x3
y 1 0 0 0 0
xn1
xn
x1 0
x 0
2
x3 0
u
1 xn1 0
an1 xn b0
0
0
0
x1 x2
x 2 x3
x 3 24 x1 26 x2 9 x3 24r
y x1
X 1 ( s)
1
R ( s) a3 s 3 a2 s 2 a1s a0
Y ( s ) C ( s ) (b2 s 2 b1s b0 ) X 1 ( s )
R( s ) a3 s 3 a2 s 2 a1s a0
y (t ) b0 x1 b1 x 2 b2 x 3
d 2 x1
dx
y (t ) b2 2 b1 1 b0 x1
dt
dt
(1)
(2)
or
X( s ) ( sI A ) 1 BU( s)
Y( s )
C( sI A ) 1 B D
U( s )
(3)
y 1 0 0 x
Solution:
1
0 s 1
0
s 0 0 0
( sI A) 0 s 0 0
0
1 0 s
1
0 0 s 1 2 3 1 2 s 3
s 2 3s 2
s3
1
1
s
3
s
s
2
s
2s 1 s
adj ( sI A)
1
( sI A)
det( sI A)
s 3 3s 2 2 s 1
Y ( s ) 10( s 2 3s 2)
3
U ( s ) s 3s 2 2 s 1
1
0
2 3
eig(A)
-1
-2
1
0
2 3
eig(A)
-1
-2
x x x 0.
eig(A)
0 1
A
-0.5000 + 0.8660i
-0.5000 - 0.8660i
3
-1
-2
-3
-4
20
40
60
80
100
120
eig(A)
0 + 1.0000i
0 - 1.0000i
5
4
3
2
1
0
-1
-2
-3
-4
-5
20
40
60
80
100
120
4. Saddle Po int
x x 2 x 0.
Separatrices
0 1
A
2 1
x x x 0.
eig(A)
0 1
A
-0.5000 + 0.8660i
-0.5000 - 0.8660i
-1
-2
-3
-4
20
40
60
80
100
120
eig(A)
0 + 1.0000i
0 - 1.0000i
5
4
3
2
1
0
-1
-2
-3
-4
-5
20
40
60
80
100
120
x 1 ax1 bx1 x 2
a 1, b 0.03, c 0.02, d 1
x 2 dx 2 cx1 x 2
lions and gazelles,
birds and insects,
pandas and eucalyptus trees,
herbivore-plant,
parasitoid-host,
Venus fly traps and flies.
Assumptions
the predator species is totally dependent on a single prey
species as its only food supply,
the prey species has an unlimited food supply, and
there is no threat to the prey other than the specific
predator.
.
A good model must be simple enough to be
mathematically tractable, but complex enough to
represent a system realistically.