Skip to main content
  • Original Article
  • Open access
  • Published:

Pre-compensation of Friction for CNC Machine Tools through Constructing a Nonlinear Model Predictive Scheme

Abstract

Nonlinear friction is a dominant factor affecting the control accuracy of CNC machine tools. This paper proposes a friction pre-compensation method for CNC machine tools through constructing a nonlinear model predictive scheme. The nonlinear friction-induced tracking error is firstly modeled and then utilized to establish the nonlinear model predictive scheme, which is subsequently used to optimize the compensation signal by treating the friction-induced tracking error as the optimization objective. During the optimization procedure, the derivative of compensation signal is constrained to avoid vibration of machine tools. In contrast to other existing approaches, the proposed method only needs the parameters of Stribeck friction model and an additional tuning parameter, while finely identifying the parameters related to the pre-sliding phenomenon is not required. As a result, it greatly facilitates the practical applicability. Both air cutting and real cutting experiments conducted on an in-house developed open-architecture CNC machine tool prove that the proposed method can reduce the tracking errors by more than 56%, and reduce the contour errors by more than 50%.

1 Introduction

In the feed drive system of CNC machine tools, friction, which is from the ball-screw and the linear motion guide, is one of the most crucial factors that restrict the positioning accuracy of machine tools [1]. At the velocity reversal points, the reversals of friction cause large tracking errors. To improve the positioning accuracy of the feed drives, various friction compensation techniques have been proposed.

The friction compensation methods can be classified into two groups, i.e., the model-free and the model-based friction compensation methods [2]. The model-free friction compensation method usually treats the friction as a disturbance, and develops various advanced controllers to suppress the adverse effect of friction [3]. Papageorgiou et al. [4, 5] implemented and experimentally compared several friction-resilient controllers. Ren et al. [6] estimated the friction with a reduced-order extended state observer, and designed a super-twisting sliding mode controller to control the three-wheeled omnidirectional mobile robot. Tian et al. [7] treated the friction as a rapidly changing disturbance during velocity reversal, and proposed an adaptive switching-gain sliding-mode-assisted disturbance observer to suppress the friction-induced tracking error. Su et al. [8] proposed a robust output feedback nonlinear proportional-derivative (PD) controller for the positioning of uncertain motion systems subject to the unknown friction with consideration of the actuator constraint.

The model-based friction compensation, which can be realized in the feedback or feedforward manner [9], cancels the friction torque by applying an additional drive torque according to the friction model. Armstrong-H\(\acute{\text{e}}\)louvry et al. [10] made a survey on the friction modeling and compensation, and proposed the well-known Stribeck curve to describe the friction characteristic of the lubricated metallic surfaces. The friction is divided into four regimes, i.e., the static friction, the boundary lubrication, the partial fluid lubrication and the full fluid lubrication. However, because the friction predicted by the Stribeck friction model is not continuous around zero velocity [11], the Stribeck friction model cannot be directly used in the friction compensation of precision motion control.

To realize the continuous and precise friction compensation, various friction models and compensation methods have been developed. The existing friction compensation methods can be classified into the static friction model-based methods and the dynamic friction model-based methods [12]. In terms of the static friction model-based methods, Makkar et al. [13] proposed a continuously differentiable friction model by expressing friction as the sum of three tanh functions and a linear function with respect to velocity. Based on this model, researchers developed various controllers, e.g., adaptive prescribed performance motion controller [14], robust adaptive tracking controller [15] and rise-based controller [16]. Xi et al. [17] proposed a two-stage tracking error-based static friction compensation method through expressing the compensation signal as a function of tracking error and velocity. Feng et al. [18] used a trapezoidal compensation pulse to compensate the friction-induced errors, and designed a generalized regression neural network algorithm to generate the optimal pulse amplitude function. Verbert et al. [19] expressed the friction force as a time-varying coefficient multiplied by the sign of velocity, and designed an online updating law to estimate this coefficient based on the position and velocity errors. Yang et al. [20] proposed a method to distinguish the boundary between the pre-sliding and sliding regimes, and proposed a two stage friction model that uniformly expresses the friction corresponding to the presliding and sliding regimes as functions of velocity. Huang et al. [21] deduced an analytical formulation to distinguish the breakaway point between the pre-sliding and sliding stages, and proposed a triple-stage friction compensation method to cancel the effect of static friction.

In terms of the dynamic friction model-based methods, Dahl [22] presented a friction model that describes the presliding friction as an elastic deflection of surface asperities. However, this model did not incorporate the Stribeck effect. Canudas de Wit et al. [23] proposed the well-known LuGre model, which captures most of the friction behaviours including the Stribeck effect, hysteresis, spring-like characteristics of friction, and varying break-away force. Yao et al. [24] proposed a continuously differentiable version of the LuGre model. Based on the LuGre model and its modifications, researchers developed parameter estimation and compensation method [25], neural network-based adaptive funnel sliding mode controller [26], adaptive barrier controller [27], adaptive compensator [28, 29], observer-based friction compensator [30], distributed friction compensator [31], and adaptive load friction compensator [32]. Dupont et al. [33] proposed the elastoplastic friction model for the control applications involving small displacements and velocities. Based on this model, Keck et al. [34] developed a friction parameter identification and compensation method. Al-Bender et al. [35] proposed the generalized Maxwell-slip (GMS) model. Based on the GMS model, various modifications [36, 37] and controllers [38] were developed. Bui et al. [39] proposed a new friction model, which combines the conventional Coulomb-viscous friction model and a nonlinear sinusoidal component, to better describe the friction in case of high speed motion or insufficient lubration. Guo et al. [40] proposed a neural network-based friction model, which takes the position and velocity information as input to predict the friction.

The above methods can realize precise prediction and compensation of friction. However, in order to obtain continuous compensation signal at the velocity reversal points, both the static and dynamic model-based methods usually introduce presliding-related parameters besides the Stribeck model parameters [13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]. For example, the boundary between presliding and sliding is required for the static model-based methods [17, 20, 21]. The stiffness and damping coefficients of the bristles [23,24,25,26,27,28, 30,31,32] are required for the LuGre model-based methods. The attraction parameters are required for the GMS model-based methods [35,36,37,38]. Identifications of these parameters depend on the position measurements by rotary encoders or linear scales [21]. If the resolutions of rotary encoders or linear scales are high and the measurement noise is small [11], those presliding-related parameters can be precisely identified. However, if the resolutions of rotary encoders or linear scales are low or the measurement noise is relatively large, those parameters are difficult to be precisely identified whether by offline [20, 41,42,43,44] methods or online methods [19, 27, 28, 30,31,32]. This fact limits the scope of application of the existing methods.

To avoid the identification of the fine parameters related to pre-sliding, this paper proposes a non-linear model predictive scheme for friction pre-compensation of CNC machine tools based on Stribeck friction model. Through taking the friction-induced tracking error as the optimization objective, the optimal compensation signal is computed with the help of non-linear model predictive scheme. The derivative of the compensation signal is constrained to avoid the vibration of the machine tool. The advantages of the proposed method are three-folds.

  1. (1)

    Besides the parameters of the Stribeck model, the proposed method only introduces one additional parameter, i.e. the bound of the derivative of the compensation signal, which can be experimentally tuned to minimize the tracking errors. Although the parameters of some existing methods can be tuned in the same way, they usually introduce more than one parameter [17, 20, 21, 23,24,25,26,27,28, 30,31,32, 35,36,37,38]. By introducing only one parameter, the proposed method greatly reduces the complexity of experimentally tuning operation.

  2. (2)

    The basic controller of the proposed method is the commonly used Proportional-Proportional Integral (P-PI) controller with velocity feedforward in the commercial CNC machine tools. This allows the proposed method to be easily integrated into the CNC system of machine tools.

  3. (3)

    Since the proposed method directly takes the friction-induced tracking error as the optimization objective to calculate the optimal compensation signal, the proposed method is expected to have good tracking performance.

The contributions of this paper are three-folds. First, a precise prediction model of the nonlinear friction-induced tracking error of the P-PI controller with velocity feedforward is established, as described in Section 2. Second, the nonlinear model predictive friction pre-compensation method is developed with the constraining of derivative of compensation signal, as described in Section 3. Third, both air cutting and real cutting experiments are conducted to validate the proposed method, as presented in Section 4. Section 5 gives the conclusions.

2 Modeling of the Friction-Induced Tracking Error

In this section, the prediction model of the friction-induced tracking error is established, which includes the following three steps. First, the model of the actual feed drive system with non-linear friction and compensation signal is developed. Second, the model of the ideal feed drive system without friction is developed. Third, through calculating the difference between the predicted position of the actual feed drive system and that of the ideal feed drive system, the friction-induced tracking error is obtained.

Since the proposed method is aimed to compensate the friction, the friction-induced tracking error is adopted as the optimization target. If the aim is to directly reduce the tracking error, the tracking error can be directly taken as the optimization target.

2.1 Modeling of the Feed Drive System under Friction and Compensation Signal

Figure 1 shows the block diagram of the feed drive system of a concerned axis. The feed drive is controlled by the commonly used Proportional-Proportional Integral (P-PI) controller [45] with velocity feedforward in the commercial CNC machine tools.

Figure 1
figure 1

Block diagram of the feed drive system of a concerned axis (R and P are the reference position and the actual position. \(K_\text{f}\), \(K_\text{p}\), \(K_\text{v}\) and \(T_\text{v}\) are the velocity feedforward coefficient, the position loop gain, the velocity loop gain, and the integral time constant. \(T_\text{s}\) is the sampling interval. \(u_\text{c}\) is the compensation signal of friction. ZOH is short for zero-order holder. \(T_\text{f}\) is the friction torque. \(K_\text{a}\), \(K_\text{t}\), \(r_\text{g}\), J and B are the current amplification factor, torque amplification factor, lead screw gain, equivalent inertia and viscous damping)

The mechanical system can be written as the following continuous state space equation:

$$\begin{aligned}&\left[ \begin{array}{c} \dot{P} \\ \dot{\omega } \\ \end{array}\right] =\varvec{A}_\text{c}\left[ \begin{array}{c} P \\ \omega \\ \end{array}\right] +\varvec{B}_\text{c}\left( u+u_\text{c}-d\right), \\&\varvec{A}_\text{c}=\left[ \begin{array}{cc} 0 &{} r_\text{g} \\ 0 &{} -\frac{B}{J} \\ \end{array}\right], \\&\varvec{B}_\text{c}=\left[ \begin{array}{c} 0 \\ \frac{K_\text{a}K_\text{t}}{J} \\ \end{array}\right], \\&d=\dfrac{T_\text{f}}{K_\text{a}K_\text{t}}, \end{aligned}$$
(1)

where \(\omega\) is the angular velocity of the screw. The dot ‘.’ means the derivative operation.

The continuous state space equation in Eq. (1) is transformed into the discrete domain with zero-order holder:

$$\begin{aligned}&\left[ \begin{array}{c} P(k+1) \\ \omega (k+1) \\ \end{array}\right] =\varvec{A}_\text{d}\left[ \begin{array}{c} P(k) \\ \omega (k) \\ \end{array}\right] +\varvec{B}_\text{d}\left( u(k)+u_\text{c}(k)-d(k)\right), \\&\varvec{A}_\text{d}=e^{\varvec{A}_\text{c}T_\text{s}},\\&\varvec{B}_\text{d}=\int _0^{T_\text{s}}e^{\varvec{A}_\text{c}\tau }\text{d}\tau \varvec{B}_\text{c}. \end{aligned}$$
(2)

Because of the integration in the velocity loop, the closed loop system model is one order higher than the open loop system model in Eq. (2). Therefore, an additional state variable q, which is shown in Figure 1, is introduced. According to the block diagram shown in Figure 1, the state variable q can be expressed as follows:

$$\begin{aligned}&q(k)=\dfrac{K_\text{i}z}{z-1}e_\text{v}(k),\\&K_\text{i}=\frac{K_\text{v}T_\text{s}}{T_\text{v}}, \end{aligned}$$
(3)

where \(e_{\text{v}}\) is the tracking error of velocity loop, which is expressed as follows:

$$\begin{aligned} e_\text{v}(k)=\dfrac{K_\text{f}(z-1)}{T_\text{s}r_\text{g}z}R(k) + K_\text{p}(R(k)-P(k)) - \omega (k). \end{aligned}$$
(4)

The control signal u is expressed as follows:

$$\begin{aligned} u(k)=K_\text{v}e_\text{v}(k)+q(k) \end{aligned}.$$
(5)

Substituting Eqs. (3), (4) and (5) into Eq. (2), the closed loop system model can be obtained as follows:

$$\begin{aligned}&\left[ \begin{array}{c} P(k+1) \\ \omega (k+1) \\ q(k) \\ R(k) \\ \end{array}\right] =\varvec{A}\left[ \begin{array}{c} P(k) \\ \omega (k) \\ q(k-1) \\ R(k-1) \\ \end{array}\right] + \varvec{B} R(k) + \varvec{D}(u_c(k)-d(k)),\\&\varvec{A}=\left( \begin{array}{cccc} \multicolumn{2}{c}{\varvec{A}_\text{d}-\varvec{B}_\text{d}(K_\text{v}+K_\text{i})\left[ K_\text{p} ~~ 1\right] } &{} \varvec{B}_\text{d} &{} -\dfrac{K_\text{f}(K_\text{v}+K_\text{i})}{T_\text{s}r_\text{g}}\varvec{B}_\text{d} \\ -K_\text{p}K_\text{i} &{} \quad \quad-K_\text{i} &{} 1 &{} -\dfrac{K_\text{i}K_\text{f}}{T_\text{s}r_\text{g}} \\ 0 &{} \quad \quad \;\;\;0 &{} 0 &{} 0 \\ \end{array}\right), \\&\varvec{B} =\left[ \begin{array}{c} (K_\text{v}+K_\text{i})\left( \dfrac{K_\text{f}}{T_\text{s}r_\text{g}}+K_\text{p}\right) \varvec{B}_\text{d} \\ K_\text{i}\left( \dfrac{K_\text{f}}{T_\text{s}r_\text{g}} + K_\text{p}\right) \\ 1 \\ \end{array}\right], \\&\varvec{D}=\left[ \begin{array}{c} \varvec{B}_\text{d} \\ 0 \\ 0 \\ \end{array}\right]. \\ \end{aligned}$$
(6)

Armstrong et al. [10] made an in-depth survey of the physics behind the friction phenomenon. The typical friction characteristic for the lubricated metallic surfaces in contact is described as the Stribeck curve. Based on this model, the expression for the nonlinear friction d is written as follows [11]:

$$\begin{aligned} d(k)&=d(k,u_\text{a}(k), w(k)) \\&=\left\{ \begin{array}{ll} u_\text{a}(k), &{} \text{if}~ |\omega (k)|\le \Omega _\omega ~ \& ~ d_\text{s}^-<u_\text{a}(k)<d_\text{s}^+,\\ d_\text{s}^-, &{} \text{if}~ |\omega (k)|\le \Omega _\omega ~ \& ~ u_\text{a}(k)\le d_\text{s}^-, \\ d_\text{s}^+, &{} \text{if}~ |\omega (k)|\le \Omega _\omega ~ \& ~ u_\text{a}(k)\ge d_\text{s}^+, \\ d_\text{s}^+e^{-\omega (k)/\Omega ^+_1} + d_\text{c}^+\left( 1-e^{-\omega (k)/\Omega ^+_2}\right), &{} \text{if}~ \omega (k)>\Omega _\omega, \\ d_\text{s}^-e^{-\omega (k)/\Omega ^-_1} + d_\text{c}^-\left( 1-e^{-\omega (k)/\Omega ^-_2}\right), &{} \text{if}~ \omega (k)<-\Omega _\omega, \\ \end{array}\right. \\ \end{aligned}$$
(7)

where \(u_\text{a}(k)=u(k)+u_\text{c}(k)\) is the total control signal. \(\Omega _\omega\) is the threshold of zero angular velocity. \(d_\text{s}^+\) and \(d_\text{s}^-\) are the static frictions in the positive and negative directions. \(d_\text{c}^+\) and \(d_\text{c}^-\) are the coulomb frictions in the positive and negative directions. \(\Omega _1^+\), \(\Omega _2^+\), \(\Omega _1^-\) and \(\Omega _2^-\) are parameters of the Stribeck friction model. The friction model in Eq. (7) is shown in Figure 2.

Figure 2
figure 2

Stribeck friction model for the lubricated ball-screw drive

Please note that the viscous friction term is shown in Figure 2 but is omitted in Eq. (7), since it has been integrated into the damping coefficient B. The parameters in relation to the Stribeck friction model can be identified by the method reported in Ref. [11].

According to Eqs. (4) and (5), the total control signal \(u_\text{a}(k)\) can be expressed as a function of the state variable:

$$\begin{aligned} &u_\text{a}(k)=\varvec{F}\left[ \begin{array}{c} P(k) \\ \omega (k) \\ q(k-1) \\ R(k-1) \\ \end{array}\right] +\left( K_\text{v}+K_\text{i}\right) \left( \dfrac{K_\text{f}}{T_\text{s}r_\text{g}}+K_\text{p}\right) R(k) + u_\text{c}(k),\\&\varvec{F}=\left[ \begin{array}{cccc} -K_\text{p}(K_\text{v}+K_\text{i}) &{} -(K_\text{v}+K_\text{i}) &{} 1 &{} -\dfrac{(K_\text{v}+K_\text{i})K_\text{f}}{T_\text{s}r_\text{g}} \\ \end{array}\right]. \end{aligned}$$
(8)

2.2 Prediction of the Friction-Induced Tracking Error

Through replacing the friction term d(k) and the compensation term \(u_\text{c}(k)\) in Eq. (6) by 0, the actual position of the ideal servo system free from friction can be predicted as follows:

$$\begin{aligned} \left[ \begin{array}{c} P^*(k+1) \\ \omega ^*(k+1) \\ q^*(k) \\ R^*(k) \\ \end{array}\right] =\varvec{A}\left[ \begin{array}{c} P^*(k) \\ \omega ^*(k) \\ q^*(k-1) \\ R^*(k-1) \\ \end{array}\right] + \varvec{B} R(k), \end{aligned}$$
(9)

where the superscript ‘*’ means the variables for the ideal servo system free from friction. The friction-induced tracking error can thus be obtained through calculating the difference between the actual position P(k) disturbed by friction and the actual position \(P^*(k)\) free from friction.

$$\begin{aligned} &\begin{aligned} e_\text{d}(k)=&P(k)-P^*(k)\\ =&\varvec{C}\left[ \begin{array}{c} P(k) \\ \omega (k) \\ q(k-1) \\ R(k-1) \\ \end{array}\right] -\varvec{C}\left[ \begin{array}{c} P^*(k) \\ \omega ^*(k) \\ q^*(k-1) \\ R^*(k-1) \\ \end{array}\right], \end{aligned} \\&\varvec{C}=\left[ \begin{array}{cccc} 1&0&0&0 \end{array}\right], \end{aligned}$$
(10)

where \(e_\text{d}\) is the friction-induced tracking error.

3 Construction of the Nonlinear Model Predictive Scheme

Figure 3 shows the block diagram of the proposed nonlinear model predictive friction pre-compensation method.

Figure 3
figure 3

Block diagram of the proposed nonlinear model predictive friction pre-compensation method for a concerned axis (NMP is short for nonlinear model predictive)

The compensation signals generated by the NMPFP at time step k can be denoted by

$$\begin{aligned} \mathcal {U}_k=\left[ \begin{array}{llll} u_\text{c}(k) &{} u_\text{c}(k+1) &{} \cdots &{} u_\text{c}(k+n_\text{c}-1) \\ \end{array}\right] ^\text{T}, \end{aligned}$$
(11)

where \(n_\text{c}\) is the control horizon. According to the compensation signals, the friction-induced tracking error \(\mathcal {E}_k\) can be predicted by Eq. (10):

$$\begin{aligned} \mathcal {E}_k\left( \mathcal {U}_k \right) =\left[ \begin{array}{llll} e_\text{d}(k+1) &{} e_\text{d}(k+2) &{} \cdots &{} e_\text{d}(k+n_\text{p}) \\ \end{array}\right] ^\text{T}, \end{aligned}$$
(12)

where \(n_\text{p}\ge n_\text{c}\) is the prediction horizon. The compensation signals beyond the control horizon and within the prediction horizon are chosen to be the same as \(u_\text{c}(k+n_\text{c}-1)\), i.e.,

$$\begin{aligned} u_\text{c}(k+i)=u_\text{c}(k+n_\text{c}-1), ~i=n_\text{c}, n_\text{c}+1,...,n_\text{p}-1. \end{aligned}$$
(13)

The following objective function is chosen to minimize the friction-induced tracking error:

$$\begin{aligned} \text{min} ~ J_k\left( \mathcal {U}_k\right) =\mathcal {E}_k\left( \mathcal {U}_k\right) ^\text{T}\mathcal {E}_k\left( \mathcal {U}_k\right). \end{aligned}$$
(14)

If this objective function is directly applied without constraints, the optimal solution of \(\mathcal {U}_k\) will be a sharp step signal, as shown in Figure 4. This signal will impact the ball screw and cause the vibration of the machine tool.

Figure 4
figure 4

An illustrative example of the compensation signal: (a) The velocity of the reference trajectory, (b) The original view and (c) the locally enlarged view of the compensation signals with and without constraining of \(\Delta u_\text{c}\) \((\Delta u_\text{c}(k)=u_\text{c}(k+1)-u_\text{c}(k))\)

Therefore, the derivative of the compensation signal needs to be constrained. However, the derivative of the compensation signal is not convenient to be constrained for the system model given in Eq. (6). Therefore, the system model in Eq. (6) is updated by the following incremental model.

$$\begin{aligned}&\left[ \begin{array}{c} P(k+1) \\ \omega (k+1) \\ q(k) \\ R(k) \\ u_\text{c}(k+1) \\ \end{array}\right] =\tilde{\varvec{A}}\left[ \begin{array}{c} P(k) \\ \omega (k) \\ q(k-1) \\ R(k-1) \\ u_\text{c}(k) \end{array}\right] + \tilde{\varvec{B}} R(k) + \varvec{D}_1\Delta u_c(k) + \varvec{D}_2 d(k),\\&\tilde{\varvec{A}} =\left( \begin{array}{ccccc} \multicolumn{2}{c}{\varvec{A}_\text{d}-\varvec{B}_\text{d}(K_\text{v}+K_\text{i})\left[ K_\text{p} ~~ 1\right] } &{} \varvec{B}_\text{d} &{} -\dfrac{K_\text{f}(K_\text{v}+K_\text{i})}{T_\text{s}r_\text{g}}\varvec{B}_\text{d} &{} \varvec{B}_\text{d}\\ -K_\text{p}K_\text{i} &{} \quad \quad -K_\text{i} &{} 1 &{} -\dfrac{K_\text{i}K_\text{f}}{T_\text{s}r_\text{g}} &{} 0\\ 0 &{} \quad \qquad 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} \quad \quad \quad 0 &{} 0 &{} 0 &{} 1 \\ \end{array}\right), \\&\tilde{\varvec{B}}=\left[ \begin{array}{c} (K_\text{v}+K_\text{i})\left( \dfrac{K_\text{f}}{T_\text{s}r_\text{g}}+K_\text{p}\right) \varvec{B}_\text{d} \\ K_\text{i}\left( \dfrac{K_\text{f}}{T_\text{s}r_\text{g}} + K_\text{p}\right) \\ 1 \\ 0 \\ \end{array}\right], \\&\varvec{D}_1=\left[ \begin{array}{llll} 0, &{} 0, &{} 0, &{} 1 \\ \end{array}\right] ^\top ,\\&\varvec{D}_2=\left[ \begin{array}{llll} -\varvec{B}_\text{d}, &{} 0, &{} 0, &{} 0 \\ \end{array}\right] ^\top, \\ \end{aligned}$$
(15)

where \(\Delta u_\text{c}(k)=u_\text{c}(k+1)-u_\text{c}(k)\) is the incremental compensation signal of friction. Correspondingly, the compensation signals and the predicted tracking errors are updated by

$$\begin{aligned}&\Delta \mathcal {U}_k=\left[ \begin{array}{llll} \Delta u_\text{c}(k) &{} \Delta u_\text{c}(k+1) &{} \cdots &{} \Delta u_\text{c}(k+n_\text{c}-1) \\ \end{array}\right] ^\text{T}, \\&\mathcal {E}_k\left( \Delta \mathcal {U}_k \right) =\left[ \begin{array}{llll} e_\text{d}(k+1) &{} e_\text{d}(k+2) &{} \cdots &{} e_\text{d}(k+n_\text{p}) \\ \end{array}\right] ^\text{T}. \\ \end{aligned}$$
(16)

To avoid sharp change of the compensation signal, the incremental compensation signal \(\Delta u_\text{c}(k)\) needs to be constrained:

$$\begin{aligned} -\Delta \overline{u_\text{c}} \le \Delta u_\text{c}(k) \le \Delta \overline{u_\text{c}}, \end{aligned}$$
(17)

where \(\Delta \overline{u_\text{c}}\) is the upper bound of the incremental compensation signal. The nonlinear optimization problem at time step k can be summarized as follows:

$$\begin{aligned} \begin{aligned} \text{min} ~&J_k(\Delta \mathcal {U}_k)=\mathcal {E}_k\left( \Delta \mathcal {U}_k\right) ^\text{T}\mathcal {E}_k\left( \Delta \mathcal {U}_k\right), \\ \mathrm{s.t.,}~&-\Delta \overline{u_\text{c}} \le \Delta u_\text{c}(k+i) \le \Delta \overline{u_\text{c}}, ~ i=0,1,...,n_\text{c}-1. \\ \end{aligned} \end{aligned}$$
(18)

The optimization problem in Eq. (18) can be solved by the interior-point method [46] or trust-region method [47].

4 Simulation and Experimental Verifications

To evaluate the performance of the proposed method, simulations, air cutting experiments and real-cutting experiments are conducted. The experiments are conducted on an in-house developed open-architecture CNC machine tool, as shown in Figure 5.

Figure 5
figure 5

The in-house developed open-architecture CNC machine tool

The machine tool is controlled by a real-time control board, where various controllers can be implemented. The sampling frequency is set as 1000 Hz. The servo model parameters and friction model parameters of each axis are identified utilizing the method reported in Ref. [11]. The results are listed in Table 1.

Table 1 Servo model parameters, controller parameters and friction model parameters of each feed drive axis

The P-PI controller with velocity feedforward shown in Figure 1 is implemented on the real-time control board. The parameters of the P-PI controllers of each axis are tuned to minimize the tracking errors without causing vibration, and the parameters are listed in Table 1.

Three common trajectories, i.e., the 3D circular trajectory, the fan-shaped trajectory, and the butterfly trajectory, are adopted to validate the controlling performance in both ideal and complex cases. All the trajectories are planned under a maximum feedrate of 20 mm/s, a maximum acceleration of 200 mm/s\(^2\) and a maximum jerk of 2000 mm/s\(^3\) by using the S-shaped feedrate planning method reported in Ref. [45].

4.1 Validation and Comparison with the Existing Methods: 3D Circular Trajectory

First, the developed tracking error prediction model is validated. The 3D circular trajectory is applied, as shown in Figure 6.

Figure 6
figure 6

(a) The 3D circular trajectory and (b) its axial position and (c) velocity after feedrate planning

The circular trajectory is repeated 3 times to verify the repeating performance of the proposed method. The prediction accuracy of tracking error depends on the identification accuracy of the servo model and friction model. In the experiment, the identification accuracy is improved through carrying out the identification for several times with the method reported in Ref. [11] and taking the average value. The predicted and measured tracking errors of the X, Y and Z axes without friction compensation are shown in Figure 7. It can be seen that the tracking errors can be precisely predicted.

Figure 7
figure 7

The predicted and measured tracking errors of the 3D circular trajectory with P-PI controller without friction compensation

Next, the following four methods are implemented and compared.

  • P-PI, which is a P-PI controller with velocity feedforward. The friction is not compensated.

  • P-PI + TEFC, which is a P-PI controller with velocity feedforward and with the tracking error-based friction compensation (TEFC) method reported in Ref. [17].

  • P-PI + LFC, which is a P-PI controller with velocity feedforward and with the LuGre model-based friction compensation (LFC) method reported in Ref. [31].

  • P-PI + NMPFP, which is a P-PI controller with velocity feedforward and with the proposed non-linear model predictive friction pre-compensation (NMPFP) method.

To ensure a fair comparison, the parameters of the P-PI controllers of the four methods are the same, and are listed in Table 1. The experimental tuning result of the upper bound \(\Delta \overline{u_\text{c}}\) is 0.03. The control horizon \(n_\text{p}\) and the prediction horizon \(n_\text{c}\) are set as 100. For each optimization, the first 10 control signals in the control horizon are adopted. The virtual CNC system developed in Ref. [48] is adopted in the simulation. The system considers the second order rigid body dynamic model of feed drive, the saturation of actuation system, the quantization error, the measurement noise, the stribeck friction model and the backlash. The model parameters are identified with the method reported in Ref. [11] and the identification results are shown in Table 1. The simulation and experimental tracking errors of the four methods for circular trajectory are shown in Figure 8.

Figure 8
figure 8

The simulated and experimentally measured tracking errors of the 3D circular trajectory with different controllers

The compensation signals of the proposed method are shown in Figure 9. It can be seen that the proposed P-PI + NMPFP method obtains the smallest tracking errors in both simulations and experiments. Two performance indexes, i.e., the maximum absolute tracking errors and the root-mean-square value of tracking errors, are calculated for each method. The results are listed in Table 2.

Figure 9
figure 9

The compensation signals of the proposed NMPFP method for the 3D circular trajectory

Table 2 Performance indexes of difference methods for the 3D circular trajectory

Compared with the P-PI controller without friction compensation, the proposed method reduces the maximum absolute tracking errors by 66.8% for X axis, 70.0% for Y axis and 72.9% for Z axis. The tracking errors are not just due to friction, but also due to the velocity, acceleration and jerk of trajectory, and the vibration, measurement noise, backlash and other factors of the machine tool. However, friction is the main factor causing tracking errors, especially at the velocity reversal points. Therefore, the tracking errors can be greatly reduced by the proposed friction compensation method.

The contour errors of the four methods are calculated and shown in Figure 10.

Figure 10
figure 10

The contour errors of the 3D circular trajectory with different controllers (The maximum contour errors are labeled on the figures)

The maximum absolute contour errors and the root-mean-square value of contour errors are listed in Table 2. It can be seen that the proposed method obtains the smallest contour error. Compared with the P-PI controller without friction compensation, the proposed method reduces the maximum contour error by 69.0%, and reduces the root-mean-square value of contour error by 70.4%.

4.2 Analysis of the Robustness: Fan-Shaped Trajectory

The robustness means the maintenance of the controlling performance when the model parameters are not precisely known [49]. Good robustness can greatly improve the practicality of the controller. In this section, the robustness of the proposed friction compensation method is investigated. Among all the parameters listed in Table 1, the controller parameters are precisely known by the designers of the control systems of CNC machine tools. The current amplification factor (\(K_\text{a}\)), the torque amplification factor (\(K_\text{t}\)), the lead screw gain (\(r_\text{g}\)) can be obtained by referring to the manuals of the servo motors and the lead screws. Only the equivalent inertia (J), the viscous damping (B) and the friction model parameters are not precisely known, and need to be identified. Therefore, it is necessary to test the robustness of the proposed method in terms of J, B and the friction model parameters.

First, the robustness in terms of the equivalent inertia J and the viscous damping B is investigated. The fan-shaped trajectory shown in Figure 11 is adopted. 90%, 100% and 110% of the J and B are utilized in the proposed algorithm to simulate the cases where J and B are not precisely identified. The corresponding tracking errors are shown in Figure 12. It can be seen that for different nominal J and B, the tracking errors are more or less the same. When J and B are inaccurate, the tracking errors only increase by 1 or 2 μm. This proves that the proposed method has good robustness in terms of J and B.

Figure 11
figure 11

(a) The fan-shaped trajectory and (b) its axial position and (c) velocity after feedrate planning

Figure 12
figure 12

The measured tracking errors of the fan-shaped trajectory with the proposed NMPFP method under different values of the servo parameters J and B (The maximum absolute tracking errors are labeled on the figures)

Next, the robustness in terms of the friction parameters is investigated. 90%, 100% and 110% of the predicted frictions are utilized in the proposed algorithm to simulate the cases where the friction parameters are not precisely identified. The tracking errors are shown in Figure 13.

Figure 13
figure 13

The measured tracking errors of the fan-shaped trajectory with the proposed NMPFP method under different values of friction parameters (The maximum absolute tracking errors are labeled on the figures)

Compared with the P-PI controller without friction compensation, the proposed method with 100% of the predicted friction can reduce the maximum tracking error by 66.7% for X axis, 60.0% for Y axis, and 82.5% for Z axis, while the proposed method with 90% of the predicted friction can reduce the maximum tracking error by 60.0% for X axis, 52.2% for Y axis, and 75.4% for Z axis. It can be seen that the proposed method can still achieve good performances when the friction parameters are not accurate. This proves that the proposed method has good robustness in terms of friction parameters.

4.3 Real Cutting Experiment: Butterfly Trajectory

To further investigate the performance of the proposed method, real cutting experiments are carried out. The butterfly trajectory shown in Figure 14 is adopted.

Figure 14
figure 14

(a) The butterfly trajectory and (b) its axial position and (c) velocity after feedrate planning

The material of the workpieces are Aluminium 7075. The tool is a four-fluted mill with the diameter of 5 mm and helix angle of 45\(^\circ\). The spindle speed is selected as 3000 r/min. The maximum feedrate is 20 mm/s, as shown in Figure 14. The axial depth of cut is 0.5 mm. An image of a workpiece after cutting is shown in Figure 15.

Figure 15
figure 15

An image of the cutting result of the butterfly trajectory

Both air cutting and real cutting experiments are conducted for the P-PI controllers without friction compensation and with the proposed NMPFP method. The tracking error and contour error results are shown in Figures 16 and 17. It can be seen that in both air cutting and real cutting, the proposed method realizes considerable reduction of tracking errors. Also, it can be seen that the tracking errors for air cutting and real cutting are more or less the same. This is due to the following two reasons. (1) Compared to the drive torque, the cutting torque disturbance caused by the cutting force is much smaller. Therefore, the tracking error caused by the cutting torque disturbance is small. (2) The integral term in the P-PI controller has the disturbance suppression ability. The cutting force disturbance can be well suppressed.

Figure 16
figure 16

The tacking errors of the butterfly trajectory with different controllers for air cutting and real cutting (The maximum absolute tracking errors are labeled on the figures)

Figure 17
figure 17

The contour errors of the butterfly trajectory with different controllers for air cutting and real cutting (The maximum contour errors are labeled on the figures)

5 Conclusions

This paper proposes a nonlinear model predictive scheme to pre-compensate the friction for CNC machine tools. The developed method aims at improving the practical applicability through avoiding fine identification of the parameters in relation to pre-sliding, since these parameters are usually difficult to be accurately identified because of the small displacement of pre-sliding, the quantization error and noise of position measurement. Besides the model parameters of the Stribeck friction, the proposed approach only introduces a single parameter, i.e., the boundary of the derivative of compensation signal. This makes the proposed method easy to be parameterized.

The developed method is experimentally validated by evaluating its tracking and contouring performances, the robustness in terms of the uncertainties of model parameters, and the performance in the real cutting processes. Experiments show that compared with the P-PI controller without friction compensation, the proposed method can reduce the maximum tracking error by 56% to 81%, and reduce the maximum contour error by 50% to 69% for different trajectories. It is also validated that the proposed method has good robustness in terms of the uncertainties of servo model parameters and friction model parameters. For fluctuations of ± 10% in the servo model parameters J and B, the tracking errors are only 1-2 \(\mathrm{\upmu }\)m larger. For fluctuations of ± 10% in the friction model parameters, the tracking errors can still be reduced by more than 52%. Furthermore, experiments demonstrate that the proposed method shows similar tracking and contouring error reductions in real cutting as those in air cutting.

Since the nonlinear model predictive control method takes a relatively long time to calculate and is difficult to calculate online, the friction compensation signals are pre-calculated offline. However, this method lacks adaptivity to model parameter uncertainties and unknown disturbances. In the future research, the calculation speed of the algorithm can be improved to realize online compensation.

References

  1. Y Altintas, A Verl, C Brecher, et al. Machine tool feed drives. CIRP Annals - Manufacturing Technology, 2011, 60: 779–796.

    Google Scholar 

  2. S Huang, W Liang, K K Tan. Intelligent friction compensation: A review. IEEE/ASME Transactions on Mechatronics, 2019, 24(4): 1763–1774.

    Google Scholar 

  3. L Nechak. Nonlinear state observer for estimating and controlling of friction-induced vibrations. Mechanical Systems and Signal Processing, 2020, 139: 106588.

    Google Scholar 

  4. D Papageorgiou, M Blanke, H H Niemann, et al. Friction-resilient position control for machine tools - Adaptive and sliding-mode methods compared. Control Engineering Practice, 2018, 75: 69–85.

    Google Scholar 

  5. D Papageorgiou, M Blanke, H H Niemann, et al. Adaptive and sliding mode friction-resilient machine tool positioning - Cascaded control revisited. Mechanical Systems and Signal Processing, 2019, 132: 35–54.

    Google Scholar 

  6. C Ren, X Li, X Yang, et al. Extended state observer based sliding mode control of an omnidirectional mobile robot with friction compensation. IEEE Transactions on Industrial Electronics, 2019, 66(12): 9480–9489.

    Google Scholar 

  7. D Tian, R Xu, E Sariyildiz, et al. An adaptive switching-gain sliding-mode-assisted disturbance observer for high-precision servo control. IEEE Transactions on Industrial Electronics, 2021, 69(2): 1762–1772.

    Google Scholar 

  8. Y Su, C Zheng, P Mercorelli. Velocity-free friction compensation for motion systems with actuator constraint. Mechanical Systems and Signal Processing, 2021, 148: 107132.

    Google Scholar 

  9. L Liu, S Tian, D Xue, et al. Industrial feedforward control technology: A review. Journal of Intelligent Manufacturing, 2019, 30: 2819–2833.

    Google Scholar 

  10. B Armstrong-H\(\acute{\rm e}\)louvry, P Dupont, C C D Wit. A survey of models, analysis tools and compensation methods for the control of machines with friction. Automatica, 1994, 30(7): 1083–1138.

  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, 2001, 41: 1487–1509.

    Google Scholar 

  12. F Marques, L Woli\(\acute{\rm n}\)ski, M Wojtyra, et al. An investigation of a novel LuGre-based friction force mode. Mechanism and Machine Theory, 2021, 166: 104493.

  13. C Makkar, W E Dixon, W G Sawyer, et al. A new continuously differentiable friction model for control systems design. Proceedings of the 2005 IEEE/ASME International Conference on Advanced Intelligent Mechatronics, 2005: 600–605.

  14. J Na, Q Chen, X Ren, et al. Adaptive prescribed performance motion control of servo mechanisms with friction compensation. IEEE Transactions on Industrial Electronics, 2014, 61(1): 486–494.

    Google Scholar 

  15. S Wang, H Yu, J Yu. Robust adaptive tracking control for servo mechanisms with continuous friction compensation. Control Engineering Practice, 2019, 87: 76–82.

    Google Scholar 

  16. J Yao, Z Jiao, D Ma. Rise-based precision motion control of DC motors with continuous friction compensation. IEEE Transactions on Industrial Electronics, 2014, 61(12): 7067–7075.

    Google Scholar 

  17. X C Xi, A N Poo, G S Hong. Tracking error-based static friction compensation for a bi-axial CNC machine. Precision Engineering, 2010, 34: 480–488.

    Google Scholar 

  18. B Feng, D Zhang, J Yang, et al. A novel time-varying friction compensation method for servomechanism. Mathematical Problems in Engineering, 2015: 269391.

    Google Scholar 

  19. K A J Verbert, R T\(\acute{\rm o}\)th, R Babu\(\check{\rm s}\)ka. Adaptive friction compensation: A globally stable approach. IEEE/ASME Transactions on Mechatronics, 2016, 21(1): 351–363.

  20. M Yang, J Yang, H Ding. A two-stage friction model and its application in tracking error pre-compensation of CNC machine tools. Precision Engineering, 2018, 51: 426–436.

    Google Scholar 

  21. X Huang, F Zhao, X Mei, et al. A novel triple-stage friction compensation for a feed system based on electromechanical characteristics. Precision Engineering, 2019, 56: 113–122.

    Google Scholar 

  22. P R Dahl. A solid friction model. The Aerospace Corporation, Report No TOR- 0158(3107-18)-1, 1968.

  23. C C D Wit, H Olsson, K J Astrom, et al. A new model for control of systems with friction. IEEE Transactions on Automatic Control, 1995, 40(3): 419–425.

    MathSciNet  MATH  Google Scholar 

  24. J Yao, W Deng, Z Jiao. Adaptive control of hydraulic actuators with LuGre model-based friction compensation. IEEE Transactions on Industrial Electronics, 2015, 62(10): 6469–6477.

    Google Scholar 

  25. C S Huang, S S Yeh, P L Hsu. Estimation and compensation of the LuGre friction model in high-speed micro-motion control. International Journal of Automation and Smart Technology, 2017, 7: 101–109.

    Google Scholar 

  26. S Wang, Q Chen, X Ren, et al. Neural network-based adaptive funnel sliding mode control for servo mechanisms with friction compensation. Neurocomputing, 2020, 377: 16–26.

    Google Scholar 

  27. S Wang, H Yu, X Gao, et al. Adaptive barrier control for nonlinear servomechanisms with friction compensation. Complexity, 2018: 8925838.

    MATH  Google Scholar 

  28. J Huang, X Zhang, G Wang, et al. Adaptive friction compensation of electromechanical servo system based on LuGre model. 2018 13th IEEE Conference on Industrial Electronics and Applications (ICIEA), 2018: 2596–2600.

  29. M Wan, J Dai, W H Zhang, et al. Adaptive feed-forward friction compensation through developing an asymmetrical dynamic friction model. Mechanism and Machine Theory,  2022: https://doi.org/10.1016/j.mechmachtheory.2021.104691.

    Article  Google Scholar 

  30. F Du, M Zhang, Z Wang, et al. Identification and compensation of friction for a novel two-axis differential micro-feed system. Mechanical Systems and Signal Processing, 2018, 106: 453–465.

    Google Scholar 

  31. W Lee, C Y Lee, Y H Jeong, et al. Distributed component friction model for precision control of a feed drive system. IEEE/ASME Transactions on Mechatronics, 2015, 20(4): 1966–1974.

    Google Scholar 

  32. W Lee, C Y Lee, Y H Jeong, et al. Friction compensation controller for load varying machine tool feed drive. International Journal of Machine Tools and Manufacture, 2015, 96: 47–54.

    Google Scholar 

  33. P Dupont, V Hayward, B Armstrong, et al. Single state elastoplastic friction models. IEEE Transactions on Automatic Control, 2002, 47(5): 787–792.

    MathSciNet  MATH  Google Scholar 

  34. A Keck, J Zimmermann, O Sawodny. Friction parameter identification and compensation using the ElastoPlastic friction model. Mechatronics, 2017, 47: 168–182.

    Google Scholar 

  35. F Al-Bender, V Lampaert, J Swevers. The generalized maxwell-slip model: A novel model for friction simulation and compensation. IEEE Transactions on Automatic Control, 2005, 50(11): 1883–1887.

    MathSciNet  MATH  Google Scholar 

  36. Y Liu, D Du, N Qi, et al. A distributed parameter maxwell-slip model for the hysteresis in piezoelectric actuators. IEEE Transactions on Industrial Electronics, 2019, 66(9): 7150–7158.

    Google Scholar 

  37. T Piatkowski. GMS friction model approximation. Mechanism and Machine Theory, 2014, 75: 1–11.

    Google Scholar 

  38. S Kang, H Yan, L Dong, et al. Finite-time adaptive sliding mode force control for electrohydraulic load simulator based on improved GMS friction model. Mechanical Systems and Signal Processing, 2018, 102: 117–138.

    Google Scholar 

  39. B D Bui, N Uchiyama, K R Simba. Contouring control for three-axis machine tools based on nonlinear friction compensation for lead screws. International Journal of Machine Tools and Manufacture, 2016, 108: 95–105.

    Google Scholar 

  40. K Guo, Y Pan, H Yu. Composite learning robot control with friction compensation: A neural network-based approach. IEEE Transactions on Industrial Electronics, 2019, 66(10): 7841–7851.

    Google Scholar 

  41. T Piatkowski. Dahl and LuGre dynamic friction models - The analysis of selected properties. Mechanism and Machine Theory, 2014, 73: 91–100.

    Google Scholar 

  42. R H A Hensen, M R J G van de Molengraft, M Steinbuch. Frequency domain identification of dynamic friction model parameters. IEEE Transactions on Control Systems Technology, 2002, 10(2): 191–196.

    Google Scholar 

  43. Y Y Chen, P Y Huang, J Y Yen. Frequency-domain identification algorithms for servo systems with friction. IEEE Transactions on Control Systems Technology, 2002, 10(5): 654–665.

    Google Scholar 

  44. T N Do, T Tjahjowidodo, M W S Lau, et al. Nonlinear friction modelling and compensation control of hysteresis phenomena for a pair of tendon-sheath actuated surgical robots. Mechanical Systems and Signal Processing, 2015, 60-61: 770–784.

    Google Scholar 

  45. M T Lin, M S Tsai, H T Yau. Development of a dynamics-based NURBS interpolator with real-time look-ahead algorithm. International Journal of Machine Tools and Manufacture, 2007, 47: 2246–2262.

    Google Scholar 

  46. R A Waltz, J L Morales, J Nocedal, et al. An interior algorithm for nonlinear optimization that combines line search and trust region steps. Mathematical Programming, 2006, 107: 391–408.

    MathSciNet  MATH  Google Scholar 

  47. R H Byrd, J C Gilbert, J Nocedal. A trust region method based on interior point techniques for nonlinear programming. Mathematical Programming, 2000, 89: 149–185.

    MathSciNet  MATH  Google Scholar 

  48. C H Yeung, Y Altintas, K Erkorkmaz. Virtual CNC system. Part I. System architecture. International Journal of Machine Tools and Manufacture, 2006, 46: 1107–1123.

  49. X Yin, L Pan. Enhancing trajectory tracking accuracy for industrial robot with robust adaptive control. Robotics and Computer-Integrated Manufacturing, 2018, 51: 97–102.

    Google Scholar 

Download references

Acknowledgements

The authors sincerely thanks to Mr. J. Dai and Mr. X.Z. Ma for their critical discussion and experimental help during manuscript preparation.

Funding

Supported by National Natural Science Foundation of China (Grant No. 51975481), and Fundamental Research Funds for the Central Universities of China (Grant No. D5000220061).

Author information

Authors and Affiliations

Authors

Contributions

QX was in charge of conceptualization, investigation, methodology, validation and writing original draft. MW was in charge of conceptualization, investigation, methodology, resources, supervision, writing-review & editing and funding acquisition. XQ assisted with experimental verification. All authors read and approved the final manuscript.

Authors' Information

Qunbao Xiao, received the Ph.D. degree in aeronautics and astronautics manufacturing engineering in 2023 from Northwestern Polytechnical University (NPU), China. His research interests include the interpolation and control of CNC system

Min Wan, received the Ph.D. degree in aeronautics and astronautics manufacturing engineering from Northwestern Polytechnical University (NPU), China, in 2007. He is currently a Professor with NPU. His research interests include the mechanics and dynamics of machining process and control of CNC system.

Xuebin Qin, received the M.S. degree in aeronautical engineering in 2021 from Northwestern Polytechnical University (NPU), China, where he is currently working toward the Ph.D. degree in aeronautics and astronautics manufacturing engineering. His research interests include corner smoothing and motion control of CNC system.

Corresponding author

Correspondence to Min Wan.

Ethics declarations

Ethics approval and consent to participate

The authors state that the present work is in compliance with the ethical standards.

Competing interests

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Xiao, Q., Wan, M. & Qin, X. Pre-compensation of Friction for CNC Machine Tools through Constructing a Nonlinear Model Predictive Scheme. Chin. J. Mech. Eng. 36, 119 (2023). https://doi.org/10.1186/s10033-023-00946-x

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s10033-023-00946-x

Keywords