# Research on Amphibious Multi-Rotor UAV Out-of-Water Control Based on ADRC
## 4 Controller Design
\begin{array}{l}e_{11}=X_{11}(k)-Z_{11}(k)\\ e_{12}=X_{12}(k)-Z_{12}(k)\\ u_{10}(k)=K_{11}fal(e_{11},\alpha_{11},\delta_{10})+K_{12}fal(e_{12},\alpha_{ 12},\delta_{10})\\ u_{1}(k)=u_{10}(k)-Z_{13}(k)/b_{1}\end{array} \right. \tag{17}\]  
Figure 4: ADRC control block diagram. In Equation (17), the dilated state observer of the ADRC obtains the observations of yaw angles \(\psi\) and \(\dot{\psi}\), \(Z_{11}\), \(Z_{12}\), and the system perturbations. \(Z_{13}\), \(\alpha_{11}\), \(\alpha_{12}\), \(\delta_{10}\) is the parameter of the nonlinear function \(fal(\cdot)\); \(K_{11}\), \(K_{12}\) is the controller gain parameter; and \(b_{1}\) is the output compensation factor. The complete ADRC formula can be found in reference [43]. The position of the controller design is according to the amphibious multi-rotor UAV ADRC attitude controller design method. In the \(E-\zeta\eta\zeta\) coordinate system, the equation is satisfied as in Equation (18). \[\left\{ \begin{array}{l}\ddot{x}=\frac{U_{1}(\sin\theta\cos\phi\cos\psi+\sin \phi\sin\psi)}{m}+w_{4}\\ \ddot{y}=\frac{U_{1}(\sin\theta\cos\phi\sin\psi-\sin\phi\cos\psi)}{m}+w_{5}\\ \ddot{z}=\frac{U_{1}\cos\phi\cos\theta}{m}+g-\frac{B}{m}+w_{6}\end{array} \right. \tag{18}\]  
In Equation (18), \(w_{i}\) is the external disturbance to the amphibious multi-rotor UAV in the \(E-\zeta\eta\zeta\) coordinate system. The external forces required to make the amphibious multi-rotor UAV reach the desired position are \(F=\left[U_{x},U_{y},U_{z}\right]^{T}\); \(\psi_{d}\) known and decoupled calculations are performed to obtain the magnitude of the external forces and attitude required to reach the desired position as in Equation (19). \[\left\{ \begin{array}{l}U_{1}=\sqrt{m\left(U_{x}{}^{2}+U_{y}{}^{2}+\left(U_{z }-\frac{B}{m}+g\right){}^{2}\right)}\\ \phi_{c}=\arcsin\Big{[}\frac{m\left(U_{x}\sin\phi_{d}-U_{y}\cos\psi_{d}\right) }{U_{1}\cos\psi_{d}}\Big{]}\\ \theta_{c}=\arcsin\Big{[}\frac{m\left(U_{x}\cos\phi_{d}+U_{y}\sin\phi_{d} \right)}{U_{1}\cos\psi_{d}}\Big{]}\end{array} \right. \tag{19}\]  
In Equation (19), \(\phi_{c}\) and \(\theta_{c}\) are the calculated attitude sizes that the UAV needs to achieve to reach the desired position. Therefore, after obtaining \(\phi_{c}\) and \(\theta_{c}\), the design process of yaw Angle controller is referred to. The controller of pitch Angle and roll Angle is designed as Formulas (20) and (21):  
\[\left\{\begin{array}{l}X_{21}(k+1)=X_{21}(k)+T_{2}\cdot X_{22}(k)\\ X_{22}(k+1)=X_{22}(k)+T_{2}\cdot fst(e_{2},X_{22}(k),r_{2},h_{2})\\ e_{2}=X_{21}(k)-\phi_{c}(k)\\ e_{21}=X_{21}(k)-Z_{21}  
phase, a position and attitude controller was developed in this study using both the PID algorithm and SMC (sliding mode control) algorithm [45; 46].  
In the PID and SMC controller building, the design method of the ADRC controller is used, and the block diagram of the built cascade controller is similar to the block diagram of the ADRC controller in Figure 4.  
The PID algorithm is a widely used control algorithm, and it is also widely used in aircraft control. It is based on error feedback, through the proportional, integral, and differential linear combination output control quantity to achieve the control effect. Using the altitude control of an amphibious aircraft as an example, its output control quantity is shown in Formula (22).  
\[u(t)=K_{p}\bigg{[}e(t)+\frac{1}{T_{i}}\int_{0}^{t}e(t)dt+T_{d}\frac{de(t)}{dt} \bigg{]} \tag{22}\]  
where \(t\) is the running time of the experiment; \(K_{p}\), \(\frac{1}{T_{i}}\), \(T_{d}\) are the proportion, integral and differential parameters to be determined, respectively; \(e(t)\) is the error between the expected height and the actual height at time t; \(u(t)\) is the output control quantity at time t.  
The sliding mode control system is often used for aircraft control because of its strong robustness. In this paper, the sliding surface of the sliding mode controller is \(s=\dot{e}+ce\), using the constant velocity convergence law \(\dot{s}=-s\cdot sgn(s)\).