Contour Tracking Control of a Linear Motors-Driven X-Y-Y Stage Using Auto-Tuning Cross-Coupled 2DOF PID Control Approach

: Linear motors (LMs) are widely used in numerous industry automation where precise and fast motions are required to convert electric energy into linear actuation without the need of any switching mechanism. This study aims to develop a control strategy of auto-tuning cross-coupled two-degree-of-freedom proportional-integral-derivative (ACC2PID) to achieve extremely high-precision contour control of a LMs-driven X-Y-Y stage. Three 2PID controllers are developed to control the mover positions in individual axes while two compensators are designed to eliminate the contour errors in biaxial motions. Furthermore, an improved artiﬁcial bee colony algorithm is employed as a powerful optimization technique so that all the control parameters can be concurrently evaluated and optimized online while ensuring the non-fragility of the proposed controller. In this way, the tracking error in each axis and contour errors of the biaxial motions can be concurrently minimized, and further, satisfactory positioning accuracy and synchronization performance can be achieved. Finally, the experimental comparison results conﬁrm the validity of the proposed ACC2PID control system regarding the multi-axis contour tracking control of the highly uncertain and nonlinear LMs-driven X-Y-Y stage.


Introduction
Linear motors (LMs) have been widely applied in extremely high-precision manufacturing occasions, such as lithography machines [1], machine tools [2], and industry gantry [3,4]. The LMs can directly produce magnetic thrust force to the load without using mechanical transmission components, such as reduction gears and lead screws [5,6]. Meanwhile, due to the prominent advantages of high speed, large pushing force, and high precision, the studies of LMs always attract much attention from various fields, such as control engineering and industry automation. However, the control performance especially in terms of high-precision of LMs is potentially affected by various nonlinear factors, such as force ripple and friction of the LMs [7][8][9]. The force ripple is periodic force oscillation dependent with displacement, while the frictional force indicates interactions between the stator and mover. F. Song et al. present an iterative learning identification method that utilizes only partial error signals to identify the force ripple [10]. C. J. Lin et al. investigate the parameters of the nonlinear friction model using particle swarm optimization and genetic algorithms [11]. M. S. Heydarzadeh et al. use neural networks to estimate the friction and force ripple of LMs [12]. However, implementing the above-mentioned control approach requires proper tuning for the controller gains to achieve the good performance. In addition, a heavy computational effort will increase challenges in the real-time implementation issue. To date, in the modern machining process, contour control precision for the positioning stage of multi-axis LMs has increased tremendously. Contour error is defined as the nearest distance between the actual position of the motion stage and the demanded position of the designed contour [13]. Conventionally, contour tracking performance was improved by only reducing tracking error in each axis individually. However, improving tracking accuracy only in each axis does not surely reduce contour tracking error since contour error is a geometric measurement, while tracking errors are time-related. That is, high-precision motion performance of the positioning stage of multi-axis LMs depends on both tracking and contour accuracy. To this end, the cross-coupled control methodology is widely employed to calculate the additional control action according to the tracking errors and the reference contour of each axis, and further eliminate the contouring error based on individual axial control. A. Farrage and N. Uchiyama employs adaptive sliding mode contouring control approach to improve machining accuracy for a biaxial computer numerical control (CNC) machine, while reducing experimentally consumed energy and control input variance [14]. In order to achieve synchronized motion performance, and while avoiding excessive internal forces for the operations of dual-drive gantry systems, C. Li et al. proposes a three-level synchronization control scheme based on adaptive thrust allocation, even when the load distribution on the individual axis cannot be priori known exactly [15]. F. Huo and A.N. Poo present a generalized variable-gain cross-coupled control approach to extend its applicability from just the linear contour to any contour defined by a continuously differentiable function. Their results show that the linear, circular, and parabolic trajectories can be realized well on a small two-axis CNC machine [16]. J. Wu et al. utilize a contour algebraic equation with its partial derivatives to establish a contour error model. The error model equals zero if and only if the real contour error value vanishes, which makes perfect contour following possible, in theory [17]. Among the above-mentioned research and applications, even the cross-coupled control methodology can be improved in contouring accuracy, the model-based approach is still limited due to that the dynamical characteristics of contouring errors are unknown especially in the cases of high feed rate, large contour curvature, and sharp corner.
To solve the control problem of multi-axis LMs, the proportional-integral-derivative (PID) control has been popularly adopted in industrial applications for several years due to its simple structure and easy implementation. However, it is difficult to obtain satisfactory control performance in nonlinear and time-varying systems using the conventional PID controller since it is not robust enough to achieve satisfactory control performance [18]. As a relief to this problem, many advanced PID control strategies have been developed, such as two-degree-of-freedom PID (2PID) [19], internal model controller PID [20], automatic tuning PID [21], and fractional-order PID [22]. Among these improved PID control methods, a 2PID controller acquires a better response as compared to that of a conventional one-degree-of-freedom PID (PID) controller due to its additional control loop [23]. However, designing a 2PID controller is more complicated than that of a PID controller. With the aid of fuzzy logic control, G. Kannan et al. establish a hybrid method based on the 2PID controller with a first-order time-delay system, in which the parameters can be automatically tuned to take advantages of reference tracking and disturbance rejection operation [24]. N. Pachauri et al. adopt a single layer neural network with a 2PID controller to change the flow rate of a cooling agent in a fermentation bioreactor. The results show that the 2PID controller performs better performance than a PID controller due to the additional controller parameters [25]. Z. Pan et al. propose a resonant-2PID controller that combines the quasi-resonant controllers and a 2PID controller to suppress current harmonics for permanent magnet synchronous linear motors [26]. The resonant controller is added in parallel to the PI controller to suppress the current harmonic components, and a 2PID controller is additionally adopted to effectively reduce the raised overshoot in the current loop response. However, while applying these methods on the multi-axis LMs, the number of the 2PID controller parameters increases rapidly and leads to more design complexity and is time-consuming during the process in designing and optimizing these parameters.
Population-based evolutionary algorithms (EAs) are commonly used to find near-optimal solutions. Among several EAs, the optimization method based on the artificial bee colony (ABC) algorithm is inspired by the collective foraging behavior of honey bee colonies [27,28]. Since the information about the nectar amount available in food sources will be shared among honey bees, the location of food source with more nectar can be regarded as closer to the optimal food source. To mimic such behavior of honey bees, in the ABC algorithms, each food source location can represent a possible solution and the optimization problem is considered to be the finding of optimal food source that implies the optimal solution [28]. According to the comparative study in Reference [29], even with fewer control parameters the ABC algorithm can further outperform the other EAs in terms of several advantages of simplicity, robustness, high flexibility, and ease of real-time implementation. To this end, the ABC algorithm is widely applied in recent engineering optimization problems, such as DC motor drive [30], controller optimization [31], and learning algorithm for humanoid robots [32].
On a different note, this study thus takes the challenge to propose a control strategy of auto-tuning cross-coupled 2PID (ACC2PID) for the mover positioning on an LMs-driven X-Y-Y stage with extremely high-precision control performances in both position tracking in each axis and contouring in biaxial motions. Firstly, the dynamical characteristics of X-Y-Y stage using three LMs are derived, and the corresponding model of contouring error is established. Then, to achieve the optimal positioning accuracy with the lowest contour error, an improved artificial bee colony (IABC) algorithm is adopted to concurrently provide the auto-tuning capabilities for numerous parameters of the ACC2PID control system. Thus, numerous control parameters of the proposed controllers are dynamically optimized and on-line tuned by the IABC algorithm to simultaneously minimize the tracking error in each axis and contour errors of the biaxial motions. Compared with the conventional 2PID controllers and cross-coupled control scheme with constant control gains, the proposed ACC2PID controller depicts the superiority without the need of trivial trials for the control parameters tuning. In this regard, stable control without fragility during the control process can be achieved. Experimental results are carried out to verify the accuracy and effectiveness of the proposed ACC2PID control system.
The remainder of this study is organized as follows: the working principle and dynamics model of an LMs-driven X-Y-Y stage are expressed in Section 2. The determination of the contour error is introduced in Section 3. In Section 4, the IABC algorithm is developed as the auto-tuning scheme for the ACC2PID control parameters with tracking performance optimization. The details of the contour tracking control by using the proposed ACC2PID control strategy are given in Section 5. Experimentations are discussed in Section 6. The conclusion is shown in Section 7.

LMs-Driven X-Y-Y Stage
The geometry of the LMs-driven X-Y-Y stage is given in Figure 1, in which one LM and two LMs are arranged on the x and y axes linear guides to yield displacements x, y 1 , and y 2 , respectively. As shown in Figure 1, the single LM in x-axis provides x-direction displacement. Moreover, the dual LMs in y-axis not only provide y-direction displacements but also can take the load, camera, or gripper along the guide. The two LMs in y-axis can move in synchronous or asynchronous ways according to the different requirements of the designed contouring control strategy. Accordingly, this X-Y-Y stage is able to perform two biaxial motions, which are the left contour motion in x-y 1 axes and right contour motion in x-y 2 axes. With this arrangement, working efficiency can be significantly improved.
In the developed LMs-driven X-Y-Y stage, the electromagnetic thrust forces F mx produced by the LM in x-axis and F myi , i = 1, 2, produced by the LMs in y-axis are expressed as follows [9]: where K x and K yi denote the thrust coefficients in x-axis and y i -axis, respectively; u x and u yi denote the control signals of three LMs. The resistance forces F rx and F ryi can be formulated as follows: Appl. Sci. 2020, 10, x FOR PEER REVIEW 4 of 22 where Bx and Byi denote the combined coefficients of the damping and viscous friction; ϒx and ϒyi denote the ripple forces and can be modeled by six terms as follows [10]: where αxj, βxj, αyij, and βyij denote the coefficients of the trigonometric series; ωxj and ωyij denote jth frequency; j = 1, 2, …, 6. Moreover, χx and χyi denote friction forces that can be expressed as follows [12]: where Fcx and Fcyi denote the Coulomb frictions; Fsx and Fsyi denote the static frictions; Fvx and Fvyi denote the viscous friction coefficients; xs and yis denote the lubricant; δx and δyi denote the additional empirical parameters; sgn(•) is a sign function. Consequently, the dynamics of the LMs-driven X-Y-Y stage are represented as follows: where Mx and Myi are the masses of LMs; Fdx and Fdyi are the unknown external disturbances. By substituting (1)-(4) into (9) and (10), the dynamic characteristics of the LMs-driven X-Y-Y stage can thus be derived as: where Hx and Hyi denote the lumped uncertainties, defined as follows: where B x and B yi denote the combined coefficients of the damping and viscous friction; Υ x and Υ yi denote the ripple forces and can be modeled by six terms as follows [10]: [a yij sin(ω yij y i ) + β yij cos(ω yij y i )], (6) where α xj , β xj , α yij , and β yij denote the coefficients of the trigonometric series; ω xj and ω yij denote jth frequency; j = 1, 2, . . . , 6. Moreover, χ x and χ yi denote friction forces that can be expressed as follows [12]: where F cx and F cyi denote the Coulomb frictions; F sx and F syi denote the static frictions; F vx and F vyi denote the viscous friction coefficients; x s and y is denote the lubricant; δ x and δ yi denote the additional empirical parameters; sgn(·) is a sign function. Consequently, the dynamics of the LMs-driven X-Y-Y stage are represented as follows:
where M x and M yi are the masses of LMs; F dx and F dyi are the unknown external disturbances. By substituting (1)-(4) into (9) and (10), the dynamic characteristics of the LMs-driven X-Y-Y stage can thus be derived as: .. ..
where H x and H yi denote the lumped uncertainties, defined as follows: In general, accessing to the information of lumped uncertainties in advance is difficult in practical applications. Alternatively, an estimation scheme is employed in this study during the control process to enhance the contour tracking performance of the LMs-driven X-Y-Y stage.

Contour Error Determination
The contour error determination plays a crucial role in achieving a high-precision multiple LMs control system. As shown in Figure 2, P i (x, y i ) and D i (x d , y id ) denote the actual and desired positions; x d and y id are the desired displacements of the actual displacements x and y i . D i (x d , y id ) denotes previously desired positions. Further, the linear contour degree θ i is an angle between the line vector D i D and x-axis which can be determined as (15) Figure 2a,b indicate the value of linear contour degree θ i is within the ranges of 0 to π/2 and π/2 to π degrees, respectively. e x and e yi are the axial errors between the desired and the actual positions defined as Then, the contour error in the first situation is [16,17] ε i = e x sin θ i − e yi cos θ i .
In general, accessing to the information of lumped uncertainties in advance is difficult in practical applications. Alternatively, an estimation scheme is employed in this study during the control process to enhance the contour tracking performance of the LMs-driven X-Y-Y stage.

Contour Error Determination
The contour error determination plays a crucial role in achieving a high-precision multiple LMs control system. As shown in Figure 2, Pi(x, yi) and Di(xd, yid) denote the actual and desired positions; xd and yid are the desired displacements of the actual displacements x and yi.
previously desired positions. Further, the linear contour degree θi is an angle between the line vector DiD' and x-axis which can be determined as Figure 2a,b indicate the value of linear contour degree θi is within the ranges of 0 to π/2 and π/2 to π degrees, respectively. ex and eyi are the axial errors between the desired and the actual positions defined as Then, the contour error in the first situation is [16,[17] sin cos  The contour error in the second situation is According to the geometry shown in Figure 2, a supplementary angle θ ci equals to (π − θ i ) that indicates cosθ ci equals to −cosθ i , and, so, both situations can apply the calculation method as shown in (18). Hence, the contour errors in x-direction and y i -direction are as follows: From (20) and (21), ε ix and ε iy are negative and positive, respectively, if ε i is negative as shown in Figure 2a. However, ε ix and ε iy are both positive if ε i is positive as shown in Figure 2b. In addition, it should be noted that decreasing the tracking error of each LM does not imply decreasing the contour error.

Artificial Bee Colony Algorithm
The ABC algorithm is an optimization algorithm based on the behavior of bee colonies. These colonies are composed of employed bees and unemployed bees. The employed bees initially occupy particular sources of food and aim to search other better food source positions around their own positions. Besides, the employed bees can further give and share the information about the food source position with the bees of the hive. The unemployed bees are onlooker bees and scout bees. The onlooker bees are responsible to help some specific bees to observe the positions and qualities of food source based on the information found by employed bees. The scout bees are related to employed bees and responsible for searching new food sources of sustenance if a food source becomes deserted.
In this study, the ABC algorithm is used to efficiently find a set of suitable gain parameters for the proposed control system, under the designed multi-objective criterion and the fitness function. The following briefly introduces the four major phases in the ABC technique: Step 1: initialization phase In the initialization phase, the best previous position could be set if the ABC algorithm has been conducted. Otherwise, an individual bee can be generated randomly within the range of the boundaries of the parameters as follows [27][28][29]: where ψ j,min and ψ j,max denote the minimum and maximum values of the jth dimension, respectively; where V denotes the population size of the employed bees or onlooker bees.
Step 2 Employed bee phase In this phase, an employed bee in the conventional ABC algorithm just searches for new change by using the mechanism, as given by v ij = ψ ij + rand(−1, 1)(ψ k j − ψ ij ), where k ∈ {1, 2, . . . . . . , V} represents a randomly selected index satisfying k j. In this study, the IABC algorithm is proposed to improve the searchability and convergent speed of the conventional ABC. The major concept of the IABC is to enhance the exploration capability for each of the employed bees by using the best experience of all bees and the worst experience of each bee. To this end, the update mechanism for each bee is modified as: where η 1 , η 2 , and η 3 are the learning weights that can be predetermined by the designer; g j is the best previous position among all employed bees; ω ij is the worst previous position of the ith bee. With the best experience from the population and the worse experience of each bee, the modified Formula (23) for updating the new food source position can exhibit the more effective searching ability of the IABC. Afterward, if the fitness value for the new position v ij exceeds that at the previous position ψ ij , the position of the employed bee will be updated for the next generation by: where fit(·) represents a fitness function for evaluating source quality of each food position. The design of fit(·) will be given in the next section.
Step 3 Onlooker bee phase After the employed bee phase, the employed bees share the information of their food source and position with an onlooker bee via waggle dance. Afterward, each onlooker bee will appraise the nectar information which is taken from all employed bees and chooses a food source with probabilistic selection as follows: where p i indicates the selection probability for each employed bee. According to these probability values, each onlooker bee can produce new solution as in (23). Then, based on the calculated fitness function of each new solution, a greedy selection is applied between the new and old position for each the onlooker bee and the best one will be saved.
Step 4 Scout bee phase If the searched source position of food from the employed bees cannot be improved over an interaction's numbers, the employed bees are changed as the scout bees and they randomly replace the original source with another one via the mechanism (22). This process can be determined according to the parameter limit in the designed controller.
The final step of the ABC algorithm is to save the track and the best position. All the phases are repeated till the optimal fitness value is achieved or an extreme number of cycles Φ is reached.

Online System Parameters Identification
To evaluate the control performances of the distinct control parameters evolved by the IABC algorithm, an accurate dynamic model of the LMs-driven X-Y-Y stage is required in the control system because the control parameters candidates cannot be applied to the control system of the drivers of the LMs-driven X-Y-Y stage, while the optimization is incomplete. Besides, immature control signals may degrade the positioning performance and destroy the stability of the multi-axis contour control system. To solve the above-mentioned problem, a mover positions observer is developed by utilizing a parallel system parameters identification approach, and the model parameters of the LMs-driven X-Y-Y stage shown in (11) and (12) can be identified online. Subsequently, the obtained dynamic model can be utilized to predict the mover positions by adopting the control laws with evolved control parameters, and additionally, the mover positions can further be used for real-time control signals evaluations. On the basis of the investigation from Sections 2-4, an optimal design of the contour tracking controller is further proposed to effectively achieve high-precision tracking in each axis of the LMs-driven X-Y-Y stage, while reducing the contour tracking error with fast convergence rate.

Contour Tracking Using 2PID Control System
In the position feedback loop of each axis LM, the contour tracking control system that composes of three 2PID controllers is firstly designed, as shown in Figure 3. This controller for each LM comprises a main PID controller G b (s) and a feedforward PD controller G f (s) as follows [23]: where K px , K pyi , T Ix , T Iyi , T Dx , and T Dyi are the P gain, I time, and D time control parameters; α x , α yi , β x , and β yi are the feedforward parameters namely the P and D constants. As such, from (26)-(29), the control laws of the contour tracking control system in time-domain can be represented as follows: Therefore, the final control signal of the contour tracking control system can be formulated as: Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 22 where Kpx, Kpyi, TIx, TIyi, TDx, and TDyi are the P gain, I time, and D time control parameters; αx, αyi, βx, and βyi are the feedforward parameters namely the P and D constants. As such, from (26)-(29), the control laws of the contour tracking control system in time-domain can be represented as follows: Therefore, the final control signal of the contour tracking control system can be formulated as: In contrast with the conventional PID control with only one set of tuning parameters (Kp, TI, and TD), the 2PID control scheme can simultaneously facilitate perfect tracking and disturbance rejection through the individual control loops by tuning its two sets of independent controller parameters. However, since there are totally fifteen control parameters required for the x, y1, and y2 axes of the 2PID contour tracking control system, it raises the severe difficulty in carefully tuning these control parameters for the LMs-driven X-Y-Y stage to achieve superior positioning performances. Besides, fixed control parameters also cannot perform favorable control performance levels against the unknown system uncertainties and external disturbances.  In contrast with the conventional PID control with only one set of tuning parameters (K p , T I , and T D ), the 2PID control scheme can simultaneously facilitate perfect tracking and disturbance rejection through the individual control loops by tuning its two sets of independent controller parameters. However, since there are totally fifteen control parameters required for the x, y 1 , and y 2 axes of the 2PID contour tracking control system, it raises the severe difficulty in carefully tuning these control parameters for the LMs-driven X-Y-Y stage to achieve superior positioning performances. Besides, fixed control parameters also cannot perform favorable control performance levels against the unknown system uncertainties and external disturbances.

Contour Tracking Using ACC2PID Control System
To improve the contour tracking performance levels and robustness of the 2PID control system, the ACC2PID contour tracking control system is further proposed. The control block diagram of the LMs-driven X-Y-Y stage using ACC2PID control system is shown in Figure 4. Regarding the biaxial structure of the LMs-driven X-Y-Y stage, two contour errors ε 1 and ε 2 are in the x-y 1 and x-y 2 contours, respectively. Recall from Figure 2, each contour error can be further decomposed to the component in the x-axis as (20) and the component in the y-axis as (21). To suppress the contour errors, two contour error compensators G cix (s) and G ciy (s), i = 1, 2, are further designed to confront the contour errors in the x-axis and y-axis, respectively. Now, design the contour error compensator as follows: where G cix (s) and G ciy (s) are selected as P gains K cix and K ciy for the x-axis and y-axis, respectively. Thus, as shown in Figure 4, three 2PID controllers with two compensators were constructed for the proposed ACC2PID control system to concurrently perform contours tracking and contour error compensation.
To improve the contour tracking performance and system robustness, the IABC algorithm was used to tune the 2PID controller parameters for each axis LM as in (34) and (35), and one control parameter of each compensator as in (36) and (37) during the contour tracking process. Thus, each bee of the IABC algorithm can be formulated as a 19-dimensional vector ψ i = [K px T Ix T Dx α x β x K py1 T Iy1 T Dy1 α y1 β y1 K py2 T Iy2 T Dy2 α y2 β y2 K c1x K c1y K c2x K c2y ]. According to the different bees represented by the distinct vectors, different control signals u x , u y1 , and u y2 under the same tracking error and contour error will be generated. To avoid performance degradation due to the use of immature parameters, the control signals u x , u y1 , and u y2 with the parameters in the evolution were sent to the mover positions observer for observing the virtual mover positionsx,ŷ 1 , andŷ 2 as shown in Figure 4. Moreover, the observation errors τ x , τ y1 , and τ y2 , which were defined as the differences betweenx and x,ŷ 1 and y 1 ,ŷ 2 and y 2 , were used in the parallel system parameters identification approach. On the other hand, the virtual mover positionsx,ŷ 1 , andŷ 2 are used to evaluate the fitness values as follows: where I represents the Ith iteration;ê x ,ê y1 ,ê y2 , andε i are the observed tracking errors and contour errors, respectively; n is the number of the considered data. Accordingly, the control parameter candidates with the highest fitness value are selected as the eventual parameters for the LMs-driven X-Y-Y stage in the next optimization period. In the same control duration, two performance measures (39) and (40), as defined in the next section, are more considered to evolve the parameters through a sufficient number of parameters optimization. As a result, the proposed ACC2PID control system with the online IABC optimization mechanism can concurrently reduce the tracking error in each axis and the contour errors of biaxial motions simultaneously.
1 Figure 4. The contour tracking control configuration of the LMs-driven X-Y-Y stage using the proposed auto-tuning cross-coupled (ACC)2PID control system.

Experimental Setup
The proposed ACC2PID control scheme is tested on a LMs-driven X-Y-Y stage, as shown in Figure 5. In this experimentation, the x-axis is actuated by a long-travel LM stage, while the y 1 -axis and y 2 -axis are actuated by a series type dual LMs. All the adopted LMs are manufactured by Hiwin technologies corporation. The travel ranges of the movers in x-axis and y-axis are 580 mm and 400 mm, respectively. Linear optical encoders with the resolution of 50, 10, and 10 µm were, respectively, used for the position sensors of measurement x, y 1 , and y 2 . Moreover, a digital signal processor (DSP) attaching a floating-point PowerPC 400-MHz processor and a VxWorks real-time operating system was used as the control core. The DSP was equipped with a 32-b resolution encoder interface and 16-b resolution digital-to-analog converters (DACs) to carry out the closed-loop control architecture. Furthermore, the gains of the input control signals to the output drive currents of the servo drivers mega-fabs MD-36-S2 were set as 0.85 A/V. The main parameters of the developed LMs-driven X-Y-Y stage are given in Table 1.
In the developed control system, the software developed for the DSP-based real-time control comprises a main program and an interrupt service routine (ISR). In the main program, the IABC algorithm was implemented to optimize the control parameters of the ACC2PID control system. Furthermore, the ISR with a 0.5 millisecond sampling interval was executed for reading the mover positions from the encoder interfaces, realizing the ACC2PID control laws, and sending control signals to the servo drivers through DACs. Then, the drive currents generated by the servo drivers drove the movers to track the contour commands accurately. To avoid performance degradation due to the use of immature parameters, the parameters were tested by a virtual mover positions observer.
The control parameter candidates with the highest fitness value were selected as the final parameters for the LMs-driven X-Y-Y stage afterwards.

Performance Measures
To provide a sufficient comparison, contour tracking control of the LMs-driven X-Y-Y stage using 2PID control system as shown in Figure 3 was tested firstly. Besides, an auto-tuning 2PID (A2PID) contour tracking control system was implemented for further examination. In the A2PID control system, the control parameters KP, TI, TD, α, and β of each 2PID controller were dynamically tuned by the IABC algorithm, while the control parameter Kcix and Kciy of each contour error compensator was set as zero.
To evaluate the quality of the contouring control scheme, the following two performance indices including the sum of the absolute values of the tracking errors Pe and the sum of the absolute values of the contour error Pε are defined as follows:

Performance Measures
To provide a sufficient comparison, contour tracking control of the LMs-driven X-Y-Y stage using 2PID control system as shown in Figure 3 was tested firstly. Besides, an auto-tuning 2PID (A2PID) contour tracking control system was implemented for further examination. In the A2PID control system, the control parameters K P , T I , T D , α, and β of each 2PID controller were dynamically tuned by the IABC algorithm, while the control parameter K cix and K ciy of each contour error compensator was set as zero.
To evaluate the quality of the contouring control scheme, the following two performance indices including the sum of the absolute values of the tracking errors P e and the sum of the absolute values of the contour error P ε are defined as follows: where k and R denote the iteration index and the total iteration number during the control process, respectively. In this study, the sampling frequency of the data acquisition system was set as 10 Hz for performance measures. Thus, the time interval between each k as shown in (39) and (40) was 0.1 s. As such, 10 s of data were measured to verify the superior tracking and contouring performance of the proposed ACC2PID method even under extreme contouring tasks.

Case 1. Circular contour command tracking
In order to investigative the control performance, the LMs-driven X-Y-Y stage is first commanded to track a dual circular contour simultaneously with the maximum frequency f of 1 Hz, as given by: where the radius of each circular contour is r = 0.05 m. In the experimentation, three movers of the LMs-driven X-Y-Y stage were concurrently controlled to carry out the x-y 1 and x-y 2 biaxial motions. The constant control parameters for the 2PID control system were selected as K px = 0.0139, T Ix = 6.2195, T Dx = 0.00094, α x = 0.0020, β x = 8.35 × 10 −7 , K py1 = 0.0018, T Iy1 = 0.1308, T Dy1 = 6.63 × 10 −6 , α y1 = 0.00012, β y1 = 2.73 × 10 −7 , K py2 = 0.007, T Iy2 = 0.2308, T Dy2 = 9.19 × 10 −6 , α y2 = 5.81 × 10 −5 , and β y2 = 7.36 × 10 −7 . These control parameters were selected on the basis of several trials to achieve the favorable transient response considering the occurrence of uncertainties and the requirement of steady-state stability. However, it is difficult to choose all the control parameters simultaneously due to the dependence among parameters. Moreover, it cannot be ensured that the 2PID control system can achieve the best control performances by adopting the manually selected control parameters. The experimental results of the LMs-driven X-Y-Y stage for the circular contouring control using 2PID control system are shown in Figure 6. From Figure 6a, the end-effectors of the LMs driven-X-Y-Y stage were controlled by the 2PID control system to track the contour command certainly. However, both the tracking error and contour error were not favorable due to the constant control gains used in the 2PID control system. where k and R denote the iteration index and the total iteration number during the control process, respectively. In this study, the sampling frequency of the data acquisition system was set as 10 Hz for performance measures. Thus, the time interval between each k as shown in (39) and (40) was 0.1 s. As such, 10 s of data were measured to verify the superior tracking and contouring performance of the proposed ACC2PID method even under extreme contouring tasks.

Case 2. Three-leaf contour command tracking
The proposed ACC2PID method is further tested for extreme three-leaf reference contour with large curvature and high speed. The reference contour can be expressed by with r = 0.025 m and the maximum frequency f up to 1 Hz. The parameters of the IABC algorithm and 2PID control system were selected as the same as the ones of Case 1. The experimental results of the LMs-driven X-Y-Y stage due to three-leaf contour command using 2PID and A2PID control systems are shown in Figures 9 and 10, respectively. As seen from Figures 9 and 10, the tracking error in each axis and the contour errors in both contours are greatly reduced by the A2PID control system, as compared with the ones of the 2PID control system. It reveals that the optimized control parameters can effectively improve the contour tracking performances in the previous tracking

Case 2. Three-leaf contour command tracking
The proposed ACC2PID method is further tested for extreme three-leaf reference contour with large curvature and high speed. The reference contour can be expressed by with r = 0.025 m and the maximum frequency f up to 1 Hz. The parameters of the IABC algorithm and 2PID control system were selected as the same as the ones of Case 1. The experimental results of the LMs-driven X-Y-Y stage due to three-leaf contour command using 2PID and A2PID control systems are shown in Figures 9 and 10, respectively. As seen from Figures 9 and 10, the tracking error in each axis and the contour errors in both contours are greatly reduced by the A2PID control system, as compared with the ones of the 2PID control system. It reveals that the optimized control parameters can effectively improve the contour tracking performances in the previous tracking experiment. Again, the proposed ACC2PID control system was applied to control three LMs for tracking the three-leaf contour command and the corresponding experimental result was shown in Figure 11. From the experimental results shown in Figures 8 and 11 the superior control performance of the ACC2PID control system for both contour commands tracking can be observed. The performance measures of the LMs-driven X-Y-Y stage due to three-leaf contour command using 2PID, A2PID, and ACC2PID control systems are summarized in Table 3. The result shows that the control performance measures P e and P ε of the 2PID control system are significantly reduced by the ACC2PID control system with an online control parameters optimization and a contour error compensation mechanism. The investigation results to the performance indices as shown in Tables 2 and 3 also verify that the proposed ACC2PID control system exhibited optimal tracking and contouring tracking performance through globally and dynamically optimized control parameters for the LMs-driven X-Y-Y stage. experiment. Again, the proposed ACC2PID control system was applied to control three LMs for tracking the three-leaf contour command and the corresponding experimental result was shown in Figure 11. From the experimental results shown in Figures 8 and 11 the superior control performance of the ACC2PID control system for both contour commands tracking can be observed. The performance measures of the LMs-driven X-Y-Y stage due to three-leaf contour command using 2PID, A2PID, and ACC2PID control systems are summarized in Table 3. The result shows that the control performance measures Pe and Pε of the 2PID control system are significantly reduced by the ACC2PID control system with an online control parameters optimization and a contour error compensation mechanism. The investigation results to the performance indices as shown in Table 2 and Table 3 also verify that the proposed ACC2PID control system exhibited optimal tracking and contouring tracking performance through globally and dynamically optimized control parameters for the LMs-driven X-Y-Y stage.

Conclusions
This study demonstrated the design and implementation of the ACC2PID control system with IABC optimization and contour error compensation to the high precision contour tracking control of a LMs driven X-Y-Y stage. First, the operating principle and dynamic of the LMs driven X-Y-Y stage were illustrated. Then, the theoretical base of the contour error determination was given. Subsequently, the detail control system designs of the proposed ACC2PID control system were introduced. In the ACC2PID control system, three 2PID controllers were developed to control the mover positions in individual x, y 1 , and y 2 axes, while two contour error compensators were designed to eliminate the contour errors in x-y 1 and x-y 2 axes, respectively. Further, the IABC algorithm was employed to automatically identify the system parameters for highly nonlinear and uncertain dynamics of the LMs-driven X-Y-Y stage, and, also, the control parameters can be optimized online without leading to fragility for the control system. Finally, the experimental results with performance measures demonstrated that the proposed ACC2PID control system significantly exhibits the superior synchronous positioning and contour tracking performances through individual axial control of the LMs-driven X-Y-Y stage.