You are on page 1of 6

Modeling and design of servo system of CNC machine

tools
Jinxing Zheng Mingjun Zhang and Qingxin Meng
Department of Mechanical and Electrical Engineering
Harbin Engineering University
Harbin,HeiLongJiang,150001 China
{zhengjinxing, &zhangmingjun &mengqingxin}@hrbeu.edu.cn
Abstract Accurate modeling of the feed drives dynamics is
an crucial step in designing a high performance CNC system. This
paper presented a comprehensive dynamic model of CNC feed
drive system. The friction model was established analyzing the
nonlinear characters of machine tool movement. And a
trapezoidal velocity control algorithm was presented due to
friction dependence of velocity. As verification of the controller,
tracking and contouring simulation were implemented.
Index Terms Servo system modeling;Nnonlinear characters;
PID control; Contour error; Velocity generation profile
I. INTRODUCTION
The feed servo system of machine tools is defined as a
control system whose purpose is to make the position and the
speed of worktable follow the command from numerical
control unit. The servo system compares the real position
signal by using sensor feedback measurements with the desired
command information, then drives the driving units to make
the worktable move to the direction of minimizing errors in
order to obtain the more accurate workpiece in size. So the
design of servo controllers is crucial to the high performance
of machine tools. The design of a high performance feed drive
control system requires accurate knowledge of the axis
dynamics [1-2].
Looking more closely into the design, though many
modern control design techniques are now available, most
machine tool servo designs are still based on the well-known
PID control architecture, only considering more delicate
factors to eliminate the effect of backlash and friction, etc.
The feedback controllers need to be designed to impose the
same closed loop response on all axes, in order to avoid
contouring errors in linear motion.
This paper presents a method for modeling the dynamics
of feed drives. A more comprehensive mathematic model of
feed servo system is presented considering the dominant
nonlinear effects of friction. A friction model is incorporated
into the axis dynamics. Then a trapezoidal velocity profile for
acceleration and deceleration based on varying interpolation
duration is considered due to the viscous friction force is
proportion to velocity of feed. The remaining of this paper is
organized as follows: modeling of the linear dynamics, as well
as nonlinear friction effects are presented in Section]. This is
continued by trapezoidal velocity generation algorithm in
Section ]. A block of PID control system is given and
simulations are implemented in Section |. Conclusions are
described in Section .
II. COMPREHENSIVE MODEL OF SERVOSYSTEMOF
MACHINE TOOLS WITHNONLINEAR CHARACTERS
Feed drive systems consist of several subsystems such as
power transmission mechanism, actuators, sensors, controllers
and amplifiers. Form the view of servo system design,
mechanical subsystem servo-motor drive subsystem and
controller subsystem are included. Accurate models of the
mechanical and control subsystem are indispensable to
perform the systematic design satisfactorily.
A. Servo motor model
The most common motors used in the feed drives are
direct current (DC) motor since they allow a wide range of
operating speeds with the sufficiently large torque delivery
required by machine tools. Recently, most feed drive actuators
of machine tools are alternating current (AC) servo motors.
Because an AC motor model is complex, the motor is
frequently modelled as an equivalent DC motor using vector
transformation or root mean squares. So the following
modelling of servo motor is explained based on DC servo
motors.
A set of well-known DC motor equations are
( )
( )
( ) ( ) ( )
( ) ( )
( ) ( ) ( )
a
m
dI t
m m a m emf m dt
m t a
d t
m m m m d dt
V t R I t L K t
T t K I t
T t J B t T t
e
e
e

= + +

= + +

(1)
Where V
m
is voltage applied to the motors circuit, I
a
is the
armature current, R
m
is the armature resistance, L
m
is the
armature inductance, K
emf
is the motors voltage back e.m.f.
constants,
m
is the angular velocity of motor. The magnetic
field produces motor dynamic torque T
m
, which is proportional
to the armature current I
a
with the motor torque constant K
t.
The total dynamic torque delivered by the motor is spent in
accelerating the inertia of the motor (J
m
) and overcoming the
motor shafts viscous damping (B
m
), and the external load
torque T
d
which includes the torque to drive the ball-bearing
leadscrew and table as well as workpiece (T
L
), and the
disturbance torque due to nonlinear static and Coulomb
friction in the guide way (T
f
) and cutting forces (T
c
).
1-4244-0466-5/06/$20.00 2006 IEEE
1964
Proceedings of the 2006 IEEE
International Conference on Mechatronics and Automation
June 25 - 28, 2006, Luoyang, China
The angular velocity of the motor shaft
m
and the
armature voltage V
m
and the external load torque T
L
can be
expressed in Laplace domain as:
1
2 2
2 3 2 3
(1/ )[ / ]
( ) ( ) ( )
m m m
m m L
J s R L K
s V s T s
s K s K s K s K
e
+
=
+ + + +
(2)
Where
1
2
3
t
m m
m m
m m
m m t emf
m m
K
K
J L
R B
K
L J
R B K K
K
J L
=
= +
+
=
B. Linear model of mechanical subsystem of feed system in
machine tools
Mathematical models of the mechanical subsystem are
generally constructed by developing equations of motion
between the motor and components of the feed drive system.
Fig. 1 shows a freebody diagram of the mechanical subsystem.
In Fig. 1, J
m
is the inertia of rotating elements composed of the
motor rotor, coupling and ballscrew inertias.
m
and
s
are
rotational angles of the motor shaft and the ballscrew,
respectively. T
m
is the driving torque of the motor. x
s
and x
t
are
transverse distances of the nut and the table, respectively. And
M
t
is the table mass, F
d
is the driving force acting on the
mechanical component. R is a conversion ratio of linear-to-
rotational motion. K
l
is the equivalent axial stiffness composed
of the ballscrew, nut and support bearing stiffnesses. K

is the
equivalent torsional stiffness composed of the ballscrew and
the coupling. F
f
is the friction force on the guideways of
machine tools.
Figure 1
Physical component diagram of a feed drive system
The equivalent inertia J
eq
and stiffness K
eq
of the feed drive
system are described as (3) and (4), respectively.
2
eq t m
J R M J = + (3)
1
2
1
eq
l
R
K
K K
u

| |
= +
|
\ .
(4)
From the above equations and Fig.1, the block diagram of a
servo physical system model between the control signal V
c
from controller which is usually implemented by computer and
worktable real position x
t
is derived as Fig.2. Where K
v
is a
gain of signal amplifier and power amplifier. T
d
is disturbance
torque which is composed of friction force on the guideways
and cutting force. K
bv
is a tachometer gain and K
bp
is linear
position sensor gain.
Figure 2
Block diagram of a feed drive physical system model
C. Nonlinear characteristic analysis and friction model of
feed system of machine tools
Due to several inherent nonlinearities, the stick-slip
phenomena appear when the machine tools move more slowly.
It has strongly nonlinear dynamic behaviours in the vicinity of
zero velocity. The main reasons are:
1) Stribeck friction exists for the metallic surfaces in contact
on the machine tool slidway;
2) The flexibility of the coupling between the servo motor
and the ballscrew mechanism makes it impossible to restrain
the Stribeck friction.
3) the backlash exists in the ballscrew transmission;
Since effects of friction are dominant in the nonlinear
characters, some of the significant points of friction are
summarized and a friction model is presented.
Armstrong et al. have presented an excellent survey on
the physics behind the friction phenomenon, as well as
compensation techniques of dealing with it. The typical
friction characteristics for lubricated metallic surfaces in
contact can be described by the Stribeck curve, as shown in
Fig. 3. The typical friction characteristics for lubricated
metallic surfaces in contact can be described by the Stribeck
curve. The stribeck curve consists of four different regions:
1
s
R Keq 2
1
t t
Ms Bs +
X
t
t
Xs

m
m

1
m m
J s B +
R
K
t
1
m m
L s R +
K
emf
K
v

Vm
Vc
Tm
TL
Tc
K
bv
K
bp
To controller
From controller
1
s
z
T z

Ts
1965
static friction zone, boundary lubrication zone, partial
lubrication zone, and full fluid lubrication zone.
If a tangential force is applied to the surfaces, it will first
work to elastically deform the asperity junctions. This
phenomenon is referred to as presliding displacement and
friction force is in static friction zone. If the tangential force
exceeds a certain threshold, referred to as maximum static
friction force, the junctions will break, causing sliding to start.
Once the breakaway occurs, a film of lubricant will not be able
to build up between the contact surfaces at very low velocities.
In this case, sliding will occur between solid boundary layers
of lubricant that are stuck to the metal surfaces. This regime of
the Stribeck curve, is referred to as boundary lubrication. As
the sliding velocity between the two surfaces increases, more
lubricant is drawn into the contact zone, which allows a
lubricant film to be formed. At this stage, the film is not thick
enough to completely separate the two surfaces, and the
contacts at some asperities still affect the friction force. This
regime is named as partial fluid lubrication. As partial fluid
lubrication increases, solid to solid contact between the
boundary layers decreases, which results in the reduction of
friction force with increasing velocity. Partial fluid lubrication
is inherently an unstable regime; with increasing velocity, the
lubricant film gets thicker, hence reducing the friction force,
and causing the velocity to increase further. This regime is
difficult to model, as it involves the interaction of elasto-
hydrodynamic phenomena with surface roughness properties.
[4-5]. After sliding velocity reaches a certain level, a
continuous fluid film is formed which completely separates the
two surfaces. In this regime, referred to as full fluid lubrication,
the viscosity of the lubricant is dominant on the friction force.
So the expression for friction torque T
f
may be written as,
( )
( )
stat
( )
0 ( ) ( ) 0
( ) ( ) - ( )< ( ) ( )
( ) ( ) ( ) - ( )<0
( ) ( )> ( )>0
( +( - )e
t
t
s
a
a a stat
f stat a stat
stat a stat
coul stat coul
t T t
T t t T t T t T t
T t T t T t T t
T t T t T t
T T T
e o
e
e o
e o
e o
e o

< =
< <
= < <
<
) sgn( ( )) ( ) > t t e e o

(5)
Where is very small and positive number, T
a
is what remains
of the motor torque T
m
after a part of it has been used to
overcome the effect of cutting forces T
c
. T
stat
and T
coul
are the
static friction and the coulomb frition torque
respectively. ( )
s
t e is critical Stribeck velocity, usually a
empirical coefficient, and is an exponent, usually equals to
2. Sinece the effect of viscous damping is included in the axis
dynamics in Fig. 2, the friction torque expression in (5)
neglects viscous damping component.
And the friction model is integrated into the axis
dynamics is shown in Fig. 4. In this case, as the equations of
motion are written according to the motor shaft, the friction is
considered to be a part of the disturbance torque.
III. TRAPEZOIDAL VELOCITYCOMMAND
GENERATIONBASEDONVARYINGINTERPOLATION
DURATION
Figure 3
The relation sliding velocity and friction force for two lubricated metallic
surfaces in contact
Figure. 4
Integration friction model into the axis dynamics
An interpolation algorithm in which reference trajectories
are generated plays a key role to the performance of the feed
drive systems. Generated trajectories must not only describe
the desired tool path accurately, but must also smooth
kinematical profiles in order to maintain high tracking
accuracy. Due to the friction is relating to the feedrate of the
servo system, which is strongly influence the performance of
designing the controller and machine tools, a novel velocity
generation based on the varying interpolation duration is
presented.
The feed f is provided by the NC part program, and the
minimum interpolation period T
min
is set within the CNC
control software. The interpolation step size is calculated as
min
L FT A = . The step size .L is kept constant until T
min
or F
is changed. When the feed is changed during machining by a
feed-override switch or a sensor-based machining process
control module, .L is kept constant but the interpolation time
T
i
is updated as [7]
i
i
L
T
f
A
=
(6)
Assuming that the total displacement along an arbitrary path is
L, the interpolation task is executed N times at interpolation
time intervals of T
i
,
L
N
L
=
A
(7)
N is always rounded to the next higher even integer for
computational efficiency. The total number of iterations (N) is
divided into a number of stages depending on the type of
velocity profile used for trajectory generation. For simplicity, a
trapezoidal velocity profile for acceleration and deceleration is
presented in this paper, which is simple to implement,
computationally advantageous.
The total number of interpolation steps (N) is divided into
acceleration (N
1
), constant velocity (N
2
) and deceleration (N
3
)
Motor model
Friction model
t
X

Tc+T
L
Tm
Tf
Ta

=
Mechanical
model
m
u
1966
zones shown in Fig. 5, that is,
1 2 3
N N N N = + +
. If the
initial feed is f
0
, the tool path length (l
1
) traveled during the
acceleration period is
2 2
0
1
2
F f
l
A

=
(8)
which leads to
2 2
0 1
1
2
F f l
N
l A l

= =
A A
(9)
Similarly, if the system decelerates from feed F to f
e
, the
number of interpolation periods during deceleration:
2 2
3
2
e
F f
N
D l

=
A
(10)
where A is acceleration and D deceleration. The counters N,
N
1
,N
2
,and N
3
are rounded integers. If the desired feed is not
reached because of a short tool path, that is N
2
<0, then N
2
=0,
N
1
=N
3
=N/2, assuming A=D.
Figure 5
Trapezoidal velocity profile of feed
The feedrates of each stage can be written as
2
0
2
2
2
i
i
i
f f kA L
f F
f F kD L
= + A
=
= A
1
2
3
1
1
1
k N
k N
k N
s s
s s
s s
(11)
Since the traveled tool path segment .L is kept constant,
the following expression can be written between interpolation
periods:
1
2 2
1
1 1
( )
2
( )( )
2
k
k
t
k k
t
k k k k
A
L Atdt t t
A
t t t t


A = =
= +
)
(12)
By substituting
1 1
( ) , ( )/ , ( 1)/
i k k k k
T k t t t f k At f k A

= = = , the
interpolation period during acceleration and deceleration
where the velocity changes is found at each increment as
2
( )
( ) ( 1)
i
L
T k
f k f k
A
=
+
(13)
If we take a two-axis motion in the x and y directions, the
resulting velocities of the x and y drives,
2
( ) ( 1)
( )
2
( ) ( 1)
( )
x x
i
y y
i
x
f k f k
T k
y
f k f k
T k
A
=
A
=
(14)
Hence, once .L, interpolation time T
i
, and N
1
,N
2
,and N
3
are
calculated, the velocities and incremental positions in the x and
y drives are automatically defined by the algorithm.
IV. SIMULATION AND RESULTS ANALYSIS
There are a significant number of control laws to be
implemented in CNC servo system. Typically, PID controllers
are used to compensate for steady-error and disturbances such
as external loads and friction forces. And in order to widen the
axis tracking bandwidth, a simple feed forward friction method
is applied to prevent from degrading the tracking and
contouring performance. The parameters in the feedforward
compensator are from the experimental knowledge. The
parameters of one axis in machine tools are identified and list
in table.
TABLE I
parameters X axis
Torque constant of a motor K
t
(Nm/A) 0.3
Inductance of a motor amplifier L
m
(mH) 2
Resistance of a motor amplifier R
m
(') 0.4
Back-e.m.f. constant of a motor K
emf
(V/rad/s) 0.3
Ballscrew lead l (m) 0.01
V Viscous damping coefficient of motor Bm 0.01
Viscous damping coefficient of a table Bt 0.03
Rotational components inertia Jm (kg m
2
) 0.0078
Mass of work table Mt (kg) 48.8
Equivalent stiffness Keq (MN/m) 0.41
A reference circle toolpaths is used in contour machining
simulation tests [7]. The commands of position and velocity of
each axis are generated in CNC units based on the trapezoidal
velocity control algorithm presented here. The contour profile
is generated by using trapezoidal velocity algorithm and the
desired circle shown in Fig.6. The generating velocity profiles
are shown in Fig. 7. The actual each axis position and velocity
are shown in Figs.8-11. The performance of classical PID
controller adding the feedforward friction compensation based
on the comprehensive servo axis dynamical model and friction
model is illustrated in these figures. The actual contour
toolpaths compared with the desired towpaths is shown in Fig.
12. the dash thick curve is actual contour under the PID
controller, and the solid thin curve is desired contour. There
are still contour errors due to the simple friction compensator.
The intelligent method tuning the parameters of PID and more
complicated friction model will help improve the tracking and
contour accuracy.
f
0
f
e
F
O
t
t
3
t
2 t
1
t
0
N
3
N
2
N
1
1967
Figure 6
The contour profiles generated by interpolator and the desired circle profiles
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
-2000
-1500
-1000
-500
0
500
1000
1500
2000
Time(s)
V
e
l
o
c
i
t
y

o
f

A
x
e
s

(
m
m
/
s
)
XAxis Velocity
Y Axis Velocity
Result Velocity
Figure 7
The velocity of each axis generated based on trapezoidal profile
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
-100
-80
-60
-40
-20
0
20
40
60
80
100
Time (s)
x

a
x
i
s

p
o
s
i
t
i
o
n

(
m
m
)
command position
actual position
Figure 8
The actual x axis position
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
-100
-80
-60
-40
-20
0
20
40
60
80
100
Time (s)
Y

a
x
is

p
o
s
it
io
n

(
m
m
)
command position
actual position
Figure 9
The actual y axis position
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
-2000
-1500
-1000
-500
0
500
1000
1500
2000
Time (s)
x

a
x
i
s

v
e
l
o
c
i
t
y

(
m
m
/
s
)
command velocity
actual velocity
Figure 10
The actual velocity of x axis
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
-2000
-1500
-1000
-500
0
500
1000
1500
2000
Time (s)
Y

a
x
i
s

v
e
l
o
c
i
t
y

(
m
m
/
s
)
command velocity
actual velocity
Figure 11
The actual velocity of y axis
1968
0 20 40 60 80 100 120 140 160 180 200
-100
-80
-60
-40
-20
0
20
40
60
80
100
Figure 12
The actual contour and desired contour
V. CONCLUSION
This paper has presented the detail modeling process of
servo drive system of CNC machine tools. A dynamic servo
model has been combined with a friction model. And the novel
velocity control algorithm has been presented and implanted
based on the varying periods. A serial of simulations verified
the high performance of PID controller based on the
comprehensive model and reasonable friction compensation.
REFERENCES
[1] Y.Koren, Computer Control of Manufacturing Systems, McGraw-Hill,
New York, 1983
[2] A.T.Elfizy, et al, Model-based controller design for machine tool direct
feed drive, International Journal of Machine Tools and Manufacturing,
vol. 41, 2001, pp. 1637-1658.
[3] Min-Seok Kim, Sung-chong Chung, A systematic approach to design
high-performance feed drive systems, International Journal of Machine
Tools and Manufacturing, vol. 45, 2005, pp. 1421-1435
[4] Kann Erkorkmaz, Yusuf. Altintas, High speed CNC system desigh. Part
, International Journal of Machine Tools and Manufacturing, vol. 41,
2001, pp. 1487-1509.
[5] Kann Erkorkmaz, Yusuf. Altintas, High speed CNC system desigh. Part
, International Journal of Machine Tools and Manufacturing, vol. 41,
2001, pp. 1637-1658.
[6] Y. Altintas, Manufacturing Automation: Metal cutting Mechanics,
Machine Tool Vibrations, and CNC design, Cambridge University Press,
Cambridge, 2000.
[7] Liu Jinkun, Advanced PID control and MATLAB simulation,2
nd
ed,
Publishing House of Electronics Industry, Beijing, 2004
1969

You might also like