Cascade Control of Magnetic Levitation with Sliding Modes

The effectiveness and applicability of magnetic levitation systems need precise feedback control designs. A cascade control approach consisting of sliding mode control plus sliding mode control (SMC plus SMC) is designed to solve position control problem and to provide a high control performance and robustness to the magnetic levitation plant. It is shown that the SMC plus SMC cascade controller is able to eliminate the effects of the inductance related uncertainties of the electromagnetic coil of the plant and achieve a robust and precise position control. Experimental and numerical results are provided to validate the effectiveness and feasibility of the method.


Introduction
Magnetic levitation technology with frictionless movement has been used in many industrial systems including in high-speed maglev trains, frictionless bearings, electromagnetic cranes, levitation of wind tunnel models, vibration isolation of sensitive machinery, levitation of molten metal in induction furnaces, rocketguiding projects, levitation of metal slabs during manufacture and high-precision positioning of wafers in photolithography [1][2][3][4][5][6][7][8].The technology under a feedback controller can ensure reliable and high-speed operations, but getting a high control performance is not easy with standard controllers due to open-loop unstable and highly nonlinear dynamics, and parameter uncertainties of the magnetic levitation plants.
In this work, a practical sliding mode based cascade control approach is considered.The cascade control allows us to design a high gain inner loop (current) controller to deal with the effects of plant disturbance and uncertainties.Sliding mode control (SMC) has ability to render robustness in the presence of inductance originated uncertainties.The effectiveness of the method is demonstrated with numerical simulations and experimental tests.The SMC based cascade controller ensures highly satisfactory tracking performance with a small tracking error for the magnetic levitation system in the existence of coil inductance uncertainty.
The organization of the paper is as follows: Section 2 provides information about the magnetic levitation system.Controller design strategy is given in Section 3, application results are given in Section 4, and finally conclusion of the study is provided in Section 5.

Magnetic levitation system
Magnetic levitation system consists of an electromagnet, a steel ball, a ball post and a ball position sensor.It is used to levitate a steel ball in air due to the electromagnetic force created by an electromagnet.The schematic diagram of the magnetic levitation plant used in the experimental studies is shown in Fig. 1.The entire system is encased in a rectangular enclosure which contains three distinct sections.The upper section contains an electromagnet, made of a solenoid coil.The middle section contains suspension, and a photo sensitive sensor embedded in the post measures the ball elevation.The ball is only controlled through vertical x-axis.The attraction force is controlled by the computer controlled electromagnet mounted directly above the levitation ball.The photo detector consists of an NPN silicon photodarlington.The electromagnet consists of a tightly wound solenoid coil made of 2450 turns of 20 AWG magnet wire.Electromagnet coil input supply is ±24V with a maximum 3A coil current.The data acquisition board is a successive approximation type, 12-bit analog and digital conversion board capable of 4 kHz sampling.In this work, the controllers are implemented at a sampling rate of 1 kHz.The entire system is decomposed into two subsystems, namely mechanical and electrical subsystems, as seen Fig. control the ball position in the mechanical system, whereas the coil voltage is varied to control the coil current in an electrical system.In the following subsections, we obtain the nonlinear mathematical model of the system by using Fig. 2.

Modelling the magnetic levitation plant
Using the notation and conventions given in Fig. 2, the mechanical model of the plant can be obtained.Attractive force generated by the electromagnet is given by [21] where K m is the electromagnet force constant (in Nm 2 /A 2 ) and I c is the coil current (in A).By applying Newton's second law of motion to the ball, the force balance equation of the ball is given with the following secondorder model: where ‫ݔ‬ is the air gap (in m), M b is the mass of the ball (in kg), g is the gravitational constant (in m/s 2 ) and F c is the force generated by the electromagnet (in N).At equilibrium point, all the time derivative terms are set to zero.
From Eq. ( 3), the coil current at equilibrium position, I c0 , can be expressed as a function of x b0 and K m .
The nominal coil current I c0 for the electromagnet ball pair can be obtained at the system's static equilibrium.
The static equilibrium at a nominal operating point (x b0 , I c0 ) is characterized by the ball being suspended in air at a stationary point x b0 due to a constant attractive force created by I c0 .By assuming that the coil inductance is constant around the operation point and applying Kirchhoff's voltage law to the electromagnet (RL circuit in Fig. 2.), the electrical model of the magnetic levitation can be written as where I c is the coil current, L c is the coil inductance (in Henry), R c is the coil resistance (in Ω), R s is the current sense resistance (in Ω) and V c is the supply voltage (in V).
In nature, the electrical subsystem is much faster than the mechanical subsystem.All system parameters are given in Table 1.

Linearization of the plant model
In order to analyze the magnetic levitation system, the system can be linearized around equilibrium point (x b0 , I c0 ), the point at which the system will converge as time tends to infinity.For the electrical part, the transfer function of the circuit can be obtained by applying Laplace transform to Eq. ( 5) where is the dc gain, and ߬ = ோ ାோ ೞ is the time constant of the electrical subsystem.
For the mechanical part, Taylor series approximation at equilibrium point (x b0 , I c0 ) for Eq. ( 2) gives Substituting Eq. ( 4) into (7), we get Thus, applying Laplace transform in Eq. ( 8), transfer function of linearized system around the operation point is obtained as where ‫ܭ‬ = ‫ݔ‬ ‫ܫ/‬ and ‫ݓ‬ = ඥ2݃/‫ݔ‬ .In this work, it is assumed that the operating point of the system is x b0 = 6mm and I c0 = 0.86A.The open-loop transfer function of the system is of type zero and second-order.The two open loop poles of the system are located at ‫ݏ‬ = ‫ݓ±‬ , so the open loop system is unstable, and a feedback controller must be designed for stabilization.

Sliding mode control design
Sliding mode control based cascade structure is considered for controlling the magnetic levitation system.The proposed control scheme as shown in Fig. 3.The objective of the control strategy is to regulate and track the ball position in mid-air.The desired performance requirements are taken as (1) percentage overshoot ≤ 5%, (2) maximum settling time ≤ 0.3s, for the position control.

Sliding mode position controller
The sliding mode controller will be designed as the outer controller to control the ball position of the mechanical part.Here, in the outer controller for the magnetic levitation system, ‫ܫ‬ = ‫ܫ‬ is assumed due to the inner SMC controller.Thus, we focus on the mechanical part of the system to control the ball position.First of all, a sliding surface, ‫ݏ‬ ଵ , can be designed for the second-order mechanical system as where ݁ = ‫ݔ‬ − ‫ݔ‬ , ߣ > 0 and ߣ > 0. The integral part is added to the sliding surface for a precise reference tracking.In addition, the second-order system from the linearized system ( 9) is obtained as Thus, the time-derivative of (10), ‫̇ݏ‬ଵ, is obtained as During sliding mode, i.e., ‫ݏ‬ ଵ = ‫̇ݏ‬ଵ = 0 , the equivalent current, ݅ , can be obtained as follows, The equivalent current value can be used in the controller design to reduce chattering on the system output.Therefore, the control input to the mechanical part of the magnetic levitation system can be designed as where The saturation function, sat(.) is used to eliminate chattering on the system output.From the reachability condition, ‫ݏ‬ ଵ ‫ݏ‬ ଵ ̇< 0, one can obtain the gain, ݅ , must be smaller than zero.To achieve design specifications, the gains λ, ߣ and ݅ can be arranged with trial-error method via simulations.

Sliding mode current controller
Since the electrical part is much faster than the mechanical part, the SMC can also be designed as the inner controller to control the coil current for getting fast response and robustness.Since the coil inductance value is dependent on the ball position, but it is taken as constant to simplify analysis and designs, there exists a parameter uncertainty.The effects of inductance related uncertainties can be minimized by designing a high-gain SMC for controlling electrical part of the system current.
To design SMC, first a sliding surface, ‫ݏ‬ ଶ , can be designed for the electrical subsystem as Thus, the time-derivative of ( 16), ‫̇ݏ‬ଶ, is obtained as To achieve a sliding mode, i.e., ‫ݏ‬ ଶ = ‫̇ݏ‬ଶ = 0, the voltage V c as the control input of the magnetic levitation can be designed as [22], The saturation function, sat(.), is used to eliminate chattering.The stability of the SMC (i.e., reachability condition ‫ݏ‬ ଶ ‫ݏ‬ ଶ ̇< 0 ) must be satisfied for selected appropriate gains, ߙ and ߚ.A detailed Lyapunov based stability and robustness analysis can be found in our previous studies (see [22]).Since a boundary layer approach (sat(.)function) is used in the controller design, the trajectory reaches a small ultimate bound set in finite time.This means that the tracking error also stays around the origin, but usually not in the origin.The appropriate gain values can be obtained via simulations.

Experimental results
The experimental hardware-in-the-loop (HIL) test and numerical simulation results of the proposed cascade control scheme for the magnetic levitation are provided in this section.In both numerical and experimental studies, MATLAB/Simulink programs are used.Based on desired performance requirements, the outer SMC parameters are found as λ=2000, ߣ = 60 and ݅ = −50, and the inner SMC parameters are taken as α=150 and β=50.

Numerical simulation results
Numerical simulations are used to get suitable control parameters.It is assumed that the ball position varies between 8 to 10 mm ramp signals with a frequency of 0.25Hz.From the desired performance requirements (see Section 3.1), the controller should accomplish a desired ±1mm square wave position set point.The tracking performances of the cascade SMC controllers are illustrated in Figs.4-8.It is seen in Fig. 4 that the controller provides a desired tracking performance with a little overshoot (around 0.6%) and a little settling time (around 0.26s.).Thus, the ball position perfectly tracks the desired position.Figure 5 shows the response of the SMC current controller in which the coil current perfectly tracks the desired current with around 0.008A error, which makes the ball to follow the reference trajectory.The tracking error, which is the difference between actual trajectory and reference trajectory, is shown in Fig. 6.The tracking error has little short transient response which satisfies the required settling time, and about 0.067mm (0.067% overshoot) in the simulations.Fig. 7 and 8 show that the sliding surfaces, ‫ݏ‬ ଶ and ‫ݏ‬ ଵ , goes to zero in a short time and stays around zero with around 1% error for all subsequent times.

Experimental studies
To compare the numerical and experimental results, the same position reference is applied.The experimental results are shown in Figures 9-15. Figure 9 shows that the controller holds the ball during startup and follows the reference position trajectory thereafter with around 1.5% error.The small oscillations around the reference point are due to the effects of sampling time, measurement error and noise.In addition, the ball sways right and left rather than staying vertically as the photo detector does not exactly measure the ball position because of the circularity of the ball.This can be solved with touching lightly to the ball by hand.Figure 10 shows the response of the coil current.The SMC current controller eliminates the effects of inductance uncertainty and provides a highly satisfactory tracking performance.The position tracking error around 1.5% is shown in Figure 11. Figure 12 shows the sliding surface, ‫ݏ‬ ଶ , (or current tracking error).It is seen that the sliding surface reaches zero in a short time and stays around zero with average 0.1A error thereafter.Figure 13 shows the sliding surface, ‫ݏ‬ ଵ , for the ball position controller.It is seen that the sliding surface reaches zero in a short time and stays around zero with average 0.2% error thereafter.Moreover, it can be said that the ball position trajectory error decreases due to the progressive simulation.We want to show when the real-time simulation reaches steady-state is in 40-50 seconds in Figures 14-15.In Figure 16, it is clear that the position error is limited about 0.1mm during steady-state which satisfies desired requirements.Figure 15 shows the position tracking error around 0.1mm in the steady-state.

Conclusion
SMC based cascade controller is designed for feedback control of the magnetic levitation.Both numerical simulation and experimental test results are given to demonstrate the effectiveness of the controller.A high gain SMC is designed for current control of the magnetic levitation system in order to eliminate coil inductance originated disturbance and uncertainty.Furthermore, a SMC with the integral part attached to sliding surface is designed for the ball position control.The results show that the method provides a highly satisfactory tracking control performance in the presence of coil inductance uncertainty.

2 .
The coil current is adjusted to DOI: 10.1051/ C Owned by the authors, published by EDP Sciences, 201

Figure 1 .
Figure 1.Schematic diagram of a single-axis magnetic levitation system.

Figure 2 .
Figure 2. Dynamical modeling of the magnetic levitation system.

Figure 3 .
Figure 3.A cascade control block diagram of the magnetic levitation system.

Figure 14 .
Figure 14.Experimental ball position trajectory in the steadystate.

Figure 15 .
Figure 15.Experimental position tracking error in the steadystate.

Table 1 .
Plant parameters B Position sensor sensitivity 2.83x10 -3 m/V N c Number of turns in coil wire 2450