# Passivity-Based Control Design for Magnetic Levitation System
## 4 Passivity-Based Control for Magnetic Levitation System
In this way, the final solution is written as  
\[H_{a}(\mathbf{x})=-\frac{x_{1}^{2}x_{2}}{k}+mgx_{2}-\frac{g}{\alpha}x_{1}+\frac{x_ {1}^{3}}{3\alpha mk}+\Phi\left(-\frac{1}{\alpha}x_{1}+mx_{2}+m^{2}R_{\alpha}x_ {3}\right) \tag{36}\]where the function \(\Phi\) in Equation (36) should have the synthesized function \(H_{d}(\mathbf{x})\), a minimum at the equilibrium point \((x_{10},\ x_{20},\ 0)\), so that \(H_{d}(\mathbf{x})\) becomes the Lyapunov function, so let \(\Phi\) be a square form  
\[ \begin{array}{l}\Phi\Big{(}-\frac{1}{a}x_{1}+mx_{2}+m^{2}R_{a}x_{3}\Big{)}\\ =q\Big{(}-\frac{1}{a}(x_{1}-x_{10})+m(x_{2}-x_{20})+m^{2}R_{a}x_{3}\Big{)}^{2} \\ =q\Big{(}-\frac{1}{a}\overline{x}_{1}+m\overline{x}_{2}+m^{2}R_{a}x_{3}\Big{)} ^{2}\end{array}  \tag{37}\]  
where \(q\) is a constant, the tilde indicates increment, \(\widetilde{x}_{1}=x_{1}-x_{10}\), \(\widetilde{x}_{2}=x_{2}-x_{20}\). After adding feedback, the new energy function of the closed-loop system is  
\[H_{d}(\mathbf{x})=H(\mathbf{x})+H_{a}(\mathbf{x})=\frac{1}{2}mx_{3}^{2}+\frac{x_{1}^{3}}{ 3\alpha mk}-\frac{g}{\alpha}x_{1}+q\Big{(}-\frac{1}{\alpha}\overline{x}_{1}+ m\overline{x}_{2}+m^{2}R_{a}x_{3}\Big{)}^{2} \tag{38}\]  
Substituting the function \(\Phi\) of Equation (37) into Equation (36) of \(H_{a}(\mathbf{x})\), and then in accordance with Equation (33), the control action can be obtained  
\[ \begin{array}{l}u\quad=\beta(\mathbf{x})\\ =-R_{0}\frac{\partial H_{a}}{\partial x_{1}}+\alpha\frac{\partial H_{a}}{ \partial x_{3}}+\alpha mx_{3}\\ =R_{0}\Big{(}\frac{2x_{12}}{k}\Big{)}+\frac{R_{0}}{\alpha}\Big{(}g-\frac{x_{1 }^{2}}{mk}\Big{)}-c_{1}\overline{x}_{1}+\alpha mc_{1}\overline{x}_{2}+\alpha m (1+mR_{a}c_{1})x_{3}\end{array}  \tag{39}\]  
where  
\[c_{1}=q\Big{(}\frac{2R_{0}}{\alpha^{2}}+2m^{2}R_{a}\Big{)} \tag{40}\]  
This control action \(u\) can be explained as follows. The first term of Equation (39) is equal to \(R_{0}i\), which is used to compensate for the voltage drop across resistor \(R_{0}\), the second term is the acceleration \(\ddot{z}\) [see Equation (26)]. Therefore, it can be seen from Equation (39) that the control action after compensating for the voltage drop is equivalent to the conventional deviation control with respect to the equilibrium point \((x_{10},\ x_{20},\ 0)\). Specifically, first, negative feedback \(-c_{1}\overline{x}_{1}\) is first applied to the flux linkage that forms the electromagnetic force to stabilize, and the rest are displacement \((\overline{x}_{2})\), velocity \((x_{3})\), and acceleration \((\ddot{z})\). It can be seen that the design results for this passivity can be explained. The difference is that this passivity-based design provides a new, clear physical concept (referred to as energy concept) design idea for the control of nonlinear systems, as further explained below. In this example, the first term of the control action Equation (39) compensates for the nonlinear term in the flux linkage loop, so the nonlinear term in the equation \(\sum_{3}\) of the system leaves only the square of the electromagnetic force generated by the flux linkage \(\lambda\)  
\[\ddot{z}=-\frac{\lambda^{2}}{km}+g \tag{41}\]  
Equation (41) can be linearized, so the parameter relationship in the control action is first analyzed from the linearization system. Finally, the configuration of the inline structure \(I_{d}\) and the dissipative matrix \(R_{d}\) in IDA-PBC is discussed based on this relationship. Linearizing \(f=\lambda^{2}/k\) in Equation (41), take one degree term  
\[\frac{\partial f}{\partial\lambda}\Big{|}_{0}\Delta\lambda=\frac{2\lambda_{0} }{k}\Delta\lambda=763.45\Delta\lambda \tag{42}\]  
After the voltage drop is compensated, and the control action Equation (39) is added, according to Equation (42), the signal flow diagram under the small deviation linearization of the system as shown in Figure 3.  
For the sake of discussion, the parameters in the system are specifically taken as \(c_{1}=200\), \(\alpha=16\), \(R_{\alpha}=0.0005\).