## 3 Data Pre-Processing
### Method for Accumulating Measurement Error Data  
The motion model of the AUV is as follows:  
\[s_{k}= \begin{cases}x_{k-1}+v_{k}\cdot dt\cdot cos\left(\Psi_{k-1}+G_{k}\right) =x_{k-1}+d_{x,k}\\ y_{k-1}+v_{k}\cdot dt\cdot sin\left(\Psi_{k-1}+G_{k}\right)=y_{k-1}+d_{y,k}\\ \Psi_{k-1}+G_{k}\end{cases}  \tag{2}\]  
where \(v_{k}\) is the forward velocity of AUV at \(k\)th time. \(G_{k}\) is the yaw angle of AUV at \(k\)th time, which constitutes the input state of AUV, that is, \(u_{k}=\left[v_{k},G_{k}\right]^{T}\). \(dt\) is the sampling interval time. The measurement coordinate system is shown in Figure 4:  
The measurement model corresponding to the coordinate system shown in Figure 4 is as follows:  
\[h= \begin{cases}\alpha=\frac{3}{2}\pi-\Psi_{DS}\\ z_{x}=-\left(x_{y}-x_{f}\right)cos\left(\alpha\right)+\left(y_{y}-y_{f}\right) sin\left(\alpha\right)\\ z_{y}=\left(x_{y}-x_{f}\right)sin\left(\alpha\right)+\left(y_{y}-y_{f}\right) cos\left(\alpha\right)\end{cases}  \tag{3}\]  
The distance between AUV and DS at \(k\)th time is calculated by the Equation (4):  
\[dis_{k}=\sqrt{\left(x_{v,k}-x_{f,k}\right)^{2}+\left(y_{v,k}-y_{f,k}\right)^{2}} \tag{4}\]  
Assuming that we know the initial position of AUV, first of all, \(\left(x_{v,k},y_{v,k}\right)\) denotes the position of AUV at \(k\)th time. \(\left(x_{f,k},y_{f,k}\right)\) denotes the position of F-DS or M-DS at \(k\)th time. \(\left(x_{x,k},z_{y,k}\right)\) denotes the measurement of acoustic sensor at \(k\)th time. Under the premise of only using an acoustic sensor, the method 1 is used to obtain measurement error data in the process of AUV homing to F-DS:  
for \(k=1,\cdots\)  
1. According to the initial position, heading and speed of AUV and Equation (2), \(\left(x_{v,k},y_{v,k}\right)\) is calculated. 2. According to \(\left(x_{v,k},z_{y,k}\right)\), \(\left(x_{v,k},y_{v,k}\right)\) and Equation (3), \(\left(x_{f,k},y_{f,k}\right)\) is calculated. 3. AUV is guided to the F-DS by line-of-sight guidance. When AUV reaches the position of F-DS, namely \(x_{v,k}=x_{f,k},y_{v,k}=y_{f,k}\), end for. 4. The position of F-DS at this time is true, namely \(x_{f}=x_{f,k},y_{f}=y_{f,k}\). Figure 4: Measurement coordinate system. According to the position of AUV at \(1:k\)th time, \((x_{f},y_{f})\) and Equation (3), the true measurements at \(1:k\)th time, that are, \(\left\{\tilde{z}_{x,1},\cdots,\tilde{z}_{x,k},\tilde{z}_{y,1},\cdots,\tilde{z}_{y,k}\right\}\) are calculated. 6. The measurement errors at \(1:k\)th time are the difference between \(\left\{\tilde{z}_{x,1},\cdots,\tilde{z}_{x,k},\tilde{z}_{y,1},\cdots,\tilde{z} _{y,k}\right\}\) and \(\left\{z_{x,1},\cdots,z_{x,k},z_{y,1},\cdots,z_{y,k}\right\}\). 7. The distances between AUV and F-DS at \(1:k\)th time, that is, \(\left\{dis_{1},\cdots,dis_{k}\right\}\) are calculated. The method 2 is used to obtain measurement error data in the process of AUV homing to M-DS: for \(k=1,\cdots\)
1. According to the initial position, heading and speed of AUV and Equation (2), \(\left(x_{v,k},y_{v,k}\right)\) is calculated. 2. According to the heading and speed of M-DS, the distances travelled by M-DS in \(dt\) time, that is, \(dx_{f,k},dy_{f,k}\) are calculated. 3. According to \(\left(z_{x,k},z_{y,k}\right),\left(x_{v,k},y_{v,k}\right)\) and Equation (3), \(\left(x_{f,k},y_{f,k}\right)\) is calculated. 4. AUV is guided to the M-DS by line-of-sight guidance. When AUV reaches the position of M-DS, namely \(x_{v,k}=x_{f,k},y_{v,k}=y_{f,k}\), end for. 5. The position of M-DS at this time is true, namely \(\left(\tilde{x}_{f,k},\tilde{y}_{f,k}\right)=\left(x_{f,k},y_{f,k}\right)\). According to this position, \(dx_{f,k},dy_{f,k}\) and Equation (2), the true positions of M-DS at \(1:k\)th time, that is, \(\left\{\left(\tilde{x}_{f,1},\tilde{y}_{f,1}\right),\cdots,\left(\tilde{x}_{ f,k},\tilde{y}_{f,k}\right)\right\}\) are calculated. 6.