# Saturation Based Nonlinear FOPD Motion Control Algorithm Design for Autonomous Underwater Vehicle
## 4 Saturation Based Nonlinear FOPD Controller Design  
In this section, a nonlinear FOPD (FONLPD) based on saturations is proposed for the virtual closed-loop. Compared with conventional PID type controllers, FOPID type controllers have more tuning knobs, namely the integration and derivation orders, so they may provide more opportunities in improving system robustness as well as transient control performance. Consider the dynamic models in Equations (1) and (2); the FONLPD control law with gravity/buoyancy compensation can be expressed as [32]:  
\[\delta=g(\upomega)-J(\upomega)\delta_{FONLPD}, \tag{5}\]  
and  
\[\delta_{FONLPD}=\varepsilon_{\bar{b}_{p}}\left[K_{p}e(t)\right]+ \varepsilon_{\bar{b}_{d}}\left[K_{d}\mathrm{D}^{\upvarepsilon}e(t)\right], \tag{6}\]  
where \(e(t)=\upomega-\upomega_{d}\) is the error between the reference value and actual value,  
\[K_{p}=\left[ \begin{array}{ccc}k_{p1}&...&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&k_{pn}\end{array} \right],\;K_{d}=\left[ \begin{array}{ccc}k_{d1}&...&0\\ \vdots&\ddots&\vdots\\ 0&\cdots&k_{dn}\end{array} \right],\]  
are proportional and derivation parameters (diagonal, positive definite matrices), \(1\leq\alpha<2\) is the derivation order, \(\mathrm{D}^{\alpha}(\cdot)\) is the fractional derivation operator, and \(\varepsilon_{\bar{b}_{p}},\;\varepsilon_{\bar{b}_{d}}\) are saturation function matrices as  
\[\varepsilon_{\bar{b}_{p}}\left[K_{p}e(t)\right]=\Big{[}\;\; \varepsilon_{\bar{b}_{p1}}\left[k_{p1}e_{1}(t)\right],\cdots,\epsilon_{\bar{b} _{pn}}\left[k_{pn}e_{n}(t)\right]\;\;\Big{]}^{T}, \tag{7}\]  
\[\varepsilon_{\bar{b}_{d}}\left[K_{d}\mathrm{D}^{\alpha}e(t)\right]=\Big{[}\; \;\varepsilon_{\bar{b}_{d1}}\left[k_{d1}\mathrm{D}^{\alpha}e_{1}(t)\right],\; \;\;\cdots,\;\;\;\varepsilon_{\bar{\gamma}_{\bar{b}_{dn}}}\left[k_{dn} \mathrm{D}^{\alpha}e_{n}(t)\right]\;\;\Big{]}^{T}. \tag{8}\]  
In Equations (7) and (8), \(\varepsilon_{\bar{b}_{pi}}\left[k_{pi}e_{i}(t)\right]\) and \(\varepsilon_{\bar{b}_{di}}\left[k_{di}\mathrm{D}^{\alpha}e_{i}(t)\right]\) (\(i=1\ldots n\)) are saturation functions (seeing Figure 1) defined by  
\[\varepsilon_{\bar{b}_{pi}}\left[k_{pi}e_{i}(t)\right]=\left\{ \begin{array}{ c}k_{pi}e_{i}(t),\;\mathrm{if}\;|e_{i}(t)|\leq w_{pi}\\ sign(e_{i}(t))\bar{b}_{pi},\;\mathrm{if}\;|e_{i}(t)|>w_{pi}\end{array} \right., \tag{9}\]  
\[\varepsilon_{\bar{b}_{di}}\left[k_{di}\mathrm{D}^{\alpha}e_{i}(t)\right]=\left\{ \begin{array}{c}k_{di}e_{i}(t),\;\;\mathrm{if}\;\;\;|\mathrm{D}^{\alpha}e_{ i}(t)|\leq w_{di}\\ sign(\mathrm{D}^{\alpha}e_{i}(t))\bar{b}_{di},\;\;\;\mathrm{if}\;\;\;|\mathrm{D}^{ \alpha}e_{i}(t)|>w_{di}\end{array} \right., \tag{10}\]  
where positive constants \(\bar{b}_{pi}\) and \(\bar{b}_{di}\) are the bounds of saturation functions \(\varepsilon_{\bar{b}_{pi}}\left[k_{pi}e_{i}(t)\right]\) and \(\varepsilon_{\bar{b}_{di}}\left[k_{di}\mathrm{D}^{\alpha}e_{i}(t)\right]\) (\(i=1\ldots n\)), respectively, and \(w_{pi}=\bar{b}_{pi}/k_{pi}\), \(w_{di}=\bar{b}_{di}/k_{di}\). Then, we can rewrite Equations (9) and (10) as  
\[\varepsilon_{\bar{b}_{pi}}\left[k_{pi}e_{i}(t)\right]=k_{pi}\left( e_{i}(t)\right)\cdot e_{i}(t), \tag{11}\] \[\varepsilon_{\bar{b}_{di}}\left[k_{di}\mathrm{D}^{\alpha}e_{i}(t) \right]=k_{pi}\left(e_{i}(t)\right)\cdot e_{i}(t), \tag{12}\]  
where\[k_{rpi}\left(e_{i}(t)\right)=\left\{ \begin{array}{cc}k_{pi}\quad\text{if}\quad \left|e_{i}(t)\right|\leq w_{pi}\\ b_{pi}|e_{i}(t)|^{-1},\text{if}\left|e_{i}(t)\right|>w_{pi}\end{array} \right., \tag{13}\]  
\[k_{rdi}\left(\text{D}^{\alpha}e_{i}(t)\right)=\left\{ \begin{array}{cc}k_{di},\quad\text{if}\quad\left|e_{i}(t)\right|\leq w_{di}\\ \bar{b}_{di}|e_{i}(t)|^{-1},\text{if}\left|\text{D}^{\alpha}e_{i}(t)\right|>w_ {di}\end{array} \right.. \tag{14}\]  
To analyze the stability of the system in Equation (1) under the FONLPD control law (Equation (5)), a helpful Lemma 1 is given at first. **Lemma 1** ([33]). : _Let \(x(t)\in R\) be a continuous and derivable function.