# 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
In moderate conditions, it applies balanced filtering strategies that optimize noise reduction while maintaining system efficiency. Under stable conditions, basic filters, such as low-pass filters, are employed to minimize residual noise without adding unnecessary processing overhead. To achieve noise reduction without distorting the original signal, the system leverages adaptive filtering techniques, notably the Least Mean Squares (LMS) algorithm. This adaptive approach allows the filter parameters to be dynamically adjusted in response to fluctuating noise levels, ensuring effective interference suppression while preserving the integrity of the signal. By continuously adapting to changing conditions, the Advanced Filtering mechanism significantly contributes to maintaining a low BER and enhancing the overall robustness and reliability of the SSM SAC-OCDMA receiver system. * MaintainSettings() function:

The MaintainSettings() function is designed to maintain the current receiver configuration when the BER is within acceptable limits. In this case, the system assumes that no further adjustments are necessary as long as performance remains stable. ### Computational Efficiency and Real-Time Feasibility of the FLC

To ensure real-time adaptability in FSO communication systems, we analyze the computational efficiency and execution time of the proposed FLC system. The execution time of the FLC system directly impacts its ability to dynamically adjust the BER threshold based on varying environmental conditions such as rain, fog, and propagation distance. #### 3.6.1 Computational Complexity Analysis

The FLC system processes three input variables (distance, rain, and fog), which are respectively classified into four, three, and three states, making a total of thirty-six fuzzy rules. The computational cost of each processing stage is as follows:

* Fuzzification: Converts crisp inputs into fuzzy sets using triangular and trapezoidal membership functions, requiring basic arithmetic operations. The complexity is \(O(1)\) due to the fixed number of inputs. * Inference Mechanism: Evaluates 36 fuzzy rules using Mamdani inference, which involves minimum/maximum operations. The computational complexity remains \(O(36)\approx O(1)\), ensuring efficient execution. * Defuzzification: Uses the Centroid Method to compute the BER threshold, requiring a weighted sum over three output membership functions (low, medium, high). The complexity is \(O(3)\approx O(1)\). #### 3.6.2 Execution Time Estimation

Experimental results were executed on an Intel Core i7-1165G7 (2.80 GHz) computer with MATLAB's fuzzy logic toolbox, which confirms that the FLC system takes 1-4 ms execution time per decision cycle. The breakdown of execution time is as follows:

* Fuzzification: 0.2-1 ms
* Inference (36-rule evaluation): 0.5-2 ms
* Defuzzification (Centroid Method, 3 MFs): 0.3-1 ms

This execution time ensures real-time responsiveness, allowing the system to adapt to environmental variations without noticeable processing delays. Given its low computational complexity and execution time, the FLC system remains lightweight, making it feasible for implementation in low-power embedded platforms, including DSPs and FPGAs. Future optimizations may include hardware acceleration (FPGA/DSP) and rule reduction techniques to further enhance real-time performance. ## 4 Results and Discussion

This section presents the results in two parts. The first subsection discusses the system's performance under foggy and rainy weather conditions without FLC. The second subsection demonstrates the performance improvements achieved by incorporating FLC under the same conditions. ### Performance Evaluation of FSO-SSM System Without FLC Under Rain and Fog

#### 4.1.1 Rainy Weather

The impact of different rainfall rates for the proposed FSO system is investigated in this section. Figure 9 illustrates the relationship between received optical power and transmission distance under varying rainfall conditions.