## 4 Monte Carlo Simulation
### MCS Framework
#### 4.1.3 Photon Travelling Step
These equations summarise the data set required to execute the MCS programme. \[f\big{(}z,\ E_{p},\ K\big{)}=-\bigg{(}\frac{n}{c}\bigg{)}\sum_{k=1}^{K}h_{p}(x_ {0,k},y_{0,k})\Bigg{[}\sum_{m=0}^{M_{k}}\cos\theta_{k,m}\text{In}(\ q_{k,m}\ )\Bigg{]}_{E_{p}|m}\ \text{Along the}\ z-\text{axis}\bot( \text{x},\text{y}) \tag{75}\]  
\[f\big{(}t,\ E_{p},\ K\big{)}=-\bigg{(}\frac{n}{v.c}\bigg{)}\ \ \ \sum_{k=1}^{K}h_{p}(t_{0,k})\ \Bigg{[}\sum_{m=0}^{M_{k}}\cos\theta_{k,m}\text{In}(\ q_{k,m}\ )\Bigg{]}_{E_{p}|m}\ \text{Along the}\ \text{ time}\ \text{axis} \tag{76}\]  
where \(n\) is the refractive index of the seawater channel; if we consider the attenuation coefficient \(c\) as random across the photon travelling steps, then Equations (75) and (76) will take the following shape:  
\[f\big{(}z,\ E_{p},\ K\big{)}=-\sum_{k=1}^{K}h_{p}(x_{0,k},y_{0,k})\Bigg{[}\sum _{m=1}^{M_{k}}\bigg{(}\frac{n_{k,m}.cos\theta_{k,m}}{c_{k,m}}\bigg{)}\text{In} (\ q_{k,m}\ )\Bigg{]}_{E_{p}|m}\ \text{Along the}\ z-\text{axis}\bot( \text{x},\text{y}) \tag{77}\]  
\[f\big{(}t,\ E_{p},\ K\big{)}=-\bigg{(}\frac{1}{v}\bigg{)}\ \ \ \ \sum_{k=1}^{K}h_{p}(t_{0,k}) \Bigg{[}\sum_{m=1}^{M_{k}}\bigg{(}\frac{n_{k,m}.cos\theta_{k,m}}{c_{k,m}}\bigg{)} \text{In}(\ q_{k,m}\ )\Bigg{]}_{E_{p}|m}\ \text{Along the}\ \text{ time}\ \text{axis} \tag{78}\]  
where \(v\) is the speed of light in a vacuum. In Equations (75)-(78) \(h_{p}(. )\) does not require the maximum intensity term because \(K\) is the total number of photons per pulse duration, T sec. In this manner, \(h_{p}(x,y)\) provides the initial starting \((x_{0,k},y_{0,k})\) position, and \(h_{p}(t_{0})\) provides the initial time \((t_{0,k})\) for each participating \(k\)th photon. The \(h_{p}(. )\) provides the initial \((x_{0,k},y_{0,k})\) and \((t_{0,k})\), on a random selection basis based on Equation (58). In Equations (73)-(78), we have the following observations: First, the instance value of \(\cos\theta_{k,m}\) could be evaluated using Equations (28)-(30) if the HG-SPF is considered or any other SPF mentioned in Section 2.7. Also, we could evaluate the \(\cos\theta_{k,m}\) directly by randomly selecting \(\theta_{k,m}\) within the predefined scope of the scattering angle to reflect one of the scattering regimes, forward, backwards, or isotropic, mimicking the category value set of the asymmetric parameter \(g\). Second, if \(x\equiv\big{\{}n_{k,m},c_{k,m}\big{\}}\), we need a PDF and its associated CDF to deduce an instant average value of \(x\). Third, the modelling flexibility of the MC method is exhibited in terms of the geometry of the medium, \(\{q_{k,m},\cos\theta_{k,m}\}\), and the distribution of the optical properties, \(\{n_{k,m},c_{k,m}\}\). It would be beneficial to explain how the UOWC receiver performance depends on the seawater channel's IOPs using Equations (76) and (78) in homogeneous and inhomogeneous channels, respectively. The distribution of photons \(f\) in Equations (75)-(78) represents the received optical (not electronic) pulse at the surface of the photodetector. First, the right-hand side of Equations (77) and (78) exposes the dependency of \(f\) on the IOPs through the set \(\left\{n_{k,m},c_{k,m},\ \theta_{k,m}\right\}\). At the surface of the photodetector, the OSNR = \(\frac{f\left(t,\ E_{p},\ K\right)}{r_{spl}}\), where \(r_{opl}\) is the optical noise due to ambient light's background and optical pulse dispersion due to backward and isotropic scattering. The electronic SNR = \(\frac{r_{f}\left(t\right)}{r_{th}}\), where \(r_{f}\)(\(t\)) is the electronic signal at the input of the decision unit, and \(r_{th}\) is the electronic thermal noise of the photodetector backend circuitry, as illustrated in Figure 12[50], which is reproduced below. To explain the outreach of \(f\) on the electronic SNR, we need to demonstrate the association of \(f\) with \(r_{f}(t)\).