Application of a New Model Reference Adaptive Control Based on PID Control in CNC Machine Tools

: To improve the control performance of the CNC machine tool feed servo system with nonlinear disturbances, a model reference adaptive control (MRAC) based on PID control is proposed. The method is based on the traditional three-loop control, the output signal of the speed loop controller is used as the input signal of the model reference adaptive controller, and the adaptive law is derived on the basis of Lyapunov stability theory. To verify the effectiveness, this paper analyzed the method through simulation and experiment. Results showed that the following error caused by nonlinear friction was signiﬁcantly reduced when the speed was reversed, and the inﬂuence of noise and mechanical resonance was effectively suppressed. The proposed control method in this paper improves the motion-control accuracy and anti-interference ability of the control system.


Introduction
The feed system of a CNC machine tool generally includes a control system and a mechanical transmission system [1].In practical engineering applications today, PID control strategies are widely used in control systems for their advantages of simplicity, stability, and convenience.In mechanical transmission, there are linear factors and nonlinear factors.PID control mainly revolves around linear factors include inertia, torsional stiffness of rotating parts, damping of contact pairs, etc. for design and parameter tuning.However, due to the ubiquitous nonlinear factors in mechanical transmission systems, including nonlinear friction, disturbance, and noise, it is difficult to achieve better PID control performance, especially when the speed was reversed, there is a short pause due to the influence of nonlinear friction [2].
As shown in Figure 1, when the speed of the machine tool is reversed, the friction will cause the phenomenon of nonlinear sudden change and over-quadrant sharp corners during full-circle machining, it also causes stickiness or low-speed climbing which makes the response performance of the system worse.In addition, the noise in CNC will cause mechanical resonance, which will reduce the stability and accuracy of the control system.To solve the above problems, Huang, X.Y. et al. [2] proposed a triple-stage friction compensation method, Keck, A. et al. [3] used the ElastoPlastic friction model to compensate the friction by identifying the parameters of the friction model.In [4], the filter has properly selected fixed characteristics and adaptive ability.Xu, J.B. et al. [5] added a low-pass filter on the basis of the notch filter to increase the phase lag of the system, reduce the deviation between the oscillation frequency and the peak frequency, and improve the system performance.In addition, disturbance observer (DOB) can also be used to eliminate interference [6].The above method had achieved ideal control performance, especially when the controlled object is determined.However, when the controlled object is changed, the friction compensation model needs to be re-established.The application of the notch nate interference [6].The above method had achieved ideal control perfor cially when the controlled object is determined.However, when the contro changed, the friction compensation model needs to be re-established.The a the notch filter is based on accurately detecting the resonant frequency of th accuracy and speed of the detection limit the application of this program.The of the notch will reduce the response speed of the system.Moreover, the de ters of the notch filter and disturbance observer are greatly affected by the sy eters, resulting in poor system robustness.Compared with the above methods, the model reference adaptive contr more flexible and has fewer limitations, does not require an accurate model.nology was proposed in 1958, and was applied to the automatic driving cont to enhance the anti-interference of the control system [7].MRAC dynamical control parameters of the system by comparing the output of the plant with the ideal reference model to achieve the desired control performance [8,9].In the analysis and application of MRAC have gradually deepened: Koksal, proposed MRAC to control the position of the DC motor and indicated tha the adaptive law being difficult to determine is the weakness of this method.[11] applied MRAC to motor speed control.MRAC is used to estimate the speed of the motor's rotor [12].Gruenwald, B.C. et al. [13] proposed a direc minimization approach for improved system performance.Abdelrahem, M. plied model-reference adaptive observer to sensor-less control of DFIGs.some articles [15][16][17] discussed the application of MRAC and achieved resu development of MRAC, the combination of MRAC and other nonlinear con ually become a research hotspot.Jang, J.F. et al. [18] proposed a control metho sliding mode control (SMC) with MRAC, which improved the convergence adaptive law gains and makes the control signal smoother.Yao, Z.K. et al. [ a tracking control combining MRAC and neural-networks for hydraulic syst al. [20] designed a neural network sliding mode variable structure decoupli based on model reference adaptive.The method eliminated the chattering and improved tracking performance.
However, Rajesh, R. et al. [21] indicated that MRAC still has some prob poor performance in existence time delay, lack of reliability, oscillatory transi and poor settling time, and PID control is still the main control strategy fo applications because of its simplicity, stability, and convenience.Considering some control methods combining PI/PID control and MRAC were develop Compared with the above methods, the model reference adaptive control (MRAC) is more flexible and has fewer limitations, does not require an accurate model.MRAC technology was proposed in 1958, and was applied to the automatic driving control of aircraft to enhance the anti-interference of the control system [7].MRAC dynamically adjusts the control parameters of the system by comparing the output of the plant with the output of the ideal reference model to achieve the desired control performance [8,9].In recent years, the analysis and application of MRAC have gradually deepened: Koksal, M. et al. [10] proposed MRAC to control the position of the DC motor and indicated that the gain of the adaptive law being difficult to determine is the weakness of this method.Guo, L. et al. [11] applied MRAC to motor speed control.MRAC is used to estimate the position and speed of the motor's rotor [12].Gruenwald, B.C. et al. [13] proposed a direct uncertainty minimization approach for improved system performance.Abdelrahem, M. et al. [14] applied model-reference adaptive observer to sensor-less control of DFIGs.In addition, some articles [15][16][17] discussed the application of MRAC and achieved results.With the development of MRAC, the combination of MRAC and other nonlinear control has gradually become a research hotspot.Jang, J.F. et al. [18] proposed a control method combining sliding mode control (SMC) with MRAC, which improved the convergence speed of the adaptive law gains and makes the control signal smoother.Yao, Z.K. et al. [19] proposed a tracking control combining MRAC and neural-networks for hydraulic systems.Ma, J. et al. [20] designed a neural network sliding mode variable structure decoupling controller based on model reference adaptive.The method eliminated the chattering phenomenon and improved tracking performance.
However, Rajesh, R. et al. [21] indicated that MRAC still has some problems, such as poor performance in existence time delay, lack of reliability, oscillatory transient behavior, and poor settling time, and PID control is still the main control strategy for engineering applications because of its simplicity, stability, and convenience.Considering these issues, some control methods combining PI/PID control and MRAC were developed.Guo et al. [22] proposed a three-closed loop controller.The position loop is composed of a first-order differential feedforward and a phase lead controller, the speed loop is controlled by direct model reference self-adaptation, and the current inner loop control introduces the PI modulator.Dey, R. et al. [23]  the PI controller to minimize the error between the two models.The adaptive controller proposed in [28] consists of decoupling terms to compensate nonlinear factors, automatic gain adjustment PID items and monitors to ensure system stability, but too many adaptive parameters are defined, which increases the difficulty of debugging.
In practical applications, it is not easy to involve a large number of differential and integral operations in the process of model definition and adaptive law derivation.Otherwise, calculation is tedious, and the sudden disturbance easily causes movement obstacles.In addition, there are few studies on the application of MRAC in the feed servo system of CNC machine tools.Considering these issues, this paper combines the stable and reliable characteristics of PID control with the characteristics of MRAC anti-interference, and proposes a model reference adaptive control strategy based on PID control.This method is based on traditional three-loop control.The output signal of speed loop is used as the input signal of model reference adaptive control, and the mechanical transmission link of the machine tool is simplified to a single inertia model.Lastly, this paper verifies related theories on CNC machine tools.The method proposed in this paper had a simple control framework with a small amount of calculation, and the stability of PID control was also considered.Through simulation and experiment, the method proposed in this paper has been successfully applied to the actual CNC control system and achieved ideal control performance, which provided experience for the future research of MRAC on CNC.
This paper is organized as follows: Section 2 clarifies the control structure framework used, Section 3 derives the design algorithm of adaptive control in detail, Sections 4 and 5 outline the simulation and experimental verification, respectively, and Section 6 summarizes the paper.

Framework of Feed Servo System
This paper refers to the control theory in [29], and establishes an adaptive control structure framework as shown in Figure 2, which includes a reference model, actual plant, the mechanism of adaptive law, and a parameter adjustable controller (constituted by K 1 and K 2 ).For MRAC, a generalized error is generated between the output of the plant and the reference model, and the error is used to adjust the controller parameters in real time, to minimize the error and improve the control performance of the system, especially for the control of nonlinear factors.
In practical applications, it is not easy to involve a large number integral operations in the process of model definition and adaptive law erwise, calculation is tedious, and the sudden disturbance easily causes cles.In addition, there are few studies on the application of MRAC in t tem of CNC machine tools.Considering these issues, this paper combi reliable characteristics of PID control with the characteristics of MRAC and proposes a model reference adaptive control strategy based on method is based on traditional three-loop control.The output signal of as the input signal of model reference adaptive control, and the mecha link of the machine tool is simplified to a single inertia model.Lastly, related theories on CNC machine tools.The method proposed in this p control framework with a small amount of calculation, and the stability also considered.Through simulation and experiment, the method prop has been successfully applied to the actual CNC control system and ach performance, which provided experience for the future research of MR This paper is organized as follows: Section 2 clarifies the control str used, Section 3 derives the design algorithm of adaptive control in det 5 outline the simulation and experimental verification, respectively, a marizes the paper.

Framework of Feed Servo System
This paper refers to the control theory in [29], and establishes an structure framework as shown in Figure 2, which includes a reference m the mechanism of adaptive law, and a parameter adjustable controller and K2).For MRAC, a generalized error is generated between the outpu the reference model, and the error is used to adjust the controller param to minimize the error and improve the control performance of the syst the control of nonlinear factors.In Figure 2, u is the torque output of PID control; in the torque i obtained by the adaptive adjustment of K1 and K2 as the input of the pla In Figure 2, u is the torque output of PID control; in the torque input of MRAC u p, obtained by the adaptive adjustment of K 1 and K 2 as the input of the plant, the generalized error is used as the input signal of the mechanism of adaptive law to adaptively adjust the system.
On the above basis, the control framework has been built as shown in Figure 3, where Kp, Kvp and Kf correspond to the position loop gain, the speed loop gain, and the feedback gain.Ki is the integral gain, and Kvf is the speed feedforward gain.Kda is the coefficient of digital-to-analog conversion, which converts digital quantities into torque.In addition, the introduction of speed feedforward can reduce the linear error of PID control and improve the dynamic response capability of the system [30].
error is used as the input signal of the mechanism of adaptive law to adaptively adjust the system.
On the above basis, the control framework has been built as shown in Figure 3, where Kp, Kvp and Kf correspond to the position loop gain, the speed loop gain, and the feedback gain.Ki is the integral gain, and Kvf is the speed feedforward gain.Kda is the coefficient of digital-to-analog conversion, which converts digital quantities into torque.In addition, the introduction of speed feedforward can reduce the linear error of PID control and improve the dynamic response capability of the system [30].

Model Definition and Deduction
Given the expression of the state equation: where p X is a 2 × 1 state vector, including the two state variables of motor angular dis- placement p θ and angular velocity p ω , measured by the actual machine tool.p A is a 2 × 2 system matrix, p B is a 2 × 1 control matrix, and I is an identity matrix.
The reference model is considered to be a single degree of freedom rotating rigid body with viscous damping, and the equation of state is: J are rotational viscous damping coefficient and total inertia, respectively.1 K ,

2
K are the state feedback matrix and the input gain matrix:

Model Definition and Deduction
Given the expression of the state equation: .
where X p is a 2 × 1 state vector, including the two state variables of motor angular displacement θ p and angular velocity ω p , measured by the actual machine tool.A p is a 2 × 2 system matrix, B p is a 2 × 1 control matrix, and I is an identity matrix.The reference model is considered to be a single degree of freedom rotating rigid body with viscous damping, and the equation of state is: .
b m , J m are rotational viscous damping coefficient and total inertia, respectively.K 1 , K 2 are the state feedback matrix and the input gain matrix: Machines 2021, 9, 274 5 of 18 According to Figure 2: Substituting ( 6) into (1) to obtain: .
During the operation of the system, parameters K 1 and K 2 were continuously adjusted until the system reaches a steady state.At this time, the output of the reference model was consistent with the actual model, and there was: Among them, K 1 * , k 2 * are the values of K 1 , k 2 in the steady state.Define the generalized error and derive the time derivative: Substituting ( 8) into (10): .
Define the error of adaptive parameter and derive the time derivative: Then, (11) is rewritten as:

Deduction of Adaptive Law Based on Lyapunov's Stability Theory
The second method of Lyapunov stability theory is used to determine the adaptive law.Define the Lyapunov function as follows: In (14), P, Ψ is a positive-definite symmetric matrix, and Ψ is simplified to Take the derivative of V and substitute Equation (13) into: .
Define the Q matrix: Substituting A m , P = p 11 p 12 p 21 p 22 into (21): To make .
V < 0, this paper need to make the Q matrix a negative-definite matrix.However, since the A m matrix has the characteristics of a singular matrix when it is initially defined, it is impossible to make the Q matrix negative-definite.Therefore, make the Q matrix a seminegative-definite matrix form; then, .
Lastly, the P matrix needs to meet the following conditions: According to the second method of Lyapunov's stability theory and the related conclusions derived above, V(E, K1 T , k2 ) has a continuous first-order partial derivative and satisfies the following conditions: 1.
Then, the system is stable in the sense of Lyapunov at the origin, that is, where the various errors are zero.

Simulation Model
In MATLAB/Simulink, a simulation model of the control system was built as shown in Figure 3: the reference model is shown in Formula (2), and the two-inertia model is shown in the Figure 4, to replace the actual machine tool model.The differential equation of the two-inertia model is: In Formula (25):    Through the offline identification of dynamic parameters based on dual ex signals, the characteristics of the two inertia models were obtained, and then the P trol gain was determined by the Ziegler-Nichols empirical method [31].The spee forward gain was set to 1, to eliminate the influence of linear error as much as p ) ( ) In Formula (25):    Through the offline identification of dynamic parameters based on dual excitation signals, the characteristics of the two inertia models were obtained, and then the PID control gain was determined by the Ziegler-Nichols empirical method [31].The speed feed- Through the offline identification of dynamic parameters based on dual excitation signals, the characteristics of the two inertia models were obtained, and then the PID control gain was determined by the Ziegler-Nichols empirical method [31].The speed feedforward gain was set to 1, to eliminate the influence of linear error as much as possible.The parameters of Table 1 were obtained through the above methods.The friction model adopts the LuGre model [32], which can reflect well the static and dynamic characteristics of friction.The relationship between friction and speed is shown in the Formula (26) and Figure 6: Load inertia The friction model adopts the LuGre model [32], which can reflect well the sta dynamic characteristics of friction.The relationship between friction and speed is in the Formula (26) and Figure 6: In (26), s F is the maximal static friction; c F is the Coulomb friction; z is th age elastic deformation of the bristles; 0 σ is the stiffness coefficient; 1 σ is the da coefficient; 2 σ is the viscosity coefficient.As shown in Table 2, the above paramete In (26), F s is the maximal static friction; F c is the Coulomb friction; z is the average elastic deformation of the bristles; σ 0 is the stiffness coefficient; σ 1 is the damping coefficient; Machines 2021, 9, 274 9 of 18 σ 2 is the viscosity coefficient.As shown in Table 2, the above parameters were obtained by the identification of friction parameters based on particle swarm algorithm [31].The rotary model was regarded as the controlled object.The feedback signal and input signal are converted into digital quantities for calculation after sampling.The position and velocity data of the rotating model involved in the following have been processed.

Simulation Analysis
To show the movement of the worktable more intuitively, the rotary motion needed to be transformed into translational motion.The angular displacement generated by the rotating model was converted into a linear displacement by the ball screw (lead is 5 mm), where every 2π rad of the rotary model rotates, the corresponding linear displacement is 5 mm.
In the adaptive control system simulation, according to the condition of Formula (24), let p 12 = 1, p 22 = 1, adaptive law gain γ 1 = γ 2 = γ 3 = 1 × 10 −5 .First, give the input position signal r = − cos(0.5πt)+ 1 (unit is mm, at two seconds, the speed reversal).The signal curve is shown in Figure 7. Perform several simulations to determine the initial value of each adaptive law.After several simulations, the initial value is taken: Figure 8 shows the step response of 0.5 mm, after the appropriate initial value was determined, MRAC control could make the system response more stable and faster.The steady-state response time has been shortened from 0.537 s to 0.110 s and the speedability increased by 79.52%.
Figure 9 shows that, after using PID + MRAC control, the sinusoidal speed curve was closer to the desired speed curve.During speed reversal, the speed was less affected by nonlinear friction, which effectively reduced the error at the speed zero crossing.The sharp corner of the speed signal was reduced from 0.61 mm/s to 0.40 mm/s and the reduction was 34.43%, which shows that the PID + MRAC control could effectively weaken the influence of nonlinear friction.
To verify the role of MRAC in reducing noise, the position noise was added to the output of the servo motor.As shown in Figure 10, the noise was generated by the block of uniform random number and the value was generated randomly within a certain range.Position signal r = − cos(0.5πt)+ 1 was used as input signal, followed by a simulation experiment.
Figure 11 shows that, compared with traditional PID + speed feedforward control, PID + MRAC could effectively reduce the excessive following error caused by nonlinear friction during speed reversal, the maximal error of 1.96 µm was reduced to 0.84 µm, and the reduction was 57.12%; on the other hand, it could also reduce the impact of noise.
Figure 12 shows the change of adjustable parameters.To make the data changes of k 2 more intuitive, it needs to be processed, so let:  Figure 9 shows that, after using PID + MRAC control, the sinusoidal speed curve was closer to the desired speed curve.During speed reversal, the speed was less affected by nonlinear friction, which effectively reduced the error at the speed zero crossing.The    Figure 9 shows that, after using PID + MRAC control, the sinusoidal spe sharp corner of the speed signal was reduced from 0.61 mm/s to 0.40 mm/s and the tion was 34.43%, which shows that the PID + MRAC control could effectively wea influence of nonlinear friction.To verify the role of MRAC in reducing noise, the position noise was added output of the servo motor.As shown in Figure 10, the noise was generated by th of uniform random number and the value was generated randomly within a certain Position signal cos(0.5 ) 1 r t π = − + was used as input signal, followed by a sim experiment.Figure 11 shows that, compared with traditional PID + speed feedforward PID + MRAC could effectively reduce the excessive following error caused by no friction during speed reversal, the maximal error of 1.96 μm was reduced to 0.84 μ the reduction was 57.12%; on the other hand, it could also reduce the impact of no Figure 12 shows the change of adjustable parameters.To make the data chang more intuitive, it needs to be processed, so let: It can be seen from Figure 12 that the parameters change more slowly in the half (from 2 s to 4 s) compared to the first half.In the initial response of the syst friction and other factors have large changes, so the control parameters change re   Figure 11 shows that, compared with traditional PID + speed fee PID + MRAC could effectively reduce the excessive following error ca friction during speed reversal, the maximal error of 1.96 μm was reduc the reduction was 57.12%; on the other hand, it could also reduce the im Figure 12 shows the change of adjustable parameters.To make the more intuitive, it needs to be processed, so let: It can be seen from Figure 12 that the parameters change more slo half (from 2 s to 4 s) compared to the first half.In the initial response friction and other factors have large changes, so the control parameter drastically.It can be seen from Figure 12 that the parameters change more slowly in the second half (from 2 s to 4 s) compared to the first half.In the initial response of the system, the friction and other factors have large changes, so the control parameters change relatively drastically.
According to the general machining speed of CNC, the input signal was defined as r = −20 cos(πt/1.3)+ 20 (unit is mm), followed by simulation experiment.As shown in Figure 13, when the processing speed was relatively fast, the introduction of MRAC not only effectively reduced the influence of friction on the following error (the maximal error of 12.62 µm was reduced to 5.60 µm, and the reduction was 55.63%) but also significantly improved the initial response speed.In addition, when the speed increased, the linear error caused by acceleration also increased accordingly, from the overall trend of the following error, PID+MRAC could still effectively reduce the linear error without introducing acceleration feedforward, and enhance the stability of the system.In general, when the speed was relatively fast, the control method proposed in this paper has more significant advantages in terms of rapidity, stability, and anti-interference compared with the traditional PID + speed feedforward control.According to the general machining speed of CNC, the input signal was defined as 20 cos( / 1.3) 20 r t π = − + (unit is mm), followed by simulation experiment.As shown in Figure 13, when the processing speed was relatively fast, the introduction of MRAC not only effectively reduced the influence of friction on the following error (the maximal error of 12.62 μm was reduced to 5.60 μm, and the reduction was 55.63%) but also significantly improved the initial response speed.In addition, when the speed increased, the linear error caused by acceleration also increased accordingly, from the overall trend of the following error, PID+MRAC could still effectively reduce the linear error without introducing acceleration feedforward, and enhance the stability of the system.In general, when the speed was relatively fast, the control method proposed in this paper has more significant advantages in terms of rapidity, stability, and anti-interference compared with the traditional PID + speed feedforward control.

Experimental Verification
The experimental platform used in this article is shown in Figure 14, comprising a PMAC controller, PC, Yaskawa servo driver (SGD7S-5R500A002), and workbench.In PMAC, the servo operation was performed in units of digital cts (the conversion relationship is 1 mm = 2000 cts), and the drive was in torque control mode.Then, the reference model, adaptive algorithm, and PID control algorithm were written into the PMAC for experimental verification.Figure 15 is the frame diagram of the experimental platform.The feedback signal received by the PMAC controller comes from the encoder on the servo driver, so the whole system is a semi-closed-loop control system.The parameters and input signals used in this section are consistent with those of the model in Table 1.Research work only for the Y axis.
The sinusoidal speed signal was used as the test command for processing experiments.The average linear speed corresponding to circle processing was 1.57 mm/s, and the radius was 2 mm.
With the above test command as input, the processing experiment was performed three times in a row, and the following error is shown in Figure 16.The maximum following errors are 3.54 μm, 2.12 μm and 0.89 μm respectively.It can be seen that the following error of the system was continuously reduced under the effect of adaptive adjustment to obtain the best control performance.

Experimental Verification
The experimental platform used in this article is shown in Figure 14, comprising a PMAC controller, PC, Yaskawa servo driver (SGD7S-5R500A002), and workbench.In PMAC, the servo operation was performed in units of digital cts (the conversion relationship is 1 mm = 2000 cts), and the drive was in torque control mode.Then, the reference model, adaptive algorithm, and PID control algorithm were written into the PMAC for experimental verification.Figure 15 is the frame diagram of the experimental platform.The feedback signal received by the PMAC controller comes from the encoder on the servo driver, so the whole system is a semi-closed-loop control system.The parameters and input signals used in this section are consistent with those of the model in Table 1.Research work only for the Y axis.
The sinusoidal speed signal was used as the test command for processing experiments.The average linear speed corresponding to circle processing was 1.57 mm/s, and the radius was 2 mm.
With the above test command as input, the processing experiment was performed three times in a row, and the following error is shown in Figure 16.The maximum following errors are 3.54 µm, 2.12 µm and 0.89 µm respectively.It can be seen that the following error of the system was continuously reduced under the effect of adaptive adjustment to obtain the best control performance.The following error in Figure 17 shows that, during speed reversal, nonlinea caused excessive following error, especially under PID + speed feedforward contr the control method proposed in this paper was used, the following error was g duced: the maximal error of 4.685 μm was reduced to 0.89 μm, and the reduction The initial response of the system was well optimized.The frequency spectru following error was analyzed by fast Fourier transform.The sampling frequen KHZ.The analytical result in Figure 18 shows that the control strategy propose paper could effectively reduce the resonance amplitude caused by mechanical t   The following error in Figure 17 shows that, during speed reversal, nonlinear fric caused excessive following error, especially under PID + speed feedforward control; w the control method proposed in this paper was used, the following error was greatly duced: the maximal error of 4.685 μm was reduced to 0.89 μm, and the reduction was 8 The initial response of the system was well optimized.The frequency spectrum of following error was analyzed by fast Fourier transform.The sampling frequency w KHZ.The analytical result in Figure 18 shows that the control strategy proposed in paper could effectively reduce the resonance amplitude caused by mechanical transm sion and noise.The following error in Figure 17 shows that, during speed reversal, nonlinear caused excessive following error, especially under PID + speed feedforward contro the control method proposed in this paper was used, the following error was gre duced: the maximal error of 4.685 μm was reduced to 0.89 μm, and the reduction w The initial response of the system was well optimized.The frequency spectrum following error was analyzed by fast Fourier transform.The sampling frequency KHZ.The analytical result in Figure 18 shows that the control strategy proposed paper could effectively reduce the resonance amplitude caused by mechanical tr sion and noise.The following error in Figure 17 shows that, during speed reversal, nonlinear friction caused excessive following error, especially under PID + speed feedforward control; when the control method proposed in this paper was used, the following error was greatly reduced: the maximal error of 4.685 µm was reduced to 0.89 µm, and the reduction was 81%.The initial response of the system was well optimized.The frequency spectrum of the following error was analyzed by fast Fourier transform.The sampling frequency was 1 KHZ.The analytical result in Figure 18 shows that the control strategy proposed in this paper could effectively reduce the resonance amplitude caused by mechanical transmission and noise.To verify the applicability of the control method in this paper, the rela speed command was used for the processing experiment (the average lin circle processing was 3 m/min, and the radius was 40 mm).Following e spectrum analysis are shown in Figures 19 and 20   To verify the applicability of the control method in this paper, the re speed command was used for the processing experiment (the average l circle processing was 3 m/min, and the radius was 40 mm).Following spectrum analysis are shown in Figures 19 and 20  To verify the applicability of the control method in this paper, the relatively fast sine speed command was used for the processing experiment (the average linear velocity of circle processing was 3 m/min, and the radius was 40 mm).Following error and errorspectrum analysis are shown in Figures 19 and 20.To verify the applicability of the control method in this paper, the relatively speed command was used for the processing experiment (the average linear ve circle processing was 3 m/min, and the radius was 40 mm).Following error an spectrum analysis are shown in Figures 19 and 20    Figure 19 shows that the proposed control method could still reduce th following error caused by nonlinear friction during speed reversal: during cessing, the maximal error of 4.715 μm was reduced to 1.895 μm, and the red 59.81%.However, after the speed had been reversed, the error had a certain f This may have been due to the faster processing speed, which led to some adaptive adjustment capabilities at this time.As shown in Figure 20, the fluctu error curve was reflected in the first peak at the low frequency, but the amplitu frequencies was still effectively reduced.Although control performance was reduced, it could generally still effectively reduce the influence of nonlinear fa In general, compared with friction compensation, observer and filter, method proposed in this paper used relatively simple modeling and algorithm ments showed that, through multiple runs, the control performance can be co improved.When the optimal control performance was achieved through adap ment, the control system could effectively reduce the influence of friction and same time.When the controlled object is changed, the control system will a accordingly and the applicability and convenience are greatly improved.

Conclusions
In the mechanical transmission system of CNC, PID control cannot ach control performance because of various nonlinear factors.Therefore, in this pa on the advantages of PID, a new model reference adaptive control method ba control is proposed.The control framework was established and the adaptiv obtained by Lyapunov stability theory.Through simulation analysis and ex verification, and remarkable control results were obtained.Experimental resu that the proposed model reference adaptive control based on PID control had a control effect on the following error caused by nonlinear friction in the spe process (the proportion of reduction by more than 50%), had an effective supp fect on noise and mechanical resonance, and at the same time improved the s sponse.When the processing speed was fast, although control performance what reduced, it still showed strong anti-interference ability.In addition, th comparison between simulation and experiment, the effect of suppression of v actual experiment became worse, which may be caused by the high-order and Figure 19 shows that the proposed control method could still reduce the excessive following error caused by nonlinear friction speed reversal: during rapid processing, the maximal error of 4.715 µm was reduced to 1.895 µm, and the reduction was 59.81%.However, after the speed had been reversed, the error had a certain fluctuation.This may have been due to the faster processing speed, which led to some insufficient adaptive adjustment capabilities at this time.As shown in Figure 20, the fluctuation of the error curve was reflected in the first peak at the low frequency, but the amplitude at other frequencies was still effectively reduced.Although control performance was somewhat reduced, it could generally still effectively reduce the influence of nonlinear factors.
In general, compared with friction compensation, observer and filter, the control method proposed in this paper used relatively simple modeling and algorithms.Experiments showed that, through multiple runs, the control performance can be continuously improved.When the optimal control performance was achieved through adaptive adjustment, the control system could effectively reduce the influence of friction and noise at the same time.When the controlled object is changed, the control system will also change accordingly and the applicability and convenience are greatly improved.

Conclusions
In the mechanical transmission system of CNC, PID control cannot achieve better control performance because of various nonlinear factors.Therefore, in this paper, based on the advantages of PID, a new model reference adaptive control method based on PID control is proposed.The control framework was established and the adaptive law was obtained by Lyapunov stability theory.Through simulation analysis and experimental verification, and remarkable control results were obtained.Experimental results showed that the proposed model reference adaptive control based on PID control had an excellent control effect on the following error caused by nonlinear friction in the speed-reversal process (the proportion of reduction by more than 50%), had an effective suppression effect on noise and mechanical resonance, and at the same time improved the speed of response.When the processing speed was fast, although control performance was somewhat reduced, it still showed strong anti-interference ability.In addition, through the comparison between simulation and experiment, the effect of suppression of vibration in actual experiment became worse, which may be caused by the high-order and nonmodeling errors of the driving object.In general, this paper applied MRAC to CNC machine tools and obtained obvious research results with important practical engineering significance.
For the fluctuation in rapid processing, future work will focus on how to optimize the control method in this paper.At the same time, a detailed theoretical analysis of the stability of linear and nonlinear control combinations will also be considered.
p θ , p θ  and p θ  are angular displacement, angular velocity and acceleration of the servo motor.

2 θ , 2 θ  and 2 θ
 are displacement, velocity and acceleration of the worktabThe simulation model is shown in Figure5.Noise and LuGre model were a approximate the actual situation.

Figure 5 .
Figure 5. Block diagram of the two-inertia model.

Figure 4 .
Figure 4. Two-inertia model.In Formula (25):θ p , p θ , p θ  and p θ  are angular displacement, angular velocity and angular acceleration of the servo motor.

2 θ , 2 θ
 and 2 θ  are displacement, velocity and acceleration of the worktable.The simulation model is shown in Figure5.Noise and LuGre model were added to approximate the actual situation.

Figure 5 .
Figure 5. Block diagram of the two-inertia model.

Figure 5 .
Figure 5. Block diagram of the two-inertia model.

Figure 6 .
Figure 6.Relationship between friction and velocity.

Figure 6 .
Figure 6.Relationship between friction and velocity.

Figure 9 .
Figure 9.Comparison of the speed of two methods.

Figure 9 .
Figure 9.Comparison of the speed of two methods.

Figure 9 .
Figure 9.Comparison of the speed of two methods.

Figure 11 .
Figure 11.Comparison of the following error of two methods.

Figure 11 .Figure 12 .
Figure 11.Comparison of the following error of two methods.

Figure 13 .
Figure 13.Comparison of the following error of two methods at general machining speed.

Figure 13 .
Figure 13.Comparison of the following error of two methods at general machining speed.

Figure 15 .
Figure 15.Frame diagram of experimental platform.

Figure 16 .
Figure 16.Following error of three processing experiments.

Figure 15 .
Figure 15.Frame diagram of experimental platform.

Figure 16 .
Figure 16.Following error of three processing experiments.

Figure 15 .
Figure 15.Frame diagram of experimental platform.

Figure 16 .
Figure 16.Following error of three processing experiments.

Figure 16 .
Figure 16.Following error of three processing experiments.

Figure 17 .
Figure 17.Comparison of following error of the two methods.

Figure 17 .Figure 17 .
Figure 17.Comparison of following error of the two methods.

Figure 18 .
Figure 18.Frequency-spectrum analysis of following error.

Figure 17 .
Figure 17.Comparison of following error of the two methods.

Figure 19 .
Figure 19.Comparison of following error of the two methods.

Figure 19 .
Figure 19.Comparison of following error of the two methods.

Figure 20 .
Figure 20.Frequency-spectrum analysis of following error.

Figure 20 .
Figure 20.Frequency-spectrum analysis of following error.

Table 1 .
Relevant parameters of simulation model.

Table 2 .
Relevant parameters of friction model.