# Discrete-Time Position Control for Autonomous Underwater Vehicle under Noisy Conditions
## 3 Discrete-Time Controller Design in Trajectory Tracking
### Stability Analysis  
By combining Equation (11) with Equation (14),  
\[\mathbf{H}(k)-\hat{\mathbf{H}}(k)=\mathbf{M}_{\mathbf{RB}}(\mathbf{u}(k)-\hat{\mathbf{v}}(k)-\mathbf{v}(k +1)+\mathbf{v}(k)) \tag{19}\]  
\(\mathbf{u}(k)\) is substituted into Equation (19) and one can obtain the following:  
\[\mathbf{M}_{\mathbf{RB}}^{-1}(\mathbf{H}(k)-\hat{\mathbf{H}}(k))= \mathbf{I}^{-1}(\hat{\mathbf{\eta}}_{\mathbf{r}}(k+1)+\mathbf{K}_{\mathbf{P}}\hat\mathbf{{\eta}}^{\prime}(k)+\mathbf{K}_{\mathbf{D}}\hat{\mathbf{\eta}}^{\prime}(k))\] \[-\mathbf{v}(k+1)+\mathbf{v}(k)-\hat{\mathbf{v}}(k) \tag{20}\]  
One can write from Equation (2) the following:  
\[\left\{ \begin{array}{l}\mathbf{v}(k+1)=\mathbf{I}^{-1}\hat{\mathbf{\eta}}(k+1)\\ \mathbf{v}(k)=\mathbf{I}^{-1}\hat{\mathbf{\eta}}(k)\\ \hat{\mathbf{v}}(k)=\mathbf{I}^{-1}\hat{\mathbf{\eta}}(k)\end{array} \right. \tag{21}\]Combining Equation (20) with Equation (21) yields the following:  
\[\Gamma^{-1}(\hat{\eta}_{r}(k{+}1)-\hat{\eta}(k+1){+}\mathbf{K}_{P}\hat{ \mathbf{\eta}}^{e}(k){+}\mathbf{K}_{D}\hat{\mathbf{\eta}}\hat{\mathbf{\tau}}(k))\] \[= \mathbf{M}_{RB}^{-1}(\mathbf{H}(k){-}\hat{\mathbf{H}}(k))+\mathbf{J}^{-1}(\hat{\eta }(k)-\hat{\mathbf{\eta}}(k)) \tag{22}\]  
Let \(\mathbf{\epsilon}(k)=\hat{\mathbf{\eta}}(k)-\mathbf{\eta}(k)\). It is assumed that \(\mathbf{\epsilon}(k)\) and \(\dot{\mathbf{\epsilon}}(k)\) are all bounded. One can write the following:  
\[\hat{\mathbf{\tau}}^{e}(k)=\mathbf{\eta}_{r}(k)-\hat{\mathbf{\eta}}(k)=\hat{\mathbf{\eta}}(k)- \mathbf{\epsilon}(k) \tag{23}\]  
From Equations (22) and (23) one can write the following:  
\[\mathbf{J}^{-1}(\hat{\mathbf{\eta}}(k{+}1){+}\mathbf{K}_{P}(\hat{\mathbf{\eta}}(k )-\mathbf{\epsilon}(k)){+}\mathbf{K}_{D}(\hat{\mathbf{\eta}}(k)-\dot{\mathbf{\epsilon}}(k)))\] \[= \mathbf{M}_{RB}^{-1}(\mathbf{H}(k){-}\hat{\mathbf{H}}(k))-\mathbf{\Gamma}^{-1} \mathbf{\epsilon}(k) \tag{24}\]  
Equation (24) can be rewritten as follows:  
\[\dot{\hat{\mathbf{\eta}}}(k{+}1){+}\mathbf{K}_{P}\hat{\mathbf{\eta}}(k){+}\bm {K}_{D}\hat{\mathbf{\eta}}(k)=\mathbf{J}\mathbf{M}_{RB}^{-1}(\mathbf{H}(k){-}\hat{\mathbf{H}}(k))\] \[+\mathbf{K}\mathbf{p}\mathbf{\epsilon}(k)+\mathbf{K}_{D}\dot{\mathbf{\epsilon}}(k)+ \dot{\mathbf{\epsilon}}(k) \tag{25}\]  
\(\mathbf{\epsilon}(k)\) is defined as follows:  
\[\mathbf{\epsilon}(k)=\mathbf{M}_{RB}^{-1}(\hat{\mathbf{H}}(k)-\mathbf{H}(k)) \tag{26}\]  
Equation (26) shows that \(\mathbf{\epsilon}(k)\) can be considered to represent the approximate error in the estimate \(\hat{\mathbf{H}}(k)\) by TDE. Equation (25) can be simplified by using the forward difference approximation. The simplified equation becomes the following:  
\[\hat{\mathbf{\eta}}(k{+}2)+(\mathbf{K}_{D}-\mathbf{I})\hat{\mathbf{\eta}}(k{+}1) +(\mathbf{K}_{P}-\mathbf{K}_{D})\hat{\mathbf{\eta}}(k)\] \[=-\mathbf{T}\mathbf{I}\mathbf{\epsilon}(t)+\mathbf{K}_{P}\mathbf{\epsilon}(k)+(\mathbf{K }_{D}+\mathbf{I})\dot{\mathbf{\epsilon}}(k) \tag{27}\]  
If \((-\mathbf{T}\mathbf{I}\mathbf{\epsilon}(k)+\mathbf{K}_{P}\mathbf{\epsilon}(k)+(\mathbf{K}_{D}+\mathbf{I}) \dot{\mathbf{\epsilon}}(k))\) is bounded, then the Bounded Input Bounded Output (BIBO) stability of the presented control law can be proved. Here, \(\mathbf{K}\mathbf{p}\mathbf{\epsilon}(k)+(\mathbf{K}_{D}+\mathbf{I})\dot{\mathbf{\epsilon}}(k)\) is bounded and the boundedness of \(\mathbf{\epsilon}(k)\) will be shown as follows.