Skip to main content
Log in

Parametric FIR filtering for G-code interpolation with corner smoothing and zero circular contour error for NC systems

  • ORIGINAL ARTICLE
  • Published:
The International Journal of Advanced Manufacturing Technology Aims and scope Submit manuscript

Abstract

Motion planning is an important topic in numerical control systems. It has two main schemes: acceleration/deceleration (acc/dec) before interpolation (ADBI) and acc/dec after interpolation (ADAI). An ADBI can interpolate command without contour error, but it causes a velocity discontinuity problem when passing through a corner. Meanwhile, an ADAI can generate a smooth cornering profile without discontinuous velocity, but it has contour error along circular trajectories. To have the benefits of both schemes and avoid their disadvantages, this study proposes a new scheme for G-code motion planning: parametric acc/dec interpolation (PADI). The PADI is a new scheme different from the ADAI and ADBI schemes. The PADI first plans a motion profile in a parametric space like an ADAI and then interpolates the blended parametric command in the working space like an ADBI. Through this approach, it can generate a smooth cornering profile like an ADAI and interpolate a circular command with zero contour error like an ADBI. These advantages can be observed in simulations and experiments. The proposed PADI scheme provides a brand-new motion planning strategy with multiple advantages that traditional methods cannot simultaneously achieve.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17

Similar content being viewed by others

References

  1. Huang R-Y, Cheng C-W, Tsai M-C, Lee A-C (2022) Acceleration-based FIR filters for trajectory interpolation with different kinematic constraints and target velocities for NC systems. Control Eng Pract 124:105204. https://doi.org/10.1016/j.conengprac.2022.105204

    Article  Google Scholar 

  2. Tsai M-C, Cheng M-Y, Lin K-F, Tsai N-C (2005) On acceleration/deceleration before interpolation for CNC motion control, IEEE International Conference on Mechatronics, 2005. ICM'05., IEEE, pp. 382–387. https://doi.org/10.1109/ICMECH.2005.1529287

  3. Shih Y-T, Chen C-S, Lee A-C (2004) Path planning for CNC contouring around a corner. JSME Int J, Ser C 47:412–420. https://doi.org/10.1299/jsmec.47.412

    Article  Google Scholar 

  4. Yong T, Narayanaswami R (2003) A parametric interpolator with confined chord errors, acceleration and deceleration for NC machining. Comput Aided Des 35:1249–1259. https://doi.org/10.1016/S0010-4485(03)00043-5

    Article  Google Scholar 

  5. Lee A-C, Lin M-T, Pan Y-R, Lin W-Y (2011) The feedrate scheduling of NURBS interpolator for CNC machine tools. Comput Aided Des 43:612–628. https://doi.org/10.1016/j.cad.2011.02.014

    Article  Google Scholar 

  6. Jahanpour J, Alizadeh MR (2015) A novel acc-jerk-limited NURBS interpolation enhanced with an optimized S-shaped quintic feedrate scheduling scheme. Int J Adv Manuf Technol 77:1889–1905. https://doi.org/10.1007/s00170-014-6575-z

    Article  Google Scholar 

  7. Jeon JW (1996) A generalized approach for the acceleration and deceleration of CNC machine tools, Proceedings of the 1996 IEEE IECON. 22nd International Conference on Industrial Electronics, Control, and Instrumentation, IEEE, pp 1283–1288. https://doi.org/10.1109/IECON.1996.566064

  8. Jeon JW, Kim Y-K (2002) FPGA based acceleration and deceleration circuit for industrial robots and CNC machine tools. Mechatronics 12:635–642. https://doi.org/10.1016/S0957-4158(01)00012-5

    Article  Google Scholar 

  9. Tsai M-S, Wu S-K, Huang H-W (2014) Study on acceleration/deceleration feedrate planning for multi-block line segments using estimated contour error formulation, 2014 IEEE/ASME International Conference on Advanced Intelligent Mechatronics, IEEE, pp 489–493. https://doi.org/10.1109/AIM.2014.6878125

  10. Pateloup V, Duc E, Ray P (2010) Bspline approximation of circle arc and straight line for pocket machining. Comput Aided Des 42:817–827. https://doi.org/10.1016/j.cad.2010.05.003

    Article  Google Scholar 

  11. Zhao H, Zhu L, Ding H (2013) A real-time look-ahead interpolation methodology with curvature-continuous B-spline transition scheme for CNC machining of short line segments. Int J Mach Tools Manuf 65:88–98. https://doi.org/10.1016/j.ijmachtools.2012.10.005

    Article  Google Scholar 

  12. Sencer B, Ishizaki K, Shamoto E (2015) A curvature optimal sharp corner smoothing algorithm for high-speed feed motion generation of NC systems along linear tool paths. Int J Adv Manuf Technol 76:1977–1992. https://doi.org/10.1007/s00170-014-6386-2

    Article  Google Scholar 

  13. Tajima S, Sencer B (2016) Kinematic corner smoothing for high speed machine tools. Int J Mach Tools Manuf 108:27–43. https://doi.org/10.1016/j.ijmachtools.2016.05.009

    Article  Google Scholar 

  14. Chen C-S, Lee A-C (1998) Design of acceleration/deceleration profiles in motion control based on digital FIR filters. Int J Mach Tools Manuf 38:799–825. https://doi.org/10.1016/S0890-6955(97)00065-5

    Article  Google Scholar 

  15. Sencer B, Ishizaki K, Shamoto E (2015) High speed cornering strategy with confined contour error and vibration suppression for CNC machine tools. CIRP Ann 64:369–372. https://doi.org/10.1016/j.cirp.2015.04.102

    Article  Google Scholar 

  16. Tsai M-S, Nien H-W, Yau H-T (2011) Development of integrated acceleration/deceleration look-ahead interpolation technique for multi-blocks NURBS curves. Int J Adv Manuf Technol 56:601–618. https://doi.org/10.1007/s00170-011-3214-9

    Article  Google Scholar 

  17. Tsai M-S, Huang Y-C (2016) A novel integrated dynamic acceleration/deceleration interpolation algorithm for a CNC controller. Int J Adv Manuf Technol 87:279–292. https://doi.org/10.1007/s00170-016-8444-4

    Article  Google Scholar 

  18. Tajima S, Sencer B, Shamoto E (2018) Accurate interpolation of machining tool-paths based on FIR filtering. Precis Eng 52:332–344. https://doi.org/10.1016/j.precisioneng.2018.01.016

    Article  Google Scholar 

  19. Lee A-C, Huang R-Y, Nguyen T-D, Cheng C-W, Tsai M-C (2020) Laser powder bed fusion of multilayer thin-walled structures based on data-driven model. J Laser Micro/Nanoeng 15:38–44. https://doi.org/10.2961/jlmn.2020.01.2007

    Article  Google Scholar 

  20. Yang DCH, Kong T (1994) Parametric interpolator versus linear interpolator for precision CNC machining. Comput Aided Des 26:225–234. https://doi.org/10.1016/0010-4485(94)90045-0

    Article  MATH  Google Scholar 

  21. Tsai M-C, Cheng C-W (2003) A real-time predictor-corrector interpolator for CNC machining. J Manuf Sci Eng 125:449–460. https://doi.org/10.1115/1.1578670

    Article  Google Scholar 

Download references

Funding

This work was supported by the Ministry of Science and Technology of the Republic of China, under Contract MOST 111–2221-E-A49-158-MY3.

Author information

Authors and Affiliations

Authors

Contributions

All the authors have contributed equally to the production of the present paper.

Corresponding author

Correspondence to An-Chen Lee.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix: Acceleration-based FIR filtering [1]

Appendix: Acceleration-based FIR filtering [1]

1.1 A.1 Filter types

An FIR filter can be expressed as

$$Y[k]=\sum_{i=0}^{{N}_{f}-1}{h}_{i}X[k-i]$$
(A.1)

where X is the input, is the output, k is the index of time, \({h}_{i}\) is the coefficient of the FIR filter, and \({N}_{f}\) is the size of the filter (or the number of the filter’s taps). There are two types of FIR filters used in this paper: 1st-type and 2nd-type FIR filters. A 1st-type filter is a moving average filter, while a 2nd-type FIR filter is composed of two 1st-type FIR filters linked up in series. The impulse responses of a 1st-type FIR filter and a 2nd-type FIR filter are shown in Fig. 

Fig. 18
figure 18

(a) First-type and (b) second-type FIR filter

18(a) and (b), respectively. Equation (A.2) defines the coefficients of a 1st-type FIR filter, equation (A.3) defines the coefficients of an odd-size 2nd-type FIR filter, and equation (A.4) defines the coefficients of an even-size 2nd-type FIR filter:

$${h}_{i}=1/{N}_{f}$$
(A.2)
$${h}_{i}=\left\{\begin{array}{cc}\frac{4i+4}{{N}_{f}^{2}+2{N}_{f}},& i=0,\dots ,\frac{{N}_{f}-1}{2}\\ \frac{4{N}_{f}-4i}{{N}_{f}^{2}+2{N}_{f}},& i=\frac{{N}_{f}+1}{2},\dots ,{N}_{f}-1\end{array}\right.$$
(A.3)
$${h}_{i}=\left\{\begin{array}{cc}\frac{4i+4}{{N}_{f}^{2}+2{N}_{f}+1},& i=0,\dots ,\frac{{N}_{f}}{2}-1\\ \frac{4{N}_{f}-4i}{{N}_{f}^{2}+2{N}_{f}+1},& i=\frac{{N}_{f}}{2},\dots ,{N}_{f}-1\end{array}\right.$$
(A.4)

1.2 A.2 A-FIR scheme

An A-FIR ADAI scheme is illustrated in Fig. 

Fig. 19
figure 19

A-FIR ADAI scheme

19. The tangent acceleration profile \({A}_{F}\) separates to \({A}_{F,X}\) and \({A}_{F,Y}\) along x- and y-axes, respectively. Then, they convolute with FIR filters to have \({A}_{X}\) and \({A}_{Y}\). Finally, the integrators generate position commands x and y from the filtered acceleration profiles. By designing the tangent acceleration profiles and FIR filters, one can generate command trajectories for G01 trajectories.

For a convolution process of an acceleration pulse in an A-FIR, the final velocity value can be any desired value. This allows the A-FIR to connect several convolution processes in a series without stopping the planning process. Because these convolution processes are individual processes, the constraints and the target velocities in these processes can be different. This is the key feature of A-FIRs that V-FIRs cannot achieve.

1.3 A.3 Acceleration profile for G01 trajectories

Figure 

Fig. 20
figure 20

n-segment trajectory

20 is an n-segment trajectory with n + 1 points \({P}_{0}\), \({P}_{1}\),…, \({P}_{n}\), where the black line is the reference trajectory and the yellow line is the convoluted trajectory. An index \(i=0,\dots ,n-1\) is used for simplifying the notation. For this trajectory, the segment length is \({S}_{i}\), the unit vector along each segment is \({\stackrel{\rightharpoonup}{v}}_{i}\), and the corner angle is \({\theta }_{i}\):

$${S}_{i}=\left|\overrightarrow{{P}_{i}{P}_{i+1}}\right|$$
(A.5)
$${\stackrel{\rightharpoonup}{v}}_{i}=\overrightarrow{{P}_{i}{P}_{i+1}}/{S}_{i}$$
(A.6)
$${\theta }_{i}={\mathrm{cos}}^{-1}\left({-\stackrel{\rightharpoonup}{v}}_{i-1}\bullet {\stackrel{\rightharpoonup}{v}}_{i}\right)$$
(A.7)

A tangent acceleration profile \({\stackrel{\rightharpoonup}{A}}_{F}\) can be written as follows:

$${A}_{F}\left[k\right]=\sum {A}_{i}\left[k\right]{\stackrel{\rightharpoonup}{v}}_{i}$$

where \({A}_{i}\) is the acc/dec component along \({\stackrel{\rightharpoonup}{v}}_{i}\). An acc/dec component is displayed in Fig. 

Fig. 21
figure 21

Acc/dec component

21, which is composed of one acceleration pulse, one gap width, one deceleration pulse, and one delay width in sequence. For the i-th acc/dec component, the acceleration pulse width is \({N}_{i,0}\), the gap width is \({N}_{i,1}\), the deceleration pulse width is \({N}_{i,2}\), and the delay width is \({N}_{i,3}\), while the magnitude of the acceleration and deceleration pulses are \({A}_{i,0}\) and \({A}_{i,1}\), respectively, or

$${A}_{i}\left[k\right]=\left\{\begin{array}{cc}{A}_{i,0}& 0\le k-{N}_{i-1}\le {N}_{i,0}\text{-1}\\ 0& {N}_{i,0}\le k-{N}_{i-1}\le {N}_{i,1}\text{-1}\\ -{A}_{i,1}& {N}_{i,1}\le k-{N}_{i-1}\le {N}_{i,2}\text{-1}\\ 0& {N}_{i,2}\le k-{N}_{i-1}\le {N}_{i,3}\text{-1}\end{array}\right.$$

where

$$\left\{\begin{array}{l}N_i=N_{i-1}+\sum_{j=0}^3N_{i,j}\\N_{-1}=0\end{array}\right.$$

The magnitudes of \({A}_{\mathrm{i},1}\) and \({A}_{i+\mathrm{1,0}}\) around the same corner point \({P}_{i+1}\) are the same, which are denoted as \({A}_{i+1,c}\):

$${A}_{i,1}={A}_{i+\mathrm{1,0}}={A}_{i+1,c}$$
(A.8)

There are n + 1 FIR filters used in motion planning, in which sizes are \({N}_{0,f}\), \({N}_{1,f}\),…, \({N}_{n,f}\), individually. The filter with size \({N}_{i,f}\) convolutes the pulses with value \({-A}_{i-\mathrm{1,1}}\) and \({A}_{i,0}\). In Fig. 20, there are smooth cornering trajectories around corners because two adjacent segments’ trajectories are blended together after filtering. Set the blending time as

$${N}_{i,b}={N}_{i+1,f}-{N}_{i,3}$$
(A.9)

Then, the corner error \({\varepsilon }_{i}\) around point \({P}_{i}\) is the shortest distance from \({P}_{i}\) to the trajectory. The corner error equation is

$$\varepsilon_i=A_{i,c}\cos\left(\frac{\theta_i}2\right)T^2f_b\left(N_{i-1,b}\right)/f_f\left(N_{i,f}\right)$$
(A.10)

where \({f}_{b}\left({N}_{b}\right)\) is a function only depending on blending width and filter type, and \({f}_{f}\left({N}_{f}\right)\) is a function only depending on filter size and type:

$${f}_{b}\left({N}_{b}\right)=\left\{\begin{array}{cc}({N}_{b}^{3}-{N}_{b})/24& {1}^{\mathrm{st}}\text{-type, }{N}_{b}\in {Z}_{o}\\ ({N}_{b}^{3}-4{N}_{b})/24& {1}^{\mathrm{st}}\text{-type, }{N}_{b}\in {Z}_{e}\\ \frac{\left(\begin{array}{c}{N}_{b}^{4}+4{N}_{b}^{3}\\ +2{N}_{b}^{2}-4{N}_{b}-3\end{array}\right)}{192}& {2}^{\mathrm{nd}}\text{-type, }{N}_{b}\in {Z}_{o}\\ \frac{\left(\begin{array}{c}{N}_{b}^{4}+4{N}_{b}^{3}\\ -4{N}_{b}^{2}-16{N}_{b}\end{array}\right)}{192}& {2}^{\mathrm{nd}}\text{-type, }{N}_{b}\in {Z}_{e}\end{array}\right.$$
$${f}_{f}\left({N}_{f}\right)=\left\{\begin{array}{cc}{N}_{f},& {1}^{\mathrm{st}}\text{-type}\\ \frac{{N}_{f}^{2}+2{N}_{f}+1}{4},& {2}^{\mathrm{nd}}\text{-type, }{N}_{f}\in {Z}_{o}\\ \frac{{N}_{f}^{2}+2{N}_{f}}{4},& {2}^{\mathrm{nd}}\text{-type, }{N}_{f}\in {Z}_{e}\end{array}\right.$$

where \({Z}_{o}\) stands for odd numbers and \({Z}_{e}\) stands for even numbers. Besides, the jerk around point \({P}_{i}\) is bounded as

$${J}_{i,\mathrm{sup}}=\underset{0\le j<{N}_{i,f}}{\mathrm{max}}\left({h}_{i,j}\right)\mathrm{max}\left(\mathrm{1,2sin}\left(\frac{{\theta }_{i}}{2}\right)\right)\frac{{A}_{i,c}}{T}$$
(A.11)

In corner smoothing, two types of filters can generate a smooth profile. The 2nd-type FIR filter, however, can generate a smoother profile than a 1st-type FIR filter and is more suitable for corners with sharper angles. Therefore, one can set \({\theta }_{F}\) as a threshold to determine which type of filter is suitable for the corner smoothing around a corner point.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Huang, RY., Cheng, CW. & Lee, AC. Parametric FIR filtering for G-code interpolation with corner smoothing and zero circular contour error for NC systems. Int J Adv Manuf Technol 125, 4379–4397 (2023). https://doi.org/10.1007/s00170-023-11005-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00170-023-11005-z

Keywords

Navigation