# A Methodology to Model the Rain and Fog Effect on the Performance of Automotive LiDAR Sensors
## 4 Modeling of the Rain and Fog Effect in the Virtual LiDAR Sensor
### Link Budget Module  
The received power \(P_{rx}(t)\) obtained from the ray tracing module does not consider the rain or fog effect and the receiver optics losses \(T_{opt}\). The link budget considers the optical receiver losses \(T_{opt}\) and attenuates the received power \(P_{rx}(t)\) according to [PERSON]'s law using the rain or fog extinction coefficient \(\sigma_{ext,rain/\mathit{fog}}\) obtained from the rain/fog module. This can be written as:  
\[P_{rx}(t)=\underbrace{P_{tx}(t)\rho\frac{d_{\mathit{aperture}}^{2}}{4R_{trg }^{2}}cos(\theta)}_{P_{rx}(t)}T_{opt}\cdot\exp(-2R_{trg}\sigma_{ext,rain/ \mathit{fog}}), \tag{26}\]  
where \(\rho\) is the target reflectivity, \(d_{\mathit{aperture}}\) denotes the diameter of the optical aperture, \(R_{trg}\) is the target range, the direction of the incident ray is given by \(\theta\), the receiver optics loss factor  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Weather Condition** & \(\rho\) (cm\({}^{-3}\)) & \(\alpha\) & \(\gamma\) & \(D_{C}\) (\(\upmu\)m) \\ \hline Haze (coast) & 100 & 1 & 0.5 & 0.1 \\ Haze (continental) & 100 & 2 & 0.5 & 0.14 \\ Strong advection fog & 20 & 3 & 1.0 & 20.0 \\ Moderate advection fog & 20 & 3 & 1.0 & 16.0 \\ Strong spray & 100 & 6 & 1.0 & 8.00 \\ Moderate spray & 100 & 6 & 1.0 & 4.00 \\ Fog of type “Chu/Hogg” & 20 & 2 & 0.5 & 2.00 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Parameters of droplet size distribution in fog using a gamma-function model [9].  
is given by \(T_{opt}\), and the transmitted power is denoted by \(P_{tx}(t)\)[4; 12]. The backscattered coefficient \(\beta_{back}\) is used to calculate the received power \(P_{rx}\) of backscattered rain or fog droplets. The received power \(P_{rx}\) from the raindrops can be written as:  
\[P_{rx,\,back\,rain}(t)=P_{tx}(t)\frac{d_{aperture}^{2}}{4R_{d}^{2}}cos(\theta)T _{opt}\,\beta_{back,\,rain}\cdot\exp(-2R_{d}\sigma_{ext,rain}), \tag{27}\]  
where \(\beta_{back,\,rain}\) is the backscattered coefficient from raindrops and \(R_{d}\) is the raindrop range [4; 12]. The received power \(P_{rx,\,back\,fog}(t)\) from the fog droplets in a range cell can be written as:  
\[P_{rx,\,back\,fog}(t)=P_{tx}(t)\frac{d_{aperture}^{2}}{4R_{cell}^{2}}cos( \theta)T_{opt}\,\beta_{back,\,fog}\cdot\exp(-2R_{cell}\sigma_{ext,fog}), \tag{28}\]  
where \(\beta_{back,\,fog}\) is the backscattered coefficient from the fog droplets in any range cell and \(R_{cell}\) is the distance of the range cell.  
The total \(P_{tot}(t)\) received power by the detector over time can originate from different sources, including internal reflection \(P_{int}(t)\), target received power \(P_{rx}(t)\), and backscattered power from rain and fog drops \(P_{rx,\,rain/\,fog}\). That is why \(P_{tot}(t)\) can be given as:  
\[P_{tot}(t)=P_{int}(t)+P_{rx}(t)+P_{rx,\,rain/\,fog}(t). \tag{29}\]  
The power signal must be sampled with a \(\Delta t\) time interval to accurately model the optics at the photon level [39]. The sampled power equation takes the form of:  
\[P_{tot}[i]=P_{int}[i]+P_{rx}[i]+P_{rx,\,rain/\,fog}[i], \tag{30}\]  
with \(t=i\cdot\Delta t\). The mean of incident photons \(\overline{n}[i]\) on the SiPM detector within a one-time bin can be written as:  
\[\overline{n}[i]=\frac{P_{tot}[i]\cdot\Delta t}{E_{ph}}, \tag{31}\]  
where \(E_{ph}=h\
u\) is the energy of a single laser photon at the laser's wavelength, \(h\) is the Planck constant, and \(\
u\) is the photon frequency [40]. The SiPM detector generates Poisson-distributed shot noise due to the statistical arrival of photons. That is why the arrival of photons can be modeled as a Poisson process \(\mathcal{P}\)[41]:  
\[n[i]=\mathcal{P}(\overline{n}[i]). \tag{32}\]