You are on page 1of 49

Chapter 3

Mathematical Modeling of
Mechanical Systems and Electrical
Systems
3-1 Introduction
This chapter presents mathematical modeling of
mechanical systems and electrical systems.
The mathematical law governing mechanical
systems is Newtons second law, while the basic
laws governing the electrical circuits are
Kirchhoffs laws.
Typical mechanical systems may involve two kinds of
motion: linear motion and rotational motion. Spring,
mass, damper and inverted pendulum are widely used
devices to describe a large class of mechanical systems.
3-2 Mathematical modeling of mechanical systems
Example (Automobile suspension system). As the car
moves along the road, the vertical displacements at the tires
act as the motion excitation to the automobile suspension
system. The motion of this system consists of
a translational motion of the center of mass and a rotational
motion about the center of mass, and can be simplified as a
system with springs, mass and dampers shown below.
3-2 Mathematical modeling of mechanical systems
Example. Equivalent spring constants.
k
1
F
x
k
2
F
k
1
k
2
y
x
1 2 1 2 eq
k x k x F k k k + = = +
Systems consisting of two springs in parallel and
series, respectively.
1 2
2
1
1 2
, ( )
( )
1
1 1
eq
k y F k x y F
F
k x F
k
F
k
x
k k
= =
=
= =
+
Example. Systems consisting of two dampers connected
in parallel and series, respectively. Find their equivalent
viscous-friction coefficients b
eq
with respect to dy/dt and
dx/dt.
Solution: (a) The force f that causes the displacements
is
1 2
1 2
( ) ( )
( )( )
( )
eq
f b y x b y x
b b y x
b y x
= +
= +
=
1
b
2
b
x
y

(Fig.a)
The same force f is transmitted through the shaft and
therefore,
1 2
( ) ( ) (1) f b z x b y z = =
from which we have
1 2 2 1 2 1
1 2
1
( ) ( ) (2)
( )
b b z b y bx z b y bx
b b
+ = + = +
+
1
b
2
b
x
y
z
(Fig.b)
(b):
Since we want to determine the relationship between dy/dt
and dx/dt, that is,
( )
eq
f b y x =
where b
eq
is the equivalent viscous friction coefficient, by
substituting (2) into (1) yields.
2 2 1
1 2
1 2
1 2
1
( )
( )
( )
( )
f b y b y bx
b b
bb
y x
b b
| |
= +
|
+
\ .
=
+
Hence,
1 2
1 2
1 2
1
1 1
( )
eq
bb
b
b b
b b
= =
+
+
b
m
k
Massless cart
u
y
Example. Consider the spring-mass-dashpot system
mounted on a massless cart. Let u, the displacement of the
cart, be the input, and y, the displacement of the mass, be
the output. Obtain the mathematical model of the SMD
system.
u y
( )
du dy
b k u y
dt dt
| |
+
|
\ .
Forces acting on the
mass:
b
m
k
Massless cart
u
y
( )
2
2
d y du dy
m b k u y
dt dt dt
d y dy du
m b ky b ku
dt dt dt
| |
= +
|
\ .
+ + = +
Therefore, the system transfer function can be obtained
as
2
( )
( )
Y s bs k
U s ms bs k
+
=
+ +
By Newtons law:
1
m
1
k
u
1
x
2
k
2
m
2
x
3
k
b
Example. Mechanical system is shown below. Obtain the
transfer functions X
1
(s)/U(s) and X
2
(s)/U(s), where u
denotes the force, and x
1
and x
2
denote the displacements of
the two carts, respectively.
Solution: By Newtons second law, we have
1 1 1 1 2 1 2 1 2
( ) ( ) m x u k x k x x b x x =
2 2 3 2 2 2 1 2 1
( ) ( ) m x k x k x x b x x =
1
m
1
k
u
1
x
2
k
2
m
2
x
3
k
b
Simplifying, we obtain
1 1 1 1 2 1 2 2 2
( ) m x bx k k x u bx k x + + + = + +
2 2 2 2 3 2 1 2 1
( ) m x bx k k x bx k x + + + = +
Taking the Laplace transforms of these two equations, and
assuming zero initial conditions,
Solving Equation (2) for X
2
(s) and substituting it into
Equation (1) and simplifying, we get
2
1 1 2 1 2 2
[ ( )] ( ) ( ) ( ) (1) m s bs k k X s U bs k X s + + + = + +
2
2 2 3 2 2 1
[ ( )] ( ) ( ) ( ) (2) m s bs k k X s bs k X s + + + = +
1
2
2 2 3
2 2 2
1 1 2 2 2 3 2
( )
( )
[ ( )]
[ ( )][ ( )] ( )
X s
U s
m s bs k k
m s bs k k m s bs k k bs k
=
+ + +
+ + + + + + +
Example. An inverted pendulum mounted on a motor-
drive cart is shown below. This is a model of attitude
control of a space booster on takeoff; that
u
u
is, the objective of the
attitude control problem is
to keep the space booster
in a vertical position.
u
M
y
O
mg
u
x
x
l cosu
sinu
Define:
u: the control force to the cart;
u: the angle of the rod from the vertical line;
(x
G
, y
G
): the center of gravity of the rod in (x, y)
coordinates. Hence,
sin
cos
G
G
x x l
y l
q
q
= +
=
u
M
y
O
H
V
H
mg
u
x
x
V 1) The horizontal
motion of cart is
described by
2
2
(1)
d x
M u H
dt
=
u
M
y
O
H
V
H
mg
u
x
x
V
2)The horizontal motion of center of gravity of the rod is
2
2
( sin ) (2)
d
m x l H
dt
q + =
3)The vertical motion of
center of gravity of the
pendulum rod is
2
2
( cos ) (3)
d
m l V mg
dt
q =
( sin ) ( cos ) (4) I l V l H q q q =
4) The rotation motion of the rod about its center of
gravity can be described by
where I is the moment of
inertia of the rod about
its center of gravity.
5) Linearization of the
equations (2)-(4):
u
M
y
O
H
V
H
mg
u
x
x
V
Since we must keep the inverted pendulum vertical, we can
assume that u and du/dt are small quantities so that sinu~u,
cosu~1 and u(du/dt)
2
~0. Hence, the equations (2)-(4) can
be linearized as
( ) (2)
0 (3) (1)
(4)
m x l H
V mg Mx u H
I V l Hl
q
q q

+ =

= + =

By replacing (1) into (2) yields


( ) (5) M m x ml u q + + =
From equations (2)-(4), we have
2
( )
( ) (6)
I mgl Hl mgl l mx ml
I ml lmx mgl
q q q q
q q
= = +
+ + =
2
( )
(7)
mgl I ml
x
lm
q q +
=
From (6), we have
Substituting (7) into (5) yields
2
( )
( ) (8)
mgl I ml
M m ml u
lm
q q
q
+
+ + =
Taking the Laplace transform on both sides of (8) yields
2 2
2
( )
( ) ( ) (9)
mgl I ml s
M m mls U s
lm
O + O
+ + O =
Therefore,
2 2
( )
( )
( ) ( )
s lm
U s
M m mgl MI mMl mI s
O
=
(
+ + +

Example. An inverted
pendulum is shown in the
figure below. Similar to the
previous example:
u
M
cosu
y
O
mg
u
x
x
sinu
P
u
u
2 2
( )
( )
( ) ( )
s lm
U s
M m mgl MI mMl mI s
O
=
(
+ + +

For this case, the moment of inertia of the pendulum
about its center of gravity is small, and we assume I = 0.
Then the mathematical model for this system becomes:
2
( ) 1
( )
( )
s
U s
M m g Mls
O
=
(
+

Example. Gear Train: Rotational transformer. In servo
control systems, the rotor drives a load through gear
train.
N
1
N
2
e
m
u
m
e
L
,
u
L
J
m
J
L
1
2
L L
m m
N
n
N
q w
q w
= = =
Gear ratio (transmission ratio):
where N
1
and N
2
denote the number of teeth of the two
gears, respectively.
3-3 Mathematical modeling of electrical systems
1. RLC circuit
Example. RLC circuit
By using Kirchihoffs law, we have
L
u iR y v = + +
Since
2
2
,
L
dy di d y
i C v L LC
dt dt dt
= = =
L R
C
u
y
we have
u

y

RLC
2
2
d y dy
CL CR y u
dt dt
+ + =
Example. RLC circuit. Find V(s)/R(s).
0
( ) ( ) 1
( ) ( )
t
v t dv t
C v t dt r t
R dt L
+ + =
}
Taking the Laplace transform of the above equation yields
( ) 1
( ) ( ) ( )
V s
CsV s V s R s
R Ls
+ + =
r(t)
Current
source
v(t)
L R
C
r v
Hence,
2
1 1
( )( ) ( )
( ) 1
1 1
( )
( )
V s Cs R s
R Ls
V s
R s
Cs
R Ls
RLs
RLCs Ls R
+ + =
=
+ +
=
+ +
2. Transfer functions of cascaded elements

Example. Find E
o
(s)/E
i
(s).
+
-
+
-
i
e
o
e
a
b
1
i
2
i
1
R
2
R
1
C
2
C
Note that in this circuit, the second portion (R
2
C
2
)
produces a loading effect on the first stage (R
1
C
1
portion);
that is , we cannot obtain the transfer function as we did
for transfer functions in cascade.
1
2 2 1 2
1
2
2
1
( )
1
c
o
u
o
e i R i i dt
C
e i dt
C

+ =

}
}
and
Taking the Laplace transforms of the above equations,
we obtain
1
1
1
1 1
1 1 2 1 2
1
1
( )
i c
c
c
e i R u
du
C i i u i i dt
dt C
= +

= =

}
1 1
1
1
[ ]
i c
I E U
R
=
0 2
2
1
( ) ( ) E s I s
C s
=
1 1 2
1
1
[ ( ) ( )]
c
U I s I s
C s
=
2 1
2
1
( ) [ ( )]
c o
I s U E s
R
=
i
E
1
1
sC
o
E
1
1
R
1 c
U
1
I
1 c
U
2
1
R
2
I
2
1
sC
from which we obtain
0
2
1 1 2 2 1 1 2 2 1 2
( ) 1
( ) ( ) 1
i
E s
E s RC R C s RC R C RC s
=
+ + + +
+
-
+
-
i
e
o
e
a
b
1
i
2
i
1
R
2
R
1
C
2
C
The above analysis shows that, if two RC circuits
connected in cascade so that the output from the first
circuit is the input to the second, the overall transfer
function is not the product of 1/(R
1
C
1
s+1) and
1/(R
2
C
2
s+1) due to the loading effect (a certain amount
of power is withdrawn).
3. Complex impedances

Resistance R: R
Capacitance: 1/Cs
Inductance: Ls
Example. Find Y(s)/U(s)
L R
C
u
y
Solution:
( ) 1/
( ) 1/
Y s Cs
U s R Ls Cs
=
+ +
Example. Find E
o
(s)/E
i
(s).
+
-
+
-
i
e
o
e
a
b
1
i
2
i
1
R
2
R
1
C
2
C
Solution: Utilizing complex impedance approach, we
have (from left to right)
1
1 1
1 2
1
2 0
2
0 2
2
( ) ( ) 1
( ) [ ( ) ( )]
1
( ) [ ( ) ( )]
1
( ) [ ( ) ( )]
1
( ) ( )
i ab
i ab
ab
ab
E s U s
I s E s U s
R R
U s I s I s
sC
I s U s E s
R
E s I s
sC

= =

i
E
1
1
sC
o
E
1
1
R
ab
U
1
I ab
U
2
1
R
2
I
2
1
sC
Example. Find E
o
(s)/E
i
(s).
C
4. Transfer functions of nonloading cascaded
elements


+
-
+
-
i
e
o
e
a
b
1
i
2
i
1
R
2
R
1
C
2
C
Isolating
amplifier
(Gain ) K
Again, consider the two simple RC circuits. Now, the
circuits are isolated by an amplifier as shown below and
therefore, have negligible loading effects, and the
transfer function
0
1 1 2 2
( )
( ) ( 1)( 1)
i
E s K
E s R C s R C s
=
+ +
In general, the transfer function of a system consisting
of two or more nonloading cascaded elements can be
obtained by eliminating the intermediate inputs and
outputs:
G
1
(s)G
2
(s)
R(s)
C(s)
G
1
(s) G
2
(s)
R(s)
C(s) U
2 2 1
( ) ( ) ( ) ( ) ( ) ( ) C s G s U s G s G s R s = =
5. Operational amplifiers

In the ideal op amp, no current flows into the input
terminals, and the output voltage is not affected by the
load connected to the output terminal. In other words,
the input impedance is infinity and the output impedance
is zero.

6. Examples: DC motor and servo system



Example. Find the transfer function of a DC motor.
Assume that the rotor has inertia J
m
and viscous friction
coefficient f
m
. Determine O
m
(s)/U
a
(s), where u
m
is the
rotational angle and u
a
is the power supply voltage
.
U
a
(s)
O
m
(s)
DC
motor
m
m
J
f
u
m
u
a
Stator winding:

Rotor windings:

Shaft:
Inertia load: ;
Bearings:
Commutator
m
m
J
f
u
m
u
a
Rotor: Torque: Back emf voltage:
Armature current:;
u
m
: rotational angle; u
a
: power supply voltage
The motor equations:
1) The electromagnetic torque M
m
on the rotor in terms
of the armature current i
a
(C
m
: torque constant):
2) The back emf voltage E
b
in terms of the shafts
rotational velocity du
m
/dt is (K
b
: electrical constant):
(1)
m m a
M C i =
(2)
b b m
E K q =
3) The electrical equation:
(3)
a
a a a a b
di
u i R L E
dt
= + +
a
u
a
R
a
L
,
m m
q w
a
i
,
m m
J f
4) The torque equation: by using Newtons law,
(4)
m m m m m m m m m m
J M f J f M q q q q = + =
Taking the Laplace transform of (3) and in view of (2)
yields
a a a a a b m
U I R L sI K s = + + O
Hence,
1
[ ] (5)
a a b m
a a
I U K s
L s R
= O
+
Taking the Laplace transform of (4) and in view of (1)
yields
2
1
(6)
m m a
m m
C I
J s f s
O =
+
a
u
( )
m
m m
C
s J s f
m
1
a a
L s R
b
K s
b
E
2
( ) [( )( ) ]
m m
a a a m m m b
C
U s L s R J s f s C K s
O
=
+ + +
( ) ( 1)
m m
a m
K
U s s T s
O
=
+
From (5) and (6), we have
In particular, if L
a
~0, we can simplify the model as
m
m
a m m b
C
K
R f C K
=
+
m a
m
a m m b
J R
T
R f C K
=
+
where
Example. A servo system is shown below, where
r and c are the input and output (that are propor-tional to
the angular positions of potentiometers),
e=rc, (e
r
e
c
)=K
0
(rc)
K
0
: proportionality constant; K
1
: amplifier gain; e
b
: back
emf voltage; n: gear ratio.
0
K
1
K
1
a a
L s R
2
K
0 0
1
J s b
1
s
n
3
K
r c
a
i
T
b
e
e
v
e
a
e
where in this example, for the DC motor
1) The electromagnetic torque (K
2
: torque constant):
2
(1)
a
T K i =
2) The back emf voltage (K
3
: electrical constant):
3
(2)
b
e K q =
where u is the rotational angle;
3) The electrical equation:
(3)
a
a a a a b
di
e i R L e
dt
= + +
4) The torque equation:
0 0 2
(4)
a
J b T K i q q + = =
where J
0
and b
0
denote the moment of inertia and
friction constant, respectively.
Then, by neglecting L
a
, the open-loop transfer
function can be simplified as
( )
=
( ) ( +B)
C s K
E s s Js
r
( )
K
s Js B
c
e
2
0
2
0 2 3
0 1 2
/
[ ( / )] /
/
a
a
J J n
B b K K R n
K K K K R n
=

= +

where
Summary of Chapter 3
In this chapter, we studied the mathematical
modeling of some simple mechanical and electrical
systems.
1. For mechanical systems, Newtons second law is
applied to establish the mathematical models of (1)
some spring-mass-damper systems and (2), inverted
pendulum systems.
b
m
k
Massless cart
u y
u
M
y
O
H
V
H
mg
u
x
x
V
2. For electrical systems, Kirchhoffs laws are used. In
particular, the concept of complex impedance is
introduced, which provides a convenient way to
obtain system transfer function.
+
-
+
-
i
e
o
e
a
b
1
i
2
i
1
R
2
R
1
C
2
C
3. The mathematical modeling of DC motor, which
combines mechanical and electrical systems, is
introduced and can be expressed as
a
u
a
R
a
L
,
m m
q w
a
i
,
m m
J f
2
( ) [( )( ) ]
m m a
b b m
m m
a
a a a m m m b a a a a b
m m m m m
M C i
E K
C
di
U s L s R J s f s C K s u i R L E
dt
J f M
q
q q
=

+ + + = + +

+ =

U
a
(s) O
m
(s)
DC
motor

You might also like