## 2 Principle
### Photon Tracing Algorithm  
We utilize a statistical Monte Carlo photon tracing algorithm (PTA) for underwater optical channel characterization and further performance analysis. The principle of this approach is to assume the light source as a collection of photons and obtain the final statistical results by tracking each propagation path from Tx to Rx through the seawater medium [20; 21]. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Water Type** & \(a\) **(m\({}^{-1}\))** & \(b\) **(m\({}^{-1}\))** & \(c\) **(m\({}^{-1}\))** \\ \hline Pure sea & 0.0405 & 0.0025 & 0.043 \\ Clear ocean & 0.114 & 0.037 & 0.151 \\ Coastal & 0.179 & 0.219 & 0.398 \\ Turbid harbor & 0.366 & 1.824 & 2.190 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Typical attenuation coefficients for different water types. Figure 2: Schematic Diagram of the UOWC system model. First, a large number of photons are randomly generated at the optical source, each with assigned attributes including initial location, transmitting direction, time and weight. The initial location can be deemed as \((x,y,z)=(0,0,0)\) in Cartesian coordinates, the weight of each photon is set to unity with \(W_{0}=1\), and the propagation starting time is \(t=0\). The emitting direction is described by polar angle \(\theta\) and azimuth angle \(\phi\). Considering the fact that the intensity of most optical sources is azimuthally symmetric, \(\phi\) is assumed to be uniformly distributed in the interval \([0,2\pi]\). The polar angle is determined based on the spatial intensity distribution pattern of the light source. For LED-based diffuse links, the radiant intensity distribution is modeled as a generalized Lambertian profile [22], and expressed as:  
\[R(\theta)=\frac{m+1}{2\pi}cos^{m}(\theta) \tag{1}\]  
where \(m\) indicates the order of Lambertian emission and is related to the semi-angle at half-power, \(\theta_{1/2}\), as \(m_{1}=-In2/In(cos\theta_{1/2})\). Then by normalizing radiation pattern \(R(\theta)\) with \(2\pi\int_{0}^{\pi/2}R(\theta)\sin(\theta)d\theta=1\) and equating \(2\pi\int_{0}^{\theta_{0}^{LED}}R(\theta)\sin(\theta)d\theta=\mathbb{R}_{1}\). The polar and azimuth angle can be given as follows:  
\[\left\{ \begin{array}{c}\theta_{0}^{LED}=\arccos(\sqrt[n]{\mathbb{R}_{1}}) \\ \phi_{0}^{LED}=2\pi\mathbb{R}_{2}\end{array} \right. \tag{2}\]  
in which \(\mathbb{R}_{1}\) and \(\mathbb{R}_{2}\) are random variables (RV) uniformly distributed in \([0,1]\). Likewise, laser-based collimated link can be considered as a Gaussian beam profile and its starting directions of photons can be given by:  
\[\left\{ \begin{array}{c}\theta_{0}^{LD}=\theta_{div/2}\times\sqrt{-ln( \mathbb{R}_{3})}\\ \phi_{0}^{LD}=2\pi\mathbb{R}_{4}\end{array} \right. \tag{3}\]  
where \(\theta_{div/2}\) denotes the laser half divergence angle and is related to the beam waist, \(\mathbb{R}_{3}\) and \(\mathbb{R}_{4}\) are also uniformly distributed RVs in the interval \([0,1]\). Thus, the major difference between the LED and laser based UOWC channels is the initial emitting directions, the LED link is more diffusive whereas the laser beam is collimated. Afterwards, the starting orientations of photons can be described as cosine directions \((c_{x},c_{y},c_{z})=(sin\theta_{0}cos\phi_{0},\ sin\theta_{0}sin\phi_{0},cos \phi_{0})\). While traveling through the underwater medium, the photons will interact with the particulate matter and water molecules, resulting in deviation from the original path and weight reduction (Figure 3). The propagation distance between two interaction events is defined as step size \(\Delta s\) with its probability distribution function (PDF) based on the Beer Law: \(p(\Delta s)=c(\lambda)e^{-c(\lambda)\Delta s}\), then \(\Delta s\) can be simplified and randomly chosen as \(\Delta s=-In\mathbb{R}_{5}/c(\lambda)\), in which \(\mathbb{R}_{5}\) represents another RV, \(c(\lambda)\) is the water attenuation coefficient.