Adaptive Fuzzy Sliding Controller with Dynamic Compensation for Multi-axis Machining

The precision of multi-axis machining is deeply influenced by the tracking error of multi-axis control system. Since the multi-axis machine tools have nonlinear and time-varying behaviors, it is difficult to establish an accurate dynamic model for multi-axis control system design. In this paper, a novel adaptive fuzzy sliding model controller with dynamic compensation is proposed to reduce tracking error and to improve precision of multi-axis machining. The major advantage of this approach is to achieve a high following speed without overshooting while maintaining a continuous CNC machine tool process. The adaptive fuzzy tuning rules are derived from a Lyapunov function to guarantee stability of the control system. The experimental results on GJ-110 show that the proposed control scheme effectively minimizes tracking errors of the CNC system with control performance surpassing that of a traditional PID controller.


Introduction
While basic machine tool errors form one of the major sources of inaccuracy in multi-axis machining, achieving high precision in actual machine tool performance also critically depends upon dynamic performance of the individual axis controllers [1].Axis controllers in processing of CNC machining need to synchronize multi-axis motions to generate the required machined surface [2].In general, each particular machine tool axis has its own position and velocity, being driven separately along the desired tool path generated by the interpolator of the CNC system.When multi-axis machine tools are machining linear segments in "step" mode, the impact of tracking error on machining accuracy is not a serious problem.Otherwise, it would be difficult to eliminate tracking errors while tracking the axial position command, which then contributes to contour error formation.This situation would be especially problematic on the conditions of continuous processing of the multi-axis machining.As one example, Figure 1 provides an illustration indicating the influence of tracking error in a 2-axis system while machining in the "auto" mode.The interpolator is responsible for generating the ideal position commands for coordinated movement of the axes, which are indicated by positions B i and B i+1 .Guided by the interpolator, the axis controller manages the task of controlling the movement of a particular axis.The actual machining points of A i and A i+1 then correspond to interpolation points B i and B i+1 due to the tracking error.Accordingly, the tracking error is about |B i -A i | and |B i+1 -A i+1 |, thus the machining error is |BD|, which is called contour error, and is the result of the tracking error of each axis.
Over the past several decades, many advanced controllers have been designed which attempt to rectify these tracking errors.Some examples of these include the self-tuning fuzzy PID type controller [3−4], fuzzy sliding controller [5], adaptive sliding controller with self-tuning fuzzy compensation [6−10], adaptive neural fuzzy control [11], fuzzy controller and turning algorithm [12], and self-tuning fuzzy logic controller [13].

Figure 1. The influence of tracking error
Overshooting and oscillation of the multi-axis controller are special concerned in the article.Since it is difficult to establish an accurate dynamic model of the multi-axis machine tools, here, a novel adaptive fuzzy sliding model controller with dynamic compensation is proposed.The advantages of this model include its capacity to reduce tracking error, thus contour error and improve multi-axis machining precision.

Adaptive Fuzzy Sliding Controller with Dynamic Compensation
Adaptive fuzzy sliding controller with dynamic compensation is the core of the multi-axis CNC system.The basic function of this system is to generate the position of servo axes of multi-axis machine tools.Digital encoder feedbacks servo to monitor the position of the servo motor to the CNC system referred to as the actual axis location of the machine tool.Interpolation of the CNC system generates the ideal trajectory of each axis, which is called the ideal location of axis of the machine tools.
While avoiding overshooting and oscillation in CNC machining, the main role of the adaptive fuzzy sliding controller with dynamic compensation is to minimize the tracking error, as computed by the actual versus ideal locations (Figure 2).The adaptive fuzzy sliding controller with dynamic compensation is a steady-state control system that includes two components -the dynamic compensation and adaptive fuzzy sliding control.

Dynamic Compensation
Dynamic compensation is calculated from an array of parameters including computing of tracking error, deadzone of tracking error, parameters of dynamic compensation and compensation control.The purpose of these determinations is to minimize tracking error of the CNC machining tools (Figure 3).

Computing Tracking Error
The method used for computing tracking error consists of calculating tracking error in each interpolation cycle based on the actual versus ideal locations of the CNC machining tool, as expressed in the following formula: where ) , , , , , ( is the tracking error in the ith interpolation cycle, ) , , , , , ( is the position of the ideal location coordinate of the ith interpolation cycle, ) , , , , , ( is the position of the actual location coordinate of the ith interpolation cycle, as indicated by the digital encoder.

Deadzone of Tracking Error
The deadzone of tracking error parameter is used to define a range, in which dynamic compensation is not used.The calculation of this parameter is based on the assumption that the maximal distance between the actual locations of multi-axis and the corresponding interpolation positions of multi-axis is within an interpolation step when the program is running at the programming velocity.That is: where e i is defined as presented in Equation ( 1), t  is the interpolation cycle time of the multi-axis CNC system, v is the programming velocity of the particular workpiece program.It has been proven by Rogier that the trajectory planner makes the maximal interpolation error [14], expressed by e max , when it passes the adjacent program with programming velocity.Since the maximal interpolation error is accepted by the operator of CNC system, it can be applied to bound the dynamic compensation of tracking error, and be referred to as the deadzone of the tracking error.If, and only if, the tracking error is greater than e max , the dynamic compensation is active.Practical experience shows that the pursuit of reducing the tracking error to zero easily leads to vibration and overshooting in multi-axis machining, so the introduction of a deadzone of tracking error is conducive to the stability of multi-axis controller.

Parameters of Dynamic Compensation
The overshooting of multi-axis machine tools will result in oversize cutting.Since this is unacceptable for high precision machining, dynamic compensation needs to avoid overshooting and vibration of the multi-axis CNC system.Parameters of dynamic compensation include the following principles: 1) The parameters of dynamic compensation are zero when the velocity of trajectory planning is zero.
2) The parameters of dynamic compensation are zero when the tracking error achieves the constraint of the deadzone, defined by chapter 2.1.2.
3) The parameters of dynamic compensation can in-crease in a step-wise manner when the multi-axis CNC system is running in an acceleration phase.
4) The parameters of dynamic compensation require a step-wise reduction when the multi-axis CNC system is running in a deceleration phase.
5) The parameters of dynamic compensation achieve a peak value when the multi-axis CNC system is running in the programming velocity.
Based on the principles of dynamic compensation, the following function can be selected as the parameter of dynamic compensation: Where v i is the velocity in the ith trajectory cycle, le i is the length of the tracking error of multi-axis in the trajectory cycle, defined by Equation (4), , (

Compensation Control
The output of the adaptive fuzzy sliding controller with dynamic compensation for multi-axis machining proposed in this paper can be expressed by the following equation: Where u col is the total output of the position controller of the multi-axis CNC system, u c is the output of the dynamic compensation controller and u is the output of the adaptive fuzzy sliding controller.We can define the rules for compensation control as follows: Where k p is the proportional gain of the CNC system, while the meanings of other variables are presented as Equation ( 3), ( 4) and (5).
The dynamic compensation controller adds a compensation variable to each axis according to the vector of the multi-axis tracking error.It can produce a rapid reduction in the tracking error while simultaneously reducing the frequency of adjusting parameters of the adaptive fuzzy sliding controller.In addition, the dynamic compensation controller can improve the stability of the numerical multi-axis control system.

Adaptive Fuzzy Sliding
There exist a number of nonlinearities and uncertainties in the multi-axis control system.These result from structural or unstructured uncertainties, such as backlash, saturation and friction.It is very difficult to establish the boundary for these nonlinearities and uncertainties in the CNC system, particularly in a multi-axis system.Dynamic compensation parameters are changed according to the trajectory velocity and therefore can contribute to an increase in the uncertainty of the multi-axis system.As an approach to rectify these problems, an adaptive fuzzy sliding control structure is proposed.This structure is referred to as adaptive fuzzy sliding controller with dynamic compensation since it incorporated the dynamic compensation algorithm discussed above.
Dynamic systems with multiple kinds of nonlinearities and uncertainties, such as multi-axis machine systems, can be expressed as the following Formula [15-17]: Where are the control inputs and outputs of the system, respectively.The nonlinear model system consists of the reference model ˆ( , )  f X t and multiple nonlinearities and uncertainties ( , ) f X t  , which include the dynamic compensation and inherent nonlinear characteristics of the multi-axis CNC system.A hypothesis can be proposed based on: The time-varying sliding surface is defined as: It is referred to as the sliding switching line in 2D space, where λ is a positive constant and  is the tracking error vector.In general, when considering second-order system as an example, the ideal fuzzy sliding control law is: Where ) , ( x x k  and ) , (  s sat are defined as: And η is a positive constant, while φ is the thickness of the boundary layer. Suppose:

Experimental Parameters
The parameter settings of the GJ-310: the axis number is 6, the encoder input equivalent is 16384, the servo periodical time is 2ms, the interpolation cycle time is 2ms, the maximal error is 0.2mm, the maximal shape error is 0.05mm, and the other parameters are shown as table 1.
According to established guidelines of adjusting numerical control machines, we obtained the control rules, as shown in table 2. Triangle membership functions of the input variables are shown in Figure 5.

Experiment Results
Where the adaptive law of fuzzy sliding controller can be designed as [18]: When machining the program (Figure 4) with the GJ-310 CNC system, while separately using the adaptive fuzzy sliding controller with dynamic compensation and the 2 ( ) PID controller, we can get the position of each axis, as shown in Figure 6.In Figure 6, series 1 is the ideal position of each axis generated by the trajectory planner (indicated with a dot), series 2 is the actual position of each axis generated by the PID controller (indicated with a dash) and series 3 is the actual position of each axis generated by the adaptive fuzzy sliding controller with dynamic compensation (indicated with a solid).We obtained the tracking errors of each axis as shown in Figure 7, where series 1 is the tracking error generated by the PID controller (indicated with a dot) and series 2 is the tracking error generated by the adaptive fuzzy sliding controller with dynamic compensation (indicated with a solid).Note, the starting position of the program is indicated by -1mm, 215mm, -150mm, 86mm, -91mm.
And γ is a positive quantity, P is a definite symmetric matrix and P 2 is the final array of the definite symmetric matrix P. Stability of the adaptive fuzzy sliding controller is guaranteed by the Lyapunov function.

Experiment
The experimental platform is a multi-axis CNC system, referred to as GJ-310 CNC.This system is based on the PC architecture, in which the servo board and the I/O board are connected by the SSB bus.The adaptive fuzzy sliding controller with dynamic compensation described above is used as an axis position controller in the motion control component of the GJ-310 CNC.
We selected a program with a simultaneous 5-axis moving to test the proposed adaptive fuzzy sliding controller as shown in Figure 4.The program consisted of a micro-line segment, whose length was approximately

Experimental Analysis
From Figure 6 it is clear that the adaptive fuzzy sliding   controller with dynamic compensation and the PID controller produce nearly identical ending points.Moreover, use of the adaptive fuzzy sliding controller with dynamic compensation results in smooth control, thereby producing an accurate tracking of the trajectory with no overshooting or vibration in the machining.From Figure 7 it is apparent that the adaptive fuzzy sliding controller with dynamic compensation can reduce tracking errors of each servo axis.As one example of the program, an examination of axis Z which has the longest moving trajectory, provides for a means of comparison of the effects between the two controllers.The adaptive fuzzy sliding controller with dynamic compensation reduced the tracking error by almost 44% of the PID controller and the tracking error of axis C, whose moving trajectory was the shortest in the example of program, was reduced by about 19% of the PID controller.
From the above simulation results, the proposed adaptive fuzzy sliding controller with dynamic compensation demonstrates a perfect performance, which can abolish effects of the system trace performance caused by tracking nonlinearities and uncertainties disturbances.In this way, the control system can produce a high degree of precision in multi-axis machining.

Conclusions
Strictly speaking, the CNC system typically has more than one axis.Therefore, an ideal linear system is not available.In this way, research is directed at resolving nonlinearity and uncertainty control problems of multiaxis machining tools, and reducing tracking errors of multi-axis.CNC systems have important implications for The results of experiment on the GJ-310 system show that this controller can eliminate overshooting and vibration in a CNC machining control system, and improve the precision of multi-axis machining.

Figure 2 .Figure 3 .
Figure 2. The servo axis control system using adaptive fuzzy sliding controller with dynamic compensation

Figure 4 .
Figure 4.The program for test

Figure 5 .
Figure 5.The triangle membership functions of the input variables

Figure 6 .Figure 7 .
Figure 6.The position of each axis