## 3 Error Analysis  
Regardless of the ranging technology, the MAC delay becomes error source. The most typical ranging methods are time of arrival (ToA), time difference of arrival (TDoA), and angle of arrival (AoA) [18]. Since AoA requires special hardware, it is rarely used. Therefore, time measurement-based ranging, i.e., ToA and TDoA have been intensively studied in underwater localization literature. In this paper, ToA is selected as ranging technique to show the relationship between the MAC delay and localization accuracy. In addition, for the simplicity, it is assumed that transmissions of the ANs are scheduled by time division multiple access (TDMA) protocol. Total \(N\) ANs are deployed at the surface, and the position of the \(i\)th AN is denoted by \(\mathbf{p_{i}}=[x_{i},\,y_{i},\,z_{i}]^{T}\). If the position of the AUV at time \(t\) is denoted by \(\mathbf{p}(t)=[x(t),y(t),z(t)]^{T}\), the actual distance between the \(i\)th AN and the AUV at time \(t\) can be calculated as below:  
\[d_{i}(\mathbf{p}(t))=\sqrt{(x(t)-x_{i})^{2}+(y(t)-y_{i})^{2}+(z(t)-z_{i})^{2}} \tag{1}\]  
The \(i\)th AN transmits a packet recording the transmission time to the AUV, and then the distance can be estimated as below:  
\[r_{i}=\frac{t_{i}-t_{i}^{tx}}{c} \tag{2}\]where \(t_{i}^{tx}\) is the transmission time of the \(i\)th AN, and \(c\) is the propagation speed. In practical system, the distance measurement has some error due to unpredictable parameters such as variation of the propagation speed and bending of the sound ray. Here, we assume that the measurement error is only caused by the MAC delay to clarify our study. The AUV can estimate its position after receiving the minimum number of packets required for localization. In the case of 3-\(D\) localization, the minimum number of reference positions is four, but using the depth information measured via the pressure sensor, localization can be performed based on three reference positions. Assuming that the AUV starts the localization process after receiving \(N\) packets from \(N\) ANs, the time to run localization is \(t_{N}\), and the measured distance vector is \(\mathbf{R}=[r_{1},r_{2},...,r_{N}]\). The distances between the AUV and the ANs can be calculated as  
\[\mathbf{D}(\mathbf{p}(t_{N}))(\mathbf{p})=\] \[ \begin{bmatrix}\sqrt{(x(t_{N})-x_{1})^{2}+(y(t_{N})-y_{1})^{2}+(z (t_{N})-z_{1})^{2}},\\ \sqrt{(x(t_{N})-x_{2})^{2}+(y(t_{N})-y_{2})^{2}+(z(t_{N})-z_{2})^{2}},\\...\\ \sqrt{(x(t_{N})-x_{N})^{2}+(y-y_{N})^{2}+(z(t_{N})-z_{N})^{2}}.\end{bmatrix}  \tag{3}\]  
Finally, the position of AUV can be estimated by finding a point \([x,y,z]\) satisfying the following equation. \[\mathbf{R}=\mathbf{D}(\mathbf{p}(t_{N})). \tag{4}\]  
In the practical system, the distance measurements have some errors, consequently (4) cannot be solved in the closed-form. Finding a position of the AUV is typically classified into nonlinear least squares problem, hence this paper adopts Gauss-Newton algorithm to solve it. In localization literature, CRLB is frequently used to evaluate the proposed system. CRLB is a theoretical lower bound on variance attainable by any unbiased estimators [10]. CRLB can be defined with the inverse of the FIM (Fisher Information Matrix), which indicates the amount of information that can be inferred from the observations. When the measurement errors are zero-mean Gaussian distributed, the FIM, whose elements are defined as  
\[\mathbf{I}(\mathbf{p})=\left[\frac{\partial\mathbf{R}(\mathbf{p})}{\partial \mathbf{p}}\right]^{T}\mathbf{C}^{-1}\left[\frac{\partial\mathbf{R}(\mathbf{p })}{\partial\mathbf{p}}\right] \tag{5}\]  
where \(\mathbf{C}\) is the variance vector of the uncorrelated measurement errors, i.e., it can be expressed by  
\[\mathbf{C}=\left[\sigma_{1}^{2},\sigma_{1}^{2},...,\sigma_{1}^{L}\right] \tag{6}\]  
Here, \(\sigma_{i}^{2}\) is the variance of distance measurement error retrieved from the \(i\)th received packet.