Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
www.elsevier.com/locate/ijmactool
Abstract
The paper presents a comprehensive virtual simulation model of a realistic and modular CNC system. The Virtual CNC architecture
represents an actual CNC, but with modular feed drives, sensors, motors, and amplifiers. The CNC software library includes a variety of
trajectory interpolation and axis control laws. Constant, trapezoidal and cubic acceleration profiles can be selected as a trajectory generation
module. The control laws can be selected ranging from a simple PID to complex Pole Placement, Generalized Predictive Control or Sliding
Mode Controller with friction compensation. When the Virtual CNC is assembled, its performance can be tested using frequency and time
domain response analyses, which are automated. The Virtual CNC includes both analytical tuning methods for linear controllers, as well as
Fuzzy Logic based expert auto-tuning system for Adaptive Sliding Mode Control. The paper includes detailed experimental verification of
the Virtual CNC.
q 2005 Elsevier Ltd. All rights reserved.
Keywords: Virtual machining; CNC; Modeling; Controls; Interpolation
1. Introduction
The objective of the Virtual Manufacturing technology is
to design a completely digital factory where the part is
modeled, machined with optimized process parameters, and
resulting errors are predicted with corrective actions being
taken in a computer simulation environment. This paper
presents a Virtual model of a CNC system for machine
tools.
The CNC system consists of mechanical feed drives,
motors, amplifiers, position-velocity-acceleration sensors,
and real-time computer algorithms which generate time
stamped position commands through trajectory generation
and close the axis servo loops [1]. The Virtual CNC requires
* Corresponding author. Tel.: C1 519 885 1211 5214; fax: 1 519 885
5862.
E-mail addresses: cyeung@mech.ubc.ca (C.-H. Yeung), altintas@
mech.ubc.ca (Y. Altintas), kaane@mecheng1.uwaterloo.ca
(K. Erkorkmaz).
0890-6955/$ - see front matter q 2005 Elsevier Ltd. All rights reserved.
doi:10.1016/j.ijmachtools.2005.08.002
1108
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
1109
1
K K u sKTd s
Js C B t a a
rg
rg
1
Kt Ka ua sKTd s
xl s Z us Z
s
s Js C B
(1)
1110
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
(7)
~ Z
rRu~ Z Eu
C
N
Cdu=2
~ u~ du~ Z
pu
KN
1 2
u~ du~
du
(8)
Kdu=2
du2
12
~
~ Z xm kKxa k
xm k Z xa k C xk0
xk
(4)
Rx~ Z
(9)
dx2
12
(10)
~
~ Z us kKuc k
us k Z uc k C uk0
uk
Td k Z Tf k C Tc k
1
T
umin=max Z
Ka Kt min=max
(5)
(6)
(12)
Fig. 4. Quantization error of DAC: (a) Block diagram of DAC quantization, (b) Uniform probability distribution function.
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
1111
Fig. 5. Stribeck friction curve for two lubricated metallic surfaces in contact.
(13)
where
Ta k ZTm kKTc k*Tm k ZKa Kt ua k
(15)
G
Kuk=u1
G
Tstribeck
uk ZTG
CTcounl
1KeKuk=u2
stat e
(16)
where Tstat and Tcoul are the static friction and the Coulomb
friction torque respectively. Tvisc is the viscous damping
(v) Backlash: The spacing or dead-zone between the
coefficient that corresponds to B in Eq. (1). u1 determines the
screw and nut creates the backlash, which is modeled by: a
spacing between the boundary lubrication and partial fluid
disengaged zone, engagement in the positive direction, and
lubrication zones. u2 determines the spacing between the
engagement in the negative direction, as shown in Fig. 6.
The analytical expressions for the backlash model are
partial lubrication and full fluid lubrication regions. The
summarized as follows,
superscript G corresponds to positive and negative
8
C
dK
x kK1;
>
e % xl k% de
>
< a
K
C
(17)
xa k Z xl kKDb =2; xl kR dC
e 0 set de Z xl kKDb and de Z xl k
>
>
:
K
K
C
xl k C Db =2; xl k% de 0 set de Z xl k and de Z xl k C Db
directions of motion. The parameters of the Stribeck friction
curve can be entered in the drive model. The characteristics
of guideway friction torque Tf in discrete time domain can be
summarized as follows,
8
0;
>
>
>
>
>
>
Ta k;
>
>
>
>
< TC ;
stat
Tf k Z
K
>
;
> Tstat
>
>
>
> C
>
>
Tstribeck uk;
>
>
: K
Tstribeck uk;
uk Z0 and Ta k Z0
K
C
uk Z0 and Tstat
!Ta k!Tstat
C
uk Z0 and Ta kRTstat
O0
K
uk Z0 and Ta k!Tstat
!0
C
initial0 dK
e ZKDb =2 and de Z CDb =2
(18)
ukO0
uk!0
(14)
1112
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Fig. 6. Classical dead-zone backlash model: (a) disengaged zone, (b) system engaged in positive direction, (c) system engaged in negative direction,
(d) backlash plot.
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
1113
1114
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Fig. 9. Feed motion profiles: (a) constant acceleration, (b) trapezoidal acceleration, (c) cubic acceleration.
C KS Sk C d k
where
8
Sk Z lxr kKxm k C_xr kKx_m k
>
>
>
>
>
>
8 2
9
3
>
>
>
<
=
<
T
z
T
z
d^ kzr l4 s xr kK s xm k5 C xr kKxm k
: zK1
;
zK1
>
>
>
>
>
>
J
B
>
> Je Z
; and Be Z
;
>
:
Ka Kt rg
Ka Kt rg
(21)
(20)
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
1115
Considering Fig. 11, the auto-tuning process has a threelevel hierarchical structure: bottom layer for SMC which
needs to be tuned, intermediate layer for system performance evaluation, and upper layer for decision making using
fuzzy logic tuning. A smooth back-and-forth motion
command is applied to the closed loop. The system
performance is observed and characterized in the intermediate layer, where descriptors of the system response
such as oscillation of the control signal, stability of the loop,
and tracking error are evaluated. If the system response is
not found to be satisfactory, then new control parameters are
Fig. 12. Fourier spectrum analysis of control signal: (a) clean signal, (b) noisy signal.
1116
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Table 1
Primary fuzzy sets for performance attributes of OSC, PHM, and TRE
Performance attributes
OSC and
PHM
TRE
Discrete
performance
index
HIUN
LIUN
EL
LA
1
2
Index of deviation
(IOD) for OSC, PHM,
TRE
Threshold(1)%IOD
Threshold(2)%IOD !
Threshold(1)
ACCP
ME
3
Threshold(3)%IOD!
Threshold(2)
LIOQ
SM
4
Threshold(4)%IOD!
Threshold(3)
HIOQ
OK
5
Threshold(5)%IOD!
Threshold(4)
For OSC and PHM: HIOQ, over-qualified; LIOQ, little-qualified; ACCP,
acceptable; LIUN, little unsatisfactory; HIUN, highly unsatisfactory
For TRE: OK, okay; SM, small; ME, medium; LA, large; EL, extremely
large
where
>
>
>
>
>
;
(22)
(23)
Table 2
Mapping from index of deviation to discrete performance index
Discrete performance index
1
2
3
4
5
1.00%OSCindex
0.75%OSCindex!1.00
0.50%OSCindex!0.75
0.25%OSCindex!0.50
0%OSCindex!0.25
PHMindex!308
308%PHMindex!408
408%PHMindex!458
458%PHMindex!608
608%PHMindex!1808
20 mm%TREindex
5 mm %TREindex!20 mm
1 mm %TREindex!5 mm
0.1 mm %TREindex!1 mm
0%TREindex!0.1 mm
Table 3
Membership functions of fuzzy input variables for OSC, PHM, and TRE
Fuzzy input variablesOSC, PHM, and TRE
5 Primary fuzzy set
For TRE
HIUN
LIUN
ACCP
LIOQ
HIOQ
EL
LA
ME
SM
OK
1
0.7
0.3
0
0
0.7
1
0.7
0.3
0
0.3
0.7
1
0.7
0.3
0
0.3
0.7
1
0.7
0
0
0.3
0.7
1
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
1117
Table 4
Membership functions of fuzzy output variables for DKS and Dr
Fuzzy output variables DKS and Dr
7 selected fuzzy set
NL (negative large)
NM (negative medium)
NS (negative small)
ZR (no change)
PS (positive small)
PM (positive medium)
PL (positive large)
K3
1
0.9
0.8
0.7
0.6
0.5
0.4
K2
0.9
1
0.9
0.8
0.7
0.6
0.5
0
0.7
0.8
0.9
1
0.9
0.8
0.7
K1
0.8
0.9
1
0.9
0.8
0.7
0.6
C1
0.6
0.7
0.8
0.9
1
0.9
0.8
C2
0.5
0.6
0.7
0.8
0.9
1
0.9
C3
0.4
0.5
0.6
0.7
0.8
0.9
1
Table 5
Heuristic manipulation of SMC parameters
Performance attribute
KS
Decrease
Decrease
No change (or slightly decrease)
(24)
Table 6
Linguistic rules for tuning SMC
Performance attributes
Or
Or
Or
Or
Or
Or
Or
Or
Or
Or
Or
Or
If
If
If
If
If
If
If
If
If
If
If
If
If
If
If
Tuning action
OSCZ
OSCZ
OSCZ
OSCZ
OSCZ
PHMZ
PHMZ
PHMZ
PHMZ
PHMZ
TREZ
TREZ
TREZ
TREZ
TREZ
HIUN
LIUN
ACCP
LIOQ
HIOQ
HIUN
LIUN
ACCP
LIOQ
HIOQ
EL
LA
ME
SM
OK
then
then
then
then
then
then
then
then
then
then
then
then
then
then
then
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
DKSZ
NL
NM
ZR
PS
PM
NM
NS
ZR
ZR
PS
NS
ZR
PS
PS
ZR
and
and
and
and
and
and
and
and
and
and
and
and
and
and
and
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
DrZ
NS
ZR
ZR
ZR
PS
NM
NM
ZR
PS
PM
NL
NM
PL
PS
ZR
1118
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Table 7
Fuzzy decision table for SMC tuning
Performance attributes (input)
Dr
OSC
HIUN
LIUN
ACCP
LIOQ
HIOQ
K0.2545
K0.2456
0
0.1552
0.2456
K0.1552
0
0
0
0.1552
PHM
HIUN
LIUN
ACCP
LIOQ
HIOQ
K0.2456
K0.1552
0
0
0.1552
K0.2456
K0.2456
0
0.1552
0.2456
TRE
EL
LA
ME
SM
OK
K0.1552
0
0.1552
0.1552
0
K0.2545
K0.2456
0.2545
0.1552
0
Table 8
Summary of axis feed drive parameters
Feed drive parameters
(25)
X-axis
Y-axis
[A/V]
[Nm/A]
[kg m2]
[kg m2/s]
[mm]
[mm/rad]
6.4898
0.4769
0.0077736
0.019811
10
1.5915
7.5768
0.4769
0.0098109
0.028438
10
1.5915
[]
[V]
[V]
[V2]
[V]
16
G10
3.0518!10K4
7.761!10K9
K5,C5
16
G10
3.0518!10K4
7.761!10K9
K5,C5
Measurement noise
Linear encoder resolution, dx
Linear encoder noise variance, Rx~
Tachometer noise variance, Ru~
[mm]
[mm2]
[(rad/s)2]
1.22!10K3
1.2418!10K7
50!10K3
1.22!10K3
1.2418!10K7
50!10K3
[Nm]
[Nm]
[rad/s]
[rad/s]
2.6256, K1.8672
2.1529, K1.4730
3.88, K3.51
4.20, K3.52
2.7658, K2.4520
2.5228, K2.3887
2.37, K4.41
3.01, K4.20
Backlash
Backlash, Db
[mm]
0.003
0.003
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Table 9
Summary of fuzzy tuning for three different scenarios
Results of fuzzy
tuning for SMC
Case 1
Case 2
Case 3
Pre-selected l [rad/s]
Initial/Tuned KS
[V/(mm/s)]
Initial/tuned r
[V/mm]
Initial/final maximum
tracking error [mm]
200
1/0.363
200
0.01/0.315
200
10/0.269
100/47.16
1/39.12
10,000/37.16
0.009/0.009
0.136/0.011
Unstable/0.012
1119
i1 ci mC ci
c^ Z
mC ci
(28)
Fig. 13. System performance before and after fuzzy tuning: (a) initially noisy system, (b) initially highly stable and sluggish system, (c) initially unstable
system.
1120
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Table 10
Summary of control parameters for PID and SMC
PID Control
Proportional gain, Kp
Integral gain, Ki
Differentiation gain, Kd
Sliding mode control (SMC)
Sliding surface bandwidth, l
Feedback gain, KS
Disturbance adaptation gain, r
[V/mm]
[V/(mm$s)]
[V/(mm/s)]
[rad/s]
[V/(mm/s)]
[V/mm]
Y-Axis
70
800
0.30
X-axis
200
0.30
30
70
800
0.30
Y-axis
200
0.30
30
rnew Zrold C
3OSC;PHM;TRE
X
(29)
!
Dr !rold
iZ1
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
1121
Fig. 15. Diamond-shaped contouring tests with sliding mode control (SMC).
1122
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
Fig. 17. Circle-shaped contouring tests with sliding mode control (SMC).
Tables 11 and 12. It can be seen that the most critical parts
on the diamond paths are located at the corners where
transients in reference trajectory occur. The most significant
deviations on the circular paths are located at the quadrants
where the direction of the axis motion changes, and the
errors are mostly due to friction, which holds the slide until
sufficient torque is accumulated to overcome the static
friction disturbance. The experimental results clearly
indicate the accurate prediction capability of the Virtual
CNC system, also indicating that the sliding mode controller
(SMC) yields significantly less contouring and tracking
error than the standard PID controller.
Table 11
Summary of simulation and experimental results for air-cutting of diamond
profile
Table 12
Summary of simulation and experimental results for air-cutting of circle
profile
Axis control
law
Comparison analysis
Simulation
(mm)
Experiment
(mm)
Deviation
(%)
0.0376
0.0115
0.0001
0.0007
0.2659
6.0870
0.0414
0.0070
0.0002
0.0004
0.0138
0.0081
0.0012
0.0003
Axis control
law
Comparison analysis
Simulation
(mm)
Experiment
(mm)
Deviation
(%)
0.0436
0.0109
0.0035
0.0008
8.0275
7.3394
0.4831
5.7143
0.0220
0.0072
0.0003
0.0005
1.3636
6.9444
8.6957
3.7037
0.0226
0.0108
0.0011
0.0009
4.8673
8.3333
C.-H. Yeung et al. / International Journal of Machine Tools & Manufacture 46 (2006) 11071123
5. Conclusion
A comprehensive virtual model of a Modular CNC is
presented. The Virtual CNC allows modular integration of
trajectory planning and interpolation routines, mathematical
models of ball screw and linear drives, friction, feedback
sensors, amplifiers, D/A converters and flexible motion
control laws. The system allows the designer to try out
various feed drive design alternatives, control laws, and
sensors with different resolutions. The accurate model of the
drives allows realistic simulation of the drives high speed
contouring capability, and auto-tuning of sophisticated axis
control laws in a virtual environment, as has been
demonstrated for the presented Sliding Mode Controller.
Acknowledgements
This research is sponsored by NSERC and Pratt &
Whitney Canada under research chair and strategic grant
agreements.
References
[1] Y. Altintas, Manufacturing automation: metal cutting mechanics
Machine Tool Vibrations, and CNC Design, Cambridge University
Press, Cambridge, 2000.
[2] Y.C. Chen, J. Tlusty, Effect of low-friction guideways and lead-screw
flexibility on dynamics of high-speed machines, Annals of CIRP 44
(1) (1995) 353356.
[3] K. Erkorkmaz, Y. Altintas, High speed CNC system design. Part I.
Jerk limited trajectory generation and quintic spline interpolation,
International Journal of Machine Tools and Manufacture 41 (9)
(2001) 13231345.
[4] K. Erkorkmaz, Y. Altintas, Trajectory generation for high speed
milling of molds and dies, Proceedings of the Second International
Conference and Exhibition on Design and Production of Dies and
Molds, Kusadasi, Turkey, DM_46 2001.
[5] Y. Altintas, K. Erkorkmaz, W.-H. Zhu, Sliding mode controller design
for high speed drives, Annals of CIRP 49 (1) (2000) 265270.
[6] P. Boucher, D. Dumur, K.F. Rahmani, Generalized predictive cascade
control (GPCC) for machine tool drives, Annals of CIRP 39 (1) (1990)
357360.
[7] K. Erkorkmaz, Y. Altintas, High speed CNC system design. Part III.
High speed tracking and contouring control of feed drives,
International Journal of Machine Tools and Manufacture 41 (11)
(2001) 16371658.
1123
[8] G. Pritschow, On the influence of the velocity gain factor on the path
deviation, Annals of CIRP 45 (1) (1996) 367371.
[9] M. Tomizuka, Zero phase error tracking algorithm for digital control,
ASME Journal of Dynamic Systems, Measurement, and Control 109
(1987) 6568.
[10] H.B. Armstrong, P. Dupont, C. Canudas De Wit, A survey of models,
analysis tools and compensation methods for the control of machines
with friction, Automatica 30 (7) (1994) 10831138.
[11] K. Erkorkmaz, Y. Altintas, High speed CNC system design. Part II.
Modeling and identification of feed drives, International Journal of
Machine Tools and Manufacture 41 (10) (2001) 14871509.
[12] K. Erkorkmaz, PhD Thesis: Optimal Trajectory Generation and
Precision Tracking Control for Multi-Axis Machines, University of
British Columbia, Department of Mechanical Engineering, Vancouver, BC, Canada, 2004.
[13] J.Y. Kao, Z.M. Yeh, Y.S. Tarng, Y.S. Lin, A study of backlash on the
motion accuracy of CNC lathes, International Journal of Machine
Tools and Manufacture 36 (5) (1996) 539550.
[14] G. Pritschow, Course notes: control techniques of machine tools and
industrial robots, Institute of Control Technology for Machine Tools
and Manufacturing Units, Stuttgart University, Germany, 1997.
[15] Y. Koren, Computer Control of Manufacturing Systems, McGrawHill, New York, 1983.
[16] C.W. de Silva, A.G.J. MacFarlane, Knowledge-based control
approach for robotic manipulators, International Journal of Control
50 (1) (1989) 249273.
[17] N. Wickramarachchi, C.W. de Silva, Knowledge-based supervisory
control system of a fish processing workcell. Part I. System
development, Engineering Applications of Artificial Intelligence 11
(1) (1998) 97118.
[18] N. Wickramarachchi, C.W. de Silva, Knowledge-based supervisory
control system of a fish processing workcell. Part II. Implementation
and evaluation, Engineering Applications of Artificial Intelligence 11
(1) (1998) 119134.
[19] C.W. de Silva, An analytical framework for knowledge-based tuning
of a servo controller, Engineering Applications in Artificial
Intelligence 4 (3) (1991) 177189.
[20] J.-F. Goulet, C.W. de Silva, V.J. Modi, Hierarchical knowledge-based
control of a deployable orbiting manipulator, Acta Astronautica 50 (3)
(2002) 139148.
[21] Y. Altintas, N.A. Erol, Open architecture modular tool kit for motion
and machining process control, Annals of CIRP 47 (1) (1998) 295
300.
[22] C.H. Yeung, MASc Thesis: A Three-Axis Virtual Computer
Numerical Control (CNC) System, University of British Columbia,
Department of Mechanical Engineering, Vancouver, BC, Canada,
2004.
[23] K.J. Astrom, B. Wittenmark, Computer-Controlled Systems: Theory
and Design, third ed., Prentice-Hall Inc., New Jersey, 1997.
[24] C.W. de Silva, Intelligent ControlFuzzy Logic Applications, CRC
Press LLC, Boca Raton, FL, 1995.