Professional Documents
Culture Documents
DC Servo Motors
1 @VLC-2019
3.1. Introduction
(Permanent Magnet Brushed) DC Servo Motor
𝐽𝑀
𝑇𝑀
𝑇𝐿 (s)
U(s) 1 I(s) 𝑇𝑀 (s) 1 (s)
Km
Ls R Js B
(s)
Ke
Fig 3.2 The block diagram of a DC motor
4 @VLC-2019
Km, Ke: torque and back emf constants (Km = Ke???)
3.2.2 Transfer function
( s) Km
G( s)
U ( s ) Ls R Js B K m 2
Km
( s) RB K
G( s) (3.1)
U (s) L J Te s 1Tm s 1
s 1 s 1
R B
where Te: electrical time constant
Tm: mechanical time constant
normally, 𝑇𝑚 ≫ 𝑇𝑒
Then we can approximate eq. (3.1) by a first order function
( s) K
G( s) (3.2)
U ( s) Tm s 1
5 @VLC-2019
3.3. Mathematical Model of a Servo System
3.2.1. The 4th order model
d 2 M (t )
JM 2
TM (t ) TL (t ) (3.3)
dt
d 2 L (t ) d L (t )
JL 2
N GTL (t ) DL (3.4)
dt dt
K L M (t ) N G L (t )
TL (t ) (3.5)
NG 2
7 @VLC-2019
3.2.1 4th Order Model of One Axis
The transfer functions of the two mass model are:
TM (s) TL (s)
M ( s) (3.6)
J M s2
NG
L ( s) TL (s) (3.7)
J L s DL s
2
TM ( s ) K vg K p U ( s ) M ( s ) s M ( s ) (3.9)
8 @VLC-2019
3.2.1 4th Order Model of One Axis
The transfer function from the input U(s) to the output 𝜃(𝑠)
a0
G ( s) (3.10)
N G ( s 4 a3 s 3 a2 s 2 a 1s a0 )
K L K P K vg DL K vg
a0 ; a3
JLJM JL JM
K L K vg DL K P K vg DL K L
a1 + + 2
JLJM JLJM NG J L J M
K L DL K vg K P K vg KL
a2 + + 2
JL JLJM JM NG J M
This model can be effectively adopted in the development
of servo parameters determination or control strategy.
9 @VLC-2019
3.2.2 Normalized 4th Order Model
The total inertial moment transformed from the motor
axis with a rigid connection is assumed as
JL
JT J M 2
(3.11)
NG
Kv is defined as the velocity loop gain by using (3.11)
K vg (3.12)
Kv
JT
The natural frequency and damping factor expressed by
the features of mechanism part is written as
KL DL
L ; L (3.13)
JL 2 J L KL
10 @VLC-2015
3.2.2 Normalized 4th Order Model
K p c pL
(3.14)
K v cvL
11 @VLC-2015
3.2.2 Normalized 4th Order Model
The normalized 4th order model without dependence on
natural frequency is derived
b0
Gc ( s ) (3.15)
N G ( s 4 b3 s 3 b2 s 2 b1s b0 )
b0 (1 N L )c p cv ; b3 2 L +(1 N L )cv
b1 (1 N L )(cv 2c p cv L ) 2 N L L
b2 (1 N L )(1 cv c p 2cv L )
where
JL
NL (3.16)
NG 2 J M
12 @VLC-2015
3.3 Parameters tuning method
3.3.1 Requirements for control performance
The response characteristic of an industrial servo system is
required to have fast response, no generation of
oscillation and overshoot.
In an industrial servo system, the following conditions are
used successfully
3 N L 10
(3.17)
0 L 0.02
Since the damping factor is usually very small, then we
can choose
L 0
13 @VLC-2019
3.3.1 Requirements for control performance
The normalized model can be derived as follow
1
Gc ( s ) (3.18)
s 4
s 3
(1 c p cv ) s 2
s
NG 1
(1 N L )c p cv c p c p cv cp
There are the following conditions for determination of servo
parameters satisfying the desired control performance
1. There are 2 real poles and one complex conjugate root (A)
2. The response of the complex one is smaller than the
response of the principal root (B)
3. The response of the complex one is more quickly
converged than the response of the principal root (C)
14 @VLC-2019
3.3.2 Ramp response
Condition B
Condition C
17 @VLC-2019
3.3.4 Determination of servo parameters
19 @VLC-2019
3.4 Reduced order model
The 1st order model for expressing the low speed
operation of the servo system (below 1/20 rated speed).
The 2nd order model for expressing the middle speed
operation of the servo system (below 1/5 rated speed).
The structure standard of the reduced model is determined by
the following conditions based on the 4th order model
expressing by equation (3.15).
1. The steady-state velocity deviation between the 4th order
model and the reduced one are consistent.
2. The oscillation does not occur in the ramp response of
the reduced model.
3. The squared integral of the ramp response error between
20 @VLC-2019
the 4th order model and the reduced one is minimized.
3.4.1 Low speed 1st order model
The low speed 1st order model is expressed as a 1st order
system (the inertial moment of the load is transformed into
the motor axis). The whole servo system is:
dy (t )
c p1 y (t ) c p1u (t ) (3.20)
dt
Its model expressed by a transfer function:
c p1 Independent of the
Gc1 ( s ) load natural frequency (3.21)
s c p1 (normalized)
22 @VLC-2019
3.4.1 Low speed 1st order model
c p1 0.24 (3.25)
23 @VLC-2019
3.4.2 Middle speed 2nd order model
The middle speed 2nd order model expressing properly the
industrial servo system from 1/20 to 1/5 of the rated speed
can be derived. The whole servo system is
dy 2 (t ) dy (t )
2
cv 2 c p 2cv 2 y(t ) c p 2cv 2u (t ) (3.26)
dt dt
Its model can be expressed by a transfer function
Independent of the
cv 2c p 2 load natural frequency
Gc 2 ( s ) (normalized) (3.27)
s 2 cv 2 s cv 2c p 2
where K p 2 c p 2L
(3.28)
K v 2 cv 2L
24 @VLC-2015
3.4.2 Middle speed 2nd order model
25 @VLC-2019
3.4.2 Middle speed 2nd order model
2 2
Gc 2 ( s ) 2 (3.31)
s 2 22 s 2 2
2
c p 2
2 2
c 2
v2 2 2
cv 2 4c p 2 4c p (3.32)
c p 2 c p 0.24
(3.33)
cv 2 4c p 0.96
27 @VLC-2019
3.5 Control a DC servo motor
3.5.1 The structure of a controller
Power
Controller Saturation DC Motor
Amplifier
Encoder
H Bridge Circuit
Microcontroller
28 @VLC-2015
3.5.2 H-bridge
30 @VLC-2019
3.5.2 H-bridge
H-Bridge Design
31 @VLC-2015
3.5.3 Encoder
Quadrature Encoder
Rotary encoder is a sensor attached to a rotating object (such
as a shaft or motor) to measure rotation. By measuring
rotation we can determine any displacement, velocity,
acceleration, or the angle of a rotating object.
100 to 6,000
segments per
revolution
32 @VLC-2019
3.5.3 Encoder
1X Encoding
When channel A leads
channel B, the
increment occurs on
the rising edge of
channel A.
2X Encoding
With 2X decoding
our 500 ppr encoder
can generate 1000 ppr
33
@VLC-2019
3.5.3 Encoder
4X Encoding
34 @VLC-2019
3.5.3 Encoder
4X encoding state transition and sample code
35 @VLC-2019
3.5.4 Measuring speed and position
The velocity and position calculation is performed in a
periodic interrupt. Using timer interrupt of a microcontroller,
declaring a interrupt interval T (s), we have the equation to
calculate the velocity of a motor as follow:
2 M 60M
(rad / s ) (RPM) (3.34)
NT NT
Where,
M: is the number of pulses from the encoder during T (s)
N: is the resolution of the encoder depending on the
encoding mode (x1, x2 or x4) (CPR)
Based on the pulses counted from the encoder, we can
calculate the angular movements of the motor (position). It is
considered as homework.
36 @VLC-2019
3.5.5 PID controller
𝐾𝑝
𝐾𝐼 𝑒 𝑡 𝑑𝑡
de(t )
u (t ) K p e(t ) K D K I e(t )dt (3.35)
dt
37 @VLC-2019
3.5.5 PID controller
PID Calculations
When implementing the PID controller in practice, the input
variable (error) is obtained by sampling the plant’s output at
the sample rate. Then, the PID algorithm is also calculated at
the same rate.
uk u P k u D k u I k (3.36)
P Calculations
u P k K P ek (3.37)
D Calculations
ek ek 1
u D
k KD (3.38)
38 @VLC-2019 T
3.5.5 PID controller
I Calculations
There are three methods to calculate the integral term as the
following figures. We will do only a method, the others could
be done similarly.
e(t) e(t) e(t)
𝑒𝑘 𝑒𝑘 𝑒𝑘
𝑒𝑘−1 𝑒𝑘−1 𝑒𝑘−1
t t t
(k-1)T kT (k-1)T kT (k-1)T kT
a) b) c)
𝑡 𝑡 𝑡 𝑡 𝑡 1
𝑡
𝑒 𝜏 𝑑𝜏 ≈ 𝑇 𝑒(𝑘) 𝑒 𝜏 𝑑𝜏 ≈ 𝑇 𝑒(𝑘 − 1) (𝑒 𝑘 +
𝑒 𝜏 𝑑𝜏 ≈ 𝑇 2
0 0 0
0 0 0 +𝑒(𝑘 − 1))
40 @VLC-2019
3.5.5 PID controller
Low pass filter:
𝐸(𝑠) 𝑈 𝐷 (𝑠) 1 𝑈𝑓𝐷 (𝑠)
𝐾𝐷 𝑠
𝑁𝑠 + 1
Filter
u Df (k ) (1 )u Df (k 1) u D (k ) (3.40)
where,
T
(0 1)
N T
u Df (k ) : Output of D-term after applying the filter
42 @VLC-2019
3.5.5 PID controller
Anti-windup
𝑒
PID 𝑢 𝑢
𝐼
𝐾𝐼 𝑒𝑑𝑡 𝑢
𝑒𝑟𝑒𝑠𝑒𝑡
𝐾𝑏
t
u I (t ) K I e( ) K b ereset ( ) d
0
u I
k uI
k 1 K I Tek K bTe reset
k
(3.41)
Students have to modify the sample code in slide 40 to
include the low pass filter for D-term and anti-windup for I-
term.
43 @VLC-2019