## 3 Design of Proposed Intelligent FSO System
### Transmitter Module
The received optical power of an LoS FSO link is expressed as [21]

\[P_{R}=P_{T}\eta_{T}\bigg{(}\frac{d_{r}}{d_{t}+\theta_{d}R}\bigg{)}^{2}\eta_{R}e ^{-\alpha R} \tag{1}\]

where \(P_{R}\) is the received optical power, \(P_{T}\) denotes the transmitted power, and \(\eta_{T}\) and \(\eta_{R}\) represent the transmitter and receiver optical efficiencies, respectively. The transmitter and receiver aperture diameters are donated by \(d_{t}\) and \(d_{r}\), respectively. The beam divergence angle is represented by \(\theta_{d}\) and \(R\) denotes the propagation range in the FSO channel. Finally, the atmospheric weather attenuation is denoted by \(\alpha\) and its value depends on the weather condition. Table 1 shows the calculation of \(\alpha\) for foggy, rainy, and snowy weather conditions. ### Receiver Module

At the receiver, the optical signal is processed according to the process described in Algorithm 1. In scenarios where the dual-amplifier arrangement is selected, the signal is initially amplified by a secondary optical amplifier with a gain of 10 dB prior to signal detection. The signal is directly routed to a positive-intrinsic-negative (PIN) photodetector (PD), where optical-to-electrical conversion is performed. The electrical signal obtained \begin{table}
\begin{tabular}{c c c} \hline \hline
**Weather Condition** & \(\alpha\) **Computation** & **Parameter Definition** \\ \hline Fog [22] & \(\alpha=\frac{13}{2}\Big{(}\frac{\lambda}{550}\Big{)}^{-s}\) & \(Z\) is the visibility range, and \(\lambda\) represents the operating wavelength. \\  & & Parameter \(s\) denotes the scattering particle distribution, and according to [PERSON] model, it has a value of 0 for \(Z\) below 0.5 km. \\ \hline Rain [23; 24] & \(\alpha=1.076\)\(\mathcal{R}^{0.67}\) & \(\mathcal{R}\) represents the rainfall intensity in mm/hr. \\ \hline  & & For wet snow, \\  & & \(a=1.023\times 10^{-4}\lambda+3.7855466\), \\ Snow [25] & \(\alpha=a\)\(S^{b}\) & \(b=0.72\). \\ \cline{2-3}  & & For dry snow, \\  & & \(a=5.42\times 10^{-5}\lambda+5.4958776\), \\  & & \(b=1.38\). \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Attenuation of various weather conditions. from the PD is passed through an Electrical Low-Pass Filter (ELPF) to suppress high-frequency components and mitigate out-of-band noise. Following the detection, a BER analyzer processes the filtered signal to evaluate the system performance by analyzing the corresponding eye diagram using three different deep learning (DL) models: CNN, LeNet, and Wide ResNet. The output of these models is subsequently used to control the switching mechanism as described in Algorithm 1 to determine whether the received signal should be forwarded to the end users or retransmitted with signal power amplification. Algorithm 2 presents the used CNN-based model designed for the binary classification of the BER of the received signal using eye diagram images. The model takes a pre-processed black-and-white-scale eye diagram as input parameter, then it outputs a binary label indicating whether the BER exceeds a predefined threshold, leveraging a lightweight CNN architecture optimized for accurate and efficient BER discrimination.