Академический Документы
Профессиональный Документы
Культура Документы
• Types of systems electric
mechanical
electromechanical
• Types of models I/O o.d.e. models
Transfer Function
State space models
I/O o.d.e. model: o.d.e. involving input/output only.
linear:
dn d n1 d
n
y an1 n1 y a1 y a0 y
dt dt dt
dm d
bm m u b1 u b0u
dt dt
where u: input
y: output
State space model:
General: State eq : x f ( x, u )
Output eq : y h( x, u )
for LTI sys: x Ax Bu
y Cx Du
where: u: input x Fx Gu
y: output y Hx Ju
x: state vector
A,B,C,D, or F,G,H,J are constant matrices
Other types of models:
Transfer function model (This is I/O model)
from I/O o.d.e. model, take Laplace
transform:
Ly(t ) Y (s),
d
L y (t ) sY ( s )
dt
d2
L 2 y(t ) s 2Y ( s),
dt
d
Lu(t ) U (s), L u (t ) sU ( s )
dt
Then I/O model in L.T. domain becomes:
s nY ( s) an1s n1Y ( s) a1sY ( s) a0Y ( s)
bm s mU ( s) b1sU ( s) b0U ( s)
Y ( s) bm s m b1s b0
n
U ( s) s an 1s n 1 a1s a0
denote
H ( s ) or G ( s )
This is the T.F. model of the system.
∴T.F. H ( s) or G ( s) Y ( s)
U ( s)
or
Y ( s) H ( s)U ( s) or G ( s)U ( s)
i.e. output L.T. is eq. to input L.T. with gain H(s)
Why State-Variable Models
The system has two state variables, the inductor current (i) and
the capacitor voltage (v).
All three results are valid models but only the equations obtained
from the mesh analysis can be represented as state equations in
the standard form. The state equations are given below:
di R 1 1
i vc vIN
dt L L L
dvc i
dt C
This form is frequently used in digital simulation.
di R 1 1
i vc vIN
dt L L L
dvc i
dt C
State Equations
The state equations, in standard form, for the series RLC circuit
are:
R 1
i L i 1
L vIN
L
1
vc vc 0
0
C
i
y 0 1 0vIN vc
vc
Solution Using Transforms
vOUT(t) can be obtained by taking the inverse (with step input):
VIN ( s)
LC 1
VOUT ( s) 2
s R s 1 s( s 0.5 j 0.866)( s 0.5 j 0.866)
L LC
d2y dy
M 2 B Ky f (t )
dt dt
d2y dy
M 2
B Ky f (t ) x1 x2
dt dt
1 Mx2 Bx2 Kx1 u
G (s) K B u
Ms 2 Bs K x2 x1 x2
M M M
Let x1 (t ) y y x1
dy (t ) dx(t )
x2 (t ) x1 (t )
dt dt x1 0 1 x 0
x K B x 1 u
1
dx2 (t ) d 2 y (t ) 2 M M 2 M
x2
dt dt 2 x1
y 1 0 0u
x2
Next slides consider general standard Transfer Function
Example: Consider the system described by the coupled differential equations
Initial Conditions
x Ax Bu
y Cx
U B
+ x X
C Y
+
x Ax Bu solution
y Cx response
b2 b1 b0
Y ( s) b2 s b1s b0
2 2 3
Y ( s) Y G
3 s s s
U ( s) s a2 s 2 a1s a0 U ( s ) 1 a2 a1 a0 U 1 GH
s s2 s3
Dividing each term by the highest order of s yields
is canonical form
x1 0 1 0 x1 0
x 0 0 1 x2 0 u
2
x3 a0 a1 a2 x3 1
x1
y b0 b1 b2 x2 0 u
x3
Y ( s) b2 s 2 b1s b0
3
U ( s) s a2 s 2 a1s a0
Decompose into two blocks as shown in Figure:
U (s) 1 W (s) Y ( s)
b2 s b1s b0
2
s 3 a2 s 2 a1s a0
W ( s) 3
U ( s) Y (s) b2 s 2W (s) b1sW (s) b0W (s)
s a2 s 2 a1s a0
b2
b1
+ +
u (t ) w 1 w 1 w 1 w + y
x1 b0
- s x3 s x2 s
- -
a2
a1
a0
Signal flow graph similar to the Simulation diagram :
b2
b1
1 w s 1 w s 1 w s 1 w b0 1 y
u (t )
a2 x3 x2 x1
a1
a0
1
7
1 w s 1
w s 1
w s 1 w 2 1 y
u (t ) x3
9 x2 x1
26
24
x1
y 2 7 1 x2
x3
(b) Re-write the following statements:
num = [1 7 2]; den = [1 9 26 24];
[A, B, C, D] = tf2ss(num, den)
The result is:
A= B= C= D=
-9 -26 -24 1 1 7 2 0
1 0 0 0
0 1 0 0
Note that MATLAB assigns x1 to the output of the first integrator, and
x2 and x3 to the output of the second and third integrators.
Example:
b2 b1 b0 2 8 6
2 3 2 3
C ( s) 2 s 2 8s 6 s s s s s s
3
R( s ) s 8s 2 26s 6 1 a2 a1 a0 1 8 26 6
s s2 s3 s s2 s3
The form is:
is control canonical form
x1 0 1 0 x1 0
x 0 0 1 x 0 r
2 2
x3 6 26 8 x3 1
x1
y 6 8 2 x2 [0]r.
x3
System controllable but not observable. Why?
Ans: State model is based on control canonical form, this can be
confirmed by another method later.
b2 b1 b0
Y ( s) b2 s b1s b0
2 2 3
Y ( s) Y G
3 s s s
U ( s) s a2 s 2 a1s a0 U ( s ) 1 a2 a1 a0 U 1 GH
s s2 s3
X 1 a2 1 0 X 1 b2
X 2 a1 0 1 X 2 b1 u
X 3 a0 0 0 X 3 b0
X1
Y 1 0 0 X 2
Observer canonical form block diagram. X 3
Control canonical form
X 1 a2 1 0 X 1 b0
X 1 0 0 X 1 0
X 0
1
X 0 u X a 0 1 X b u
2
0 1 2 1 2 1
2
X 3 a0 a1 a2 X 3 1 X 3 a0 0 0 X 3 b2
X1 X1
Y b0 b1 b2 X 2 Y 1 0 0 X 2
X3 X 3
Controllable but not directly observable but not directly
observable controllable
s 1 s 1 1
G(s) 2
(s 1)( s 3) s 4s 3 s 3
0 1 0 0 3 1
x
x u x x u
3 4 1 1 4 1
x1 x1
y 1 1 y 0 1
x 2 x 2
State space model to T.F. / block diagram
s.s.
x Ax Bu
y Cx Du
Take L.T. :
sX ( s) AX ( s) BU ( s) 1
Y ( s) CX ( s) DU ( s) 2
From sX(s)-AX(s)=BU(s)
1
sIX(s)-AX(s)=BU(s)
(sI-A)X(s)=BU(s)
X(s)=(sI-A)-1BU(s)
into 2 : Y(s)=C(sI-A)-1BU(s)+DU(s)
Y(s)=[C(sI-A)-1B+D] U(s)
G(s)= C(sI-A)-1B+D
is the T.F. from u to y
from 1 1
X ( s) ( AX ( s) BU ( s))
s
D
A
Example
0 1 0
x x u
2 3 1
y 1 3x
D 0, C 1 3
0 1 0
A , B
2 3 1
G ( s ) D C ( sI A) 1 B
1
1 0 0 1 0
0 1 3 s
0 1 2 3 1
1
s 1 0
1 3 1
2 s 3
s 3 1 0
1 3
1
s( s 3) 2 2 s 1
1
1 3
1
s( s 3) 2 s
1
1
1 3
s( s 3) 2 s
3s 1 3s 1
2
s( s 3) 2 s 3s 2
>> n=[1 2 3];d=[1 4 5 6];
>> [A,B,C,D]=tf2ss(n,d)
A=
• In Matlab: -4 -5 -6
1 0 0
0 1 0
>> A=[0 1;-2 -3];
>> B=[0;1]; B=
1
>> C=[1 3]; 0
>> D=[0]; 0
>> [n,d]=ss2tf(A,B,C,D) C=
1 2 3
n= D=
0 3.0000 1.0000 0
d= >> tf(n,d)
1 3 2 Transfer function:
s^2 + 2 s + 3
---------------------
s^3 + 4 s^2 + 5 s + 6
State Space Model
f spring k elongation
k (y-r) opposing y
f damping b (y r) opposing y
Quarter car suspension
Let x1 y, x2 y ; u r.
Then : x1 x2
b k b k
x2 y y y r r
m m m m
b k b k
x2 x1 r u
m m m m
Problem :
One variable is neither state nor input : r
Solution :
b
Modify x2 to get rid of r. Let x2 y r
m
b
Then : x1 y x2 r
m
b b k k
x2 y r y y r
m m m m
2
b b k k
x2 2 r x1 u
m m m m
u
State space model in matrix form :
b
1
x 0 1 1
x
k
b m 2 u
m
x x k b
2 m 2
2
m m
x1
y x1 1 0 0u
x2
State-Transition Matrix
• The state-transition matrix is defined as
a matrix that satisfies
• (t): state-transition matrix
• x(0): initial state
•
Properties of State-Transition Matrix
1)
2)
3)
4)
State-Transition Equation
• State equation:
• Output Equation:
Example
Example