Chapter 2 - Mathematical Model
Chapter 2 - Mathematical Model
COURSE
2
Models allow us to reason about a system
and make predictions about who a system will
behave
3
Contents
2.1Transfer functions(hàm truyền) and Block
Diagram ( sơ đồ khối)
2.1.1 Laplace transform( biến đổi Laplace)
2.1.2 Transfer function
4
2.1 Transfer function and Block
Diagram
2.1.1 Laplace Transform( biến đổi Laplace)
Purpose:
Method for solving differential(vi phân) and
intergral( tích phân) equations,
Converts differential equations in time t into
algebraic(đại số) equations in complex( miền phức)
variable s
Formula ( công thức)
s p jw 5
2.1 Transfer Function
6
Transfer function and Block
Diagram
Laplace transforms
L( f (t )) F ( s )
Laplace transforms for Differential Equations
df (t )
L( ) sF ( s ) f (0 )
dt
Laplace transforms for Integral Equations
t
F (s)
L( f (t )dt ) 7
0
s
Transfer function and Block
Diagram
8
Transfer function and Block
Diagram
2.1.2 Transfer Function( hàm truyền đạt)
SYSTEM
Laplace Transform
SYSTEM
9
Transfer function and Block
Diagram
Differential Equation
Transfer function
10
Transfer function and Block
Diagram
Definition:
Transfer function is defined as the ratio ( tỉ lệ)
of the Laplace transform of the output
variable to the Laplace transform of the input
variable ( biến), with all zero initial
conditions( điều kiện ban đầu).
11
Differential Equation of Physical Systems
Rotational Spring
2
1 d 1 T
21 T E
k dt 2 k
Fluid Inertia
d 1 2
P21 I Q E IQ
dt 2 12
Differential Equation of Physical Systems
Electrical Capacitance
d 1 2
i C v 21 E M v 21
dt 2
Translational Mass
d 1 2
F M v2 E M v 2
dt 2
Rotational Mass
d 1 2
T J 2 E J2
dt 2
Fluid Capacitance
d 1 2
Q Cf P21 E Cf P21
dt 2
Thermal Capacitance
d
q Ct T2 E CtT2
dt 13
Example 1
di
v i.R L vC
dt
dvC d 2 vC
RC LC 2 vC
dt dt
14
Transfer function and Block
Diagram
Example 2:
t
v( t) d 1
C v ( t ) v ( t ) d t r( t )
R dt L 0
Transfer function:
V (s) R.L.s
G (s)
R ( s ) RLCs 2 Ls R
15
Example 3
v1 (t ) i (t ).R vc (t )
dvc (t ) dv (t )
vc (t ) v2 (t ); ic (t ) i (t ) C. C. 2
dt dt
dv2 (t )
v1 (t ) R.C. v2 (t ) V1 ( s ) RCsV2 ( s ) V2 ( s )
dt
V2 ( s ) 1
G (s)
V1 ( s ) RCs 1
16
Example 4:
F1=kX(t)
F(t)
m
b Fms=bv(t)
F: Force
X(t): Displacement
v: velocity
m: mass
K: spring constant
b: Damping coefficient
17
18
Example 5
Transfer function of DC motor
L R
i
+
T w Kf J
U
Eu
K
21
Transfer function
Position Control
22
Determine transfer function with input is
voltage and output is position
Laplace Transform
23
2.2BLOCK DIAGRAM
24
Block Diagram
25
Block Diagram
R(s) E(s)
+ G(s)
- C(s)
B(s)
H(s)
26
Block Diagram Models
27
28
Block Diagram Models
29
Block Diagram Models
30
Example:
31
Block Diagram Models Example 2.7
32
Example:
33
2.2 Signal-Flow Graph
34
2.2 Signal-Flow Graph
35
2.2 Signal-Flow Graph
Mason’s Fomula
1
G k Pk
k
Pk Transmission along with path k ( độ lợi đường tiến)
Determinant of diagram(định thức của sơ đồ)
k Cofactor of diagram with respect to Pk (định thức con của sơ đồ
tín hiệu)
1 L L L L L L
i
i
i, j
i j
i , j ,m
i j m ...
LL L
i , j ,m
i j m : sum of product of transmission of all triple disjoint loops
Disjoint ( không dính): Don’t have any common joint( không có nút nào chung)
Joint ( dính): Have at least one common joint( có ít nhất một nút chung)
37
38
Example 1
39
40
2.2 Signal-Flow Graph
Example:
P1
P2
P3
41
M12
M22
M32
42
Mm3 = Mm4
M 12 M 22 M 32
P1
P1
43
C ( s ) P11 P2 2 P3 3
G ( s)
R( s)
44
Signal-Flow Graph Models
R(S) Y(S)
45
Y( s ) P1 P2 2 P3
R( s )
1 3 1 2 1 L5 1 G4H4
46
2.3 State Space
2.3.1Basic concepts:
State Variable: variables that determine the future behavior of a
system when the present state and the excitation signals are known
State Vector: the column vector consisting all n state variables
x1 (t )
x (t )
x(t ) 2
x
n (t )
47
2.3 State Space
SYSTEM
48
2.3 State Space
2.3.2 Description of State Space Equation
Nonlinear time variant system
x (t ) f ( x(t ), u (t ), t )
y (t ) g ( x(t ), u (t ), t )
Nonlinear time invariant system
x (t ) f ( x(t ), u (t ))
y (t ) g ( x(t ), u (t ))
Linear time variant system
x (t ) A(t ) x(t ) B (t )u (t )
y (t ) C (t ) x(t ) D(t )u (t )
Linear time invariant system
x (t ) Ax(t ) Bu (t )
y (t ) Cx (t ) Du (t )
49
2.3 State Space
50
2.3 State Space
2.3.3 Example 4: Consider the DC motor system
Inputs: armature voltage u a & load torque M d
Output: angular velocity
Energy stored: inductor & rotary inertia
State variables: x1 ia , x2
dia
ua La Ria eb
dt
d
M a J f Md
dt
eb Ce
M a CM ia
Matrix form Ra Ce 1
0
x 1 La La x1 La ua
x C f
x 1
M
2 M 2 0 d
J J J
x1
y 0 1
x2 52
2.3 State Space
Transfer Differential Equations to State Space
Equations
Example: Consider second-order differential equation:
c(t ) a1c (t ) a2 c(t ) b0 r (t ) (1)
We assign: x1 (t ) c(t ) x2 (t ) c (t ) with x1 (t ), x2 (t )are two state
variables
After substitute into (1) we obtain:
x 1 (t ) x2 (t )
x 2 (t ) a2 x1 (t ) a1 x2 (t ) b0 r (t )
c(t ) x1 (t )
Write these in matrix form: x 1 (t ) 0 1 x1 (t ) 0
x (t ) a r (t )
a1 x2 (t ) b0
2 2
x1 (t )
c(t ) 1 0
x2 (t ) 53
2.3 State Space
Generalize with Nth-order differential equations:
N
c N
(t ) ai c i (t ) b0 r (t )
i 1
54
2.3 State Space
Example: 2c(t ) 5c(t ) 6c (t ) 10c(t ) r (t )
c(t ) 2.5c(t ) 3c (t ) 5c(t ) 0.5r (t )
We donate the state variables as below:
x1 (t ) c(t )
x2 (t ) x 1 (t )
x2 (t ) x 2 (t )
According to above formula we can obtain state equation:
x (t ) Ax(t ) Br (t ) 0 1 0 0
B 0
c(t ) Cx (t ) Dr (t ) A 0 0 1
5 3 2.5 0.5
C 1 0 0 D 0
55
2.3 State Space
Consider example:
c(t ) a1c(t ) a2 c (t ) a3c(t ) b0 r(t ) b1r (t ) b2 r (t )
c(t ) x1 (t )
x1 (t ) c(t )
c (t ) x2 (t ) 1r (t )
x2 (t ) x 1 (t ) 1r (t ) c (t ) 1r (t )
c(t ) x3 (t ) 1r (t ) 2 r (t )
x3 (t ) x 2 (t ) 2 r (t ) c(t ) 1r (t ) 2 r (t )
c(t ) x 3 (t ) 1r(t ) 2 r (t )
56
2.3 State Space
We select 1 and 2 to dismiss differential
parts in right hand-side of equation.
b0 1 0 1 b0
b1 2 a11 2 b1 a11
and we donate : 3 b2 a1 2 a2 1
Finally, we obtain:
x1 (t ) c(t )
x 1 (t ) x2 (t ) 1r (t )
x 2 (t ) x3 (t ) 2 r (t )
x 3 (t ) a3 x1 (t ) a2 x2 (t ) a1 x3 (t ) r (t ) 3
57
2.3 State Space
x 1 (t ) 0 1 0 x1 (t ) 1
x (t ) 0 0 1 x2 (t ) 2 r (t )
2
x 3 (t ) a3 a2 a1 x3 (t ) 3
x1 (t )
c(t ) 1 0 0 x2 (t )
x3 (t )
58
2.3 State Space
We can extend above result with more general
case as below:
c N (t ) a1c ( N 1) (t ) a2 c ( N 2 ) (t ) ... a N 1c (1) (t ) a N c(t )
b0 r ( M ) (t ) b1r ( M 1) (t ) ... bM 1r (1) (t ) bM r (t ) M N 1
x
There are two method to donate state
variables:
Method 1: x1 (t ) c(t )
x2 (t ) x 1 (t ) 1r (t ) c (t ) 1r (t )
x3 (t ) x 2 (t ) 2 r (t ) c(t ) 1r (t ) 2 r (t )
.....
i 1
xi (t ) x i 1 (t ) i 1r (t ) c ( i 1)
i 1
i 1 r (t )
59
2.3 State Space
We can get result:
0 1 0 0 1
0 0 1
2
A B
0 0 0 1
N1
aN aN 1 aN 2 a1 N
C 1 0 0 0 D 0
1 b0
b a
2 1 1 1
3 b2 a1 2 a2 1
.....
N bN 1 a1 N 1 a N 11
60
2.3 State Space
Example:
61
d 2 y (t ) R dy (t ) 1 1
y (t ) v(t )
dy (t ) 1 1 dt 2
L dt LC LC
y (t ) v(t )
dt RC RC
0 1 0 1
1 A 1 / LC
A a0
0 a a1 R / L
RC
0 0
1 B
B b0 C 1 D 0 b
0 1 / LC
RC
C 1 0 D 0
x 1 (t ) 1 x (t ) 1
RC
1
RC v(t ) x 1 (t ) 0 1 x1 (t ) 0
x (t ) 1 / LC R / L x (t ) 1 / LC v(t )
2 2
x1 (t ) x1 (t )
y (t ) 1 y (t ) 1 0 62
x
2 (t )
Example:
c ( 4 ) (t ) 8c(t ) 10c(t ) 12c (t ) 4c(t ) 3r(t ) 5r(t ) 4r (t ) 10r (t )
63
64
Transfer Function to State Space Conversion
65
Transfer Function to State Space Conversion
First block
Second block
66
Transfer Function to State Space Conversion
67
68
69
70
2.3 State Space
Transfer State Space Equation to Transfer Function
Consider State Space equation
x (t ) Ax(t ) Bv (t )
y (t ) Cx(t ) Dv(t )
Laplace Transform:
sX( s ) x(0) AX( s ) BV ( s )
sI A X( s) x(0) BV ( s)
X( s ) sI A x(0) sI A BV ( s )
1 1
y (t ) Cx(t ) Dv(t )
Y ( s ) CX( s ) DV ( s )
sI A x(0) CsI A B D V ( s )
1 1
Y( s ) H ( s ) X( s ) where H ( s ) CsI A B D
1
71
2.3 State Space
For zero initial condition:
Y( s ) H ( s ) X( s ) where H ( s ) CsI A B D
1
For example:
72
2.3 State Space
73
2.3 State Space
74