# Discrete-Time Position Control for Autonomous Underwater Vehicle under Noisy Conditions
## 2 System Model Building  
To describe the motion of the AUV in three-dimensional (3D) space, two coordinate systems are usually required (Figure 1). The first one involves the earth-fixed frame \(\{E\}\), while the other one is the body-fixed frame \(\{B\}\). Specifically, in Figure 1a, the position and orientation of the AUV can be defined by the earth-fixed frame, while in Figure 1b, the body-fixed frame as a moving coordinate system describes the AUV velocity and acceleration. Since an AUV motion involves of six degrees of freedom (6-DoF), its dynamics can be written as follows [30]:  
\[\mathbf{M}\dot{\mathbf{v}}+\mathbf{C}(\mathbf{v})\mathbf{v}+\mathbf{D}(\mathbf{v})\mathbf{v}+\mathbf{g}(\mathbf{\eta})=\tau \tag{1}\]  
Reference [30] also describes the the kinematics of AUV as:  
\[\dot{\mathbf{\eta}}=\mathbf{J}(\mathbf{\eta})\mathbf{v} \tag{2}\]  
In Equation (1), \(\mathbf{M}=\mathbf{M}_{\mathbf{R}\mathbf{B}}+\mathbf{M}_{\mathbf{A}}\), where \(\mathbf{M}\) represents the inertia matrix, and \(\mathbf{M}_{\mathbf{R}\mathbf{B}}\) and \(\mathbf{M}_{\mathbf{A}}\) denote the rigid body mass matrix and the added mass matrix, respectively. \(\mathbf{C}(\mathbf{v})\) denotes the Coriolis and the centripetal matrix of the rigid body \((\mathbf{C}_{\mathbf{R}\mathbf{B}})\) with added mass \((\mathbf{C}_{\mathbf{A}})\). Therefore, \(\mathbf{C}(\mathbf{v})=\mathbf{C}_{\mathbf{R}\mathbf{B}}(\mathbf{v})+\mathbf{C}_{\mathbf{A}}(\mathbf{v})\). \(\mathbf{D}(\mathbf{v})\) represents the matrix, including the linear and the quadratic drag. Vector \(\mathbf{g}(\mathbf{\eta})\) denotes the restoring force and moment. \(\mathbf{v}~{}=~{}[u~{}v~{}w~{}p~{}q~{}r]^{T}\), \([u~{}v~{}w]^{T}\) are the linear velocities and \([~{}p~{}q~{}r]^{T}\) are the angular velocities. \(\tau\) represents the control input, which includes the forces and moments. In Equation (2), \(\mathbf{\eta}~{}=~{}[x~{}y~{}z~{}\phi~{}\theta~{}\psi]^{T}\). Considering frame \(\{E\}\), \(x\), \(y\), and \(z\) describe the position of AUV for surge, sway, and heave, respectively. Likewise, \(\phi\), \(\theta\), and \(\psi\) represent the Euler angles for roll, path and yaw, respectively. The non-singular \(\mathbf{J}(\mathbf{\eta})\) denotes the kinematic transformation matrix from the frame \(\{B\}\) to frame \(\{E\}\).  
In this paper, the following assumptions are made, considering the study of the discrete-time position control for AUV:  
* The AUV is regarded as a rigid body.
* The vehicle is symmetric, and thus \(\mathbf{M_{RB}}\) and \(\mathbf{M_{A}}\) are positive definite.
* During the controller design, all AUV model parameters are unknown, except from \(\mathbf{M_{RB}}\).
* Given that most AUVs are designed with pitch and roll stability, in the model, the pitch and roll motion are neglected.
* The motions of surge, sway, and heave are considered and studied. Given that \(r(t)\simeq 0\) and \(\psi(t)\simeq\psi_{c}\), with \(|\psi_{c}|<\pi/2\).  
By neglecting the pitch and roll motions, the AUV model can be simplified and degraded from a 6-DoF problem to a 4-DoF. Thus, the resulting 4-DoF of hydrodynamic and kinematic equations is used [31]:  
\[\mathbf{M}=\begin{bmatrix}m_{u}&0&0&0\\ 0&m_{v}&0&0\\ 0&0&m_{w}&0\\ 0&0&0&I_{r}\end{bmatrix} \tag{3}\]  
\[\mathbf{C}(\mathbf{v}(t))=\begin{bmatrix}0&0&0&-m_{u}v(t)\\ 0&0&0&m_{v}u(t)\\ 0&0&0&0\\ m_{u}v(t)&-m_{v}u(t)&0&I_{r}\end{bmatrix} \tag{4}\]  
Figure 1: AUV 3D position tracking reference frames: (**a**) earth-fixed frame and (**b**) body-fixed frame.  
\[\mathbf{D}(\mathbf{v}(t))=\left[\begin{array}{ccc}k_{u}+k_{u|u|}|u(t)|&0\\ 0&k_{v}+k_{v|v|}|v(t)|\\ 0&0\\ 0&0\\ &0&0\\ &k_{w}+k_{w|w|}|w(t)|&0\\ &0&k_{r}+k_{r|r|}|r(t)|\end{array}\right] \tag{5}\]  
\[\mathbf{g}(\mathbf{\eta}(t))=[0\quad 0\quad-W(t)\quad 0]^{T} \tag{6}\]  
\[\mathbf{\tau}(t)=[F_{u}(t)\quad F_{v}(t)\quad F_{w}(t)\quad T_{r}(t)] \tag{7}\]  
\[\mathbf{J}(\mathbf{\eta}(t))=\left[\begin{array}{cccc}\cos(\psi_{c})&-\sin(\psi_{c} )&0&0\\ \sin(\psi_{c})&\cos(\psi_{c})&0&0\\ 0&0&1&0\\ 0&0&0&1\end{array}\right] \tag{8}\]