Study on Acc/Dec Algorithm Based on Piecewise Polynomial in CNC

In order to improve the stability of feed movement in high speed CNC system, the feedrate planning algorithm based on piece-wise polynomial function was proposed. The flexible transition of feedrate was realized through maintaining linear continuous jerk. The principle of the proposed algorithm was introduced and the method to generate smooth motion profile based on the proposed algorithm was presented. The rapidity, stability and tracking accuracy of the feedrate planning algorithm to linearity, S curve and the proposed one were analyzed. The proposed algorithm is simple and it can be applied in acceleration/deceleration before interpolation in high speed feed movement to improve the stability of it. The proposed algorithm was applied in multi-contour high speed processing and the result indicated that it could improve the stability of large-scale parts motion.


Introduction
In the CNC processing, the feedrate of the controlled device can not be adjusted abruptly because of the mechanical and electrical inertia from the CNC system, driving system and controlled device. In order to avoid shock, losing step, over travel, vibration of the controlled device, the feedrate of it should be modified smoothly according to acceleration and deceleration (acc/dec) mode. The conventional CNC has the linear and exponential acc/dec function only, which result in abrupt acceleration change during the CNC operation and cause excessive vibration in the processing. The advanced CNC has the S curve acc/dec ability [1][2][3] currently resulting the continuous acceleration but discontinuous jerk change during CNC processing [4]. The jerk change of the CNC system reflects the change of its kinetic energy with processing time [5,6]. In CNC processing especially high speed machining, in order to reduce the moving parts' especially the large-scale moving parts' shock and impact, the kinetic energy of the whole CNC system should be continuous change with time. When the feedrate of moving parts is high, its jerk besides its acceleration should be continuous change with processing time [7]. Intense vibration can be found during the large-scale parts moving in S curve acc/dec mode. The acc/dec algorithm based on the trigonometric series was proposed by Guo et al. to realize the continuous change of jerk during CNC processing, but the complicated calculation of it can not meet the real time requirement of servo control. So the acc/dec process should be pre-treated, and it is realized with look-up table and interpolation calculation in operation, moreover, the Guo's algorithm has large truncation error, and it will effect the smoothness of acc/dec process. A novel acc/dec algorithm based on piece-polynominal was proposed in this paper to realize the continuous change of jerk during CNC operation, and the detail of it was given.

Acc/dec algorithm based on piece-polynominal
Smooth feedrate change, continuous acceleration, the start and end feedrate equalling to the desired value, the start acceleration equalling to zero should be meet on constructing acc/dec algorithm [8].The whole acc/dec course includes acceleration, constant feedrate and deceleration phase. As indicated in figure 1, the proposed acc/dec algorithm include 15 phases, of which from 1st to 7th phases are acceleration, from 9th to 15th phases are deceleration and the left one is constant feedrate phase.
For brevity, all the variables in the proposed algorithm were explained here.①j,a,v,s indicates jerk, acceleration, feedrate and displacement respectively; ②t 1 …t 15 represents the absolute time of the end of each acc/dec phase respectively; ③T1…T 15 indicates the run time of each acc/dec phase respectively; ④j 1 …j 15 were the jerk of each end of acc/dec step respectively; ⑤a 1 …a 15 were the acceleration of each end of acc/dec step respectively; ⑥v 1 …v 15 were the feedrate of each end of acc/dec step respectively; ⑦s 1 …s 15 were the displacement of each end of acc/dec step respectively; ⑧l 1 …l 15 were displacement of each acc/dec phase respectively; ⑨t,τwere absolute time variable and relative time variable; ⑩v s ,v e were the start and end feedrate of the whole acc/dec course, R, J, A, v fmax indicates change rate of jerk, acceleration limit of machine tool, the acceleration maximum and maximal feedrate respectively. As shown in figure 1, the jerk, acceleration, feedrate and displacement of each acc/dec phase can be written as the expression of follows, respectively.

Realization of the proposed algorithm
The J, A value were determined according to the dynamical performance of CNC machine tool. The feedrate v fmax was selected based on dynamical performance of CNC machine tool, geometrical property of pathway to be traveled and requirements for processing accuracy, then t v =v fmax /A and t a =A/J were calculated. When t v >t a , select the change rate of jerk R, and t j =J/Rwas calculated to enable t a >t j ; When t v ≤t a , select the change rate of jerk R , and t j =J/Rwas calculated to enable t a <t j , the smooth feedrate profile can be generated under two kinds of case mentioned above.
For simplifying discussion, the start and end feedrate of the CNC operation were set to zero, in this case, the acc/dec curve exhibits symmetry.

t/s
Tv>t a >t j case. t v >t a >t j indicate it is possible to attain acceleration maximum with constant jerk and to achieve maximal feedrate with constant acceleration, in this case , there exists three critical value of distance of run s cr1 , s cr2 , s cr3 corresponding to no constant feedrate phase just right; no constant feedrate and acceleration phase; no constant feedrate, acceleration and jerk phases respectively, s cr1 , s cr2 , s cr3 can be calculated according to formula (1) to (4) and the corresponding motion conditons. For instance, in the CNC operation, the v fmax =100mm/s, A=2000mm/s 2 , J=60000mm/s 3 and R=6000000mm/s 4 were specified, the s cr1 =9.13mm, s cr2 =7.51mm, and s cr3 =0.48mm can be obtained. The smooth moving profile for l=12mm, 8.5mm, 6mm, 0.4mm were generated in figure 2 to 5. great than or less than the critical value s cr4 . The critical value s cr4 corresponds to the CNC acc/dec process without constant feedrate just right, and can be calculated combining with formula (1) to (4). For instance, in the CNC operation, the feedrate v fmax =100mm/s, acceleration A=4000mm/s 2 , jerk J=60000mm/s 3 , change rate of jerk R=600000mm/s 4 , the critical value s cr4 =17.47mm was solved with these conditions. The smooth moving profile for l=20mm, 14mm were given in figure 6 to 7.

Compared with other typical acc/dec algorithm
Rapidity, stationarity, flexibility and the tracking accuracy are generally regarded as performance index of acc/dec of CNC operation [9]. The running time of the proposed algorithm, the linear algorithm [10] and the S curve algorithm [1] for each cases of two instances mentioned above were calculated and listed in table 1. From table 1, although the acc/dec time were lengthened respectively to some extent, the flexibility of them can be improved increasingly by the linear, S curve and the proposed acc/dec algorithms. In fact, the linear, S curve and the proposed algorithm are all based on polynomial, the rapidity of linear acc/dec are the best one of them at the same target feedrate of the acc/dec process, the S curve compromise the acc/dec performance between the rapidity and flexibility at the same acceleration of the acc/dec process, the best CNC operation flexibility can be achieved by the proposed algorithm because it can realize the linear change of jerk in the whole acc/dec process.

Summary
The continuous evolution of jerk can be realized with the proposed acc/dec algorithm based on piece-wise polynomial. Compared with the linear and S curve acc/dec algorithm, the proposed one has more complicated calculating procedure and has the longest acc/dec time for the same CNC operation with the same dynamical index, but it needs simple calculation and can realize the flexible evolution of feedrate during the acc/dec operation. So the proposed algorithm can be applied in the acc/dec procedure before interpolation in high speed machining, and the vibration or shock resulting from high speed cutting can be reduced greatly. The proposed algorithm has been applied in acc/dec before interpolation in one kind of the home-made large-scale multi-contour cutting machine tool, the corresponding feedrate stationarity was improved significantly.