Lecture 3 System Modeling
Lecture 3 System Modeling
Highlight:
Mathematical Modeling of Mechanical Systems Mathematical Modeling of Electrical Systems Linearization of Nonlinear Systems
Real Systems: usually very complicated, nonlinear, and time varying. Mathematical Models: Often very simple, linear, and time-invariant.
We always start by using simple models:
Translational Systems
Simples models are based on Newton's second law, i.e. for each free-body
F = m a F: : a m:
where: vector sum of all forces applied to each body in the system in Newtons (N), vector acceleration of each body in m/s , and mass of the body in kg.
(1)
2. Use a free-body-diagram to nd all forces. Free-body-diagram is diagram used to show the relative magnitude and directions of all forces acting upon an object. (a) External forces (input, disturbance, etc.), (b) Spring,
x,
where
k is spring constant,
b m, b x,
where
b is friction coecient.
F = m, a
to get all dierential equations that describe the dependencies between coor-
dinates and forces. 4. Get the transfer function of interest. Example: One-mass system
u(t) = M x(t)
The Laplace transform
(2)
1 s2
x(t)
u(t).
u bx = M x
Take Laplace transform
(3)
M s2 X(s) 1 2 + bs Ms
Free-body diagram
m1 .
If If
x2 > x1 , x2 > x1 ,
spring is extended
m2 .
X1
and
X2 .
X2 .
X1 (s) =
X2 (s) [bs + k] + U (s) [bs + k] + X2 (s) m2 s2 + bs + k = 0 [m1 s2 + bs + k] bs + k X2 (s) = 4 + (m + m )bs3 + (m + m )ks2 U (s) m1 m2 s 1 2 1 2
Rotational Systems
Newton's Second Law now reads:
M = I
where:
(4)
= force distance
= mass (distance
=
0
r2 dm
M =F l
For Figure (3.b)
M = I
1. If the axis is static/xed, use it. 2. Use to body's center of mass as the axis. Caution: do not use an axis that is moving unless it is the center of mass. Example: The rotational equivalent of the two-mass system from previous example.
applied torque
=U R
I1 1 = U R + k (2 1 ) + b 2 1 I2 2 = k (2 1 ) b 2 1
Dimension of Freedom
One dimension of freedom
F = m x
Fx Fy
= =
m x m y
u to keep the inverted pendulum in the upright position. For this system, the object m has both translational and rotational motions.
We can consider it as the combination of translational motion at the center of mass and rotational motion around the center of mass
m.
M, Figure (5.b)
U H = Mx
Apply Newton's Law on the horizontal direction. Q: What is the displacement of A: Relative to
V mg = m
V l sin H l cos = I
There are four equations. Quantities of interest:
x. Additional unknown: V, H
will be eliminated.
d (sin ) = cos dt d d2 (sin ) = (cos ) = sin + cos dt2 dt d (cos ) = sin dt d d2 (cos ) = ( sin ) = cos sin dt2 dt
Hence
U H = Mx
(5)
(6)
(7)
(8)
H H
2 U = (M + m) ml sin () + ml cos x
Eliminate and
(9)
(10)
u and x, .
e0 = K(e2 e1 ) = K(e1 e2 )
innite input impedance zero output impedance gain
i+ = i = 0
and
e+ = e .
e0
K = +
Kirchho's Laws
Governs the relationship between the various currents and voltages.
Ei E2 E2 Eo C1 sE2 =0 R1 R2 C2 s (Ei Eo ) +
Eliminating
(11)
E2 Eo =0 R2 Ei (s)
and output
(12)
E2 (s),
Eo (s),
we have:
Eo R1 R2 C1 C2 s2 + (R1 + R2 ) C2 s + 1 = Ei R1 R2 C1 C2 s2 + ((R1 + R2 ) C2 + R1 C1 ) s + 1
Derive (13) for exercise. Example: Inverting op-amp and ideal. Using KCL
(13)
i1 i2 i3 = 0 ei e e eo d C (e eo ) =0 R1 dt R2
Because
e = 0,
then
deo eo ei +C + =0 R1 dt R2
Take Laplace transform
Ei Eo + CsEo + =0 R1 R2 Eo = Ei
Putting everything together:
1 R1 1 Cs + R2
R2 1 R1 1 + R2 Cs
10
An electro-mechanical system
1. Input voltage 2.
i through the armature (rotor winding). The current i caused a torque T on the rotor and load. T is proportional to i
ei
sends a certain current
T = ki.
3. The rotor + load is modeled as a rotational system with damping. 4. The rotation of the rotor also generate a back voltage (emf ) velocity
m .
eb
eb = Kb m
Thus, we have the set of equations as
ei eb = i R + sL T = ki T b = J m m m e = K b b m
where
m =
T Jm s2 + bs eb = sKb m
Jm
b is friction coecient.
(s) ei (s)
11
x1 , x2 .
then so does
(y1 (t), u1 (t)) and (y2 (t), u2 (t)) both satisfy (y1 (t) + u1 (t), y2 (t) + u2 (t)).
f ( ) = an y (n) +an1 y (n1) + +a1 y (1) +a0 y(t) bm u(m) + bm1 u(m1) + + b1 u(1) + b0 u(t)
Then
f (.)
Non-linear systems are those where the principle of superposition does NOT apply.
f (, , , x, x, x, u) = 0
The function
2. Non-linear circuit.
Non-linear resistor
VR = i3 R. Vi = i3 R + L
di dt
We CANNOT take Laplace transform for non-linear systems. However, we could derive a linear system that is an approximation of the original system, then take Laplace transform.
12
Linearization
Basic idea: If the system operates only around a small neighborhood of an equilibrium points, by expanding the nonlinear functions into a Taylor series about the equilibrium point, we can retain the linear terms, and neglect the higher-order terms. In this way we obtain linear approximation of the original system. Such linear model would work, if the deviation of the signals from the equilibrium point is small. We can the study the linear system by taking Laplace transform.
Linearization of a function
Suppose
y = f (x),
f
y
= =
f (x) f (x) + df dx (x x) +
x=x
1 d 2f 2! dx2 x
(x x)2 +
x=x
(constant)
|x x|
is small,
df y f (x) + = dx
Letting
(x x)
x=x
y = y f (x),
and
x = x x,
we have
y=
Deviations from
df dx
x
x=x
f (x)
of the output
13
f (x1 , x2 , u1 , u2 ) + f = x1 + f x2
x1 = x1 u1 = u1
x2 = x2 (x1 x1 ) u2 = u2 x1 = x1 u1 = u1 x2 = x2 (u1 u1 ) u2 = u2
x1 = x1 u1 = u1
f x2 = x2 (x2 x2 ) + u1 u2 = u2 x2 = x2 (u2 u2 ) u2 = u2
++
f u2
x1 = x1 u1 = u1
The coecient in front of each variable is simply the partial derivative evaluated at the equilibrium point.
x, x, u, u,
to zero
2. For each term that is non-linear, view it as a non-linear function of the variables Evaluate the partial derivative at the equilibrium point: linear approximation.
x, x, x, u, u, u, .
x, 0, 0, u, 0, 0, .
3. Simplify the linear equations. Replace each variables by its deviation from the equilibrium.
Suppose
dx = f (x(t)), dt
where
x = 0 f (x) = 0.
The set of solutions that satisfy the above equation is called the set of equilibrium points of
x(0)
is close to
x(0) = x, then x(t) = x for all t. The system is at equilibrium. x, x(t) will stay close to x for at least some interval (0, T )).
dx df f (x) + dt dx
3. Simplify the linear equation. Note that Let
(x x)
x=x
f (x) = 0
x.
x = x x.
Then
d d df x = x x = dt dt dx
x
x=x
uref ,
f (xeq , 0, ueq ) = 0
14
d2 x(t) dt2
= f (xeq , 0, ueq ) +
f (xeq , 0, ueq ) = 0.
x = x xeq , u = u ueq
x =
Example:
Vi = i3 R + L
di . dt
di Vi R = i3 dt L L Vref = 1 Vi R i3 = 0 L L ieq =
3
di = 0, dt
we have
Vref = R
1 R
f (i) =
R 3 i L f i (i ieq )
i=ieq
f (i) f (ieq ) + f i
=
i=ieq
3R 2 i L
=
i=ieq
3 3 R L
di dt
= = =
3. Simplify. Let
3 Vi 3 Ri L L
15
= =
uref = 0.
Set
, = 0.
We have
mgl sin = 0 = 0.
2. Evaluate partial derivatives. Let
f (u uref ) u u = uref =0
u = uref =0
f u u = uref =0
16
and