Optimal Robust Constraint-Following Control for Permanent Magnet Linear Motor: A Fuzzy approach

—In this paper, robust constraint-following con- trol (RCFC) with the optimal design is developed to handle the trajectory tracking control issues for permanent magnet linear motors, which control performance is deteriorated mainly by friction, ripple force, and external disturbance. Speciﬁcally, fuzzy description for the main nonlinearity of permanent magnet linear motor and its fuzzy dynamic model is formulated. Then, the tracking speciﬁcation is modeled as a performance constraint, the RCFC algorithm following the Udwadia-Kalaba theory is designed to com-ply with this constraint, and possess strong robustness to uncertainties simultaneously. The resulting controller is demonstrated to be uniform bounded and uniform ultimate bounded with Lyapunov analysis. Furthermore, the optimal design issue via a fuzzy approach is investigated to achieve the optimal tradeoff between control effort and system performance. Finally, the rapid control prototype platform CSPACE is employed to implement the real-time control while avoiding the time-consuming repetitive programming and debugging. Simulation and experiment results illustrate the actual effectiveness of the proposed algorithm.

are inevitable frictions, force ripple, external disturbances, and parameter uncertainties [7], [8]. The proportional-integralderivative (PID) control is broadly applied in the engineering field, especially in industrial robots which can be quite accurately modeled. While for the PMLM system, it is difficult to obtain an accurate model of nonlinear effects, particularly the cogging effect in linear motion. Thus, it is very crucial to develop more advanced control algorithms to promote the development of the PMLM system towards ultra-precision tracking and positioning, because the conventional PID control usually does not exist alone.
Until now, energetical and continuous attempts have been devoted to boosting the control performance of the PMLM system. Various controllers have been implemented on the linear motor platform, such as sliding mode control [9], adaptive robust control [10], iterative learning control [11], backstepping control [12], fuzzy control [13], neural network control [14], fault-tolerant control [15], model predictive control [16], etc. The mentioned-above researches have played significant roles in improving the dynamic precision of the PMLM system. Different from the previous studies that mainly focus on motion control itself, the control issues in this paper are regarded as the servo constraint problems. According to the rigorous theoretic framework established by Udwadia and Kalaba [17], the system's motion requirement is treated as a kind of constraint, which is termed as trajectory tracking constraint (also called performance constraint). From the perspective of inverse dynamics control, in order to obey the specified performance constraint, a certain servo constraint force can be imposed on the system as a control input. This servo constraint force can be obtained by the fundamental equation derived by Udwadia and Kalaba [18].
Begin from the concept of servo constraint [19], [20], the robust constraint following control (RCFC) is structured to render the PMLM system to follow the pre-specified performance constraints in case of nonlinearity and uncertainty. Specifically, the control design can fall into three components. Firstly, the constraint force is formulated as the u 1 component to cope with the dynamics in the system when uncertainty is not involved. Secondly, considering that the initial conditions may not strictly follow the constraints, the u 2 component of the controller is devised. The combination of u 1 and u 2 components is the nominal control of the system, namely Udwadia-Kalaba nominal control (UKNC), which is designed via Udwadia-Kalaba theory. Thirdly, the u 3 component is deduced as robust feedback terms to restrain the influence of model uncertainty and extrinsic disturbance. It is worth emphasizing that the initial condition shift issues are considered in our control design, which has practical significance. Because in practical terms, the PMLM system does not necessarily start from the setting conditions strictly due to positioning errors, output noises, and other factors, which would degrade the control performance [21].
In the aspect of trajectory tracking control, the design idea of constraint-following has been successfully developed in some mechanical systems, such as active suspension [22], electronic throttle [23], mobile robot [24], etc. In addition, robust control is also recognized as having inherent reliability in dealing with uncertainties. Inspired by the previous researches, this paper innovatively incorporates the idea of constraint-following and the design of robust feedback to settle the tracking control problems of PMLM system. The proposed RCFC strategy is concerned with the exogenous and internal uncertainties of the model, including mass, friction, ripple force, and load variation, etc. Nevertheless, obtaining a precise model is sometimes more complicated than the control design itself. A fuzzy approach is adopted to handle uncertainties. Specifically, assuming that the uncertainties in the PMLM system (probably fast time-varying) are unknown but bounded, fuzzy-set theory is invoked to describe those unknown bounds.
In view of the fuzzy information of the uncertainties, the fuzzy dynamic model is established at first, and then the RCFC strategy is devised to render the PMLM system control performance. Since robust feedback design generally considers the most unsatisfactory situation, the optimal gain of the controller is finally explored to avoid high control costs without sacrificing the control performance. Among them, the idea of optimal design is to minimize a comprehensive performance index that formulates the control cost, transient response performance, and steady-state tracking performance. As a result, the optimal RCFC (ORCFC) algorithm based on the fuzzy approach is validated by simulation and experiment.
For this paper, to summarize, the predominant objective is to pursue the optimal robust constraint-following control (OR-CFC) scheme for the uncertain PMLM system via a fuzzy approach to obtain superior trajectory tracking performance. The resulting controller is demonstrated to be uniform bounded and uniform ultimate bounded with Lyapunov analysis. The primary contributions are stated as below: i) Start from tracking requirements: From another novel point viewpoint, the concept of servo constraint is innovatively applied to redesign robust control of PMLM system. The developed RCFC algorithm starting from the tracking requirement can better guarantee the system performance.
ii) Converge under any initial condition: The uncertainty of the initial state is considered, and the UKNC and RCFC algorithms can still converge to the desired trajectory under the mismatched initial conditions. Therefore, the PMLM system can also meet the performance requirements without strictly starting from the set initial conditions. iii) Optimal design by fuzzy approach: Through the fuzzy description of an uncertain PMLM system, the optimal gain of the RCFC controller is solved by fuzzy-set theory. The optimal RCFC (ORCFC) algorithm can avoid the control cost waste caused by robust design structure, and achieve the optimal tradeoff between control effort and system performance. iv) Real-time experimental validation: Rapid control prototype platform CSPACE is employed to carry out the realtime control for the PMLM system while avoiding the timeconsuming repetitive programming and debugging. Due to the convenience of practical operation, experiments have been implemented to verify the superior trajectory tracking property and strong robustness against disturbance.

A. Fundamental equation of constrained system
Since the proposed control design is characterized by constraint-following, it is essential to introduce the fundamental equation and the concept of constraint. The fundamental equation introduced in this section is called Udwadia-Kalaba equation [17]. A systematic three-step procedure is summarized to derive the fundamental equation as follow: Firstly, an unconstrained system with n generalized coordinates x := [x 1 , x 2 , . . . , x n ] T is considered. By applying Lagrangian or Newtonian mechanics, its equation of motion can be presented as where the inertia matrix M (x, t) is positive definite,ẋ is the velocity, andẍ is the acceleration, Q(x,ẋ, t) denotes the force impressed on the system in which the constraints are released. Thus, the acceleration of unconstrainted system denoted by the vector a(x,ẋ, t) is obtained Secondly, when constraints exist, at arbitrary time t, the acceleration of constrained system recorded as the vectorẍ differs from a(x,ẋ, t), because additional forces are generated to cater for constraints. Suppose that the system is governed by m constraints, including h holonomic constraints with the mathematical form of and m − h nonholonomic constraints with the mathematical form of Differentiating h holonomic constraints twice and m − h nonholonomic constraints once with regard to the time t, yields A(x,ẋ, t)ẋ = c(x,ẋ, t), A(x,ẋ, t)ẍ = b(x,ẋ, t).
where the m × n matrix A(x,ẋ, t) and the m-vector b(x,ẋ, t) are known functions.
Thirdly, the actual equations of motion with constraints can be written in the following form M (x, t)ẍ = Q(ẋ,ẍ, t) + Q c (ẋ,ẍ, t). (6) where Q c (ẋ,ẍ, t) is a constraint force that is enabled to satisfy the constraint equation. By Gauss's principle, Udwadia and Kalaba put forward the fundamental equation where B = AM −1/2 , the symbol +, called the Moore-Penrose (MP) generalized inverse on the condition of the following: From Eq.(6) and Eq. (7), the additional constraint force Q c (ẋ,ẍ, t), which caused the acceleration of the system at time t to change from its unconstrained value of a(t) to its constrained value ofẍ(t), is given by B. Description of the PMLM system According to the previous derivation [10], PMLM can be described as follows: where x represents the position,ẋ andẍ are the corresponding velocity and acceleration, u denotes the input voltage. Mass of the coil assembly plus the inertia load is denoted by M . The lumped nonlinearities recorded as F consists of friction F f ric , ripple force F ripple , and the other external disturbances F d . The friction is generally modeled as [1]: where f v denotes the viscous friction parameter, f s denotes the static friction level, f c denotes the minimum Coulomb friction level, and the lubricant coefficient generally determined by empirical experiments is denoted asẋ s .
Besides friction, ripple force is another major factor affecting the tracking control performance, especially in the lowspeed motor. The ripple force is caused by the cogging forces and the magnetic resistance in the actuator structure. It is mainly related to the displacement and is generally modeled as: (12) High order harmonics in (12) are often ignored in control design, and the following simplified ripple force model is usually applied.
where ω, S1, S2, S3 are constants. Aiming at the main uncertainties of PMLM system, we adopt a fuzzy description method and combine fuzzy theory with system theory to re-describe the dynamic model as follows: (14) where u ∈ R n is the control input voltage, and δ denotes the uncertain parameter. Assumed that δ ∈ ⊂ R n , which represents the bound of δ is known and compact.
In order to facilitate the nominal control design based on Udwadia-Kalaba theory, the following definition is necessary. Let whereM ,F f ric ,F ripple , andF d denote the nominal portions, ∆M , ∆F f ric , ∆F ripple , and ∆F d denote the uncertain portions, which depend on δ.

III. ROBUST CONSTRAINT-FOLLOWING CONTROL DESIGN
In this paper, we consider the PMLM system as a constrained system, in which the performance requirement is modeled as a servo constraint (we call it a performance constraint). Then the performance constraint can be described by Eq.(5) of second-order form.

A. Constraint force under the known uncertainty
Firstly, we present the constraint force if the uncertainty is not considered in PMLM system (14). Here, δ is considered known. Theorem 1. (Udwadia and Kalaba [25]): Consider the PMLM system (14) and the constraint (5), the expression for the force of constraint, which complies with Gauss's principle and Lagrange's form of d'Alembert's principle, is given by where (14), such that the system exactly satisfies all the constraint. Remark 1. Theorem 1 suggests that one can employ the control input u = Q c to drive PMLM system to meet Eq. (5) if there is no uncertainty. However, in the practical PMLM system, the uncertainty is widespread and unknown. Therefore, robust constraint-following design to deal with uncertainty for position tracking control need to be investigated.

B. Robust constraint-following control
Based on the actual situation, we consider the uncertainty while designing the controller. The matrices/vectors M , F f ric , F ripple , F d can be decomposed as shown in Eq. (15) Assumption 2. For given P ∈ R m×m , P > 0, let Define that λ is a positive scalar constant, have Next, we consider the constraint-following problem. That is, Aẋ = c or Aẍ = b results in the constraint tracking error. Let where κ ∈ R, κ > 0, η := Aẋ − c denotes the constraint tracking error. Thus, our control objective is to render η → 0 such that e → 0 when t → ∞. Note that, we must consider the case that when the system does not satisfy the constraint at the initial time t0.
Assumption 3. There exists ρD(·) : Now, the RCFC design is provided as follows: with where where ρ(x,ẋ, t) that represents the upper bound of uncertainties is defined as follows: (26) Remark 2. From the structure of the controller, it consists of the nominal term based on Udwadia-Kalaba theory and the robust feedback term characterized by constraint following. Essentially, the control in Eq. (22) with u3 = 0 is the nominal control based on U-K theory (UKNC), and u3 is the robust feedback design used to restrain the influence of model uncertainty and extrinsic disturbance.
Remark 3. The parameter ε can be chosen arbitrarily small to achieve a high-performance constraint following. Nevertheless, ε can not be unlimited small, otherwise, the corresponding control input may be severely chatter. Consequently, there should be an optimal tradeoff between control effort and system performance.

IV. OPTIMAL GAIN DESIGN
From the above Lyapunov analysis, system performance can be guaranteed by the proposed RCFC scheme. The size of uniform ultimate bounded region decreases with the increase of κ. We can choose an infinitesimal κ to achieve excellent performance, but it will be accompanied by high control cost. Therefore, it is of practical engineering significance to seek an optimal gain for κ to achieve the best tradeoff between control effort and system performance. Here, the optimal design for RCFC is conducted by a fuzzy approach.
System performance is analyzed with Lyapunov function. By the Rayleigh's principle [26], we know Substituting (45) into (40), we then geṫ with V0 = V (t0) = V (e(t0)). From the analogous property of differential inequality, have for all t ≥ t0. We can also deduce that, for arbitrary ti or arbitrary τ ≥ ti, with Vi = V (ti) = V (e(ti)). The time ti refers to the initial execution time of the control algorithm.
As V (e) ≥ λm(P ) e 2 , combine (48), we can obtain an upper bound of e 2 . For any τ ≥ ti, let The components Θ(κ, τ, ti) and Θ∞(κ) depending on ε can be treated as transient-state response performance and steady-state tracking performance, respectively. Although their exact values are unknown, their possible values can be delivered by known membership functions. Next, a fuzzy performance index is formulated.
(51) the weighting factors θ1 > 0, θ2 > 0, while J1(κ, ti), J2(κ), J3(κ) can be viewed as the average of overall transient performance, steady-state performance, and control cost (via a fuzzy D-operation). There exist a balance and trade-off between system performance and control effort. Motivated by this, the goal of the optimal design is to pursue κ > 0 such that the performance index (51) is minimized.
From (49), it can be shown that Applying the D-operation, and recalling that χ = 2κλ λ M (P ) in (46), the performance index can be rewritten as 16λ 2 D ε 2 . The optimal design problem can be transformed into a constrained optimization issue. For any ti, min κ J(κ, ti), subject to κ > 0. (54) The first-order derivative of J with respect to κ is given by The fact that ∂J ∂κ = 0 leads to Fig. 1: The optimal robust constraint-following control block diagram of PMLM.
which is a quintic polynomial equation. Through mathematical analysis, we can get that the solution κ > 0 to (56) always exists and is unique.
The well organized optimal design procedure is concluded as follows: • Step 1: According to the desirable performance of PMLM system, convert it to the form of (5). • Step 2: Choose design parameters P and ρ to meet (26), choose parameter ρD(x, t) to meet (21), and choose parameter ε small enough. • Step 3: Construct robust constraint-following controller (22) on account of (19), (20), and (23). • Step 4: Choose parameter λ based on (17) and (18), determine parameter λM (P ). Then, χ is given in (46). • Step 5: Calculate χ1, χ2, χ3, χ4 in (53) through D-operation. • Step 6: Set weighting factors θ1 and θ2, then the solution of the optimal gain κ in (56) is obtained. • Step 7: The optimal robust constraint-following control (OR-CFC) is expressed in (22) using the optimized gain κ in (56). The control design flow chart of the optimal robust constraintfollowing control (ORCFC) for PMLM is shown in Figure.1. Remark 4. The major advantages of fuzzy optimal design for RCFC (ORCFC) can be summarized as threefold. First, the ORCFC scheme can formulate analytically, which can be reflected in the form of analytic expressions of the optimal gain, the system performance, and the minimum cost. It can provide guidance for engineering designers in practice. Second, due to the small amount of calculation and simple implementation of the ORCFC scheme, it is applicable for control and analysis of other mechatronic systems which can be modeled as second-order form. Third, the ORCFC scheme does not need initial on-line training or learning, which is easier to implement in practical engineering applications.

A. Parameters selection and simulation results
The PMLM system's parameters are listed in Table I. In the dynamic description of the PMLM system, M in (10) is given by [29]    Considering a sinusoidal signal, which frequency and amplitude are 1 rad/s and 100 mm, i.e., x d = 0.1sin(t), as the reference trajectory. Based on the Udwadia-Kalaba theory, the constraint of PMLM system should be satisfied as to the desired trajectory, which can be written in the form of (5) x d = 0.1cos(t),ẍ d = −0.1sin(t).
(58) that is, We  Next, we just need set the control parameters ρ in (25) and ε in (24), and then calculate the optimal gain κ in (20). Through a lot of repeated simulation tests, the optimal parameters are set as ρ = 0.1, ε = 0.01.
As to the uncertainties in (15), we choose ∆M , ∆F f ric , ∆F ripple , ∆F d to be "close to 0, 0.01, 0.002, 0 "and associated with the following membership functions Based on the design Step 4 in Section 4, we obtain λ = 0.01, λM (P ) = 1. According to the design Step 5, we calculated that χ1 = 918.09, χ2 = 75.75, χ3 = 1.5625, χ4 = 0.0625. From the design Step 6, we select five sets of weight coefficients θ1 and θ2, the optimal gains κopt and the corresponding minimum performance indexes Jmin are listed in Table II. The sinusoidal signal with the function x d = 0.1sin(t) is considered as the desired trajectory. Under the three control algorithms u1, UKNC (u1 + u2), RCFC (u1 + u2 + u3), the tracking curves are plotted in Figure.2. Note that, we set the initial displacement of the three tracking curves not at the original point. It can saw  that the curves of UNKC and RCFC can gradually reach the desired trajectory, while u1 can't. In fact, in our control design, the initial position of the tracking curve can be at any position in the presence of u2 and the tracking performance can be guaranteed. The tracking performance curves for sinusoidal signal under the RCFC algorithms with different κopt in Table II and the UKNC algorithm are provided in Figure.3. The results show that compared with the UKNC algorithm, the RCFC algorithm with κopt can achieve a smaller steady-state displacement error. For RCFC algorithm, when κopt increases, both the displacement error and the control input decrease. Therefore, the RCFC algorithm with κopt = 7.59 (ORCFC) is chosen as the optimal design, which achieves the tradeoff between control cost and performance.

B. Experimental platform and experimental results
To further illustrate the practical effectiveness of the proposed ORCFC algorithm, experiments are conducted on the real-time PMLM position tracking control system. Experimental setup is depicted in Figure 4, which is composed of CSPACE control box platform, PMLM, industrial PC installed MATLAB/Simulink, linear motor driver, grating displacement sensor, and other platform configurations. The CSPACE control box platform, combined with MATLAB/Simulink real-time workshop, seamlessly integrates the total development lifecycle into an independent environment. In this way, each development phase between testing and simulation can be run multiple times without frequent adjustments.
The specific process of the control strategy proposed in this paper for real-time experiments is listed as follows.
• i) Program the control algorithm in Matlab/Simulink software and directly convert it into C code in the automatical code generation software via the CSPACE control box platform. • ii) Compile the C code in the Compose Code Studio (CCS) software, and then download it into the digital system processor (DSP, TMS320F28335) via the emulator. • iii) The DSP control board receives the input signal and implements the final C code (i.e., the control algorithm proposed in this paper) in real-time. • iv) The control signal is output via CAN communication and simultaneously amplified as the input of the linear motor to achieve motion control. The UKNC and ORCFC algorithms are chosen to be conducted in the abovementioned experimental platform to verify the practical effect, and the widely used PID algorithm in practice is selected as a comparison. During online programming, the sampling period for position information is 5 milliseconds, the instruction period is 6.67 nanoseconds, while the online processing capacity is 150 (MIPS). All controllers' parameters are the same as the simulation.
1) Transient response performance: Step signal (x d = 0.1) is chosen as the desired reference trajectory. The experimental response results of displacement, error, and the control input for step signal are depicted in Figure 5. From the experimental results, on one side, the response speed of both UKNC and ORCFC algorithms is faster than PID control. On the other side, the steady-state error of both UKNC and ORCFC algorithms is also smaller. Among them, the dynamic performance of the ORCFC algorithm is the most superior. To intuitively exhibit the excellent transient performance of the proposed algorithm, Table III provides specific performance indexes, i.e., rise time and stability time. Meanwhile, the error range between 6 and 10 seconds is estimated to reflect the steady-state performance.
2) Steady-state tracking performance: Same as the simulation, the sinusoidal signal (i.e., x d = 0.1sin(t)) is chosen as the desired reference trajectory. Similarly, the corresponding experimental tracking results of the displacement error and control input are shown in Figure 6. Obviously, the proposed ORCFC and UKNC algorithms can achieve smaller errors than PID control. Simultaneously, the control input of PID control is higher than that of the ORCFC and UKNC algorithms. The ORCFC algorithm can achieve the best steady-state tracking performance. For quantitative comparison, Table IV gives the concrete data about the average error (AVE), the maximum error (MAXE), and the error's standard deviation (STD), which are mathematically described as follows: where i and n denote the sampling points for displacement error, and e(i) is the i-th sampling error. For sinusoidal signal, i and n are set to 1 and 5000, which correspond to the time from 0 to 25 seconds, because the sample period is 0.005 (sec). Similarly, for step signal, we calculate the steady-state error from 3 to 10 seconds, so i and n are set to 601 and 2000, respectively.
3) Robustness against parameter variations: Different payloads are added to the moving thrust block, which would lead to the change of mass and friction of the PMLM system. To further observe the impact of parameter variations on the system performance, experiments are carried out under the following three conditions, i.e., without load and with 4kg, 8kg load. The experimental results under different payloads are presented in Figure 7. Furthermore, Table V lists the comparison of specific data reflecting the steady-state tracking performance under the ORCFC, UKNC, and PID control. Through comparison study, it can be summed up that the ORCFC strategy demonstrates excellent robustness against parameter variations.

4) Robustness against a sudden disturbance:
The purpose of this experiment is to verify the anti-interference ability of the control system. When tracking a sinusoidal signal, the sudden disturbance load is applied to the moving thrust block of the PMLM system. Under the ORCFC, UKNC, and PID control, the experimental curves for the control input, displacement error are depicted in Figure 8. It serves to show that the ORCFC algorithm demonstrates a better capacity for resisting disturbance.

VI. CONCLUSIONS
In this paper, optimal robust constraint-following control is proposed to achieve high-performance position tracking control of the PMLM. The PMLM system's control performance is deteriorated mainly by friction, ripple force, and external disturbance. Those uncertainties are described via a fuzzy number, and then system's fuzzy dynamic model is generated. The RCFC algorithm (theoretic framework established by Udwadia and Kalaba) is devised to obey system's position tracking performance constraint. The resulting controller is demonstrated to be uniform bounded and uniform ultimate bounded with Lyapunov analysis. Next, the optimal design for RCFC (ORCFC) is formulated as a comprehensive performance index minimization problem. On the rapid control prototype platform CSPACE, the real-time experiments are implemented to demonstrate that the proposed ORCFC algorithm can reach superior performance.

CONFLICTS OF INTEREST
The authors declare no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.