Robust Detection Algorithm for Single-Phase Voltage Sags Integrating Adaptive Composite Morphological Filtering and Improved MSTOGI-PLL
Abstract
1. Introduction
2. Principle and Limitations of Traditional Single-Phase Voltage Sag Detection
2.1. Detection Principle Based on αβ-dq Transform
2.2. Structural Characteristics and DC Penetration Failure Mechanism of SOGI-PLL
3. Improved Detection Method Based on MSTOGI-CNF-PLL
3.1. Topology and DC Blocking Mechanism of MSTOGI
3.2. Dynamic Response Analysis and Parameter Optimization
3.3. Target Harmonic Suppression Based on Cascaded Notch Filters and Overall Detection Architecture
4. Adaptive Composite Morphological Filter (ACMF)
4.1. Basic Principles of Morphological Filtering
4.2. Design of the Composite Structuring Element
4.2.1. Sine–Triangle Composite Structuring Element
4.2.2. Parameter Optimization Strategy Based on Maximum Reconstructed SNR
4.3. Offline Periodic Optimization Mechanism and Overall Synergistic Workflow
4.3.1. Offline Periodic Parameter Optimization Mechanism
4.3.2. Overall Synergistic Detection Workflow
- Upon system startup, the default or previous cycle’s parameters (H0, L0, λ0) are loaded. The ACMF module utilizes these parameters to filter the real-time acquired voltage signal containing disturbances.
- The filtered voltage signal is input into the MSTOGI-CNF-PLL module to obtain the final output instantaneous RMS value URMS.
- The URMS is compared with the preset threshold in real time. If a limit violation occurs, an alarm or protective measure is immediately triggered; otherwise, the system assesses whether the parameter update cycle has been reached.
- When the parameter update cycle is reached, the system initiates waveform recording and constructs the ideal voltage uideal under current conditions based on the acquired steady-state voltage sample sequence urec.
- A 3D discrete parameter search space encompassing the structuring element height H, length L, and weighting factor λ is constructed. Aiming to maximize the SNR, a global exhaustive search is performed across all parameter combinations.
- The optimal parameter combination (Hopt, Lopt, λopt) is selected and updated into the ACMF module.
5. Simulation Analysis
5.1. ACMF Parameter Optimization
5.2. ACMF Performance Analysis
5.3. MSTOGI Performance Analysis
5.3.1. DC Offset Rejection Capability Comparison
5.3.2. Dynamic Response Speed Comparison
5.4. Synergistic Detection Architecture Ablation Study
5.5. Performance Verification Under Complex Conditions
6. Experiments
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Blaabjerg, F.; Teodorescu, R.; Liserre, M.; Timbus, A.V. Overview of control and grid synchronization for distributed power generation systems. IEEE Trans. Ind. Electron. 2006, 53, 1398–1409. [Google Scholar] [CrossRef]
- Bollen, M.H. Understanding Power Quality Problems; IEEE Press: New York, NY, USA, 2000. [Google Scholar]
- Khaleel, M.; Yusupov, Z.; Elmnifi, M.; Elmenfy, T.; Rajab, Z.; Elbar, M. Assessing the financial impact and mitigation methods for voltage sag in power grid. Int. J. Electr. Eng. Sustain. 2023, 1, 10–26. [Google Scholar] [CrossRef]
- Nielsen, J.G.; Blaabjerg, F. A detailed comparison of system topologies for dynamic voltage restorers. IEEE Trans. Ind. Appl. 2005, 41, 1272–1280. [Google Scholar] [CrossRef]
- Fitzer, C.; Barnes, M.; Green, P. Voltage sag detection technique for a dynamic voltage restorer. IEEE Trans. Ind. Appl. 2004, 40, 203–212. [Google Scholar] [CrossRef]
- Li, H.; Meng, C.; Zhao, Y. Automatic expansion of voltage signals using empirical mode decomposition for voltage sag detection. IEEE Access 2022, 10, 80138–80150. [Google Scholar] [CrossRef]
- Shi, C.; Dong, K.; Yan, H.; Liu, W.; Zhao, J. An improved real-time voltage sag detection method based on the short-time delay method. In Proceedings of the 2021 IEEE Sustainable Power and Energy Conference (iSPEC); IEEE: New York, NY, USA, 2021; pp. 2781–2786. [Google Scholar]
- Li, Z.; Yang, R.; Guo, X.; Wang, Z.; Chen, G. A novel voltage sag detection method based on a Selective Harmonic Extraction algorithm for nonideal grid conditions. Energies 2022, 15, 5560. [Google Scholar] [CrossRef]
- Yang, D.; Lu, S.; Wei, J.; Zheng, L.; Gao, Y. Detection and Classification of Power Quality Disturbances Based on Improved Adaptive S-Transform and Random Forest. Energies 2025, 18, 4088. [Google Scholar] [CrossRef]
- Wang, H.; Liu, J.; Luo, S.; Xu, X. Research on power quality disturbance detection method based on improved ensemble empirical mode decomposition. Electronics 2020, 9, 585. [Google Scholar] [CrossRef]
- Marei, M.I.; El-Saadany, E.F.; Salama, M.M.A. Estimation techniques for voltage flicker envelope tracking. Electr. Power Syst. Res. 2004, 70, 30–37. [Google Scholar] [CrossRef]
- Caicedo, J.E.; Agudelo-Martínez, D.; Rivas-Trujillo, E.; Meyer, J. A systematic review of real-time detection and classification of power quality disturbances. Prot. Control Mod. Power Syst. 2023, 8, 1–37. [Google Scholar] [CrossRef]
- Memon, A.A.; Koondhar, M.A.; Al-Gahtani, S.F.; Elbarbary, Z.M.S.; Alaas, Z.M. Comprehensive review of power quality disturbance detection and classification techniques. Comput. Electr. Eng. 2025, 126, 110512. [Google Scholar] [CrossRef]
- Karimi-Ghartemani, M.; Iravani, M.R. A method for synchronization of power electronic converters in polluted and variable-frequency environments. IEEE Trans. Power Syst. 2004, 19, 1263–1270. [Google Scholar] [CrossRef]
- Shen, X.; Lin, Y.; Yuan, B.; Chen, D.; Li, Z. An Adaptive Variable-Parameter MAF-MATCH Algorithm for Grid-Voltage Detection Under Non-Ideal Conditions. Electronics 2025, 14, 4288. [Google Scholar] [CrossRef]
- Al-Gahtani, S.F.; Barnawi, A.B.; Azazi, H.Z.; Irshad, S.M.; Bhutto, J.K.; HM, M.; Salem, E.Z. A new technique implemented in synchronous reference frame for DVR control under severe sag and swell conditions. IEEE Access 2022, 10, 25565–25579. [Google Scholar] [CrossRef]
- Ikeda, F.; Okamoto, S.; Okamoto, M.; Yamada, H.; Tanaka, T. Fast Voltage-Dip Detection Method With Single-Phase PLL in Bidirectional Battery Charger for EVs. In Proceedings of the 2023 11th International Conference on Power Electronics and ECCE Asia (ICPE 2023-ECCE Asia); IEEE: New York, NY, USA, 2023; pp. 1195–1200. [Google Scholar]
- Tan, G.; Fu, Q.; Xia, T.; Zhang, X. Development of frequency fixed sliding discrete fourier transform filter based single-phase phase-locked loop. IEEE Access 2021, 9, 110573–110581. [Google Scholar] [CrossRef]
- Sahoo, A.; Mahmud, K.; Ravishankar, J. An enhanced frequency-adaptive single-phase grid synchronization technique. IEEE Trans. Instrum. Meas. 2021, 70, 9002611. [Google Scholar] [CrossRef]
- Xu, J.; Hu, Y.; Qian, H.; Xie, S. Delay-based phase-locked loop parameters design based on stability region of grid-connected single-phase inverter under grid voltage sags. IEEE Trans. Ind. Electron. 2021, 69, 11324–11334. [Google Scholar] [CrossRef]
- Xiao, F.; Dong, L.; Li, L.; Liao, X. A frequency-fixed SOGI-based PLL for single-phase grid-connected converters. IEEE Trans. Power Electron. 2016, 32, 1713–1719. [Google Scholar] [CrossRef]
- Xu, J.; Qian, H.; Hu, Y.; Bian, S.; Xie, S. Overview of SOGI-based single-phase phase-locked loops for grid synchronization under complex grid conditions. IEEE Access 2021, 9, 39275–39291. [Google Scholar] [CrossRef]
- Zhang, Y.; Shen, Y.; Wang, T.; Cheng, T.; Chen, Z. An Improved SOGI-PLL for DC Offsets and Frequency Ramps. J. Electr. Eng. Technol. 2025, 20, 4231–4242. [Google Scholar] [CrossRef]
- Xie, M.; Wen, H.; Zhu, C.; Yang, Y. DC offset rejection improvement in single-phase SOGI-PLL algorithms: Methods review and experimental evaluation. IEEE Access 2017, 5, 12810–12819. [Google Scholar] [CrossRef]
- Smadi, I.A.; Albatran, S.; Fawaz, B.B.; Ali, M.S. DC offset rejection and harmonics filtering improvement in second-order generalized integrator based-phase-locked loop: A comprehensive review. Renew. Sustain. Energy Rev. 2025, 220, 115891. [Google Scholar] [CrossRef]
- Zhang, C.; Zhao, X.; Wang, X.; Chai, X.; Zhang, Z.; Guo, X. A grid synchronization PLL method based on mixed second-and third-order generalized integrator for DC offset elimination and frequency adaptability. IEEE J. Emerg. Sel. Top. Power Electron. 2018, 6, 1517–1526. [Google Scholar] [CrossRef]
- Zhu, J.H.; Zhang, P.; Tan, L.; Gu, J.; Li, H. Improved MSTOGI-PLL with enhanced control under non-ideal grid voltage conditions. Electr. Power Syst. Res. 2025, 238, 111060. [Google Scholar] [CrossRef]
- Yu, Y.; Othman, M.M.; Chu, Y. Analytical Design and Performance of MSTOGI-PLL in Unified Power Quality Conditioner (UPQC) for Anti-Disturbance Enhancement in Power Quality Mitigation. Arab. J. Sci. Eng. 2026. [Google Scholar] [CrossRef]
- Zimmermann, M.; Dostert, K. Analysis and modeling of impulsive noise in broad-band powerline communications. IEEE Trans. Electromagn. Compat. 2002, 44, 249–258. [Google Scholar] [CrossRef]
- Sonmez, M.A.; Zehir, M.A.; Bagriyanik, M.; Nak, O. Impulsive noise survey on power line communication networks up to 125 kHz for smart metering infrastructure in systems with solar inverters in Turkey. In Proceedings of the 2013 International Conference on Renewable Energy Research and Applications (ICRERA); IEEE: New York, NY, USA, 2013; pp. 705–710. [Google Scholar]
- Ma, H.; Sheng, W.; Liu, K. A distribution network state estimation method with non-Gaussian noise based on parallel particle filter. IEEE Access 2023, 11, 133034–133048. [Google Scholar] [CrossRef]
- Ou-yang, H.; Bu, L.P.; Yang, Z.L. Voltage sag detection based on dq transform and mathematical morphology filter. Procedia Eng. 2011, 23, 775–779. [Google Scholar] [CrossRef]
- Ding, Z.; Ji, T.; Li, M.; Wu, Q.H. A hybrid signal processing method combining mathematical morphology and Walsh theory for power quality disturbance detection and classification. CSEE J. Power Energy Syst. 2023, 10, 584–592. [Google Scholar]
- Dash, P.K.; Prasad, E.N.; Jalli, R.K.; Mishra, S.P. Multiple power quality disturbances analysis in photovoltaic integrated direct current microgrid using adaptive morphological filter with deep learning algorithm. Appl. Energy 2022, 309, 118454. [Google Scholar] [CrossRef]
- Ciobotaru, M.; Teodorescu, R.; Blaabjerg, F. A new single-phase PLL structure based on second order generalized integrator. In Proceedings of the 2006 37th IEEE Power Electronics Specialists Conference; IEEE: New York, NY, USA, 2006; pp. 1–6. [Google Scholar]
- Golestan, S.; Guerrero, J.M.; Vasquez, J.C. Three-phase PLLs: A review of recent advances. IEEE Trans. Power Electron. 2016, 32, 1894–1907. [Google Scholar] [CrossRef]






















| Sag Occurrence Moment | MSTOGI-PLL | SOGI-PLL |
|---|---|---|
| Zero-crossing point | 2.4 ms | 3.6 ms |
| Peak point | 0.7 ms | 1.1 ms |
| Quarter-point | 0.7 ms | 1.15 ms |
| Algorithm | Detection Time | Steady-State RMS Error | Steady-State Phase Error |
|---|---|---|---|
| ACMF-MSTOGI-CNF-PLL | 1.0 ms | ±2% | ±2° |
| SOGI-PLL | 1.85 ms | ±17% | ±7° |
| SDFT-PLL | 2.6 ms | ±1% | ±2° |
| EASOGI-PLL | 0.7 ms | ±9% | ±2° |
| Algorithm | Detection Time | Steady-State RMS Error | Steady-State Phase Error |
| ACMF-MSTOGI-CNF-PLL | 1.0 ms | ±2% | ±1° |
| SOGI-PLL | 1.85 ms | ±14% | ±6° |
| SDFT-PLL | 2.6 ms | ±1% | ±1.5° |
| EASOGI-PLL | 0.7 ms | ±8% | ±2° |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Zhou, J.; Wang, E.; Xu, J.; Yu, Y. Robust Detection Algorithm for Single-Phase Voltage Sags Integrating Adaptive Composite Morphological Filtering and Improved MSTOGI-PLL. Energies 2026, 19, 1621. https://doi.org/10.3390/en19071621
Zhou J, Wang E, Xu J, Yu Y. Robust Detection Algorithm for Single-Phase Voltage Sags Integrating Adaptive Composite Morphological Filtering and Improved MSTOGI-PLL. Energies. 2026; 19(7):1621. https://doi.org/10.3390/en19071621
Chicago/Turabian StyleZhou, Jun, Enming Wang, Jianjun Xu, and Yang Yu. 2026. "Robust Detection Algorithm for Single-Phase Voltage Sags Integrating Adaptive Composite Morphological Filtering and Improved MSTOGI-PLL" Energies 19, no. 7: 1621. https://doi.org/10.3390/en19071621
APA StyleZhou, J., Wang, E., Xu, J., & Yu, Y. (2026). Robust Detection Algorithm for Single-Phase Voltage Sags Integrating Adaptive Composite Morphological Filtering and Improved MSTOGI-PLL. Energies, 19(7), 1621. https://doi.org/10.3390/en19071621
