## 3 Design of Proposed Intelligent FSO System
### Transmitter Module
\[Precision=\frac{TP}{TP+FP}, \tag{3}\]

\[Recall=\frac{TP}{TP+FN}, \tag{4}\]

\[F1-score=2\times\frac{recall+precision}{recall\times precision}, \tag{5}\]

Among these metrics, the accuracy remains a principal criterion, offering a comprehensive measure of the model's predictive effectiveness and playing a central role in the overall assessment framework. The confusion matrix presented in Figure 8 illustrates the classification performance of the proposed model in distinguishing eye diagram images based on a BER threshold of \(10^{-4}\). The model successfully identified all 196 samples from the majority class (BER \(\leq 10^{-4}\)) with no false positives, demonstrating high specificity. For the minority class (BER \(>10^{-4}\)), the model correctly classified three out of four instances while misclassifying one instance as belonging to the majority class. These results reflect the model's strong discriminatory capability, particularly for the dominant class, and its reasonable generalization to under-represent samples. The overall accuracy achieved is approximately 99.5%, indicating a high level of reliability for BER-based eye diagram classification. The trained BER CNN classifier model demonstrated strong classification performance in distinguishing between eye diagrams corresponding to low and high BER levels. Specifically, it correctly classified 194 out of 195 instances with a BER below the threshold and 4 out of 5 instances with the BER above the threshold, resulting in an overall accuracy of 99%. For the dominant class (BER \(\leq 10^{-4}\)), the model achieved high precision, recall, and F1-score values near 0.99, indicating excellent reliability in identifying low-BER conditions. While the minority class (BER \(>10^{-4}\)) comprised a limited number of samples, the model

Figure 8: Confusion matrix. still maintained a precision of 1.00 and an F1-score of 0.86, reflecting good generalization capability under class imbalance. We took a sample eye diagram from another dataset that has a BER reading of \(10^{-3}\) and applied it to the model to be sure that the proposed BER CNN classifier model works properly. The model classifies it correctly as \"1\", meaning the BER is above the threshold. Figure 9 illustrates the model's classification confidence for a sample eye diagram using a horizontal bar chart. The chart displays the predicted probabilities for the two output classes, BER \(\leq 10^{-4}\) and BER \(>10^{-4}\), based on the model's sigmoid output. In this case, the classifier assigns a high confidence score of 0.9962 to the BER \(>10^{-4}\) class, indicating a strong likelihood that the input eye diagram corresponds to a high BER scenario. This type of visualization aids in interpreting the model's output by illustrating not only the predicted class but also the associated confidence level. For applications such as FSO systems, where reliability is critical, having access to the model's confidence can be as important as the classification outcome itself, particularly when decisions must be made under uncertain conditions. ### Performance Evaluation of LeNet-Based Model for BER and Q-Factor Prediction

In this section, the performance of the LeNet architecture is evaluated for predicting the Q-factor or BER from eye diagram inputs. The model is trained using first dataset of 1000 eye diagram images for 100 epochs. To rigorously assess its predictive capability and generalization performance, the Mean Squared Error (MSE) is employed as the primary evaluation metric. MSE quantifies the average squared difference between predicted and true Q-factor/BER values, providing a robust measure of the model's overall prediction accuracy under diverse optical transmission conditions. Figure 10 illustrates the MSE trends for the training and validation sets of the Q-factor (Figure 10a) and the BER (Figure 10b) over 100 epochs. The steep initial decline in MSE indicates the rapid learning of the underlying mapping between eye diagram features and the target quality metrics.