## 3 Trajectory Tracking Controller Design Based on LADRC
### LADRC Design Process for Trajectory Tracking
#### 3.2.1 Horizontal Trajectory Tracking Controller  
LADRC eliminates the need for detailed knowledge about the controlled object, as it solely requires the order relationship between the output and input variables. According to Equation (5), the following expression about \(\psi\) can be obtained,  
\[\begin{split}\ddot{\psi}=&\frac{\sin\phi}{\cos\theta }\dot{q}+\frac{\cos\phi}{\cos\theta}\dot{r}+\frac{\sin\theta\sin 2\phi}{\cos^{2} \theta}q^{2}-\frac{\sin\theta\sin 2\phi}{\cos^{2}\theta}r^{2}+\frac{\cos\phi}{ \cos\theta}pq-\frac{\sin\phi}{\cos\theta}pr\\ &+\frac{2\sin\theta\cos 2\phi}{\cos^{2}\theta}qr\end{split} \tag{15}\]  
Then, combining Equations (3) and (15), we obtain the following second-order system,  
\[\ddot{\psi}=f_{1}(\cdot)+f_{2}(u_{1}) \tag{16}\]  
where, due to the complexity of the model, we use the abbreviated terms \(f_{1}\) and \(f_{2}\) to express the system. This does not impact the design of the controller.  
Furthermore, let \(y=\psi-\psi_{g}\); then, there is  
\[\dot{y}=f_{1}(\cdot)+f_{2}(u_{1})-\ddot{\psi}_{g} \tag{17}\]  
To facilitate the design of the controller, Equation (17) is rearranged to  
\[\begin{split}\ddot{y}&=f_{1}(\cdot)+f_{2}(u_{1})- \ddot{\psi}_{g}-b_{01}u_{1}+b_{01}u_{1}\\ &=f_{h}+b_{01}u_{1}\end{split} \tag{18}\]  
where \(f_{h}\) is the total disturbance and \(b_{01}\) is an adjustable parameter.  
By defining the state as \(x_{11}=y\), \(x_{12}=\dot{y}\), and \(x_{13}=f_{h}\), the following state space equation can be obtained,  
\[\left\{\begin{array}{l}\dot{x}_{11}=x_{12}\\ \dot{x}_{12}=x_{13}+b_{01}u_{1}\\ \dot{x}_{13}=f_{h}\\ y=x_{11}\end{array}\right. \tag{19}\]  
Consequently, a full-order LESO is utilized to estimate the above state,  
\[\left\{\begin{array}{l}\dot{x}_{11}=\hat{x}_{12}+\beta_{01}(y-\hat{x}_{11}) \\ \dot{x}_{12}=\hat{x}_{13}+b_{01}u_{1}+\beta_{02}(y-\hat{x}_{11})\\ \dot{x}_{13}=\beta_{03}(y-\hat{x}_{11})\end{array}\right. \tag{20}\]  
where \(\hat{x}_{11}\), \(\hat{x}_{12}\), and \(\hat{x}_{13}\) are the estimated values of \(x_{11}\), \(x_{12}\), and \(x_{13}\), respectively. \(\beta_{01}\), \(\beta_{02}\), and \(\beta_{03}\) are observer gains, and these three parameters are related to the accuracy of the estimated values. Usually, the pole configuration method is used to configure the observer gain parameters to the pole \(-\omega_{01}\) (\(\omega_{01}>0\)) that can make the system stable, that is, \(\beta_{01}=3\omega_{01}\), \(\beta_{02}=3\omega_{01}^{2}\), and \(\beta_{03}=\omega_{01}^{3}\). In this case, only the single parameter \(\omega_{o}\) must be adjusted to align the observed values with the actual values.  
When the observed states are accurate, we have \(\hat{x}_{13}\approx f_{h}\). Then, we can employ a PD control law to mitigate the disturbance,  
\[u_{1}=\frac{k_{p1}(y_{d}-\hat{x}_{11})-k_{d1}\hat{x}_{12}-\hat{x}_{13}}{b_{01}} \tag{21}\]where \(k_{p1}\) and \(k_{d1}\) are controller parameters; \(y_{d}\) is the desired value of \(y\). \(y_{d}=0\). In addition, by substituting Equation (21) into Equation (18), we observe that the estimated disturbance value effectively compensates for the unknown disturbance within the system. This fundamental concept lies at the core of the LADRC algorithm. In addition, the stability analysis of an LADRC control system is provided in the Appendix A.