Integrated Controller Design and Application for CNC Machine Tool Servo Systems Based on Model Reference Adaptive Control and Adaptive Sliding Mode Control

In order to reduce the effect of nonlinear friction and time-varying factors on the servo system of a computer numerical control (CNC) machine tool and improve its motion control accuracy, this paper uses an adaptive sliding mode control (ASMC) method based on model reference adaptive control (MRAC). The method adopts ASMC in the control outer loop and obtains the optimal control parameters by making the sliding mode control (SMC) law continuous and adaptively estimating the control parameters. At the same time, MRAC is used in the control inner loop to enhance the “invariance” of the controlled object so that the switching gain of SMC can satisfy the disturbance matching condition even under lesser conditions. Simulation and experimental results show that compared with the traditional SMC, the ASMC based on MRAC proposed in this paper effectively reduces the influence of nonlinear friction on the system performance, and the reduction in following error reaches 71.2%, which significantly improves the motion control accuracy of the control system. The spectral analysis of the following errors shows that the maximum magnitude reduction rate of the high-frequency chattering is 89.02%, which significantly reduces the effect of the high-frequency chattering and effectively improves the stability performance of the control system.


Introduction
The proportional integral derivative (PID) control strategy is widely employed in the servo control systems of CNC machine tools due to its stability, simplicity, and convenience [1].However, in the actual machining process, the PID control strategy gradually fails to meet the requirement of motion control accuracy due to nonlinear friction and time-varying factors.As a typical nonlinear control method, SMC has gradually become a research hotspot in the field of automatic control due to its simple structure, ease of implementation, and robustness.Due to its discontinuous switching characteristics, it is prone to the chattering phenomenon, which affects the control performance of the system.Therefore, it is important to investigate a novel nonlinear SMC strategy to improve the motion accuracy of servo control systems.
In traditional SMC, the alternating positive and negative output signals of the sign function are the root cause of chatter.In order to mitigate the negative impact of chatter on system control performance, References [2][3][4] propose a new SMC method to reduce chatter generation.In addition, References [5,6] enhance the stability of the control system by designing a high-order sliding mode controller.In order to improve the robustness of the system, researchers choose SMC with integral sliding mode function methods [7][8][9][10] and disturbance estimation methods [11][12][13].Reference [14] shows that SMC is a reliable and robust control method under the condition of disturbance matching.However, when the parameters of the model are uncertain, the dynamics are not modeled, or the external disturbance is mismatched, it is difficult to achieve synchronization between different model representations and systems of different orders, which affects the control performance of SMC.
Therefore, when designing a sliding mode controller, in order to satisfy the disturbance matching condition of SMC, it is necessary first to obtain an upper bound on the nonlinear disturbance of the controlled object.Moreover, the nonlinear disturbance upper bound is often easily overestimated, and even if the upper bound can be accurately estimated, if the nonlinear disturbance upper bound of the controlled object is too large, then the SMC needs stronger anti-disturbance capability to satisfy the disturbance matching condition, which still leads to intensely chattering in the control system, and it is difficult to achieve better control performance just by optimizing the SMC.
To address the effects caused by SMC, researchers have combined it with other control methods to optimize control performance.It includes adaptive sliding mode control [15,16], neural network sliding mode control [17][18][19] and fuzzy sliding mode control [20,21].Among them, the development of adaptive control is relatively mature and can adapt to the state changes in the system by adjusting the characteristics of the control system.Combining SMC with adaptive control can effectively mitigate SMC the issue of chattering while improving the control performance of nonlinear systems.
In References [22][23][24], ASMC is designed under the condition that the upper limit of nonlinear disturbance is unknown so that the system can reach the convergence state in a short time.However, it is pointed out in Reference [24] that when the initial value of the adaptive gain parameter is underestimated, it is easy for the adaptive gain parameter to increase indefinitely.To address this issue, Reference [25] presented an adaptive sliding mode method that compensates for uncertain nonlinearities and linear uncertain parameters in the system.In addition, Reference [26] proposed a sensor robust tracking control strategy based on the ASMC method to ensure the stability of the system.Reference [27] developed an adaptive sliding mode control with a fractional-order model predictive control algorithm to accurately follow a given trajectory.
In summary, current adaptive control methods have two main approaches to reducing the chatter generated by SMC: (1) Adaptive estimation of the unknown variables as known quantities that can be controlled directly.(2) Adaptive estimation of the SMC parameters to obtain control parameters that can achieve optimal control performance.
Although the above control methods mitigate the effect of chattering in SMC and improve the system response speed, they do not start from the root cause of chattering in SMC to reduce the upper bound of uncertainty factors as much as possible, and the uncertainty factors of the object to be controlled are still large, which leads to the control algorithms to become more complex with the improvement of the robustness and depend on the uncertainty factors of upper bound.
In this paper, starting from the reduction in the upper bound of the uncertainty factor, the upper bound of the uncertainty factor is reduced to some extent by the modelindependent nonlinear control method, which reduces the degree of uncertainty of the controlled object (this part of the work has been completed in Reference [28]).Then, the SMC is applied to radically reduce the effect of chattering, which is based on the adaptive estimation of the SMC parameters using adaptive algorithms to improve the control performance of the system further.
The main framework of the paper is as follows: In Section 2, a mechanical model of a CNC machine tool with nonlinear friction is introduced.In Section 3, a novel ASMC strategy based on MRAC is proposed.In Sections 4 and 5, the effectiveness of proposed ASMC is verified through simulation and experimentation.The paper is summarized in Section 6.

Mechanical Transmission Model
The mechanical transmission link of a CNC machine tool can be considered an "inertiastiffness-damping" system.Due to the distinct characteristics of each component, accurate modeling can become overly complex if the components are treated as flexible links.To facilitate the study and analysis while accurately expressing the resonance properties, the mechanical transmission link is simplified in this paper to a double inertia model with only motor and load inertia, as illustrated in Figure 1.

Mechanical Transmission Model
The mechanical transmission link of a CNC machine tool can be considered an "inertia-stiffness-damping" system.Due to the distinct characteristics of each component, accurate modeling can become overly complex if the components are treated as flexible links.To facilitate the study and analysis while accurately expressing the resonance properties, the mechanical transmission link is simplified in this paper to a double inertia model with only motor and load inertia, as illustrated in Figure 1.In Figure 1, u is the torque output of the motor, θ1 and θ2 are the equivalent angular displacements of the motor and the load, respectively.The specific values are shown in Table 1.Based on the equivalent double inertia model, the kinetic differential equation is formulated as follows. (1)

LuGre Friction Model
Nonlinear friction has a significant impact on the control performance of servo systems, which is mainly reflected in the phenomenon of "Zero crossing" and "Over-quadrant sharp corners" when the velocity changes direction.This paper involves the nonlinear friction model LuGre friction model [29]; the model effectively displays the static and dynamic features of nonlinear friction.Equation (3) demonstrates the correlation between friction and velocity.
Figure 2 shows the equivalent double inertia mechanical Simulink model, including LuGre friction, and the specific friction parameters are shown in Table 2.In Figure 1, u is the torque output of the motor, θ 1 and θ 2 are the equivalent angular displacements of the motor and the load, respectively.The specific values are shown in Table 1.Based on the equivalent double inertia model, the kinetic differential equation is formulated as follows.

C
.

LuGre Friction Model
Nonlinear friction has a significant impact on the control performance of servo systems, which is mainly reflected in the phenomenon of "Zero crossing" and "Over-quadrant sharp corners" when the velocity changes direction.This paper involves the nonlinear friction model LuGre friction model [29]; the model effectively displays the static and dynamic features of nonlinear friction.Equation (3) demonstrates the correlation between friction and velocity.
Figure 2 shows the equivalent double inertia mechanical Simulink model, including LuGre friction, and the specific friction parameters are shown in Table 2.

Structural Framework for ASMC Based on MRAC
According to the research of the team [28], the results show that the MRAC effectively suppresses the influence of noise and mechanical resonance, enhances the precision of motion control and the resistance to interference in the control system, significantly enhances the "invariance" of the controlled object, and at the same time diminish the uncertainty of the nonlinear factors.In this study, MRAC is applied to the control inner loop, and based on this, a sliding mode controller and a parameter adaptive controller are designed to implement the control outer loop by ASMC to achieve the optimal parameter solution.The structural framework for ASMC based on MRAC is illustrated in Figure 3.According to the research of the team [28], the results show that the MRAC effectively suppresses the influence of noise and mechanical resonance, enhances the precision of motion control and the resistance to interference in the control system, significantly enhances the "invariance" of the controlled object, and at the same time diminish the uncertainty of the nonlinear factors.In this study, MRAC is applied to the control inner loop, and based on this, a sliding mode controller and a parameter adaptive controller are designed to implement the control outer loop by ASMC to achieve the optimal parameter solution.The structural framework for ASMC based on MRAC is illustrated in Figure 3.

Sliding Mode Controller Design
Defining the following error of the CNC machine:

Sliding Mode Controller Design
Defining the following error of the CNC machine: where r is the expected input signal.
Defining the sliding surface: where c is the positive constant.
For SMC, since no precise, controlled model is needed in the theoretical design process, stiffness K and damping C are ignored as external disturbances and the single inertial model is simplified for the convenience of design.
where the total inertia Usually, CNC machine tools do not involve step signal control of larger amplitudes during operation, so the convergence law of the SMC adopts a relatively simple equalvelocity convergence law: .
where ε is the switching gain and is the positive constant.By combining Equations ( 4)-( 7),obtain the SMC law as follows: In Equation ( 8), J ..

r + c
. e is the equivalence term, also known as the linear term, which is able to achieve full control of the known linear characteristics of the model.Jε sgn(s) is the switching term, also known as the nonlinear term; the project realizes the control of unknown nonlinear factors in the form of high-frequency chattering, and the control strength of the switching term needs to be greater than the maximum strength of the disturbance of the nonlinear factors, which is to satisfy the condition of disturbance matching.
For the proposed simplified system model ( 6) and control law (8), it is necessary to prove the stability of the control algorithm to ensure the stability of the system.
Define the V function: Take the derivative of Equation ( 9) in time and then substitute it into Equation ( 7): .
Obviously, Equation ( 9) is positive definite, and Equation ( 10) is negative definite; both satisfy the stability conditions of Lyapunov's stability theory, so lim t→+∞ s = 0, the system is uniformly asymptotically stable at the origin, and the state variable associated with the following error when s → 0 : e → 0, .e → 0 .

Design of Sliding Mode Controller Based on Parametric Adaptive Control
In the SMC law (8), there is a discontinuous sign function (sign function), which causes discontinuity in the output signal and thus leads to chatter in the SMC.The use of a continuously derivable bipolar function (sigmoid function [30]) instead of the sign function can make the output signal relatively smooth, and the bipolar function is defined as follows [31]: The bipolar function is shown schematically in Figure 4.As the boundary thickness a increases, the bipolar function tends to become more similar to the sign function.
tion can make the output signal relatively smooth, and the bipolar function is defined as follows [31]: The bipolar function is shown schematically in Figure 4.As the boundary thickness a increases, the bipolar function tends to become more similar to the sign function.Rewrite the SMC law as follows: where ,  ̂ are the control parameters that require adaptive estimation, and the parameter estimation errors are ̃= ̂−  ,  ̃=  ̂−  ; ε, a are the values at the final steady state, which is also the value to achieve the optimal control performance.By using the method of adaptive estimation of control parameters, it is possible to obtain control parameters with good control performance without determining the upper bound of nonlinear disturbances.
Define the V function and find the time derivative: In Equation ( 14), e is the following error, the sampling frequency of the CNC machine tool T0 = 0.48 ms, which can be organized by using  Rewrite the SMC law as follows: where ε, â are the control parameters that require adaptive estimation, and the parameter estimation errors are ε = ε − ε, ã = â − a; ε, a are the values at the final steady state, which is also the value to achieve the optimal control performance.By using the method of adaptive estimation of control parameters, it is possible to obtain control parameters with good control performance without determining the upper bound of nonlinear disturbances.Define the V function and find the time derivative: .
V = e ∂e ∂θ 1 In Equation ( 14), e is the following error, the sampling frequency of the CNC machine tool T 0 = 0.48 ms, which can be organized by using ∆θ 1 ∆u instead of ∂θ 1 ∂u to represent the discrete system: .
To ensure that .
V ≤ 0, the equation holds only when e = 0 or s = 0. Then .
V is negative definite, and according to the second approach of Lyapunov's stability theory: (1) V(e) is positive definite; ( . V(e) is negative definite.Therefore, the system is located at the origin, and the following error at zero is asymptotically stable.
Thus far, the adaptive algorithm for the switching gain ε and boundary thickness a has been determined as follows: where k ε0 and k a0 are the initial values of the adaptive estimation of each parameter.

Simulation Analysis and Sliding Mode Control Parameters Adaptive Optimization
Based on the control framework diagram shown in Figure 3, the Matlab/Simulink simulation model is established by combining the derived ASMC law, where the MRAC structure containing the LuGre friction model is used as the control inner loop, while the ASMC implements the control outer loop.The values of the relevant parameters for the preliminary simulation are γ ε = 800, k ε0 = 10, γ a = 10, k a0 = 5, c = 30; the input desired position signal is r = −cos(0.5πt)+ 1mm; the simulation time is 12 s; there is a total of 3 cycles of the input signal.
Figure 5 shows the trajectory following the error curve; the system enters the steady state after 1.7 s after adaptive adjustment and produces a "static difference" of about 2 µm, and the "Static difference" direction is in alignment with the direction of motion velocity.And there is no "Zero crossing" or "Over-quadrant sharp corners" phenomenon during the velocity reversal change phase.Figure 6 shows that the presence of the "static difference" causes the switching gain ε to increase slowly, and Figure 7 shows that the value of the boundary thickness a stabilizes at 50.It is known that the sliding surface is shown in Equation ( 5), for which the differential equation is solved to obtain: By analyzing the equation above, it becomes evident that the error amount decays exponentially to zero, and a positive correlation exists between the decay rate and the value of c.Therefore, appropriately increasing the value of c can enhance the convergence of the control algorithm.
The adaptive estimation of the parameter c is performed, and the parameter estimation error is defined: From Figures 5-7, on the one hand, it can be seen that the continuous slow increase in the switching gain ε does not make the following error appear to be further reduced because the control algorithm includes several adaptive algorithms, and the adaptive control itself has a certain time lag, which causes the convergence of the algorithm to be reduced in the case of time-varying signal input.On the other hand, it exacerbates the deficiency of convergence by the presence of sliding friction resistance, so increasing convergence can reduce the "static difference" to some extent.
It is known that the sliding surface is shown in Equation ( 5), for which the differential equation is solved to obtain: By analyzing the equation above, it becomes evident that the error amount decays exponentially to zero, and a positive correlation exists between the decay rate and the value of c.Therefore, appropriately increasing the value of c can enhance the convergence of the control algorithm.
The adaptive estimation of the parameter c is performed, and the parameter estimation error is defined: Deriving the adaptive law based on Lyapunov stability theory, define the V function and derive it for time as follows: Equation ( 24) is obtained by putting Equations ( 4)-( 6), (11) and (12) into the derivative of Equation ( 23): .
In Equation ( 24 e, and increasing both the gain coefficient γ c and the initial value k c0 ; the adaptive law for the parameter c is: Prove the stability of the system based on the second method of Lyapunov stability theory: (1) The V function represented by Equation ( 23) is positive definite; (2) Substituting Equation ( 25) into (24) gives .
V ≤ 0, and the equality sign holds only at s = 0 and c = 0. Therefore, the system is located at the origin, and the following error at zero is asymptotically stable.
The parameter c was adaptively estimated and applied to the simulation model, defining the initial value of the switching gain k ε0 = 230, the boundary thickness k a0 = 50, the adaptive gain γ ε = 500, γ a = 10.The initial value of the convergence parameter c is k c0 = 30, the adaptive gain factor γ c = 3000, the input signal is constant, and the simulation runs for 12 s.
Figure 8 simulation outcomes indicate that after the adaptive estimation of the parameter c, the system can spontaneously improve the convergence of the algorithm and further reduce the "static difference"; finally, the following error is reduced to about 0.3 µm, but there is still a small "static difference" error.In this case, depending on the algorithm, convergence alone cannot achieve a smaller following error, and if c is forced to take too large a value, it will cause a strong vibration of the system.The above problems are analyzed and solved in the experimental session.

𝑐 𝑐 0
Prove the stability of the system based on the second method of Lyapunov stability theory: (1) The V function represented by Equation ( 23) is positive definite; (2) Substituting Equation ( 25) into (24) gives  ≤ 0 ̇, and the equality sign holds only at  = 0 and ̃= 0. Therefore, the system is located at the origin, and the following error at zero is asymptotically stable.
The parameter c was adaptively estimated and applied to the simulation model, defining the initial value of the switching gain kε0 = 230, the boundary thickness ka0 = 50, the adaptive gain γε = 500, γa = 10.The initial value of the convergence parameter c is kc0 = 30, the adaptive gain factor γc = 3000, the input signal is constant, and the simulation runs for 12 s.
Figure 8 simulation outcomes indicate that after the adaptive estimation of the parameter c, the system can spontaneously improve the convergence of the algorithm and further reduce the "static difference"; finally, the following error is reduced to about 0.3 μm, but there is still a small "static difference" error.In this case, depending on the algorithm, convergence alone cannot achieve a smaller following error, and if c is forced to take too large a value, it will cause a strong vibration of the system.The above problems are analyzed and solved in the experimental session.

Experimental Platform
This experiment is based on a three-axis CNC engraving and milling machine platform, as shown in Figure 9; the controller adopts digital amount to execute the servo

Experimental Platform
This experiment is based on a three-axis CNC engraving and milling machine platform, as shown in Figure 9; the controller adopts digital amount to execute the servo control algorithm (1 mm = 2000 cts), and the driver adopts the torque control mode, which constitutes a closed-loop control system and ensures that the machine still maintains stable motion and positioning accuracy under the situation of load change.

SMC of Trajectory Motion Experiments
According to the relevant characteristics of SMC chatter, the 0.5 mm position step signal is used as the input signal for experimental verification.The SMC is parameter c = 500.Figure 10 shows the step position response curve when switching gain ε takes different values.Since the SMC law adopts an equal-velocity convergence law, each curve shows a convergence process of reaching the steady state at a constant rate.As the switch-

SMC of Trajectory Motion Experiments
According to the relevant characteristics of SMC chatter, the 0.5 mm position step signal is used as the input signal for experimental verification.The SMC is parameter c = 500.Figure 10 shows the step position response curve when switching gain ε takes different values.Since the SMC law adopts an equal-velocity convergence law, each curve shows a convergence process of reaching the steady state at a constant rate.As the switching gain ε increases, the time to reach the peak time is shortened accordingly, which is 0.23 s, 0.09 s, and 0.05 s, respectively, and the convergence rate is increased accordingly.The following error curve presented in Figure 11 below shows that when a steady state is reached, chatter intensifies accordingly.

SMC of Trajectory Motion Experiments
According to the relevant characteristics of SMC chatter, the 0.5 mm position step signal is used as the input signal for experimental verification.The SMC is parameter c = 500.Figure 10 shows the step position response curve when switching gain ε takes different values.Since the SMC law adopts an equal-velocity convergence law, each curve shows a convergence process of reaching the steady state at a constant rate.As the switching gain ε increases, the time to reach the peak time is shortened accordingly, which is 0.23 s, 0.09 s, and 0.05 s, respectively, and the convergence rate is increased accordingly.The following error curve presented in Figure 11 below shows that when a steady state is reached, chatter intensifies accordingly.The parabolic position signal  = −(0.5)+ 1 mm is used as the test command for the machining experiment, and the parameters of the SMC are set to c = 500, ε = 1500 Based on the following error shown in Figure 12, the analysis shows that SMC can elimi nate the disturbance of various nonlinear factors under the condition of satisfying disturb ance matching, but it produces excessive chattering, which leads to a decrease in contro performance, the increase in motor energy consumption, and the reduction in the service life of the CNC machine tool, and the disadvantages outweigh the advantages in general The parabolic position signal r = −cos(0.5πt)+ 1mm is used as the test command for the machining experiment, and the parameters of the SMC are set to c = 500, ε = 1500.Based on the following error shown in Figure 12, the analysis shows that SMC can eliminate the disturbance of various nonlinear factors under the condition of satisfying disturbance matching, but it produces excessive chattering, which leads to a decrease in control performance, the increase in motor energy consumption, and the reduction in the service life of the CNC machine tool, and the disadvantages outweigh the advantages in general.
for the machining experiment, and the parameters of the SMC are set to c = 500, ε = 1500.Based on the following error shown in Figure 12, the analysis shows that SMC can eliminate the disturbance of various nonlinear factors under the condition of satisfying disturbance matching, but it produces excessive chattering, which leads to a decrease in control performance, the increase in motor energy consumption, and the reduction in the service life of the CNC machine tool, and the disadvantages outweigh the advantages in general.

ASMC of Trajectory Motion Experiments
The parabolic position signal  = −(0.5)+ 1 mm is used as the test command for the machining experiments, which are carried out on the CNC machine based on different control methods (including SMC, SMC+MRAC, and ASMC+MRAC), and the following error generated by the three control methods are compared.Table 3 displays the control parameters for different control methods.

ASMC of Trajectory Motion Experiments
The parabolic position signal r = −cos(0.5πt)+ 1mm is used as the test command for the machining experiments, which are carried out on the CNC machine based on different control methods (including SMC, SMC+MRAC, and ASMC+MRAC), and the following error generated by the three control methods are compared.Table 3 displays the control parameters for different control methods.
Table 3.Control parameters of the three control methods.

Control Methods
Control Parameters Figure 13 shows the following error curves under the three control methods.The analysis shows that, by comparing the two control strategies of SMC and SMC+MRAC, adding MRAC in the control inner loop can effectively eliminate the influence of nonlinear factors so that the switching gain ε of the SMC can satisfy the disturbance matching condition with a smaller value, thus reducing the chattering and improving the control performance.Compared with SMC+MRAC, ASMC+SMC can adaptively adjust the control parameters, which makes it easier to obtain the optimal control parameters and further reduces the following error and chattering.Table 4 shows the variance in the following error data shown in Figure 13.With the continuous optimization of the control algorithm, the deviation of the following error decreases gradually, which indicates that the amplitude of chatter of the SMC decreases gradually.
The following error under ASMC+MRAC control in Figure 13 shows that after the control system is stabilized, the error is always stable within 2 µm, and there is a "static difference" phenomenon, which is due to the control algorithm containing a number of adaptive algorithms; adaptive algorithms have a hysteresis effect, and the hysteresis effect is more obvious when the input signal is time-varying.On the other hand, there is sliding friction resistance in the mechanical transmission link of CNC machine tools, and the direction of sliding friction resistance is opposite to the direction of speed, and the control system makes it difficult to achieve better convergence under the combined effect of the two.The previous part of the study improved the convergence of the algorithm by adaptive estimation of the parameter c, reducing part of the "static difference", which at this point is mainly caused by the sliding friction resistance and is in the opposite direction of the velocity direction, causing the actual position output signal to always lag behind the desired input signal.
analysis shows that, by comparing the two control strategies of SMC and SMC+MRAC, adding MRAC in the control inner loop can effectively eliminate the influence of nonlinear factors so that the switching gain ε of the SMC can satisfy the disturbance matching condition with a smaller value, thus reducing the chattering and improving the control performance.Compared with SMC+MRAC, ASMC+SMC can adaptively adjust the control parameters, which makes it easier to obtain the optimal control parameters and further reduces the following error and chattering.Table 4 shows the variance in the following error data shown in Figure 13.With the continuous optimization of the control algorithm, the deviation of the following error decreases gradually, which indicates that the amplitude of chatter of the SMC decreases gradually.The following error under ASMC+MRAC control in Figure 13 shows that after the control system is stabilized, the error is always stable within 2 μm, and there is a "static difference" phenomenon, which is due to the control algorithm containing a number of adaptive algorithms; adaptive algorithms have a hysteresis effect, and the hysteresis effect is more obvious when the input signal is time-varying.On the other hand, there is sliding friction resistance in the mechanical transmission link of CNC machine tools, and the direction of sliding friction resistance is opposite to the direction of speed, and the control system makes it difficult to achieve better convergence under the combined effect of the two.The previous part of the study improved the convergence of the algorithm by adaptive estimation of the parameter c, reducing part of the "static difference", which at this point is mainly caused by the sliding friction resistance and is in the opposite direction of the velocity direction, causing the actual position output signal to always lag behind the desired input signal.
In order to verify the relationship between the "static difference" and the feed rate, the same trajectories were completed at machining times of 1 s, 2 s, 4 s, and 8 s, respectively, under the control method of ASMC+MRAC.Figure 14 shows the following error curves under each machining time, and the analysis shows that the following error of the trajectory is mostly stable at about ±2 μm, and the overall value is not much different (when the running time is 1 s, due to the relatively fast running speed, there is an obvious adaptive process in the first half of the trajectory, and the second half of the trajectory still tends to be stable).In order to verify the relationship between the "static difference" and the feed rate, the same trajectories were completed at machining times of 1 s, 2 s, 4 s, and 8 s, respectively, under the control method of ASMC+MRAC.Figure 14 shows the following error curves under each machining time, and the analysis shows that the following error of the trajectory is mostly stable at about ±2 µm, and the overall value is not much different (when the running time is 1 s, due to the relatively fast running speed, there is an obvious adaptive process in the first half of the trajectory, and the second half of the trajectory still tends to be stable).Figure 15 presents the average value of the absolute value of the following error at different processing times (the data in the second half of the error curve).The analysis shows that there is no positive or negative correlation between the mean size of the "static difference" and the operating speeds, which further indicates that after enhancing the Figure 15 presents the average value of the absolute value of the following error at different processing times (the data in the second half of the error curve).The analysis shows that there is no positive or negative correlation between the mean size of the "static difference" and the operating speeds, which further indicates that after enhancing the convergence of the algorithm, the sliding friction resistance is relatively fixed state and does not change with the speed, and the direction of resistance is opposite to the direction of motion.
(c) (d) Figure 15 presents the average value of the absolute value of the following error at different processing times (the data in the second half of the error curve).The analysis shows that there is no positive or negative correlation between the mean size of the "static difference" and the operating speeds, which further indicates that after enhancing the convergence of the algorithm, the sliding friction resistance is relatively fixed state and does not change with the speed, and the direction of resistance is opposite to the direction of motion.For the "static difference", which has a definite value, a position feed-forward compensation of 2 μm is added to the input desired signal, and the direction of the position compensation is the same as the direction of the velocity so that the hysteresis effect can be eliminated on the following error.Figure 16 shows the following error curve after adding position feed-forward compensation; the control method is ASMC+MRAC and compared with the following error curve under PID+rate feed-forward control.In the stage of static friction to sliding friction, the maximum following error decreases from 2.21 μm to 1.29 μm, a decrease of 41.6%; in the speed direction change phase, the maximum following For the "static difference", which has a definite value, a position feed-forward compensation of 2 µm is added to the input desired signal, and the direction of the position compensation is the same as the direction of the velocity so that the hysteresis effect can be eliminated on the following error.Figure 16 shows the following error curve after adding position feed-forward compensation; the control method is ASMC+MRAC and compared with the following error curve under PID+rate feed-forward control.In the stage of static friction to sliding friction, the maximum following error decreases from 2.21 µm to 1.29 µm, a decrease of 41.6%; in the speed direction change phase, the maximum following error decreases from 4.68 µm to 1.23 µm, a decrease of 73.7%.The analysis shows that the introduction of position feed-forward compensation can offset the influence of sliding friction resistance, and the ASMC+MRAC proposed in this paper, compared with the PID+rate feed-forward control, effectively eliminates the phenomena of "Zero crossing" and "Over-quadrant sharp corners" caused by nonlinear friction during the initial response and commutation process of the system, and the following error is a substantial reduction.Figures 17 and 18 clearly illustrate the following error spectrum analysis of the two control methods.The analysis shows that in the relatively low-frequency range of 0-150 HZ, the error amplitude of ASMC is lower than that of the traditional PID+rate feed-forward control, which effectively inhibits the mechanical resonance in this range, noise, and other disturbances, improving the stability of the system; in the high frequency range of 150 to 340 HZ, the amplitude of the ASMC is slightly larger than that of the PID+rate feed-  the error amplitude of ASMC is lower than that of the traditional PID+rate feed-forward control, which effectively inhibits the mechanical resonance in this range, noise, and other disturbances, improving the stability of the system; in the high frequency range of 150 to 340 HZ, the amplitude of the ASMC is slightly larger than that of the PID+rate feedforward control due to the inevitable chatter of the SMC itself.As shown in Figure 18, compared with the traditional SMC, the ASMC method designed in this paper substantially reduces the overall chattering, the linearity error at the low frequency is greatly reduced, the chattering at the high frequency is greatly weakened, and the maximum chattering amplitude is lowered from 0.52 µm to 0.057 µm, which is a reduction of 89.02%, and the control system's stability has been significantly enhanced.Figures 17 and 18 clearly illustrate the following error spectrum analysis of the two control methods.The analysis shows that in the relatively low-frequency range of 0-150 HZ, the error amplitude of ASMC is lower than that of the traditional PID+rate feed-forward control, which effectively inhibits the mechanical resonance in this range, noise, and other disturbances, improving the stability of the system; in the high frequency range of 150 to 340 HZ, the amplitude of the ASMC is slightly larger than that of the PID+rate feedforward control due to the inevitable chatter of the SMC itself.As shown in Figure 18, compared with the traditional SMC, the ASMC method designed in this paper substantially reduces the overall chattering, the linearity error at the low frequency is greatly reduced, the chattering at the high frequency is greatly weakened, and the maximum chattering amplitude is lowered from 0.52 μm to 0.057 μm, which is a reduction of 89.02%, and the control system's stability has been significantly enhanced.

Conclusions
This paper introduces an ASMC strategy that is based on MRAC as its approach.The control method effectively reduces the influence of chattering generated by SMC, which reduces the influence of system nonlinear friction and time-varying factors on the control accuracy and can adaptively estimate the control parameters according to the changes in the control system, thus solving the problem of relatively cumbersome manual debugging parameters.
First, a feed servo mechanism system containing the LuGre friction model is established in the control inner loop, and the MRAC is used to improve the controlled object "invariance" so that SMC satisfies the disturbance matching and reduces the chattering effect under the condition of smaller switching gain.The control outer loop used ASMC to replace the sign function with a continuously smooth bipolar function to radically smooth the output signal and used adaptive optimization to determine the appropriate switching gain and boundary thickness control parameters.To address the issue of inadequate convergence of the control algorithm, the c value in the sliding surface is adaptively estimated, and the influence of "static difference" is further eliminated by using position feed-forward compensation.The simulation results substantiate the efficacy of the proposed approach, while the experimental findings demonstrate the practical viability of the

Conclusions
This paper introduces an ASMC strategy that is based on MRAC as its approach.The control method effectively reduces the influence of chattering generated by SMC, which reduces the influence of system nonlinear friction and time-varying factors on the control accuracy and can adaptively estimate the control parameters according to the changes in the control system, thus solving the problem of relatively cumbersome manual debugging parameters.
First, a feed servo mechanism system containing the LuGre friction model is established in the control inner loop, and the MRAC is used to improve the controlled object "invariance" so that SMC satisfies the disturbance matching and reduces the chattering effect under the condition of smaller switching gain.The control outer loop used ASMC to replace the sign function with a continuously smooth bipolar function to radically smooth the output signal and used adaptive optimization to determine the appropriate switching gain and boundary thickness control parameters.To address the issue of inadequate con-

Figure 2 .
Figure 2. Simulink model of CNC machine tool dynamics.

Figure 2 .
Figure 2. Simulink model of CNC machine tool dynamics.

Figure 3 .
Figure 3. Structural framework for ASMC based on MRAC.

Sensors 2023 ,
23,  x FOR PEER REVIEW 10 of 17 control algorithm (1 mm = 2000 cts), and the driver adopts the torque control mode, which constitutes a closed-loop control system and ensures that the machine still maintains stable motion and positioning accuracy under the situation of load change.

Figure 9 .
Figure 9. Three-axis CNC engraving and milling machine experiment platform.

Figure 9 .
Figure 9. Three-axis CNC engraving and milling machine experiment platform.

Figure 9 .
Figure 9. Three-axis CNC engraving and milling machine experiment platform.

Figure 11 .
Figure 11.Steady state following error of step position response curve.

Figure 12 .
Figure 12.Comparison diagram of following error curve of two control methods.

Figure 12 .
Figure 12.Comparison diagram of following error curve of two control methods.

Figure 13 .
Figure 13.Comparison diagram of following error curve of three control methods.

Figure 13 .
Figure 13.Comparison diagram of following error curve of three control methods.

Figure 14 .
Figure 14.Following error graphs at different running times: (a) running time 1 s; (b) running time 2 s; (c) running time 4 s; (d) running time 8 s.

Figure 14 .
Figure 14.Following error graphs at different running times: (a) running time 1 s; (b) running time 2 s; (c) running time 4 s; (d) running time 8 s.

Figure 14 .
Figure 14.Following error graphs at different running times: (a) running time 1 s; (b) running time 2 s; (c) running time 4 s; (d) running time 8 s.

Figure 15 .
Figure 15.Mean value of following error for each processing run time.

Figure 15 .
Figure 15.Mean value of following error for each processing run time.

Sensors 2023 ,
23, x FOR PEER REVIEW 14 of 17error decreases from 4.68 μm to 1.23 μm, a decrease of 73.7%.The analysis shows that the introduction of position feed-forward compensation can offset the influence of sliding friction resistance, and the ASMC+MRAC proposed in this paper, compared with the PID+rate feed-forward control, effectively eliminates the phenomena of "Zero crossing" and "Over-quadrant sharp corners" caused by nonlinear friction during the initial response and commutation process of the system, and the following error is a substantial reduction.

Figure 16 .
Figure 16.Comparison diagram of following error curve of two control methods.

Figure 16 .
Figure 16.Comparison diagram of following error curve of two control methods.

Figures 17
Figures 17 and 18 clearly illustrate the following error spectrum analysis of the two control methods.The analysis shows that in the relatively low-frequency range of 0-150 HZ,

Figure 16 .
Figure 16.Comparison diagram of following error curve of two control methods.

Figure 17 .
Figure 17.Comparison between ASMC and PID+rate feed-forward spectrum analysis.Figure 17.Comparison between ASMC and PID+rate feed-forward spectrum analysis.

Figure 17 .
Figure 17.Comparison between ASMC and PID+rate feed-forward spectrum analysis.Figure 17.Comparison between ASMC and PID+rate feed-forward spectrum analysis.

Figure 18 .
Figure 18.Comparison between SMC and ASMC spectrum analysis.

Figure 18 .
Figure 18.Comparison between SMC and ASMC spectrum analysis.

Table 1 .
Equivalent double inertia mechanical model parameters.

Table 1 .
Equivalent double inertia mechanical model parameters.

Table 3 .
Control parameters of the three control methods.

Table 4 .
The variance of the following error.

Table 4 .
The variance of the following error.