# Passivity-Based Control Design for Magnetic Levitation System
## 2 Passivity-Based Control  
If there is a non-negative storage function \(H\) that satisfies the following equation, the system is said to be passive. \[H[\mathbf{x}(t)]-H[\mathbf{x}(0)]\leq\int_{0}^{t}\mathbf{u}^{T}(s)\mathbf{y}(s)ds \tag{1}\]  
where \(\mathbf{u}\in\mathbb{R}^{m}\) is the control input of the system, \(\mathbf{y}\in\mathbb{R}^{m}\) is the output of the system. Equation (1) can also be written as an energy balance equation  
\[H[\mathbf{x}(t)]-H[\mathbf{x}(0)]=\int_{0}^{t}\mathbf{u}^{T}(s)\mathbf{y}(s)ds-d(t) \tag{2}\]  
where the left term of Equation (2) represents the energy stored by the system, the integral term of the right term represents the energy supplied, and \(d(t)\) is the energy dissipated. If select a control action \(\mathbf{u}=\mathbf{\beta}(\mathbf{x})+\mathbf{v}\), and let \(\mathbf{\beta}(\mathbf{x})\) satisfies the following equation about function \(H_{d}(\mathbf{x})\)  
\[-\int_{0}^{t}\mathbf{\beta}^{T}[\mathbf{x}(s)]\mathbf{y}(s)ds= H_{d}[\mathbf{x}(t)]+n_{0} \tag{3}\]  
where \(n_{0}\) is the integral constant. Substituting the above \(\mathbf{u}\) into Equation (2), we have that  
\[H_{d}[\mathbf{x}(t)]-H_{d}[\mathbf{x}(0)]=\int_{0}^{t}\mathbf{v}^{T}(s)\mathbf{y}(s)ds-d(t) \tag{4}\]  
where Equation (4) shows that under this control, the new input \(\mathbf{v}\) to output \(\mathbf{y}\) mapping is still passive. Then, the new energy function is written as  
\[H_{d}(\mathbf{x})\triangleq H(\mathbf{x})+H_{d}(\mathbf{x}) \tag{5}\]  
If Equation (5) has a minimum value at the desired working point \(\mathbf{x}_{0}\), then when \(\mathbf{v}\equiv\mathbf{0}\), \(\mathbf{x}_{0}\) is a stable equilibrium point, and \(H_{d}(\mathbf{x})\) is the Lyapunov function. Note that \(H_{d}(\mathbf{x})\) is configurable as required, and the dissipative term \(d(t)\) can also be reconfigured. This is the basic idea of passivity-based control (PBC). In general, Equation (3) needs to solve a partial differential equation (PDE). But for a general nonlinear passive system \(\sum_{1}\),  
\[\sum_{1}:\left\{ \begin{array}{l}\dot{\mathbf{x}}=\mathbf{f}(\mathbf{x})+\mathbf{g}(\mathbf{x}) \mathbf{u}\\ \mathbf{y}=\mathbf{h}(\mathbf{x})\end{array} \right. \tag{6}\]This PDE is not easy to solve, so under the premise of the above PBC design, Equation (6) of the system need to be organized into a port-controllable Hamilton system, \(\sum_{2}\)[10],  
\[\sum_{2}:\left\{ \begin{array}{l}\dot{x}=[J(x)-R(x)]\frac{\partial H}{\partial x }(x)+g(x)u\\ y=g^{T}(x)\frac{\partial H}{\partial x}(x)\end{array} \right. \tag{7}\]  
where \(H(x)\) is the energy function of the system, \(J(x)=-J^{T}(x)\) represents the interconnection structure of the system, and \(R(x)=R^{T}(x)\geq 0\) is the dissipative matrix, which represents the dissipative structure of the system, damping in English, which means that the energy is dissipated and quickly stabilized. For the Hamilton system, its partial differential equations are easier to solve, because \(J\) and \(R\) can reflect the structural characteristics of the system and facilitate PBC design. Such a design is called interconnection and damping assignment PBC, abbreviated as IDA-PBC. Let the Hamilton system \(\sum_{2}\) [Equation (7)] select static feedback \(u=\beta(x)\), then the equation for the state \(x\) of the system can be written as  
\[\dot{x}=[J(x)-R(x)]\frac{\partial H}{\partial x}(x)+g(x)\beta(x) \tag{8}\]  
The following partial differential equation what is required now is  
\[[J(x)-R(x)]\frac{\partial H_{a}}{\partial x}(x)=g(x)\beta(x) \tag{9}\]  
If \(\beta(x)\) can be solved from Equation (9), and according to Equation (5), then Equation (8) can be rewritten as  
\[\dot{x}=[J(x)-R(x)]\frac{\partial H_{d}}{\partial x}(x) \tag{10}\]  
is that there is a new energy function, \(H_{d}(x)=H(x)+H_{a}(x)\). If it is guaranteed that \(H_{d}(x)\) can be minimized at the equilibrium point, then this state feedback \(u=\beta(x)\) will stabilize the system at that equilibrium point.