# Energy Harvesting Hybrid Acoustic-Optical Underwater Wireless Sensor Networks Localization
## 3 Performance Analysis  
The Cramer-Rao lower bound (CRLB) defines the lower bound for the variance of any unbiased estimator, when the range measurement error is zero mean Gaussian distributed [34]. The probability density function for \(\tilde{d}_{ij}\), conditioned on \(\mathbf{l}_{i}\) and \(\mathbf{l}_{j}\), can be written as  
\[f(\tilde{d}_{ij}|\mathbf{l}_{i},\mathbf{l}_{j})=\frac{1}{\sqrt{2\pi\sigma_{ij}^{2}}}e ^{\left(-\frac{1}{2\sigma_{ij}^{2}}(\tilde{d}_{ij}-\tilde{d}_{ij})^{2}\right)}, \tag{37}\]where \(\tilde{d}_{ij}\) is the estimated distance, \(d_{ij}=\parallel I_{i}-I_{j}\parallel=\sqrt{(x_{i}-x_{j})^{2}+(y_{i}-y_{j})^{2}}\) is the Euclidean distance, and \(\sigma_{ij}^{2}\) is the noise variance. The expression for the Fisher information matrix (FIM) becomes  
\[I(I)=\mathrm{E}_{f(\tilde{d}/I)}\left\{\left[\frac{\partial\ln(f(\tilde{d}/I))} {\partial I}\right]^{T}\left[\frac{\partial\ln(f(\tilde{d}/I))}{\partial I} \right]\right\}. \tag{38}\]  
It is assumed that the noise added to the ranging measurements is zero mean Gaussian process with variance \(\sigma_{\tilde{d}}\). Therefore, the RSS based noise co-variance matrix is \(\mathbf{\Gamma}_{\tilde{d}}=\mathrm{diag}(\sigma_{\tilde{d}_{1}},\sigma_{ \tilde{d}_{2}},...,\sigma_{\tilde{d}_{n}})\). Then, the likelihood ratio is computed as  
\[\ln(f(\tilde{d}/I)) = \ln\left(\frac{1}{\left(2\pi\mathbf{\Gamma}_{\tilde{d}}\right)^{ \frac{(n)}{2}}}\right)\] \[-\frac{1}{2}\left(\tilde{d}-d(I)\right)^{T}\mathbf{\Gamma}_{ \tilde{d}}^{-1}\left(\tilde{d}-d(I)\right).\]  
The FIM is constructed from the likelihood ratios, given by  
\[\mathbf{\chi}_{\tilde{d}}=\mathbf{\Theta}_{\tilde{d}}^{T}\mathbf{\Gamma}_{ \tilde{d}}^{-1}\mathbf{\Theta}_{\tilde{d}}, \tag{40}\]  
where  
\[\mathbf{\Theta}_{\tilde{d}}=-\beta\begin{bmatrix}\frac{x_{i}-x_{j}}{d^{2}}\\ \frac{y_{i}-y_{j}}{d^{2}}\end{bmatrix}^{T}, \tag{41}\]  
and \(\beta\) is the path loss exponent. The elements of \(\mathbf{\chi}_{\tilde{d}}\) are derived as  
\[\{\mathbf{\chi}_{\tilde{d}}\}_{1,1}=\frac{\bigtriangledown\left(\tilde{d}-d( I)\right)^{T}}{\bigtriangledown x}\mathbf{\Gamma}_{\tilde{d}}^{-1}\frac{ \bigtriangledown\left(\tilde{d}-d(I)\right)}{\bigtriangledown x}, \tag{42}\]  
\[\{\mathbf{\chi}_{\tilde{d}}\}_{1,2}=\frac{\bigtriangledown\left(\tilde{d}-d( I)\right)^{T}}{\bigtriangledown x\bigtriangledown y}\mathbf{\Gamma}_{\tilde{d}}^{-1} \frac{\bigtriangledown\left(\tilde{d}-d(I)\right)}{\bigtriangledown x \bigtriangledown y}, \tag{43}\]  
and  
\[\{\mathbf{\chi}_{\tilde{d}}\}_{2,2}=\frac{\bigtriangledown\left(\tilde{d}-d( I)\right)^{T}}{\bigtriangledown y}\mathbf{\Gamma}_{\tilde{d}}^{-1}\frac{ \bigtriangledown\left(\tilde{d}-d(I)\right)}{\bigtriangledown y}. \tag{44}\]  
Simplifying (42)-(44), we get  
\[\{\mathbf{\chi}_{\tilde{d}}\}_{1,1}=\frac{\beta^{2}(x_{i}-x_{j})^{T}\mathbf{ \Gamma}_{\tilde{d}}^{-1}(x_{i}-x_{j})}{d^{4}}, \tag{45}\]  
\[\{\mathbf{\chi}_{\tilde{d}}\}_{1,2}=\frac{\beta^{2}(x_{i}-x_{j})^{T}\mathbf{ \Gamma}_{\tilde{d}}^{-1}(y_{i}-y_{j})}{d^{4}}, \tag{46}\]  
and  
\[\{\mathbf{\chi}_{\tilde{d}}\}_{2,2}=\frac{\beta^{2}(y_{i}-y_{j})^{T}\mathbf{ \Gamma}_{\tilde{d}}^{-1}(y_{i}-y_{j})}{d^{4}}. \tag{47}\]  
The CRLB is computed as the inverse of the diagonal elements of the FIM, i.e.,  
\[\mathrm{CRLB}=\{\mathbf{\chi}_{\tilde{d}}\}_{1,1}^{-1}+\{\mathbf{\chi}_{\tilde {d}}\}_{2,2}^{-1}. \tag{48}\]Finally, the mean square error of each node should satisfy the following condition:  
\[\frac{\sum_{i=1}^{n}(I_{i}-\tilde{\mathbf{l}}_{i})^{2}}{n}\geq\{\mathbf{\chi}_{d}\}_{1,1}^ {-1}+\{\mathbf{\chi}_{d}\}_{2,2}^{-1}. \tag{49}\]  
The condition in (49), gives the theoretical lower accuracy bound for the proposed localization technique which is valuable to design a localization system.