## 4 Controller Design for Unmanned Helicopter Hovering Position
### Control Law Design of Horizontal Position  
Through the decoupling of attitude, the dynamic equations on the \(X\)-axis and \(Y\)-axis directions can be converted as follows:  
\[\begin{array}{l}m\ddot{P}_{x}=U_{x}T_{mr}+n_{px}\\ m\ddot{P}_{y}=U_{y}T_{mr}+n_{py}\end{array} \tag{28}\]  
The expected position \(P_{xr}\) and \(P_{yr}\) are on \(X\) and \(Y\) axis, respectively. Thus, the errors are \(e_{x}=P_{xr}-P_{x}\) and \(e_{y}=P_{yr}-P_{y}\), respectively.  
For the control of the \(X\)-axis direction, the slide mode surface of \(s_{x}=\beta_{x}\cdot e_{x}+\dot{e}_{x}\) is designed, satisfying \(\beta_{x}>0\). Then, the time derivative of \(s_{x}\) is  
\[\dot{s}_{x}=\beta_{x}\cdot\dot{e}_{x}+\ddot{e}_{x}=\beta_{x}\cdot\dot{e}_{x}- \frac{U_{x}T_{mr}}{m}-\frac{n_{px}}{m} \tag{29}\]Then, according to the progression law of \(-(k_{x}+\overline{k}_{x})\text{sgn}(s_{x})\), where \(k_{x}\) and \(\overline{k}_{x}\) are positive constants satisfying \(\overline{k}_{x}\geq|n_{Px}/m|\), the position control law in the \(X\)-axis direction can be designed as  
\[U_{x}=\frac{m}{T_{mr}}\left(\beta_{x}\cdot\dot{e}_{x}+(k_{x}+\overline{k}_{x}) \cdot\text{sgn}(s_{x})\right) \tag{30}\]  
Similarly, the slide mode surface in the \(Y\)-axis direction of \(s_{y}=\beta_{y}\cdot e_{y}+\dot{e}_{y}\) is established, satisfying \(\beta_{y}>0\). With the progression law of \(-(k_{y}+\overline{k}_{y})\text{sgn}(s_{y})\), satisfying \(\overline{k}_{y}\geq\left|n_{Py}/m\right|\), the position control law in the \(Y\)-axis direction can be designed as  
\[U_{y}=\frac{m}{T_{mr}}\left(\beta_{y}\cdot\dot{e}_{y}+(k_{y}+\overline{k}_{y}) \cdot\text{sgn}(s_{y})\right) \tag{31}\]  
where \(\overline{k}_{x}\) and \(\overline{k}_{y}\) are designed for suppressing chattering and improving robustness.  
Proof.: Regarding the control in the \(X\)-axis direction, the Lyapunov function of \(V_{x}=s_{x}^{2}/2\) is considered. Evidently, \(V_{x}\) is positive definite, and the time derivative is  
\[\begin{array}{ll}\dot{V}_{x}&=s_{x}\cdot\dot{s}_{x}\\ &=s_{x}(\beta_{x}\cdot\dot{e}_{x}-\frac{U_{x}T_{mr}}{m}-\frac{n_{x}}{m})\\ &=s_{x}(-(k_{x}+\overline{k}_{x})\text{sgn}(s_{x})-\frac{n_{Px}}{m})\\ &\leq-(k_{x}+\overline{k}_{x})|s_{x}|+|\frac{n_{Px}}{m}|\cdot|s_{x}|\\ &\leq-k_{x}|s_{x}|+\left(|\frac{n_{Px}}{m}|-\overline{k}_{x})|s_{x}|\right.\\ &\leq-k_{x}|s_{x}|\leq 0\end{array} \tag{32}\]  
If and only if \(S_{x}=0\), the equality of the above formula holds true. Thus, \(\dot{V}_{x}\) is negative definite, and the stability of the system is certified.  
Similarly, the control system in the \(Y\)-axis direction is also stable. \(\square\)  
According to \(U_{x}\) and \(U_{y}\), and combined with the previous analysis, the relations of longitudinal and lateral flapping angles can be obtained as follows:  
\[\begin{array}{ll}a=\dot{q}l_{y}/\left(H_{mr}T_{mr}+k_{\beta}\right)\\ b=\left(\dot{p}l_{x}-T_{tr}H_{tr}\right)/\left(T_{mr}H_{mr}+k_{\beta}\right) \end{array} \tag{33}\]  
where \(\dot{p}\) and \(\dot{q}\) are calculated by Equations (25) and (27). The servo's rotation angles can be calculated as follows:  
\[\begin{array}{ll}\delta_{lon}=\left(\theta_{lon}+0.0028\right)/0.2008\\ \delta_{lat}=\left(\theta_{lat}+0.0034\right)/0.2056\end{array} \tag{34}\]  
where taking the parameters of Table 1 into Equation (22) yields  
\[\begin{array}{ll}\theta_{lon}\approx\left(\dot{a}+q+17.74a-20.94b\right)/17. 74\\ \theta_{lat}\approx\left(b+p+20.94a+17.74b\right)/17.74\end{array} \tag{35}\]