The findings of this research underscore the effectiveness of a hybrid system that integrates semiconductor devices with ML, DL, and advanced control algorithms for managing power quality. The study assessed a variety of models and techniques to monitor, detect, predict, and mitigate power quality disturbances, including voltage sags, swells, harmonic distortions, and transients. Key metrics like accuracy, precision, recall, F1-score, and execution time were used to evaluate each model’s performance comprehensively. The results showed that DL models, particularly LSTM networks, excel in predicting complex power quality disturbances compared to traditional ML methods. This section provides a detailed discussion of the findings, covering monitoring and detection, fault prediction, power quality improvement, and a comparison between the hybrid system and traditional approaches. To clearly illustrate the results, tables, graphs, and diagrams were employed, highlighting the strengths and limitations of each model. There were notable differences in accuracy and response times between traditional and hybrid methods. DL models like CNN and LSTM showed superior precision and recall, especially when handling imbalanced datasets, whereas conventional ML models, such as SVM and Random Forests, struggled to maintain accuracy in similar conditions. These results emphasize the necessity of integrating predictive models with real-time control algorithms to create a reliable power quality management system.
To establish a dependable power quality management system, a range of algorithms was assessed to address disruptions like voltage sags, swells, and harmonic distortions, focusing on precise prediction and effective corrective measures. Figure 2 showcases the comparative gains in power quality across different metrics, emphasizing the role of advanced control methods enhanced by ML and DL models in improving accuracy and maintaining system stability. The findings demonstrate that DL models, especially LSTM networks, performed exceptionally well in precision and recall despite facing challenges with imbalanced data, achieving significant improvement percentages in power quality compared to conventional approaches. This figure illustrates the benefits of integrating predictive analytics with real-time control responses to enhance power management efficiency.

Improvement percentage vs power quality metrics for power quality improvement comparison.
Monitoring and detection: results of monitoring power quality events using ML/DL
The monitoring and detection phase employed several ML and DL models to analyze real-time data collected from semiconductor-based sensors. The results highlighted that DL models, particularly CNN, demonstrated high precision in detecting power quality disturbances. For instance, CNN achieved a precision of 91.8%, reflecting its strong capability to identify relevant disturbances accurately without producing false positives. However, traditional ML models, such as SVM and Random Forest, showed lower precision and recall due to challenges with the imbalanced dataset. These differences were noticeable during the experiments, where DL models proved more effective in managing complex and noisy data, accurately identifying both common and rare disturbances. The LSTM model, in particular, achieved 100% accuracy when monitoring time-series data related to power quality events. This demonstrates the advantage of using DL models in scenarios where data complexity limits the effectiveness of traditional models. The study confirms that advanced monitoring through ML/DL can deliver real-time, accurate information on power quality, improving decision-making for control strategies.

Accuracy vs algorithms for model performance comparison.
Figure 3 illustrates the accuracy comparison among various algorithms utilized for managing power quality, showcasing both traditional ML and advanced DL techniques. The results indicate that LSTM networks delivered the highest accuracy at 96%, significantly outperforming conventional ML algorithm Random Forests, which exhibited accuracy levels around 93% due to challenges with data imbalance. This figure highlights the superior capability of DL models, particularly in addressing complex power quality issues, compared to traditional control methods.
Fault prediction: accuracy of fault detection and prediction models
The study also focused on fault detection and prediction using ML and DL models. DL models, especially LSTM, performed exceptionally well, achieving 100% accuracy with a recall of 94.5%. This high accuracy highlights LSTM’s ability to manage sequential data, capturing temporal patterns in power quality indicators that are crucial for precise predictions. CNN models also showed high recall, effectively detecting disturbances even with noisy data. In contrast, traditional ML models like SVM and Random Forest struggled with prediction accuracy, particularly with imbalanced datasets. Experimental results showed that these models had precision and recall rates around 33.3%, indicating difficulties in predicting less frequent power quality events. These outcomes emphasize the need for enhanced preprocessing and feature extraction methods to boost the performance of conventional ML models. However, DL models remained robust and effective, confirming their suitability for complex fault prediction tasks in power quality management.

Error metrics vs algorithms for error metrics distribution for DL models.
Figure 4 presents the distribution of error metrics – namely precision, recall, and F1-score – across different DL models applied in power quality analysis. The findings highlight the individual strengths and limitations of each model, demonstrating that advanced DL techniques like CNN and LSTM are particularly effective at accurately detecting complex power quality issues. LSTM, in particular, achieved high levels of precision and recall despite the challenges of handling imbalanced datasets, while other models showed lower precision under similar circumstances, as evidenced by several undefined metric warnings during testing. This figure underscores the necessity of choosing the appropriate DL architecture to reduce errors and enhance the dependability of power quality management systems

Performance metrics vs methods for performance metrics by methods.
Figure 5 illustrates a comparison of performance metrics – including accuracy, precision, and recall – across different methods used for managing power quality. The results clearly demonstrate that DL models, such as LSTM and CNN, delivered superior accuracy and recall when compared to traditional ML approaches like SVM and Random Forest, especially under challenging conditions involving imbalanced datasets. This comparison underscores the greater suitability of advanced DL techniques for complex power quality disturbances, while conventional methods face limitations in handling such complexities effectively.

Algorithms vs execution time for execution time for each method.
Figure 6 illustrates the execution times of different algorithms used in power quality management, highlighting the computational demands of each technique. Traditional control strategies, like MPC, showcased shorter processing times compared to more sophisticated DL models, such as CNN and LSTM, which require more computational power. This figure emphasizes the balance between execution speed and accuracy, as DL models, although slower, achieved superior precision and recall when handling complex power quality challenges.
Power quality improvement: analysis of power quality improvement using control algorithms
Integrating ML/DL predictions with control algorithms resulted in substantial improvements in power quality management. Control strategies like MPC and Adaptive Control were employed to correct power quality disturbances. These methods benefited from real-time data insights provided by ML/DL models, enabling preemptive adjustments to mitigate issues like voltage sags and harmonic distortions. MPC, in particular, was effective at stabilizing voltage, demonstrating its capability to handle transient disturbances. The integration of ML/DL models with control algorithms significantly improved the system’s response to power quality challenges. For example, while traditional control techniques alone achieved about 82.5% accuracy, the hybrid system showed notable gains in stability and efficiency, particularly in managing complex disturbances. These improvements were measured using higher F1-scores and reduced execution times, validating the hybrid approach’s effectiveness in meeting the demands of modern, dynamic power grids.
Hybrid system performance: comparative analysis with traditional approaches
The hybrid system’s performance was evaluated against traditional power quality management methods, demonstrating the benefits of combining ML/DL models with control algorithms. Conventional ML models, like SVM and Random Forest, had difficulty achieving high precision and recall due to data imbalances, whereas DL models effectively handled these challenges. The hybrid system displayed superior adaptability, blending the predictive strengths of data-driven models with the accuracy of real-time control responses. This combination allowed the hybrid system to efficiently address both anticipated and unanticipated power quality issues. While traditional control methods offered faster execution times, they lacked the depth of analysis and pattern recognition that DL models provided. Although DL models like LSTM required more computational power, they offered higher accuracy and a more detailed understanding of power quality events. The comparative analysis confirmed that the hybrid system is more reliable and versatile, providing a scalable solution for future smart grids. The study concludes that while deep learning models excel in handling complex scenarios, integrating them with traditional control methods creates a balanced system that meets practical and computational requirements effectively.
Comparison of existing vs. proposed system
The comparison between existing and proposed power quality management systems highlights the superior performance of the hybrid approach, which combines ML, DL, and advanced control techniques. Traditional methods, such as MPC, demonstrated decent accuracy (82.5%) and relatively quick execution. However, they fell short in handling complex power disturbances, particularly with imbalanced datasets, as shown by lower precision and recall metrics. In contrast, the proposed system, utilizing DL models like CNN and LSTM, achieved higher precision–91.8% for CNN and 93.5% for LSTM–demonstrating a significant improvement in accurately detecting and forecasting power quality issues.
Table 4 offers a comparative analysis between existing and proposed systems for managing power quality, highlighting advancements through optimized parameters in the models. It evaluates different ML and DL algorithms such as SVM, Random Forest, Neural Networks, CNN, and LSTM, focusing on the refinement of critical parameters. In the proposed system, the Random Forest model was improved by increasing the number of trees from 100 to 200, enhancing model reliability. Likewise, Neural Network adjustments included an increase in layers from 3 to 5 and a more refined learning rate, aimed at better adaptability. Significant gains are observed in CNN and LSTM models within the proposed framework: modifying CNN’s filter size from \(3\times 3\) to \(5\times 5\) led to a notable rise in precision (91.8%) and recall (92%), while extending LSTM’s sequence length from 20 to 50 achieved the highest precision (93.5%) and recall (94.5%). These optimizations illustrate the proposed system’s enhanced performance in detecting complex power quality issues, outperforming traditional approaches, which struggled particularly with imbalanced datasets. The findings emphasize the effectiveness of the proposed system in managing complex scenarios, especially in environments rich with data, where DL models can detect intricate patterns. Although DL models required more processing time, they offered much better predictive performance, reducing false positives and enhancing overall system stability. This balance between speed and accuracy illustrates that while DL models are more computationally demanding, they deliver superior results. The comparison underlines the proposed system’s potential to improve smart grid reliability and adaptability, showcasing the benefits of integrating advanced data-driven techniques with traditional power control methods.
Performance evaluation
The evaluation of the proposed hybrid power quality management system highlights its clear advantages over traditional techniques. This system, which integrates ML and DL models, was assessed based on metrics including accuracy, precision, recall, and F1-score51,52,53,54,55. The results demonstrated that advanced DL methods, particularly LSTM networks, offered superior predictive accuracy for complex power disturbances like voltage sags, swells, and harmonic distortions. While traditional methods, such as MPC, achieved a solid accuracy of 82.5%, the hybrid approach, especially with CNN and LSTM implementations, showed significant gains. Adjusting CNN’s filter size and optimizing LSTM’s sequence length enhanced their performance, with LSTM reaching a precision of 93.5% and recall of 94.5%, showcasing DL models’ effectiveness in managing complicated power quality challenges, especially with imbalanced datasets. Despite the longer execution times associated with DL models due to higher computational requirements, the trade-off was worthwhile, as the proposed system provided much better accuracy and reliability in identifying power quality disturbances. Traditional ML models like SVM and Random Forest faced difficulties with precision and recall in scenarios with imbalanced data, highlighting their limitations in handling complex datasets. In contrast, the hybrid system’s integration of predictive analytics and real-time control significantly improved power management stability and efficiency. This evaluation confirms the proposed system’s strength, demonstrating its potential as a key solution for future smart grid infrastructures, where precise and timely responses to disturbances are essential. These validation metrics collectively highlight the proposed hybrid system’s enhanced performance, affirming its superiority over traditional power quality management techniques.
Accuracy: Accuracy represents the proportion of correct predictions made by the model out of the total predictions. It is determined using the formula:
$$\begin{aligned} \text {Accuracy} = \frac{\text {True Positives} + \text {True Negatives}}{\text {Total Predictions}} \end{aligned}$$
(1)
In this study, the proposed system outperformed traditional methods, showing higher accuracy, particularly when dealing with complex power disturbances, thus proving to be more effective in identifying power quality issues accurately.
Precision: Precision evaluates the accuracy of the model’s positive predictions, indicating how many of the positively predicted cases were correct. The formula for precision is
$$\begin{aligned} \text {Precision} = \frac{\text {True Positives}}{\text {True Positives} + \text {False Positives}} \end{aligned}$$
(2)
In the proposed system, DL models like CNN and LSTM exhibited higher precision compared to traditional approaches, which indicates a better capacity to reduce false positives during power quality monitoring.
Recall: Recall measures the model’s ability to identify all actual instances of a particular class, focusing on sensitivity to relevant cases. It is calculated using:
$$\begin{aligned} \text {Recall} = \frac{\text {True Positives}}{\text {True Positives} + \text {False Negatives}} \end{aligned}$$
(3)
In challenging scenarios with imbalanced datasets, the proposed system’s DL models, particularly LSTM, achieved superior recall, showcasing their effectiveness in detecting even infrequent disturbances.
F1-Score: The F1-score combines both precision and recall into a single metric, providing a balanced view of the model’s accuracy. It is the harmonic mean of precision and recall, given by:
$$\begin{aligned} \text {F1-Score} = 2 \times \frac{\text {Precision} \times \text {Recall}}{\text {Precision} + \text {Recall}} \end{aligned}$$
(4)
We incorporated several Key Performance Indicators (KPIs), including MARE, MSRE, MAE, MSE, RMSE, MAPE, RMSPE, and RMSRE, to provide a comprehensive evaluation of the proposed model’s performance. These KPIs offer a nuanced assessment of prediction accuracy, error distribution, and generalization across various datasets. For example, the MARE for voltage sags prediction in the hybrid model was 6.3%, outperforming the 9.5% of the simpler SVM model. Similarly, the MSRE for voltage swells prediction was 0.015 for the hybrid model, compared to 0.028 for the SVM, demonstrating the hybrid model’s ability to minimize larger deviations. The MAE for voltage sag prediction was 0.35 V for the hybrid model, significantly lower than 0.65 V for traditional models, indicating better accuracy. The RMSE for voltage sag detection was 0.52 V, compared to 0.85 V for simpler models, showing better handling of fluctuations. Additionally, the hybrid model achieved 5.2% MAPE in harmonic distortion prediction, compared to 9.8% for traditional models, showcasing better generalization. The RMSPE for transient event prediction was 7.1% for the hybrid model, compared to 11.3% for SVM, highlighting the hybrid model’s superior efficiency in minimizing errors. Finally, the RMSRE for harmonic disturbance classification was 4.5% for the hybrid model, better than the 6.8% of traditional models. These results demonstrate the hybrid model’s superior ability to minimize errors, improve detection accuracy, and generalize across different power quality disturbances, making it more reliable for real-world applications.
We conducted a comprehensive evaluation of the proposed model by incorporating sensitivity analysis, feature importance, and computational complexity. The sensitivity analysis assessed how the model’s predictions change with variations in key power quality parameters such as voltage, current, harmonics, and transient events. For example, the model’s error margin for voltage sags increased by 8% when the voltage was reduced by 20%, demonstrating its sensitivity to disturbances. This ensures the model’s robustness across different operational conditions. Additionally, feature importance analysis using permutation importance and SHAP (Shapley Additive Explanations) values revealed that voltage fluctuations contributed to 40% of the model’s predictions for voltage sags, while harmonic distortion accounted for about 35%. This guides feature selection, improving the model’s efficiency and interpretability by focusing on key parameters like harmonics and voltage fluctuations. Furthermore, we assessed the model’s computational complexity by measuring both training and inference times. The hybrid model required 2 hours to train on a dataset of 50,000 samples, compared to 45 minutes for the simpler SVM model, and 5 hours for deep learning models like LSTM on larger datasets. The inference time for the hybrid model was 20 milliseconds for real-time prediction with a dataset size of 10,000 samples, whereas traditional models like Random Forest took 50 milliseconds. We also found that adding more features, such as harmonics and non-linear load characteristics, increased training time by approximately 25%, with more complex models like LSTM requiring three times the computational resources compared to simpler models.
