Available online at www.sciencedirect.com
ScienceDirect Procedia CIRP 41 (2016) 806 – 811
48th CIRP Conference on MANUFACTURING SYSTEMS - CIRP CMS 2015
Application of an improved PSO algorithm to control parameters autotuning for bi-axial servo feed system Xiaoyong Huanga,Dong Zhanga,b,*,Bin Fenga,Xin Xua,Shi Guoa,Run Liua aXi’an Jiaotong Univeristy, No.28 Xianning West Road, Xi’an 710049, P.R.China bState Key Laboratory for Manufacturing Systems Engineering, No.99 Yanxiang Road, Xi’an 710049, P.R.China * Corresponding author. Tel.: +86-29-8266-3870; fax: +86-29-8266-8604. E-mail address:
[email protected]
Abstract To improve dynamic performance of servo feed system and aim at automatically calculating optimal controller parameters to increase contour accuracy and manufacturing efficiency. An improved particle swarm algorithm (IPSO) is adapted to optimize control parameters on line, and to match the control parameters of bi-axial servo feed system in this paper. Linearly decreasing acceleration weights is introduced to improve global searching ability in early stage and converge to global optimization at the end of the search. At the same time, adaptive maximum speed limit is introduced to control the scale of search and improve convergence efficiency. The experimental results demonstrate that the novel method is effective at reducing the follow error and contour error. © 2015 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license Peer-review under responsibility of the Scientific Committee of 48th CIRP Conference on MANUFACTURING SYSTEMS - CIRP CMS 2015. (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the scientific committee of 48th CIRP Conference on MANUFACTURING SYSTEMS - CIRP CMS 2015 Keywords: Servo feed system; Auto-tuning; IPSO; Linearly decreasing acceleration weights; Adaptive maximum speed limit.
1. introduction The servo feed system is the key element of CNC machine tools and precise motion control platforms[1] . Its properties have a strong impact on the motion performances and machining accuracy of CNC machine tools[2]. There are mainly two methods to improve the dynamic performances of the servo feed system. One is to improve the components’ precision which will cause production costs to excessively increase. The other one is to optimize servo control parameters, which leads to significant improvement in the overall performance and don’t need much investment in hardware resources. Because it is limited by hardware configuration, operating environment and other restrictions, it should consider improving the matching degree between the servo control parameters and the mechanical system. In addition, the controller structure of servo feed system is three PID loop controllers, which includes many control parameters. Because these controllers are heavily coupled, it is hard work to optimize control parameters to realize high contour accuracy[3, 4]. There are numerous studies carried out to solve problems about PID controller parameters tuning. The control
parameter optimization can be realized through the following methods: Z-N tuning method[5], relay feedback method[6], identification model method[7], manual tuning method and intelligent optimization algorithms[8-11]. According to transient response of the specific object, The Z-N method can obtain the controller’s parameter information, but there are still many defects. If constant amplitude concussion excited by the servo feed system is too small, it becomes difficult to get servo parameters information. Conversely, it will damage the physical structure when the amplitude is very large. On the other hand, the tuning results are vulnerable to influenced by the environment. Although many scholars have improved the Z-N tuning method[12, 13], it is still not suitable for the servo feed system parameter optimization. To overcome the deficiency of Z-N tuning method, Astrom puts forward the relay feedback method, which replaces proportional control in Z-N tuning method and gets system information by equal amplitude oscillation realized by using lag link. But the relay feedback method is easily affected by reversing backlash, friction characteristics, system delay, so the result of control parameter tuning is not perfect. The identification model method obtains the servo feed system model by
2212-8271 © 2015 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Peer-review under responsibility of the scientific committee of 48th CIRP Conference on MANUFACTURING SYSTEMS - CIRP CMS 2015 doi:10.1016/j.procir.2015.12.024
807
Xiaoyong Huang et al. / Procedia CIRP 41 (2016) 806 – 811
system identification to guide the control PID controller parameters tuning[7].The uncertain factors of servo feed system have greater impact on the identification result, and the accuracy of the tuning result is not guaranteed. In reality, model identification method is suitable to verify control parameters tuning result and evaluate the system when tuning to a certain precision level. In engineering practice, the common method is the manual tuning method. This method depends on engineer's experiences and copes with the problems of dynamics mismatching and repeatedly adjusts the parameters until the satisfied accuracy reached[14]. Besides, this method has deficiencies in tuning inefficiently and great tuning margins. Intelligent optimization algorithm converts parameters tuning problem to parameter optimization. By dynamically updating the control parameters and evaluating performance of servo system on line, the dynamic characteristics of the system achieves optimum state. The intelligent optimization algorithm has advantages of automation, intelligence and high optimizing efficiency, and suits to control parameter optimization in multi-loop and multi-parameter parameters and complex controllers coupled. Combined with the structural characteristics of the servo feed control system, this study proposes an improved particle swarm optimization algorithm (IPSO) for PID control parameter optimization of servo feed system. This method introduces linearly decreasing acceleration weights[15] to enhance global searching ability in early stage, and prompts more easily to converge to global optimization at the end of the search. At the same time, adaptive maximum speed limit is proposed to control the scale of search and improve convergence efficiency. Servo control parameter optimization experiment results indicate that the proposed method is equipped with intelligence, and high tuning efficiency. It not only promotes the dynamics of the servo feed system, but also improves the motion precision of the servo feed system. This paper is organized as follows: after the previous introduction, in Section 2, determining the control parameters of bi-axial servo feed system for tuning is discussed. The details of IPSO are described in section 3. The experiment results are analyzed in section 4. Section 5 summarizes the results of this paper. 2. Determining the control parameters for tuning A high precision X-Y worktable, which is the study object of this paper, is made up of X, Y axis servo feed systems. The closed loop PID servo control system includes velocity feedforward and acceleration feedforward, which are commonly used in engineering. In addition, there are no inner connections in the control system between the two axes. The modeling of X axis servo feed system can depict the dynamic behaviors of servo feed system well, as shown in Figure 1, where Xr is command position. Xf is feedback position. KXAF is acceleration feedforward gain. KXVF is velocity feedforward gain. KXpp is proportion gain of position loop. KXvp is proportion gain of velocity loop. KXvi is integral gain of velocity loop. KXt is torque constant. JX is
inertia of X axis servo feed system. rXg is transmission ratio of X axis servo feed system.
Fig.1.The modeling of X axis servo feed system
Because current loop bandwidth is much larger than the position loop bandwidth, the control parameters of current loop are not necessary for tuning. In addition, current loop has been in the state of optimization[16]. Therefore, the current loop input can be treated as equaling to the current loop output. With the Mason formula, the transfer function of X axis servo system can be described as
Xf ( s) Xr ( s)
As 3 Bs 2 Cs D Es 3 Fs 2 Gs H
(1)
Where
A KAF ° B KVFKvp ° °C KviKVF KvpKpp ° °° D KppKvi J ® ° E rgKt ° ° F Kvp °G Kvi KvpKpp ° °¯ H KppKvi
(2)
In order to realize perfect tracking control, the position loop transfer function needs to satisfy the following formula
Xf ( s ) Xr ( s)
1
(3)
Substituting equation (1) into equation (3) gives
° KAF ® ° KVF ¯
J rgKt 1
(4)
To simplify the process of parameter optimization, the value of acceleration feedforward gain and velocity feedforward gain can be calculated. Therefore, the control
808
Xiaoyong Huang et al. / Procedia CIRP 41 (2016) 806 – 811
parameters of X-Y worktable need to be tuned as follows: KXpp, KXvp, KXvi, KYpp, KYvp and KYvi. 3. Improve particle swarm optimization algorithm Considering the process of control parameters autotuning for bi-axial servo feed system, IPSO, based on classical particle swarm optimization algorithm (PSO), is presented in this study. IPSO introduces linearly decreasing inertia weight and adaptive maximum limit speed into speed iterative equation. IPSO could reinforce global searching ability at the beginning stage and converge to global optimum at the end. Meanwhile, IPSO makes the search scale controllable and raises the convergence efficiency. IPSO can have ideally results of optimizes control parameters and overcomes the problem that traditional algorithm constantly ends up with local optimal solution. The details of this improved method are illustrated as follows. 3.1. Standard PSO algorithm A warm consists of n particles and moves around in a ddimensional search space. The i-th particle has current position as Xi(t)=(Xi1(t), Xi2(t), …, Xid(t)), and flying speed as Vi(t)=(Vi1(t), Vi2(t), …, Vid(t)). Each particle’s present global extremum is recorded as Pi(t)=(Pi1, Pi2, …, Pid), and the present global extremum of warm is recorded as Pg(t)=(Pg1, Pg2, …, Pgd). The velocity and position of each particle are updated as the following equations
Vij (t 1) Z (t )Vij (t ) c1 r1 ( Pij (t ) X ik (t )) c2 r2 ( Pgj (t ) X gk (t ))
Z (t ) Zmax
Zmax Zmin Tmax
t
and c2 would lead to particle oscillation in area far from the object. When they become larger, particles rapidly fly to object region. Linear acceleration factor improves global searching ability at the beginning, and easily converge to global optimum at the end. Maximum limited velocity depends on the resolution ratio between current position and best position. If maximum limited velocity is too large, particles will fly over optimal position. While particles end up with local optimum if maximum limited velocity is too small. In this paper, maximum limited velocity of the original PSO is introduced adjust scale coefficient (K − (t/Tmax)p), then dropped according to the generation of evolution to improve convergence efficiency. Speediterative equation based on adaptive speed will be calculated as:
c1
(c1 f c1 j )
(6)
(c2 f c2 j )
t c2 j N
(8)
In the equation, i ę {1,2,…,L}, j ę {1,2,…,N}, t is current iteration step, N is maximum iterations, c1j, c1f, c2j and c2f are constant, r1, r2are random numbers in (0,1). Maximum limited velocity selecting equation based on adaptive speed is modified as
Vij (t 1)
Vt (5)
t c1 j ; c2 N
Vt ,Vij (t 1) t Vt ° ®Vij (t 1), Vt d Vij (t 1) d Vt ° ¯ Vt ,Vij (t 1) d Vt
(9)
( K (t / N ) p )Vmax
(10)
In the equation above, p, K are content with normal sizes of control scale factor; (K − (t/Tmax)p) is scale coefficient; t,N are current iteration number and maximum iteration number. 3.3. Fitness function
X ij (t 1)
X ij (t ) Vij (t 1)
(7)
c1 and c2 are two positive constants named acceleration constants; r1 and r2 are random numbers between [0,1][17]; w(t) is inertia weight; wmin, wmax are initial weight and final weight of inertia weight; Tmax is maximum iteration number; t means current iteration number. Xij(t) is the position of particle i with j-th dimension at t-th iteration. Vij(t) is the velocity of particle i with j-th dimension at t-th iteration. Variation range about velocity and position of particle at jth (1 d j d d ) dimension are [Xjmin, Xjmax] and [Vjmin, Vjmax]. Xij or Vij of any dimension in iteration process which is beyond boundary will be recorded as boundary value. Initial position and initial velocity of particle swarm would randomly generate, then iterated by the equation until meet stop condition. 3.2. Self-adaptation adjusted strategy in PSO Acceleration constants c1 and c2 shows cognitive learning rate and social learning rate of particle. Smaller c1
Fitness function is applied to evaluate the level of particle position optimization in particle swarm. Control parameters auto-tuning, demonstrated in this paper, aims at improving movement precision of servo feed system, so fitness function fit(Xi(t)) gives ° ° ° Fi (t ) ® ° °N sample ° ¯
N
¦ > X ( p) X ( p) @ >Y ( p) Y ( p) @ 2
r
f
2
r
f
p 1
N sample
(11)
T Ts
Fi(t) is the i-th partical value of the fitness function in the t-th generation. Position command of servo feed system adopts sine and cosine trajectory. Nsample is number of sampling point per period T. Ts is sampling period. T is period of the circular motion of servo feed system position command.
809
Xiaoyong Huang et al. / Procedia CIRP 41 (2016) 806 – 811
3.4. The proposed IPSO algrithm
fg
1)The total number of particles is L , maximum iteration number is N, scope of particle space search is Xję[Xjmin, Xjmax], flying speed range is Vj ę[Vjmin, Vjmax]. In particle swarm whose population is L, i-th particle in the t-th generation should illustrate as X i (t )
( X i1 (t ), X i 2 (t ),
(12)
, X i 6 (t ))
Each particle is consisted of six control parameters that need to be optimized which are KXpp, KXvp, KXvi, KYpp, KYvp, KYvi. Because there are six parameters in optimization process, particle’s dimension should be six, too. Xij (i ę {1,2,…,L}, ję{1,2,…,N}) is the i-th partical value of the position in the t-th generation. 2) The 1st-generation particle is randomly initialized, and the generating rule for parameter Xij(1) of each particle is as follows X ij (1)
X ijmin rand ()*( X ijmax X ijmin )
fp
fi
(18)
If fi(t) is better than fg, then current position X i (t ) is substituted by the position of fi(t) in n-dimensional space, and serial number p of particle that corresponding to best fitness value is recorded. 6) If g>N, optimization process is finished when reaching maximum iteration number N, and skip to procedure 12), otherwise skip to procedure 7). 7) The velocity of each particle can be modified by the following equation
Vij (t 1) Z (t ) Vij (t ) c1 r1 ( Pij (t ) X ik (t )) c2 r2 ( Pgj (t ) X gk (t )) c1
(c1 f c1 j )
t c1 j ; c2 N
(c2 f c2 j )
t c2 j N
(19)
(20)
(13)
Unreasonable control parameters would lead to machine tool vibration or even damage. Therefore, operator should choose at rational value range when conducting servo parameter optimization. On the other hand, rational range would enhance performance of the servo system optimization. i ę {1,2,…,L}, j ę {1,2,…,N}, Xj ę [Xjmin, Xjmax],rand() means a random number in (0,1). 3) Calculating the value of fitness function of current t-th generation particle swarm Fig.2. High-speed, high precision X-Y worktable
fi (t )
(14)
fit ( X i (t ))
8) Particle's velocity constraint equations The value of fitness function fi(t) is error between command position and actual position of servo feed system, smaller the value is, better servo matching will be. 4) The best fitness value of each particle, f i , and individual best position vector, Pi is updated by using the following equations fi
Pi
° fi (t ), f i d f i (t ) i {1, 2, ® ° ¯ fi , others
° X i (t ), fi d fi (t ) i {1, 2, ® ° ¯ Pi , others
Vt , L}
° X i (t ), f g d fi (t ) ® ° ¯ Pg , others
Vt ,Vij (t 1) t Vt ° V ( t ® ij 1), Vt d Vij (t 1) d Vt ° ¯ Vt ,Vij (t 1) d Vt
( K (t / N ) p )Vmax
(21)
(22)
(15) 9) The position of each particle can be calculated as
, L}
(16)
If current value fj(t) is better than f i , using fj(t) as current value and setting current position Xi(t) as the individual best position of agent i Pi in n-dimensional space. 5) Global best positions vector Pg, global best fitness f g and serial number p of particle that corresponding to optimal solution are illustrated as follows Pg
Vij (t 1)
(17)
X ij (t 1)
X ij (t ) Vij (t 1)
(23)
10) Particle’s search space constraint equations is usually utilized in
X ij (t 1)
X j max , X j max X ij (t 1) °° min max ® X ij (t 1), X i d X ij (t 1) d X j ° min , X ij (t 1) X j min °¯ X j
(24)
11) After t=t+1, skip to procedure 3); 12) Ascertain parameters Pg with global best fitness value fg.
810
Xiaoyong Huang et al. / Procedia CIRP 41 (2016) 806 – 811
4. Experiments
Table 1. The initial values of parameters based on IPSO.
N(generation) L
Value 50 6
wmax
0.9
Parameter X1min(s-1) X2max(V·s·mm-1) X2min(V·s·mm-1)
Value 50 0.06 0.02
The value of the best fitness function/mm
To verify the validity of the method to improve the ability of control parameters auto-tuning proposed in this study, an X-Y worktable was set up, as show in Figure 2. The motion control experimental platform is composed of high performance servo motors, digital servo drivers, mechanical systems and an open CNC system. The open CNC system includes a slave computer and a host computer. The slave computer is responsible for making high-speed high-accuracy movement control in real time and sending system’s state data to host computer. The host computer mainly realizes the following functions: data sampling, parameter variation monitoring, real-time analysis about operation process. Considering optimizing efficiency of the algorithm and experimental demonstration effect, the initial values of parameters based on the IPSO are set shown in Table 1.
Parameter
3.5
3
2.5
After auto-tuning
460
492.368
KXvp(V·s·mm-1)
0.03
0.0584
KXvi(V·s·mm-1)
0.6
0.9546
KYpp(s-1)
460
493.012
KYvp(V·s·mm-1)
0.04
0.0586
0.56
0.9625
KYvi(V·s·mm )
1 0
c1f
2.5
X4max(s-1)
500
0.04 0.03
X4 (s )
50
c2f
0.5
X5max(V·s·mm-1)
0.06
p
1.2
X5min(V·s·mm-1)
0.02
K
0.8
X6max(V·s·mm-1)
1
0.001
X6min(V·s·mm-1)
0
(s )
500
Before optimization After optimization
0.02
X axis follow error/mm
2.5
50
Before auto-tuning
-1
c2j
40
KXpp(s-1)
X3min(V·s·mm-1)
X1
20 30 t/generation
The control parameter
X3max(V·s·mm-1)
-1
10
Table 2. The control parameters auto-tuning results.
0.5
max
0
Fig.3. the value of the best fitness function
0.4
-1
PSO IPSO
4
c1j
min
-3
4.5
wmin
Ts(s-1)
x 10
5
0.01 0 -0.01 -0.02 -0.03 -0.04
0
2
4
6
8 t/s
10
12
14
16
(a) 0.015 Before optimization After optimization
0.01
Y axis follow error/mm
Considering the practical work conditions, the position command is circular trajectory with radius of 10mm and feedrate of 600mm/min. In this paper, PSO and IPSO are used in servo control parameters optimization experiment, and results have been compared. Fitness function value of every generation is compared in Figure 3. Based on the information contained in this experiment, IPSO has better convergence performance and higher convergence speed. The fitness function value of every generation becomes low in the range of 2 and 50 generations, which means IPSO possessed better ability of control parameter optimization. Because optimal solution is determined by particles’ memory of present speed, which mainly adjusted by adaptive inertia weight w. It is worth noting that convergence curves based on PSO is not enough smooth, so local extreme value is more easily to be select rather than global optimum value. At the end of the searching process, particles finely search on a small scale as acceleration constant changes, which lead to IPSO possessing stronger ability to search global extreme value. In addition, it takes 40 minutes to tune the control parameters of the X-Y worktable, and the tuning efficiency is improved greatly.
0.005
0
-0.005
-0.01
-0.015
0
2
4
6
8 t/s
(b)
10
12
14
16
Xiaoyong Huang et al. / Procedia CIRP 41 (2016) 806 – 811
90° 120°
References
100P m 80P m
60°
60P m 150°
40P m
30°
20P m 180°
0°
330°
210°
240°
811
300° 270° Before auto-tuning After auto-tuning
(c) Fig.4. (a) X axis follow error; (b) Y axis follow error; (c) contour error of the X-Y worktable
To evaluate the performances of auto-tuning with using the IPSO, the following error and the contour error with the feed rate of 600 mm/min and the radius of 25 mm are compared ,as shown in Figure 4. The follow accuracy of the X, Y axis servo feed systems is improved distinctly after control parameters optimizing, as shown in Figures 4(a) and (b). Meanwhile, the contour errors decrease greatly as shown in Figure 4(c). Table 2 shows that the optimum values of control parameters for the X-Y worktable after auto-tuning based on the IPSO. 5. Summary Combined with the structural characteristics of the servo feed control system, we proposed an improved particle swarm optimization algorithm (IPSO) for servo feed system control parameter optimization. This method introduces linearly decreasing acceleration weights and adaptive maximum speed limit strategy improves the performance of PSO. IPSO and PSO are adapted to intelligent tune the control servo parameters of the X-Y worktable. The performance results of experiments indicate that the proposed method has rapid convergence rate, high efficiency, intelligence and automation. Meanwhile, the follow accuracy and contour accuracy are increased greatly before-and-after auto-tuning. In addition, this method can improve dynamics optimal matching and decrease contour error.
Acknowledgements This work is supported by National Science and Technology Major Project of the Ministry of Science and Technology of China under grant number 2012ZX04012032.
[1] Altintas Y, Verl A, Brecher C et al. Machine Tool Feed Drives [J]. CIRP Annals-Manufacturing Technology, 2011, 60(2): 779-96. [2] Neugebauer R, Denkena B, Wegener K. Mechatronic Systems for Machine Tools [J]. CIRP Annals-Manufacturing Technology, 2007, 56(2): 657-86. [3] Ramesh R, Mannan M, Poo A. Tracking and Contour Error Control in Cnc Servo Systems [J]. International Journal of Machine Tools and Manufacture, 2005, 45(3): 301-26. [4] Whalley R, Ebrahimi M, Abdul-Ameer A et al. Optimum, Machine Tool Axis Traverse Regulation [J]. International Journal of Machine Tools and Manufacture, 2006, 46(14): 1835-53. [5] Ziegler J G, Nichols N B. Optimum Settings for Automatic Controllers [J]. trans ASME, 1942, 64(11): [6] ström K J, Hägglund T. Automatic Tuning of Simple Regulators with Specifications on Phase and Amplitude Margins [J]. Automatica, 1984, 20(5): 645-51. [7] Erkorkmaz K, Altintas Y. High Speed Cnc System Design. Part Ii: Modeling and Identification of Feed Drives [J]. International Journal of Machine Tools and Manufacture, 2001, 41(10): 1487-509. [8] Gyöngy I, Clarke D. On the Automatic Tuning and Adaptation of Pid Controllers [J]. Control engineering practice, 2006, 14(2): 149-63. [9] Jianhua W, Jia L, Zhenhua X et al. A Relay-Based Method for Servo Performance Improvement [J]. Mechatronics, 2011, 21(6): 1076-86. [10] Carvajal J, Chen G, Ogmen H. Fuzzy Pid Controller: Design, Performance Evaluation, and Stability Analysis [J]. Information Sciences, 2000, 123(3): 249-70. [11] Calvo-Rolle J L, Corchado E, Quintian-Pardo H et al. A Novel Hybrid Intelligent Classifier to Obtain the Controller Tuning Parameters for Temperature Control [M]. Hybrid Artificial Intelligent Systems. Springer. 2012: 677-89. [12] ström K, Hägglund T. Revisiting the Ziegler–Nichols Step Response Method for Pid Control [J]. Journal of Process Control, 2004, 14(6): 635-50. [13] Valério D, Da Costa J S. Tuning of Fractional Pid Controllers with Ziegler–Nichols-Type Rules [J]. Signal Processing, 2006, 86(10): 2771-84. [14] Kwon H, Burdekin M. Adjustment of Cnc Machine Tool Controller Setting Values by an Experimental Method [J]. International Journal of Machine Tools and Manufacture, 1998, 38(9): 1045-65. [15] Shi Y, Eberhart R. A Modified Particle Swarm Optimizer; proceedings of the Evolutionary Computation Proceedings, 1998 IEEE World Congress on Computational Intelligence, The 1998 IEEE International Conference on, F, 1998 [C]. IEEE. [16] Erkorkmaz K, Altintas Y. High Speed Cnc System Design. Part Iii: High Speed Tracking and Contouring Control of Feed Drives [J]. International Journal of Machine Tools and Manufacture, 2001, 41(11): 1637-58. [17] Mei X, Tsutsumi M, Tao T et al. Study on the Compensation of Error by Stick-Slip for High-Precision Table [J]. International Journal of Machine Tools and Manufacture, 2004, 44(5): 503-10.