# Fuzzy Logic-Based Performance Enhancement of FSO Systems Under Adverse Weather Conditions
## 3 Fuzzy Modeling for Enhancing Receiver Performance in FSO System
### Adaptive BER Threshold Adjustment Mechanism for FSO-FLC-OCDMA Receivers
#### 4.2.1 Rainy Weather

Figure 17 shows the BER performance versus the number of users for a system employing an SSM code (w = 4) at 2.5 Gbps for different FSO spans/distances. Results are shown for both systems with and without FLC under HR conditions. Acceptable BER values for FSO systems typically range from \(3.8\times 10^{-3}\) to \(10^{-6}\) for many applications. However, more demanding applications, such as high-definition video streaming, require BER values of \(10^{-9}\) or lower. As shown in Figure 17, at a BER of \(10^{-3}\), the system without FLC supports approximately 15 users at 1.2 km distance. Similarly, the system with FLC supports approximately 20 users at the same distance. Therefore, the FSO system with FLC results in a 33.33% improvement in the number of users compared to without FLC. This improvement is attributed to the FLC's ability to dynamically adjust the threshold and transmission parameters to maintain reliable performance. Similarly, with an FSO link at a distance of 0.8 km, the system supports 17 and 20 users with and without FLC, respectively. Furthermore, when the distance is reduced to 0.5 km, the supported number of users increases to 18 and 23, respectively, with and without FLC and under the same transmission conditions. Figure 18 illustrates the BER as a function of the number of users for the system employing SSM coding at 2.5 Gbps across various FSO propagation ranges, both with and without FLC under low rainfall conditions. At a BER of \(10^{-9}\) and FSO range of 2.8 km, the system supports approximately 7 users without FLC and 12 users with FLC. This enhancement is due to FLC's capability to continuously adapt the system threshold, fine-tuning transmission settings to ensure consistent performance. Furthermore, when the distance is reduced to 2 km, the system accommodates 15 users without FLC and 18 users with FLC. At 1.5 km, the number of supported users increases to 19 and 23 for the system without and with FLC, respectively, and under identical transmission conditions. In addition to the graphical evaluation, Table 5 presents a quantitative comparison of average BER values with and without the FLC under various rainfall conditions. The results

Figure 7:5 Number of active users vs. BER under HR weather condition. show that the proposed FLC achieves BER improvements ranging from 90.32% to 98.69%, depending on the rainfall rate and number of users. This confirms the FLC's ability to effectively adapt to rain-induced attenuation and significantly enhance system reliability across varying channel conditions. The improvement percentage in BER achieved by the FLC is calculated as follows:

Figure 7:6

To show up the spatial shape of each output for every two input combinations of the fuzzy model for distance (L) and rainfall (mm/h), the 3D surface is plotted in Figure 19 via MATLAB's fuzzy logic toolbox. #### 4.2.2 Foggy Weather

Figure 20 presents the BER versus the number of supported users for an FSO system employing an SSM code at 2.5 Gbps under LF conditions. Figure 20 compares system performance with and without FLC across various FSO ranges. Maintaining a BER equal to \(10^{-3}\), the system without FLC supports 13 and 35 users at FSO spans of 1.1 km and 0.5 km, respectively. However, the corresponding values for the FLC-enabled system are 16 and 42 users with similar conditions. At a more stringent BER of \(10^{-9}\) and FSO propagation range of 0.5 km, the system supports 18 and 22 users without and with FLC, respectively. At 1.1 km, these values decrease to six and eight users, respectively, which shows the detrimental effect of increased transmission distance on system capacity. The performance improvement observed with FLC is attributed to its ability to dynamically adjust system

Figure 7:7 Number of active users vs. BER under LR weather condition.