Adaptive Fixed-Time Position Precision Control for Magnetic Levitation Systems

A novel adaptive fixed-time controller (AFTC) based on disturbance compensation technology is proposed to achieve high performance position precision control for magnetic levitation system in this paper. Firstly, the dynamic model of the magnetic levitation system is established and a fixed-time controller (FTC) is designed to realize the closed-loop control. However, this approach usually requires a large switching gain to suppress interference, resulting in chattering. In view of this, the generalized proportional integral observer (GPIO) is introduced to estimate and compensate the time-varying interference, which can not only improve the anti-interference ability, but also reduce the chattering by choosing a smaller switching gain. Nevertheless, these two performance improvements come at the cost of the dynamic response rate. In order to improve steady state performance without sacrificing dynamic performance, an adaptive fixed-time controller based on GPIO is proposed, which has a significant advantage because of the adjustable switching gain. Specifically, when the system state is far from the sliding mode surface, a larger switching gain is adjusted to improve the convergence rate. When the system state is close to the sliding mode surface, a smaller switching gain is adjusted to reduce chattering. Simulation and experimental results demonstrate the superiority of the proposed AFTC-GPIO method qualitatively and quantitatively. Note to Practitioners–As a highly nonlinear system easily affected by external disturbances and system uncertainty, high precision position control of magnetic levitation system is a great challenge. In this paper, based on the accurate estimation of lumped time-varying interference by GPIO, an adaptive fixed time sliding mode controller is designed to suppress the disturbance and achieve the high precision control. Traditional sliding mode control inevitably has to choose between improving convergence rate and suppressing chattering, and the dynamic and steady performance of the system cannot be considered simultaneously. In view of this issue, this paper combines sliding mode control with adaptive control, and an adaptive and adjustable switching gain is designed, so that the system has the performance of fast convergence and small chattering. Simulation and experimental results verify the effectiveness of the proposed method. The reported AFTC-GPIO idea can also be extended to control of other types of systems.


I. INTRODUCTION
M AGNETIC levitation system has been widely used in high-speed maglev passenger trains [1], [2], frictionless bearing [3], levitation of wind tunnel models, vibration isolation of sensitive machinery and other occasions [4]- [7] due to its advantages of contact-less and friction-less. However, the magnetic levitation system has strong nonlinearity, so it is difficult to achieve the high performance control with traditional control methods. In addition, with the development of nonlinear science and automatic control technology, the engineering demand for the control precision of magnetic levitation system has been further improved. Thus, modern advanced control methods are investigated, such as optimal control [8], adaptive control [9], [10], sliding mode control [11]- [13], fuzzy control [14], robust control [15]- [17], neural network and so on. These efforts have been made to improve the performance of magnetic levitation system from different aspects.
Sliding mode control has attracted much attention because of its simple algorithm, fast response, strong robustness to external noise and parameter perturbation [18]- [20]. However, the traditional sliding mode control converges asymptotically. The terminal sliding mode control proposed in [21] can make the system converge in finite-time, but it only speeds up the convergence rate when the system state is near the sliding mode surface, and it is even slower than the traditional sliding mode control when the state is far from the sliding mode surface. In order to improve the convergence rate when it is near or far away from the sliding mode surface, fast terminal sliding mode control is designed in [22], but its convergence time still depends on the initial state of the system. In view of this, the fixed-time terminal sliding mode control is proposed in [23], which enables the system converges in a fixed-time independent of the initial state.
In order to suppress the interference existing in the system, it is necessary to select a large switching gain value for sliding mode control, which will lead to chattering phenomenon. One of the ways to reduce chattering is the disturbance compensation-based control scheme [24]- [26]. As long as the disturbance estimation is accurate, this scheme could completely compensate it in the feed-forward channel and eliminate the effect of interference on the system. Thereby, a smaller switching gain is selected while the anti-interference ability of the system is improved. However, the dynamic response rate of the system is sacrificed due to small switching gain, especially when the system states is far away from the sliding mode surface. The combination of adaptive theory is a good choice to solve this problem [27]- [31]. At present, there are many adaptive algorithms to adjust the switching gain dynamically. However, without the knowledge of uncertainties/perturbations bounds, the tracking performance often can't be guaranteed [32], [33]. The proposed adaptive switching gain could be realized without knowing the boundary of bounded disturbance and is convenient to adjust parameters. Using adaptive switching gain, a larger switching gain will be adjusted when the system state is far from the sliding mode surface to increase convergence rate, and a smaller switching gain will be adjusted when the system state is close to the sliding mode surface to reduce chattering. In this way, both the dynamic and steady state performance of the system could be improved.
In this paper, a novel adaptive fixed-time position precision controller based on disturbance compensation technology is proposed for magnetic levitation system. The contributions of this work are presented as follows: • Firstly, a fixed-time controller is designed to make the system converge in fixed-time independent of initial states, and a GPIO is introduced to estimate and compensate the timevarying disturbance, so that the system will achieve good antiinterference ability and steady-state performance.
• Secondly, an adaptive switching gain is introduced to improve the dynamic performance on the premise of ensuring the anti-disturbance ability and steady-state performance. Adjustable switching gain can improve the convergence speed of the system when it is far from the sliding mode surface and suppress chattering when it is close to the sliding mode surface.
• At last, simulation and experimental results show that adaptive fixed-time control based on GPIO improves the steady-state performance, dynamic performance and antiinterference ability of the closed-loop system.
The remainder of this paper is presented as follows. The mathematical model is described in Section II. The controllers are designed in Section III. The simulation and experimental results are discussed in Section IV and Section V. Then the conclusion is summarized in the end.

A. Model of Magnetic Levitation Ball System
As shown in Fig. 1, the components of the magnetic levitation ball system include: a steel ball as the controlled object, a controller used to process the data and calculate the control quantity, a laser position sensor used to obtain the position of the steel ball in real time and a PC for humancomputer interaction. For a magnetic levitation ball system, suppose that no iron coil magneto-resistance, the current-voltage relationship of the power amplifier is linear and the system works near the equilibrium point. The dynamics equation, electromagnetic equation, circuit equation and force equation of equilibrium point can be obtained where x denotes the position of steel ball, m denotes the weight of ball, i denotes the excitation coil current, F(i, x) denotes the electromagnetic force, u(t) denotes the input voltage of the power amplifier, g denotes the gravitational acceleration, L denotes the self-inductance of electromagnetic coil, R denotes the coil resistance, coefficient term K includes three parameters, μ 0 denotes vacuum permeability, A denotes magnetic permeability area, N denotes coil turn and F(i 0 , x 0 ) denotes the electromagnetic force at the equilibrium point.
The electromagnetic equations in Eq. (1) exhibit strong nonlinearity between the electromagnetic force F(i, x) and i , x, to facilitate the design of the controller, Taylor expansion is performed for Let the input voltage as control signal and consider bounded external disturbance signal d(t), it can be deduced where n is the measurement noise, y is the measurement output, a 0 , b 0 denote the nominal value of system parameter a and b, respectively. f (i, u is the total disturbance which consist of unknown internal dynamics, parameter uncertainties and external disturbance. Then, let δ 1 = x r − x 1 , δ 2 =ẋ r − x 2 , x r and x 1 denote the expected position and actual position of the steel ball, respectively. The control objective is to converge the tracking error δ 1 to zero in the presence of disturbance and uncertainty. Because the magnetic levitation ball system is a strong nonlinear, and open-loop unstable system, its exact model is difficult to establish due to the parameter a, b of system is time-varying and easy to be affected by unknown external disturbances g(i, x 1 , d, t), so it is difficult to achieve the high performance control of this system. In following sections, an adaptive fixed-time controller will be designed step by step and the stability analysis of close-loop system will also be discussed.

B. Preliminary
Throughout this paper, the following lemma will be used and an assumption should be made.
where α > 0, β > 0, and m, n, p, q are positive odd integers satisfying m > n and p < q. Then the equilibrium of (1) is fixed-time stable and the settling time T is bounded by Lemma 2 ( [35]): For any x i ∈ R, i = 1, . . . , n, and a real number p ∈ (0, 1] Lemma 3 ( [36]): For a ∈ R, b ∈ R, and q ≥ 1 which is an odd integer or a ratio of odd integers, the following inequalities hold: Assumption 1: Assuming that the lumped disturbance f in system (5) is bounded and there exists a constant l f > 0, such that | f | ≤ l f , ∀t > 0.

III. CONTROLLER DESIGN
In this section, as described in Fig. 2, a novel adaptive fixedtime control scheme is designed for position precision control of the magnetic levitation system (5). The design of the control algorithm is carried out step by step: 1) A fixed time controller is proposed in the first subsection to realize the closed-loop control of the system. Although the response time of the system is short, the large switching gain causes the phenomenon of chattering. 2) In order to reduce chattering, interference compensation technology is introduced in the second subsection. A smaller gain can be selected by interference compensation, but this sacrifices dynamic performance. 3) To improve the steady performance of the system without sacrificing the dynamic performance, an adaptive method is introduced in the third subsection and an AFTC algorithm based on GPIO is designed.

A. Fixed-Time Controller Design
For system (5), a non-singular fixed-time sliding mode surface is proposed and a fixed-time control law is designed as According to the above design, when the sliding mode surface is reached, implieṡ then, think about Lemma 1, tracking error δ 1 will converge to the zero within fixed-time. That is to say, the system state x 1 will track x r accurately within a fixed time.
Theorem 1: Consider the system (5) with the control law designed as (11), wherein the switching gain η ≥ l f . Then the state (δ 1 , δ 2 ) will converge to the origin within a fixed-time and the settling time is bounded by Proof: Consider the Lyapunov function candidate as Taking the time derivative of V 1 yieldṡ The state space is divided into the following two parts to facilitate the proof where ζ is a small positive constant. Case 1: When the system state (δ 1 , δ 2 ) is in the area 1 , thenV According to Lemma 1, it is not difficult to find that the system state will reach the sliding surface or enter the area 2 within fixed time T 2 .
Case 2: When the system state (δ 1 , δ 2 ) is in the area 2 , i.e., 0 < δ 2 q 1 p 1 −1 < ζ with δ 2 = 0, the system state will still reach the sliding mode surface within fixed time. In particular, when δ 2 = 0, it means that the system state is located in the δ 1 -axis, and control law (11) degenerates into From this we can inferδ 2 < 0 for s > 0 andδ 2 > 0 for s < 0. Therefore, δ 2 = 0 is not an attractor and the system state will pass through the area 2 to 1 . It can be concluded that the sliding mode surface can be reached from anywhere in the phase plane within fixed time T 2 . Once the sliding mode surface is reached, Eq. (12) is established, which can be verified from Lemma 1 that the system state will reach the origin in a fixed time, and the settling time is bounded by T 1 . Therefore, the total settling time T is bounded by Eq. (13). This completes the proof of Theorem 1.
Remark 1: It's worth noting that the necessary condition for Theorem 1 be established is that the switching gain η is greater than or equal to l f , which is the upper bound of the absolute value of the system's lumped disturbance. However, in general, the lumped disturbance value of the system is unknown. Therefore, for this necessary condition to be true, we need to select a switching gain value as large as possible to suppress the disturbance, but it also causes chattering of the system. Naturally, disturbance estimation and compensation techniques are considered to suppress the interference, so that a smaller switching gains can be selected to reduce chattering phenomenon.

B. Fixed-Time Controller Design Based on Disturbance Compensation
Regard as a new state variable, which denotes the total disturbance. A GPIO [37] is designed as: where λ 1 , λ 2 , λ 3 , λ 4 are the observer gain, and z 1 , z 2 , z 3 , z 4 are the estimated value of x 1 , x 2 , x 3 ,ẋ 3 , respectively. Define the estimated errors as e 1 = z 1 − x 1 , e 2 = z 2 − x 2 , e 3 = z 3 − x 3 , e 4 = z 4 − x 4 , it could obtain: where e = [e 1 , e 2 , e 3 , e 4 ] T . Suppose thatẍ 3 is bounded, according to input-to-state stability (ISS) theorem [38], as long as the observer gain λ 1,2,3,4 is properly selected, A will be Hurwitz, so that the states e 1,2,3,4 are bounded. Remark 2: It could be concluded from the above derivation that the estimated errors of the observer are all bounded. Then, the estimated error of lumped disturbance f is also satisfies max|e 3 | ≤ē 3 . Moreover, there exists a time T F such that ∀t ≥ T F , e 3 converges to a small region, i.e., there exists a constant l e > 0, such that |e 3 | ≤ l e . On the other hand, the choice of observer parameters is also a problem that cannot be ignored. Firstly, the value of the observer gain λ 1,2,3,4 needs to satisfy the input-to-state stable (ISS) theorem, and then a larger value should be selected as far as possible. Therefore, the characteristic root of the observer system will be located in the left half plane and away from the imaginary axis, which will improve the convergence rate effectively. Furthermore, the estimated lumped disturbance is compensated to the system before the action of the controller to enhance the robustness of the system. However, high frequency noise is often introduced when the observer gain is too large. Therefore, it is important to select a compromise observer gain according to the actual situation.
Then, based on the accurate estimation of the lumped disturbance, a fixed-time control law is designed where the parameters is the same as Eq.(11). Theorem 2: Consider the system (5) with the control law designed as (23), wherein the switching gain η ≥ l e . Then the state (δ 1 , δ 2 ) will converge to the origin within a fixed-time and the settling time is bounded by T < T max = T F + T (24) where T is designed in Eq. (13).
Proof: Consider the Lyapunov function candidate as Taking the time derivative of V 2 yieldṡ Then the proof will be divided into two steps.
Step 1: when 0 < t < T F , i.e., before the convergence of observer, theṅ It can be deduced from the above equation thatV 2 is negative outside the region s = max q 1 , which drives s to converge to region s . In other words, the sliding dynamics s will not escape to infinity during the interval t ∈ (0, T F ).
Step 2: when t ≥ T F , at this point, the estimated error of the disturbance have converged to |e 3 | ≤ l e , theṅ By a proof similar to Theorem 1, it can be obtained that after the disturbance estimation error e 3 converges to l e after time T F , the system state will reach the origin in a fixed time T . Therefore, the settling time T is bounded by Eq. (24). This completes the proof of Theorem 3.3. Remark 3: By estimating the lumped interference of the system and compensating it in the controller (23), the antiinterference ability of the system will be improved. Furthermore, the requirement for the value of switching gain η changes to η ≥ l e , which is smaller than that in the controller (11), so that chattering phenomenon will be suppressed. It is worth noting that the anti-interference ability and steadystate performance of the system have improved at the expense of dynamic response rate. To improve the steady performance of the system without sacrificing the dynamic performance, adaptive theory is introduced in next subsection.

C. A Novel Adaptive Fixed-Time Controller Design
For practical systems, it is usually difficult to obtain the upper bound of the estimated error l e . If the switching gain is used to suppress the estimation error, the switching gain is bound to be overestimated. Adaptive sliding mode control algorithms allow adjusting dynamically the switching gains without the knowledge of the boundary of the disturbance estimate error, so that a large switching gain is adjusted to make the system state reach the sliding mode surface as soon as possible when the system state is far from the sliding mode surface, and a small switching gain is adjusted to reduce chattering when the system state is close to the sliding mode surface. In this way, the steady-state performance, dynamic response performance, and anti-disturbance ability of the system are all been improved. An adaptive law is designed asη where η(0),η are positive and ι, η m are small positive numbers. ι represents the boundary between the system state close to and away from the sliding mode surface, η m represents the minimum value of switching gain, andη represents the change rate of switching gain. Fig. 3 qualitatively shows the relationship between the switching gain and the distance from the system state to the sliding mode surface. In the time domain [0, t 1 ], |s| > ι, η > η m ,η =η|s|, the increasing of switching gain makes the system state reach the equilibrium point quickly; in the time domain [t 1 , t 2 ], |s| < ι, η > η m , η = −η|s|, the switching gain is reduced to suppress chattering near the equilibrium point; in the time domain [t 2 , t 3 ], |s| < ι, η ≤ η m ,η = η m , the switching gain is kept to a minimum value η m ; in the time domain [t 3 , t 4 ], |s| > ι, η > η m , the switching gain began to increase again. Lemma 4 ( [27]): Given the nonlinear uncertain system (5) with the sliding dynamics (10) controlled by (23), (29), then the gain η(t) has an upper-bound, i.e. there exists a positive constant η * so that η(t) ≤ η * , ∀t > 0.
Theorem 3: Consider the system(5) with the control law (23) and the adaptive law (29), wherein the gain satisfies η * ≥ l e . Then the state (δ 1 , δ 2 ) will converge to the origin within a fixed-time and the settling time is bounded by Eq. (24).
Proof: Consider the Lyapunov function candidate as Taking the time derivative of V 3 yieldṡ Then the proof will be divided into two steps.
Step 1: when 0 < t < T F , theṅ It can be deduced from the above equation thatV 3 is negative outside the region , which drives s to converge to region s . In other words, the sliding dynamics s will not escape to infinity during the interval t ∈ (0, T F ).
Step 2: when t ≥ T F , at this point, the estimated error of the disturbance have converged to |e 3 | ≤ l e , theṅ Consider the Lemma 2 and Lemma 3,V 3 could be further simplified aṡ Case 1: Suppose that |s| > ι, thenη =η|s|, by choosing the appropriate parameter γ , φ can be negative. γ is not a control parameter, which is selected as follows: it obtain in conclusion, γ is selected as is established. By a proof similar to Theorem 1, it can be obtained that after the disturbance estimation error e 3 converges to l e after time T F , the system state will reach the origin in a fixed time T . Therefore, the settling time T is bounded by Eq. (24).
Case 2: Suppose that |s| ≤ ι, thenη = −η|s|, φ can be positive. It means thatV 3 becomes sign indefinite, and it is impossible to conclude on the closed-loop system stability. Therefore, |s| may increase over ι. As soon as |s| be greater than ι,V 3 and s has fixed-time reaching time dynamics with a bounded deviation of s from the domain |s| ≤ ι. This completes the proof of Theorem 3.

IV. NUMERICAL SIMULATION
In this section, numerical simulations have been performed using Matlab/Simlink. The parameters of the magnetic levitation system are shown in Table I.
The purpose of simulation is to compare the performance of FTC, FTC-GPIO, AFTC-GPIO and verify the superiority of the method AFTC-GPIO proposed in this paper. In order to simulate the unknown uncertainty in the system, parameters a 0 = 97, b 0 = −0.36 are set. Moreover, performance index integral of time-multiplied absolute-value of error (ITAE) [39] and root mean square error (RMSE) [40] are introduced to describe the performance quantitatively. To compare the performance of different methods, sinusoidal wave, square wave tracking and sinusoidal wave, sawtooth wave interference are taken into account. The parameters of three methods are shown in Table II.  TABLE II   PARAMETERS

A. Signal Tracking Performance
In order to compare the tracking capability of different control algorithms, sine wave and square wave tracking are tested in this section. Figs. 4-5 show the response of system output response, control quantity and the adaptive switching gain of three methods. The comparisons of performance index are shown in Table III. It can be seen from Figs. 4-5, the three methods proposed in this paper can track the expected position quickly and accurately even in the presence of system uncertainty. Furthermore, the comparison from the enlarged figure shows that AFTC-GPIO has the best tracking performance, followed by FTC-GPIO, FTC is the worst. At the same time, the control quantity of FTC also has the largest ripple. It can also be seen that the switching gain of AFTC-GPIO will be adjusted continuously with the change of system state. When the system state is far away from the sliding mode surface, the switching gain is larger, which improves the dynamic response performance of the system. And when approaching the sliding surface, the switching gain is small and the chattering phenomenon is weakened. The quantitative performance index intuitively reflects the superiority of the proposed AFTC-GPIO method.

B. Disturbance Suppression Performance
In order to compare the anti-interference ability of the three methods proposed in this paper, the performance of the system with sinusoidal wave and sawtooth wave interference is tested in this section. Figs. 6-7 show the system output response, control quantity and the adaptive switching gain of three methods. The comparisons of performance index are shown in Table IV.
It can be seen from Figs. 6-7 that all three methods have good anti-disturbance performance. Furthermore, the comparison from the enlarged figure shows that AFTC-GPIO has  the best anti-disturbance performance, followed by FTC-GPIO and FTC is the worst. And the control quantity of FTC also has the largest ripple. The switching gain of AFTC-GPIO will be adjusted continuously with the change of system state, so that the system has good anti-interference performance, dynamic and steady-state performance. The performance index data in the Table IV also validate this.

V. EXPERIMENTAL RESULTS
In this section, experiments are performed. Fig. 8 show the physical structure of the maglev system test platform. The experimental bench includes the hardware controller with simulink of modular programming based on One Raspberry Pi development board and a STM32 minimum system board. PWM control signal is generated for a H-bridge power converter which could drive excitation coil. laser position sensor is used for measuring position. The Euler discretization method is employed for digital implementation of proposed control scheme. Similar to the simulation, the tracking performance and anti-disturbance ability of three control algorithms FTC, FTC-GPIO and AFTC-GPIO are compared in the experiment and the parameters are shown in Table V.

A. Signal Tracking Performance
The reference outputs of the system are set as sine wave and square wave respectively in this section, and the proposed  methods FTC, FTC-GPIO and AFTC-GPIO are compared experimentally. Fig. 9 and Fig. 10 show the output response, control quantity and adaptive switching gain curve of the system when tracking sine wave and square wave respectively. It can be seen from the figure that method FTC has the largest fluctuation of control quantity and output response, followed by method FTC-GPIO. Method AFTC-GPIO has the best tracking performance relatively, and can adjust the switching gain adaptively to achieve better dynamic and steady performance. Notice that Fig. 10 shows the change of the designed adaptive switching gain clearly. When the set  tracking position changes suddenly, the distance between the system state and the sliding mode surface is far, and the gain value increases to improve the convergence rate. When the system state is close to the sliding mode surface, the gain value decreases to reduce chattering. Table VI shows the ITAE and RMSE performance of the three methods, and calculates the performance improvement of AFTC-GPIO algorithm compared with FTC-GPIO algorithm.  The superiority of the proposed AFTC-GPIO method can be directly proved by numbers.

B. Disturbance Suppression Performance
The external interference of the system is set as sinusoidal wave and sawtooth wave respectively in this section, and the proposed methods FTC, FTC-GPIO and AFTC-GPIO are compared experimentally. Fig. 11 and Fig. 12 separately show the output response, control and adaptive switching gain curves of the system when the sinusoidal and sawtooth waves are applied. It can be seen from the figure that method FTC has the largest fluctuation of control quantity and output response due to the need of large switching gain to suppress interference, followed by method FTC-GPIO. Method AFTC-GPIO has the best tracking performance relatively, and can adjust the switching gain adaptively to achieve better dynamic and steady performance. The performance indexes shown in Table VII directly reflect the superiority of method AFTC-GPIO. In order Fig. 13.
Curve under sawtooth wave disturbance with ESO and GPIO (experiment).
to verify the superiority of GPIO, a comparative experiment between extended state observer (ESO) and GPIO has been performed. The disturbance in the experiment is timevarying sawtooth wave, and the results are shown in Fig. 13. Experiments show that the controller based on GPIO has better resistance to time-varying disturbance. At the end, it is also easy to find that the control input ripple is large due to the current dynamic is ignored during the control design, in future, the current dynamic could be considered for improving the system performance.

VI. CONCLUSION
In this paper, the position precision control problem of magnetic levitation system is studied, and a novel adaptive fixed-time controller based on generalized proportional integral observer is proposed in consideration of time-varying interference. Fixed time control scheme enables the system states converge to the equilibrium point in a fixed time. Adaptive switching gain enables the system to converge faster when it is far from the equilibrium point, and attenuates chattering when it is close to the equilibrium point, showing good anti-interference performance, dynamic and steady state performance. Simulation and experiment results confirm the superiority of method AFTC-GPIO. In the future, we would like to further study continuous sliding mode control and extend this method to other similar nonlinear systems.