# Comparison of Nonlinear and Linear Controllers for Magnetic Levitation System
## 4 State Feedback Controller for Nonlinear Magnetic Levitation System
### 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 considered controllers are  
* nonlinear controller designed for continuous-time closed-loop poles \(P=[-500,-100,-50,-15]\), providing the best performance from tested nonlinear ones;
* robust discrete-time pole-placement controller designed for AE region with design parameters: prescribed damping given by angle 70, \(xe=0.7\), and stability degree \(r=0.99\). Simulation results for all three balls are shown in Figures 15-20. Figure 14: Big ball—control variable \(u\): Simulation results for nonlinear control law, comparison of three variants of control parameters. Figure 15: Small ball—output position \(y=x_{1}\): comparison of simulation results for nonlinear and robust linear pole-placement controllers. Figure 16: Small ball—control variable \(u\): comparison of simulation results for nonlinear and robust linear pole-placement controllers. Figure 17: Medium ball—output position \(y=x_{1}\): comparison of simulation results for nonlinear and robust linear pole-placement controllers. Figure 18: Medium ball—control variable \(u\): comparison of simulation results for nonlinear and robust linear pole-placement controllers. 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. Figure 19: Big ball—output position \(y=x_{1}\): comparison of simulation results for nonlinear and robust linear pole-placement controllers. Figure 20: Big ball—control variable \(u\): comparison of simulation results for nonlinear and robust linear pole-placement controllers. _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;
* 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.