Comparison of Nonlinear and Linear Controllers for Magnetic Levitation System

: Nonlinear system control belongs to advanced control problems important for real plants control design. Various techniques have been developed in this ﬁeld. In this paper we compare two different approaches to a nonlinear unstable Magnetic levitation system control. The ﬁrst control design approach further develops our recent results on robust discrete-time pole-placement, based on convex D R -regions. The second studied approach is based on feedback linearization and the simpliﬁed development of the corresponding nonlinear control law is provided. Both approaches are compared and evaluated. The efﬁciency of robust discrete-time pole-placement controller is shown as well as its competitiveness in comparison with nonlinear control for Magnetic levitation system. paper can be summarized as: simpliﬁed development of nonlinear control law with novel approximation of nonlinear terms; developed robust pole-placement controller for different levitating balls and mainly a comparison and evaluation of the obtained results for both cases. The efﬁciency of the recently developed robust pole-placement linear controller was shown as well as the advantages and disadvantages of both approaches applied to Magnetic levitation.


Introduction
In practice, a control is designed mostly for nonlinear systems, various nonlinear control approaches have been developed during past decades (sample of excellent books on nonlinear control is [1,2]). Nevertheless, some kind of linearization is frequently used to simplify analysis and control design of inherently nonlinear systems. Techniques based on feedback linearization can be used under certain, not too strict assumptions on nonlinear system, see e.g., [3,4]. The resulting control design scheme then provides a nonlinear control law which can be designed based on a transformed linearized closed-loop control system. Other possibility to control a nonlinear system is to use a linearized uncertain model or its parameter varying (LPV) alternative and design a corresponding robust, adaptive or gain scheduling control. A nice survey of robust control techniques is in [5], gain scheduling approach can be found in [6].
Among various robust control techniques, Linear Matrix Inequality (LMI) approach attracted notable interest owing to its computational tractability [7][8][9][10]. Specifically, when a polytopic uncertain linear model is used, different robust control algorithms can be formulated in LMI framework, as H in f , H 2 , LQG (Linear-Quadratic-Gaussian) based controllers and other robust controllers designed using quadratic or parameter dependent Lyapunov function [8,10,11]. Successful control design has to meet basic requirements on closed-loop stability and performance. For uncertain system, stability and prescribed performance is required for the whole uncertainty domain. One of the frequently used approaches to guarantee the prescribed closed-loop system dynamics is pole-placement technique [7,[12][13][14][15] and others. In pole-placement, it can be advantageous to prescribe only a region, where the closed-loop poles should be placed instead of their exact position. Such approach is especially useful for robust control of uncertain systems. An appropriate region can be determined by the prescribed settling time, overshoot, stability degree, relative damping or other performance indices closely connected with closed-loop pole position [12][13][14]. In this field, so called D R region concept have been introduced and used for robust The ML nonlinear model below can be derived using Lagrange function. More details can be found in [26]. We omit argument t to improve readability. For the readers convenience we recall the basic steps of the development. Lagrange function (the difference between kinetic and potential energy) T is used in the form where x is a distance of the sphere from electromagnet (position), q is electric charge, m is a mass of the sphere, R is a resistance of the electromagnet coil, L(x) is dependence of inductance of the coil on x, I = dq/dt is a current in the coil, g is acceleration of gravity, u is voltage on the coil. From Lagrange equations, the following equations are obtained For inductance L, the next approximation is used The term dI dt is approximated by experimentally received expression k 1 , c 1 can be directly measured, f 1 (x 1 ) is approximated analogically to (3). Substituting (3) and (4) into (2), splitting the first equation from (2) into two first order equations and introducing denotation where state variables are: x 1 = x-position of the ball, x 2 -velocity of the ball, x 3 = I-current in the upper electromagnet coil, control input u is the voltage on the upper coil, output is the position of the ball x 1 measured as a distance from the upper coil. Values for F emP1 , F emP2 , f 1P1 , f 1P2 , k 1 , c 1 are inherent plant parameters, their values are specific for the concrete coil; see Table 1 for the considered ML.
All parameters are summarized in Table 1. The mass of the ball is 0.016 kg for the small ball, 0.023 kg for the medium ball and 0.039 kg for the big ball.

Control Design
A nonlinear system control design frequently uses linearization techniques, which provide powerful tools to simplify analysis and design. The main idea behind linearization approaches is to apply appropriate transformation to the nonlinear system so that the simplified-linearized model is obtained, for which some of many existing control design methods can be used.
In this section, two different approaches to a nonlinear system control design are presented. The first one is based on the classic linearization approach using Taylor series (Jacobian) around the appointed working point. To guarantee stability around the working point, the resulting linearized model is then represented as a polytopic uncertain system. For such system model, we recall a robust pole region approach introduced in [9] and briefly summarize our recent results for a discrete-time domain [18,19]. Robust pole-placement control is designed directly in a discrete-time domain since control implementation uses digital controller. In the second part of this section a nonlinear continuous time control law motivated by [22] and based on feedback linearization is developed for magnetic levitation. Presented result further develops nonlinear control law from [22] and uses approximation of lumped exponential terms by a rational function to simplify the resulting control law. The main motivation is to compare these two approaches and assess the qualities of recently developed, relatively simple robust pole-placement control [19].

Robust Pole Placement-Pole Region Approach
Robust control will be designed for a linearized model, considering three balls of different sizes and their corresponding masss.
The first step is to linearize the nonlinear model (5) around the determined working point using standard Jacobian method. In the following we will use the closed-loop response comparison for the position control of the ball at pos = 0.01 m. The resulting continuous-time linear state space model is: where The control will be designed in discrete time domain, therefore, in the next step continuous time model (6) is discretized for appropriate sampling period T s = 0.001 s. Since we consider three different balls, the uncertain parameter corresponds to their mass m. The resulting discrete-time linearized model is then represented by a polytopic system (7) and (8), where the polytope vertices are obtained for different ball masses.

Robust Control Problem Formulation
Robust pole-placement controller is designed for a polytopic uncertain linear discretetime dynamic system. x where x(k) ∈ R n is the state vector, u(k) ∈ R m is the control input, ξ ∈ R N denotes the vector of uncertainty parameters corresponding to uncertainties belonging to the convex polytope described as follows The control design goal is to find such feedback gain matrix K that the corresponding closed-loop system (10) is stable and conform to the prescribed performance limits, in our case it has all poles in the prescribed region in the convex plane.

D R Regions and D R Stability
Robust pole-placement belongs to efficient tools for uncertain system control design. So called D R region approach, introduced in [9] provides computationally tractable LMI condition which can be used for a robust controller design for uncertain polytopic systems. We start with definition of basic notions. A definition of D R region in the complex plain as set of points conforming to the specified matrix inequality is taken from [9].
To get convex formulation transformable to LMI, we assume that R 22 is positive definite (semidefinite). A generalized-D R stability notion can be defined for a specific D R domain determined for system poles. Matrix A CL (.) is said to be D R stable if and only if all its eigenvalues lie in the D R region defined by (11). Standard Lyapunov stability condition can be then generalized for the D R stability in the form of matrix inequality as summarized in the following lemma.

Lemma 1 ([9]
). Closed-loop matrix A CL (ξ) ∈ R n×n is D R stable if and only if there exists a positive definite matrix P(ξ) ∈ R n×n such that It is important to note that the D R stability condition (12) can be for state feedback control directly converted to LMI which significantly reduces computational effort.
Standard domains for stable poles and matrices R ij defining the corresponding D R regions (11) can be listed as: interior of the unit circle, shifted left-half plane of the complex plane corresponding to stability degree λ, interior of the circle centered in [0, 0] with radius r = 1/sqrt(α) corresponding to stability degree sqrt(α), interior of the convex cone with vertex angle 2ϕ, corresponding to the relative damping (given by a ratio of the imaginary and real part of the complex pole in continuous-time systems) The domains (I) and (II) correspond to basic stability, domains (III) and (IV) to stability degree, which influences the speed of system response and also robustness, domain (V) determines the relative damping, belonging to important performance indices since it is related to oscillations of the system response. Recall that the stability degree defines the distance to the standard stability border, for continuous-time systems it given by the biggest real part of system poles-see (III); for discrete time system it is given by the inverse of radius of the circle where all system poles lie-see (IV).

Robust Pole-Placement Controller Design
Below, we recall the LMI formulation of D R stability condition for closed-loop uncertain system (12) which can be directly used to compute feedback gain matrix K for robust pole placement controller, more details can be found in [27].

Lemma 2 ([9]
). Consider the uncertain polytopic system with state feedback control (12). If there exist positive definite matrices P i ∈ R nxn and any matrices H ∈ R nxn , S ∈ R mxn such that the following inequality holds where and the state feedback controller matrix is computed as then the closed-loop system (10) is D R stable for stability region (11).
Frequently, the integration term, or PI controller is required to eliminate the steadystate error of the controlled output variable. Then, the robust pole-placement controller design presented in Lemma 2 can be applied for the augmented state model which includes also the integration dynamics of PI controller. The augmented discrete-time system can be then described as where matrix C corresponds to those outputs which are considered in the integration controller part. The state feedback gain matrix K is then in the following form matrices K p and K I correspond to proportional and integral gains of the PI controller. More details can be found in [27]. For the magnetic levitation system, the ball position is required to track the reference value, therefore in this case, the system output represented by the state x 1 enters the integration term and C = [1 0 0].
In robust-pole placement, it is very important to appropriately prescribe the required closed-loop pole region. For ML we aim at achieving the determined stability degree and relative damping. The relative damping belongs to basic closed-loop (CL) performance requirements, however, in this case, the corresponding discrete-time region is no more convex, given by a logharitmic spiral and has a "cardioid" shape. This nonconvex region can be advantageously approximated using convex inner approximations which then enables controller design via LMI solution. Here, the inner ellipse and angle-ellipse approximations, which we developed recently [18,19] will be considered. The detailed description of considered pole regions is as follows.

(A) Standard Stabilizing Controller (Unit Circle)
In the first controller design, based on LMI approach, we will use a standard stabilizing controller from [28]: the state feedback controller matrix is then computed by (15).

(B) Discrete-time Robust Pole-placement Controller Design Using Ellipse Approximation (Ellipse)
In this design of a discrete robust controller, we will use the D R region for the ellipse, corresponding to the prescribed relative damping. Note, that the inner elliptic approximation of the originally nonconvex domain is less conservative as the circle one. The interior of the ellipse centered in [x s , 0] with semi-axes 1/c and 1/d for damping ϕ prescribed in continuous-time domain [29] is described by (11) with where c = 1 Using (19) and (13)-(15) we can design controllers for prescribed angles of damping.

(C) Discrete-time Robust Pole-placement Controller Design Using Angle-Ellipse Approximation (AE)
We have recently developed new convex inner approximation of the nonconvex cardioid domain [18]. This approximation is referred to as angle-ellipse (AE) and is defined as an intersection of the cone end ellipse. The cone is defined by its vertex [1,0] and the intersection point with cardioid [xe, ye]; the ellipse is centered in the middle of the cardioid x-axis, with the y-semi-axis derived so that the ellipse intersects the cardioid in [xe, ye]. The common extreme point of the cardioid and ellipse, in the left half plane is denoted as x0. The corresponding D R region (11) matrices for AE inner approximation are where Z is 2 × 2 zero matrix; matrices R11e, R12e, R22e correspond to the ellipse centred in xse with semiaxes ak, bk given as xse = (1 + x0)/2, ak = (1 − x0)/2, bk = ye · ak/sqrt(ax 2 − (xe − xse) 2 ) matrices R11v, R12v, R22v correspond to the cone (shifted angle) given as Using (20) and (13)- (15) we can design controllers for prescribed angles of damping.

Nonlinear Control of Magnetic Levitation Using Feedback Linearization
The nonlinear control based on feedback linearization and result from [22] is developed in this section. A nonlinear control law compensating the nonlinear terms is combined with the corresponding state space transform to convert the nonlinear closed-loop control to the pole-placement control for a transformed linearized model. The resulting control law aims at shaping the closed-loop system dynamics according to the poles prescribed for the linear system. All the developments are performed for an original continuous nonlinear state space ML model (5). To eliminate the steady-state control error when positioning the levitating ball, additional state is considered corresponding to the controller integration term. To simplify computations and implementation of a resulting nonlinear control law, the nonlinear terms including exponential functions are approximated by rationale functions (such approximations are frequently used in magnetic levitation models). The considered nonlinear model is then where approximating functions for exponential terms are Parameters a = 11234.45; b = 39.608; c = 0.33387; d = 830; e = 5.66 were found by fitting the original nonlinear functions from (5) using least squares method. Approximations f (x 1 ) and f ap (x 1 ) are depicted in Figures 2 and 3 respectively.  It can be shown that nonlinear system (5) or (23) meets standard assumptions on the existence and uniqueness of its solution. The feedback linearization is based on appropriate nonlinear transformation of the system equations so that the linear system is received. To achieve this end, we consider the state variable transformation and target linear system as in [22]. The aim is to find the corresponding control law u such that the linear system (25) is for state variables (24) equivalent to nonlinear system (23) with the appropriately determined control u. Note that z 3 in (24) corresponds to the right hand side of dx 2 dt in (23). Thus, u conforming to the dx 3 dt in (23) should be determined so that dz 3 dt in (25) is fulfilled. To meet this end, firstly (23) is used to receive From (24), the derivative of z 3 is The control law (26) should make the right hand side of (27) equal to linear term −(K 1 z 1 + K 2 z 2 + K 3 z 3 + K 4 z 4 ) from (25). From the latter we obtain Substituting the right hand side of (28) for dx 3 /dt into (26) and making use of (24) we finally receive the nonlinear control law The derived nonlinear control law (29) will be applied to magnetic levitation system and compared with robust pole-placement controller.

State Feedback Controller for Nonlinear Magnetic Levitation System
This section presents main results-controllers designed for Magnetic levitation using methods described in Section 3, and corresponding nonlinear ML responses. Several different discrete-time robust pole-placement controllers are designed in Section 4.1. In Section 4.2, nonlinear continuous time controllers are designed for different choice of closed-loop poles. Finally, the comparison of best controllers from both approaches is presented in Section 4.3 together with simulation experiments to show the limits of the designed controllers.

Discrete-Time Robust Pole-Placement State Feedback Controller Design Based on LMI Solution for Magnetic Levitation
In this section we further develop our recent results on discrete-time robust poleplacement controller design using LMI approach, in this case applied to working points for different ball mass. We evaluate the design parameters of the proposed approach and compare the results for several variants of robust controller.
A linearized ML plant model (6) is evaluated in the determined working points-for different ball masses: Element a 2ci varies with the mass of the ball. The following 3 working points, denoted as WP1, WP2, WP3, and parameters of the corresponding continuous-time linearized models are in the Table 2. The continuous linearized model (30) was discretized for all three considered working points with sampling period T s = 0.001 s. The resulting discretized polytopic model is described by (7), where matrices A(ξ), B(ξ) have the following form Elements a 21di , a 23di , b 2di vary with the mass of the ball. In the next Subsection, the discrete-time polytopic model (7), (8) with vertices corresponding to working points WP1, WP2, WP3 in Table 3, is considered for robust pole-placement controller. We designed stabilizing controller via solution of LMI (18) for the augmented discretetime system (16), where A i and B i are polytope vertices given by (31). This controller places the poles of the closed-loop system inside the unit circle. The resulting controller parameters are shown in Table 4. In this part, we design other robust pole-placement controller by a solution of LMIs (13) and (14) for the augmented discrete-time system (16), where A i and B i are polytope vertices given by (31). In this case, we used matrices R ii and R ij from (19). The results for different prescribed damping angle are shown in Table 5. Note, that smaller angle corresponds to higher damping, therefore more strict control requirement. For ML system, even small angle differences brings significant changes of control matrices gains.

Robust Pole-Placement Controller Design for Magnetic Levitation Using Angle-Ellipse Approximation (AE)
Finally, we design robust pole-placement controller for more advanced AE region by solving LMIs (13) and (14) for the augmented discrete-time system (16), where A i and B i are polytope vertices given by (31), now we use matrices R ii and R ij from (20). The results for different design parameters x e and r and prescribed damping angle are shown in Table 6. Note, that controller gains in Table 6 are significantly smaller than the ones in Table 5 though the damping angles are smaller (more strict) in the former case. This illustrates that AE provides less conservative inner approximation than Ellipse which can be noted also in simulation responses.
Robust control laws (9) for standard stabilizing controller (Unit Circle), Table 4, robust pole-placement controllers obtained for Ellipse, Table 5, and Angle-Ellipse, Table 6, regions have been implemented in the simulation nonlinear model of magnetic levitation. Simulation results for step changes around the required position pos = 0.01 m for small, medium and big ball cases are shown in Figures 4-9. Ball position is depicted in mm for better readability. Simulation results indicate the superiority of AE controllers over UC and Ellipse ones, which is especially visible on responses for a big ball, Figures 8 and 9. The closed-loop pole regions and poles corresponding to the designed controllers are shown in Figure 10. It should be noted that AE region poles fulfilles the prescribed damping contrary to UC, while they are less strict than Ellipse ones. The closed-loop pole position influences not only the output response but also control variable u. Comparing Ellipse and AE results, control variable response for AE is significantly less agressive, the Ellipse control action has big overshoot for step change to lower value. This indicates vast control effort in practice.

Continuous-Time Nonlinear State Feedback Controller Design for Magnetic Levitation
In this section, we design the parameters of nonlinear control law (29), developed in Section 3.2, for three variants of closed-loop poles prescribed for a linearized system (25). It should be noted that in this case, a continuous-time system description and the corresponding closed-loop poles are considered. While in previous section, it was sufficient to define only a region for closed-loop poles, here the exact pole position is required, which complicates the design and simulation experiments were used to find the appropriate pole position to receive good quality control law. Three favourite prescribed closed-loop pole sets and the corresponding control law parameters are summarized in Table 7. The resulting nonlinear control law (29) have been implemented in the magnetic levitation simulation model. Simulation results for step changes around the ball position pos = 0.01 m for small and big ball cases are shown in Figures 11-14. It should be noted, that step responses for ball position are with nonlinear control very similar for all three balls, therefore the responses for medium ball are omitted. Control variable differs in amplitude due to different ball masses, the shape of transient responses is again very close to each other for all three balls.

Comparison of Robust Pole-Placement and Nonlinear Controller for Magnetic Levitation
This section compares simulation results for robust pole-placement controller and a nonlinear controller, considering best designs in both cases. To test qualities of the compared controllers, in simulation experiment the required position is changed between 0.01 and 0.015 m, the latter provides upper limit for ball position feasible in simulation for all considered controllers. It can be assumed that the real system limit is even lower. The    Presented comparison shows that the discrete-time pole-placement controller designed for AE region can compete with the continuous-time controller even for relatively big step change of ball position near the limit of feasible setpoints. In Figure 21 the closed-loop poles for both robust linear discrete-time and nonlinear continuous-time controllers are shown. The continuous-time poles are recalculated with sampling period T s = 0.001 s for all three designed controllers. Robust discrete-time poles correspond to three WPs, therefore we can see 3 times more poles than the system dimension. In the discrete-time case, some of poles are complex conjugated. On the other hand, the dominant poles depicted in detail are close to each other both for robust linear and nonlinear cases. This also confirms the competitiveness of the robust discrete-time pole-placement controller designed for AE region.
Finally, we can summarize the advantages and disadvantages of studied control approaches for nonlinear ML system. Robust discrete-time pole-placement controller Advantages: • pole region instead of exact pole position is prescribed, which can be less demanding both on determining it and on corresponding control effort; • control design is realized as off line solution of LMIs which is computationally efficient; • the resulting control law is simple -implemented as state feedback gains; • robust pole-placement is flexible and various uncertainties as different ball position or ball mass can be easily incorporated into the uncertain model and corresponding controller design. Disadvantages: • The main disadvantage of robust pole-placement controller is, that it is designed as a controller with constant gains for the whole uncertainty domain, which limits its use; this can be illustrated in responses in Figures 15, 17 and 19, where the response is nearly the same for nonlinear controller, while for a robust linear one there are significant differences; for the big ball the robust linear controller provides an oscillating response.

Nonlinear continuous-time controller
Advantages: • The nonlinear control law follows the changing system parameters, for example, ball mass appears explicitly in control law (29). Therefore, the responses are very close to each other for different ball masses. This feature can be advantageous also for other parameter changes. Disadvantages: • in feedback linearization design, the exact closed-loop poles are to be prescribed, which are not easy to determine appropriately, since the closed-loop system proves as rather sensitive to pole-position, for example there is a problem when the complex poles are prescribed; • control law is rather complicated and its implementation is more demanding, since several nonlinear feedback dependent formulas must be computed on-line; • for simplification of the control law, the appropriate approximations of nonlinear terms should be used which must be found by optimization.

Conclusions
The main aim of this paper is in comparison of two principally different approaches to a nonlinear unstable Magnetic levitation system control. The nonlinear continuous-time control based on feedback linearization is compared with a robust pole-placement discretetime controller for a linearized uncertain polytopic model. The main contribution of the paper can be summarized as: simplified development of nonlinear control law with novel approximation of nonlinear terms; developed robust pole-placement controller for different levitating balls and mainly a comparison and evaluation of the obtained results for both cases. The efficiency of the recently developed robust pole-placement linear controller was shown as well as the advantages and disadvantages of both approaches applied to Magnetic levitation.