Next Article in Journal
Sustainable Development, Energy Economics and Economic Analysis
Previous Article in Journal
Comparative Assessment of Supervised Machine Learning Models for Predicting Water Uptake in Sorption-Based Thermal Energy Storage
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Robust Detection Algorithm for Single-Phase Voltage Sags Integrating Adaptive Composite Morphological Filtering and Improved MSTOGI-PLL

School of Electrical Engineering, Northeast Electric Power University, Jilin 132012, China
*
Author to whom correspondence should be addressed.
Energies 2026, 19(7), 1621; https://doi.org/10.3390/en19071621
Submission received: 25 February 2026 / Revised: 19 March 2026 / Accepted: 23 March 2026 / Published: 25 March 2026
(This article belongs to the Section F1: Electrical Power System)

Abstract

Voltage sags pose severe risks to sensitive equipment in modern industries, requiring power quality monitoring equipment to possess fast and accurate sag detection capabilities. The traditional second-order generalized integrator (SOGI) will have oscillation phenomena in the case of DC offset, low-frequency harmonics, and high-frequency impulse noise. This study introduces a strong detection algorithm that combines Adaptive Composite Morphological Filtering (ACMF) with an improved Mixed Second- and Third-Order Generalized Integrator (MSTOGI). First, the ACMF pre-filtering module dynamically adjusts the scale of composite structuring elements through periodic parameter optimization, effectively filtering high-frequency random impulses while preserving the sharp transitions of abrupt voltage changes. Second, MSTOGI eliminates DC offset, and optimizes the gain coefficient to achieve the best dynamic response speed. Ultimately, a cascaded notch filter (CNF) module focuses on and removes even-order harmonic ripples caused by the synchronous reference frame transformation. Simulation results indicate that under severe grid conditions involving multiple composite distortions, the proposed architecture reduces the sag detection time to within 1.0 ms under typical operating conditions, with steady-state phase errors strictly controlled within a ±2° range. This method provides a reliable solution for DVR and UPS.

1. Introduction

With the high-penetration integration of distributed renewable energy sources and the widespread application of power electronic devices in modern industrial and distribution networks, power quality issues have become increasingly prominent [1]. Among these, voltage sags, characterized by their high frequency of occurrence and broad coverage area, have emerged as a critical challenge constraining the stable operation of smart grids and modern industry [2]. From a physical causality perspective, short-circuit faults, the direct starting of large induction motors, and the inrush current generated by transformer no-load energization are the three primary triggers of voltage sags in distribution networks. Even a short-duration voltage sag lasting merely tens of milliseconds can easily induce widespread shutdowns of highly power-sensitive, high-end industrial equipment, such as semiconductor manufacturing plants and precision robotics control centers, resulting in incalculable economic losses [3]. To mitigate this issue, power quality mitigation devices such as DVR and UPS are widely deployed [4]. However, the actual compensation performance of these devices heavily depends on whether their control systems can achieve sub-millisecond, highly precise detection of voltage sag characteristics under complex and distorted grid conditions [5].
Existing single-phase voltage sag detection methods encompass traditional time-domain approaches, transform-domain analysis techniques, and data-driven algorithms. Although traditional time-domain methods (e.g., root-mean-square calculations and peak detection) offer intuitive principles, they are susceptible to grid noise interference and suffer from inherent computational delays in dynamic response [6,7]. Within transform-domain methods, the Wavelet Transform (WT) exhibits sensitivity to background high-frequency noise [8]; the S-Transform (ST) and its improved variants encounter multiple challenges, including insufficient time–frequency resolution, limited adaptability, and low computational efficiency when processing composite power quality disturbances containing high-frequency transients [9]; the Empirical Mode Decomposition (EMD), the core algorithm of the Hilbert–Huang Transform (HHT), possesses a degree of adaptability but suffers from inherent “mode mixing” defects, and its long execution time restricts its industrial application in online closed-loop control [10]. Deep learning and artificial intelligence algorithms, such as Convolutional Neural Networks (CNNs), have been introduced to this field, demonstrating an accuracy rate of over 99% in disturbance feature recognition [11]. However, the large model parameters and hardware computational burden conflict with real-time requirements, rendering their ability to meet the stringent real-time closed-loop control demands of devices such as DVR [12,13].
Detection methods based on the Synchronous Reference Frame Phase-Locked Loop (SRF-PLL) have become a mainstream solution with practical engineering value, due to their minimal computational burden and clear physical significance [14]. This method is mature in three-phase systems, easily mapping AC fundamental waves to DC quantities [15,16]. However, in single-phase systems, the core technical bottleneck lies in how to rapidly construct virtual orthogonal voltage signals with zero steady-state error. In recent years, scholars have proposed various improved architectures for orthogonal signal generators. Ref. [17] proposed a fast voltage-dip detection method utilizing a single-phase PLL based on a quarter-cycle (T/4) delay module for dq coordinate transformation; however, this approach fundamentally relies on the physical caching of historical sampling data, and this inherent delay characteristic still restricts the rapid response of the system. Ref. [18] introduced a detection architecture using a fixed sampling frequency Sliding Discrete Fourier Transform (SDFT) as a pre-filter to enhance steady-state precision, but its core sliding computation window inherently possesses a delay equivalent to an entire fundamental frequency cycle; when grid faults occur, the aliasing of old and new data leads to dynamic trailing and detection delays. Ref. [19] introduced an enhanced single-phase synchronization technique combining a simplified energy operator with a SOGI to accelerate dynamic tracking during voltage sags; however, by simplifying the operator to pursue extreme dynamic response, this approach essentially widens the equivalent passband, meaning it cannot maintain good filtering performance in complex environments, easily coupling impulse noise into the detection loop. Ref. [20] proposed a delay-based PLL parameter optimization method focused on dynamic response and large-signal stability under grid voltage sags, yet its fixed parameter design struggles to adapt to complex harmonics or phase jumps, easily triggering transient oscillations and inherently amplifying grid noise.
The SOGI has become the most widely applied solution for single-phase voltage sag detection due to its structural simplicity and the absence of physical delays [21,22]. However, the standard SOGI exhibits a fatal flaw when faced with non-ideal operating conditions: its orthogonal channel presents low-pass characteristics and cannot suppress aperiodic DC offset in the input signal, causing the calculated voltage RMS value to exhibit severe fundamental frequency oscillations and detection errors [23]. Recently, researchers have proposed various improvement strategies. Refs. [24,25] provide exhaustive reviews of these strategies, ranging from structural optimization schemes based on multi-stage cascading or integrator reconstruction to pre-filtering or in-loop filtering strategies integrating notch filters, delayed signal cancellation, and moving average filtering. Ref. [26] proposed a Mixed Second- and Third-Order Generalized Integrator (MSTOGI) scheme. This scheme ingeniously embeds a dedicated DC estimation and cancellation channel by reconstructing the integrator topology while retaining the second-order resonant characteristics of the SOGI. Its core advantage is that it fundamentally blocks the interference of DC offset on orthogonal signals at the physical level, achieving zero steady-state error. More critically, it avoids the introduction of additional delay components or high-order filters, thereby perfectly inheriting the SOGI’s rapid response characteristics at the instant of inception, providing an ideal solution for grid detection under complex, non-ideal conditions. To further enhance its adaptability under complex conditions, MSTOGI has been continuously developed and applied to power quality mitigation equipment [27,28].
In addition to DC offset, high-frequency impulse interference triggered by converter commutation or capacitor bank switching in distribution networks cannot be ignored [29,30,31]. If processed directly without suppression, these high-amplitude impulse signals will cause the calculated RMS voltage results to exhibit violent fluctuations and significant deviations, severely degrading the measurement precision and reliability of the detection system. Against such noise, traditional linear filtering methods, while capable of attenuating interference, generally sacrifice dynamic response speed and easily cause the blurring of transient edges. Mathematical morphological filtering, as a non-linear signal processing tool, utilizes a unique set-theoretic operational mechanism to effectively suppress impulse interference while perfectly preserving the instant of inception. Therefore, it is widely utilized in the field of power quality disturbance detection [32,33]. However, the performance of traditional morphological filters is highly dependent on the scale selection of the structuring elements, and a single fixed scale struggles to maintain optimal filtering performance in complex and highly variable noise environments [34]. Consequently, building an adaptive filtering framework that adjusts its parameters automatically in response to noise levels is vital for boosting the detection algorithm’s ability to resist interference.
This study constructs a collaborative detection architecture integrating ACMF, MSTOGI, and CNF to solve the contradiction between detection accuracy and response speed in challenging grid environments. This architecture utilizes ACMF for purification filtering at the forefront, accurately removing impulse interference while maintaining the transient profile of the voltage sag without distortion. First, an ACMF based on a sinusoidal–triangular composite structuring element is constructed as a pre-filter, which efficiently filters high-frequency random impulse noise and retains transient features relying on an offline parameter optimization mechanism. Then, the MSTOGI is used in the core calculation layer to cancel DC offset, and a sub-millisecond extreme dynamic response is constructed using optimized high-gain coefficients. Finally, the cascaded notch filter (CNF) is added at the back end to effectively eliminate the even-order harmonics generated by the coordinate transformation.
The rest of this paper is organized as follows. Section 2 elaborates on the detection principle based on the αβ-dq transform and analyzes the failure mechanism of the traditional SOGI-PLL under DC offset conditions. Section 3 details the mathematical model of the improved MSTOGI-CNF-PLL algorithm, focusing on the DC rejection characteristics of the MSTOGI, dynamic parameter tuning strategies, and the design of the cascaded notch filter. Section 4 introduces the ACMF algorithm targeting impulse noise, exploring the design of the composite structuring element and the parameter optimization process based on the maximum reconstructed SNR. Section 5 and Section 6 verify the steady-state precision and dynamic performance of the proposed method under DC offset, harmonic interference, impulse noise, and composite distortion conditions through comparative simulation experiments. Finally, Section 7 summarizes the main conclusions of this study.

2. Principle and Limitations of Traditional Single-Phase Voltage Sag Detection

2.1. Detection Principle Based on αβ-dq Transform

In single-phase AC systems, a detection architecture using the Synchronous Reference Frame (SRF) is typically used to quickly track voltage amplitude and phase. This method’s fundamental control strategy involves first generating a set of virtual voltage signals (uα and uβ) in the stationary reference frame, which are equal in magnitude and strictly orthogonal. Subsequently, the Park transform is utilized to map them into a synchronously rotating dq reference frame (as shown in Figure 1). Through this coordinate transformation, the amplitude characteristics of the AC fundamental wave are converted into easily controllable DC components, thereby enabling the instantaneous calculation of the voltage RMS value.
Under steady-state grid operating conditions, the voltage vector U remains relatively stationary in the dq reference frame. After obtaining the grid phase θ = ωt + φ using a PLL, the matrix expression for the orthogonal signals undergoing the Park transform is as follows:
u d u q = cos θ sin θ sin θ cos θ u α u β
When the system is in steady state and phase-locking is precise, the outputs ud and uq are both smooth DC components. In this case, the instantaneous RMS value of the single-phase voltage URMS can be calculated in real time by the following equation:
U RMS = ( u d 2 + u q 2 ) / 2
This method possesses excellent detection performance and minimal computational delay under ideal grid conditions. However, the prerequisite for its effectiveness is that the front-end system must be able to rapidly and accurately construct ideal orthogonal voltage signals with zero steady-state error.

2.2. Structural Characteristics and DC Penetration Failure Mechanism of SOGI-PLL

To achieve orthogonal signal reconstruction, the SOGI is widely applied as an Orthogonal Signal Generator (OSG) in single-phase phase-locked loop systems due to its structural simplicity and superior frequency adaptability [35]. Its control block diagram is shown in Figure 2.
In this system, the left side comprises the orthogonal signal generation structure of the SOGI, which utilizes two integrators and a cross-feedback channel to process the input single-phase voltage u and generate a set of orthogonal signals uα and uβ. These signals, uα and uβ, serve as inputs to the αβ-dq transform module to obtain the d-axis and q-axis components in the synchronous rotating reference frame. The PLL module achieves phase locking by implementing closed-loop regulation on the q-axis component uq, and the output estimated phase θ′ participates in the coordinate transformation as the rotation angle, while the output estimated angular frequency ω′ is fed back to the SOGI. The transfer functions of the SOGI are derived as follows:
D SOGI ( s ) = u α ( s ) u ( s ) = k ω s s 2 + k ω s + ω 2
Q SOGI ( s ) = u β ( s ) u ( s ) = k ω 2 s 2 + k ω s + ω 2
where k is the integrator gain coefficient, and ω′ is the estimated angular frequency fed back by the PLL.
However, in practical, complex, non-ideal grid conditions, short-circuit faults or sudden changes in large loads are often accompanied by aperiodic DC offset components instantaneously injected into the grid. Assuming the input voltage contains a DC offset Vdc, and the SOGI gain coefficient k = 1.0, the DC gain of the orthogonal channel is:
Q SOGI ( 0 ) = k ω 2 s 2 + k ω s + ω 2 s = 0 = 1
This indicates that QSOGI(s) exhibits low-pass filtering characteristics in the low-frequency band and is incapable of suppressing DC. Any DC offset Vdc in the input signal will propagate through the orthogonal channel without attenuation. At this time, the orthogonal voltage signals constructed by the system will be distorted as follows:
u α ( t ) = U m cos ( ω t + φ )
u β ( t ) = U m sin ( ω t + φ ) + V dc
By substituting the aforementioned distorted orthogonal signals into the Park transform matrix, the d-axis and q-axis components in the synchronous rotating reference frame are obtained:
u d ( t ) = U m + V dc sin ( ω t + φ )
u q ( t ) = V dc cos ( ω t + φ )
According to the RMS calculation formula, the actual detected RMS voltage URMS becomes:
U RMS = 1 2 U m 2 + V d c 2 + 2 U m V dc sin ( ω t + φ ) 1 2 U m + V dc sin ( ω t + φ )
The derivation results demonstrate that due to the penetration of the DC component, the calculated RMS voltage is superimposed with strong fundamental frequency AC oscillation ripples. This not only severely degrades the precision of the voltage sag detection but also triggers incorrect compensation and maloperation of protective equipment.
Since this “DC penetration” is an inherent topological defect of the SOGI, attempting to cascade a low-pass filter in the external control loop to eliminate this oscillation will inevitably introduce unacceptable phase delays, thereby losing the sub-millisecond extreme dynamic response required for voltage sag detection. Therefore, structural reconstruction must be performed internally from the physical topology of the integrator.

3. Improved Detection Method Based on MSTOGI-CNF-PLL

3.1. Topology and DC Blocking Mechanism of MSTOGI

To address the fundamental flaw that the orthogonal channel of the traditional SOGI exhibits low-pass characteristics and cannot suppress DC offsets, this paper introduces the MSTOGI to reconstruct the underlying physical architecture of the orthogonal signal generator. While strictly preserving the original second-order resonant channel, this architecture introduces a third integration path to topologically reconstruct the orthogonal output branch, endowing it with DC isolation capabilities. The internal control block diagram of the MSTOGI is shown in Figure 3.
The transfer functions of the MSTOGI are derived as follows:
D MSTOGI ( s ) = u α ( s ) u ( s ) = k ω s s 2 + k ω s + ω 2
Q MSTOGI ( s ) = u β ( s ) u ( s ) = k ω s ( ω s ) ( s + ω ) ( s 2 + k ω s + ω 2 )
where k is the integrator gain coefficient, and ω′ is the estimated angular frequency fed back by the phase-locked loop. The Bode diagrams of DMSTOGI(s) and QMSTOGI(s) under different gain coefficients k are shown in Figure 4.
For a fundamental frequency signal of 50 Hz, uα is in phase with the input signal u and equal in amplitude; uβ lags behind u by 90° and is equal in amplitude. This indicates that the MSTOGI fully retains the fundamental wave extraction and phase-shifting functions of the orthogonal signal generator. Furthermore, the gain of QMSTOGI(s) at zero frequency (s = 0) is:
Q MSTOGI ( 0 ) = k ω s ( ω s ) ( s + ω ) ( s 2 + k ω s + ω 2 ) s = 0 = 0
This demonstrates that the MSTOGI structurally forces the introduction of an open-loop zero at the origin of the complex plane, effectively blocking the DC pathway at a physical level. This ensures that the reconstructed orthogonal components contain no DC offset, achieving zero steady-state error.

3.2. Dynamic Response Analysis and Parameter Optimization

Voltage sags introduce transient disturbances into the voltage waveform. The tracking speed of the detection algorithm at the sag onset is inherently coupled with its sensitivity to the rate of change in the input signal. The transfer function of the traditional QSOGI(s) features a constant numerator (2) and lacks a differential component. Consequently, the system relies on the integral action within the denominator to accumulate errors for transient tracking, resulting in a relatively sluggish dynamic response.
In contrast, the transfer function of the proposed QMSTOGI(s) expands to a numerator of s(ω′ − s), thereby introducing a differential component. This modification enables the system to rapidly detect the rate of change in the input voltage and inject phase-lead compensation at the initial stage of the voltage sag, significantly enhancing the dynamic tracking speed.
To quantitatively evaluate and select the optimal control parameters, this paper systematically investigated the impact of the gain coefficient k on system performance. Figure 5 and Figure 6 respectively illustrate the step response curves and pole-zero maps under different gain coefficients of k.
As indicated by the root locus plot in Figure 6, all closed-loop poles of the system consistently reside in the left half of the complex plane, ensuring system stability. When k < 2.0, the system possesses a pair of complex conjugate poles and is in an underdamped state; when k = 2.0, the conjugate poles converge on the real axis, reaching critical damping; when k > 2.0, the system enters an overdamped state, and the response speed conversely becomes sluggish. Furthermore, the step response in Figure 5 demonstrates that increasing the value of k significantly steepens the initial slope, thereby enhancing the system’s tracking capability for abrupt signal changes.
Although theoretically the system responds fastest and without overshoot at the critical damping point of k = 2.0, operating exactly at this critical boundary is typically avoided in practical engineering applications to maintain a sufficient stability margin. According to Figure 5, the initial tracking slope at k = 1.8 is nearly identical to that at k = 2.0, guaranteeing an equivalent sub-millisecond dynamic response speed. Furthermore, Figure 6 indicates that selecting k = 1.8 places the system in a slightly underdamped state. This provides a more robust stability margin against grid parameter variations compared to the critical limit, while also avoiding the excessive bandwidth expansion that occurs as k approaches 2.0. Therefore, to strike an explicitly justified balance between dynamic response speed and steady-state stability, the gain coefficient is set to k = 1.8.

3.3. Target Harmonic Suppression Based on Cascaded Notch Filters and Overall Detection Architecture

Modern low-voltage distribution networks contain low-frequency odd harmonics, primarily the 3rd, 5th, and 7th. This phenomenon is mainly caused by the high penetration of non-linear electronic loads, such as single-phase bridge rectifiers, switching power supplies, and variable frequency drives [36]. Following the Park transform, these odd harmonics are mapped to even harmonics on the DC side. The 3rd harmonic may map to the 2nd or 4th harmonic, while both negative-sequence 5th and positive-sequence 7th harmonics are mapped to the 6th harmonic in the synchronous reference frame.
Since the high-gain MSTOGI possesses limited harmonic attenuation capabilities, these mapped even harmonics will directly induce periodic fluctuations in the detection results. Therefore, after the Park transform, three targeted second-order notch filters (Cascaded Notch Filter, CNF) are cascaded as a back-end shaping module. The CNFs significantly attenuate the characteristic harmonics while allowing the DC component to pass unattenuated. The transfer function of the designed cascaded notch filter GCNF(s) is as follows:
G CNF ( s ) = n 2 , 4 , 6 s 2 + ( n ω ) 2 s 2 + 2 ς ( n ω ) s + ( n ω ) 2
where ω is the fundamental angular frequency of the grid, and n denotes the harmonic order (selected as 2, 4, and 6, respectively). The damping coefficient ζ for all cascaded notch filters is strictly configured to 0.02. The theoretical justification for adopting such a marginal damping value is to endow the notch filters with an exceptionally narrow stopband bandwidth. This parameter design ensures the precise and targeted elimination of the designated even-order harmonics mapped by the coordinate transformation, preventing unintended amplitude attenuation of adjacent useful frequency components. Furthermore, this narrow bandwidth configuration minimizes the inherent phase delay introduced by the filtering process, which is critical for preserving the sub-millisecond dynamic response speed of the overall detection architecture.
Figure 7 shows the constructed MSTOGI-PLL-CNF architecture. The front-end MSTOGI adopts a high gain (k = 1.8) to maintain ultra-fast transient tracking and suppresses the DC offset. The middle-stage CNF accurately removes even-order harmonic ripples from the coordinate transformation. The back-end PLL and RMS calculation modules perform high-precision phase locking and amplitude reconstruction under clean signal conditions. This architecture effectively balances the trade-off between dynamic detection speed and steady-state precision.

4. Adaptive Composite Morphological Filter (ACMF)

In practical low-voltage distribution networks, the commutation actions of a large number of power electronic converters and the switching of capacitor banks inject substantial high-amplitude, extremely short-duration random impulsive interference into the grid. To achieve a rapid dynamic response speed, the gain coefficient of the MSTOGI is set to k = 1.8. While this accelerates the system’s tracking of the sag onset, it also renders the system highly susceptible to high-frequency impulses. If not suppressed, these impulses spikes will directly affect the integrator, causing severe oscillations in the closed-loop detection results, leading to significant distortion in the final output RMS voltage or even triggering erroneous detections. Therefore, before the voltage signal enters the MSTOGI, a pre-filtering stage must be introduced to filter out impulsive interference while preserving the sharp transitions of abrupt voltage changes.
Traditional linear filters can attenuate high-frequency interference, but introduce phase lag, restricting the speed of voltage sag detection. Mathematical morphology filtering is a signal processing method based on geometric feature matching, using structuring elements to extract signal features. This method has the advantages of zero phase shift and low computational burden, and can filter out high-amplitude impulses spikes and background noise while retaining the step-like transient features of voltage sags.

4.1. Basic Principles of Morphological Filtering

Mathematical morphological filtering is fundamentally a non-linear signal processing technique. Its core principle involves utilizing a structuring element sliding over the signal under test to match and extract local features. For a one-dimensional discrete voltage signal f(n) (domain F = {0, 1, …, N − 1}) and a structuring element g(n) (domain G = {0, 1, …, M − 1}, where NM), the four basic morphological operations—dilation ( Θ ), erosion ( ), opening ( ), and closing ( )—are defined as follows:
( f Θ g ) ( n ) = min [ f ( n + m ) g ( m ) ] , m G
( f g ) ( n ) = max [ f ( n m ) + g ( m ) ] , m G
( f g ) ( n ) = ( f Θ g g ) ( n )
( f g ) ( n ) = ( f g Θ g ) ( n )
To simultaneously filter out positive and negative bidirectional impulses, operations are typically combined to form Opening–Closing (Oc) and Closing–Opening (Co) filters, which are defined as follows:
O c = ( f g ) g
C o = ( f g ) g
To further suppress residual noise and eliminate statistical bias, the Adaptive Composite Morphological Filter (ACMF) constructed in this paper computes the arithmetic mean of the Oc and Co filters to yield the final output:
Z ( n ) = C o ( n ) + O c ( n ) 2

4.2. Design of the Composite Structuring Element

4.2.1. Sine–Triangle Composite Structuring Element

Existing research indicates that a sine-shaped structuring element aligns most closely with the fundamental frequency voltage waveform, thereby minimizing the amplitude attenuation and waveform distortion of the fundamental signal. A triangular structuring element possesses a sharp gradient, offering exceptionally high capability in capturing and suppressing impulsive interference. To address complex and volatile grid conditions, this paper constructs a weighted composite structuring element that geometrically fuses the sine-shaped and triangular structuring elements using a weighting factor λ. This endows the filter with the dual advantages of steady-state tracking and transient impulse suppression.

4.2.2. Parameter Optimization Strategy Based on Maximum Reconstructed SNR

To determine the optimal parameters for the composite structuring element, this paper proposes a parameter optimization strategy based on maximizing the reconstructed SNR. This strategy first utilizes the discretely sampled voltage as the sample sequence. Then, it leverages the calculated RMS value and the grid frequency extracted by the PLL to reconstruct the ideal, noise-free reference waveform uideal under current conditions. Subsequently, a three-dimensional discrete parameter search space encompassing length L, height H, and the weighting factor λ is constructed. Finally, aiming to maximize the SNR between the filtered output signal and the reconstructed ideal waveform, a global exhaustive search is performed. The parameter combination Lopt, Hopt, λopt corresponding to the maximum SNR is selected as the optimal setting.

4.3. Offline Periodic Optimization Mechanism and Overall Synergistic Workflow

4.3.1. Offline Periodic Parameter Optimization Mechanism

Existing adaptive morphological filtering typically adopts a frame-by-frame online optimization strategy, conducting real-time parameter iterations for each sampled data point. However, this method consumes substantial computational resources of the controller and introduces significant processing delays, which fundamentally conflicts with the millisecond-level fast response requirement for voltage sag detection.
In order to balance the adaptability and execution speed of the algorithm, this paper proposes an offline periodic parameter optimization mechanism suitable for engineering practice. The physical foundation of this mechanism lies in the statistical stationarity of the noise environment at distribution network nodes: the background noise in the grid is primarily governed by local network topology and load characteristics, exhibiting significant short-term stationarity within a specific time window (e.g., 1–2 h). Based on this premise, the system avoids computationally intensive real-time optimization on frame-by-frame data. It only requires setting an update cycle Tupdate. Once the update time is reached, the parameter optimization process is executed as a background task to refresh the filtering parameters.

4.3.2. Overall Synergistic Detection Workflow

To address the dual demands for rapidity and noise immunity in voltage sag detection, this paper ultimately constructs a synergistic detection architecture: an ACMF-based front-end adaptive filter combined with an MSTOGI-CNF-PLL rapid feature extraction module. Within this framework, the ACMF is responsible for filtering front-end impulses and random noise; the MSTOGI suppresses DC offsets and constructs orthogonal signals; the CNF targets harmonics induced by the coordinate transformation; and the PLL provides the synchronous phase to assist in the dq coordinate transformation, which in turn enables the calculation of the voltage RMS. The overall operational workflow of the system is shown in Figure 8.
The specific synergistic execution steps of the system are as follows:
  • 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

To verify the validity of the proposed method, a single-phase voltage simulation model was built using the MATLAB 2021b software platform. The system setup parameters are defined as follows: grid fundamental frequency 50 Hz, and grid RMS voltage 220 V. The sampling frequency fs is set to 20 kHz, corresponding to a fixed discrete simulation time step of 50 μs. This sampling frequency aligns with the standard switching and sampling frequencies of mainstream industrial digital signal processors (DSPs) widely used in microgrid and converter control systems. It provides sufficient temporal resolution to accurately capture high-frequency transients and multi-order harmonics, while simultaneously keeping the computational burden within acceptable limits to ensure the real-time execution of the complex ACMF and MSTOGI algorithms within a single control cycle. To simulate harsh conditions, a non-ideal voltage signal containing 20 dB Gaussian white noise and random impulse interference was constructed, as shown in Figure 9.
Based on the parameter optimization strategy maximizing the reconstructed SNR detailed in Section 4.3.2, the composite structuring element parameters were determined. The designated height search sequence H is {7, 8, …, 30, 31}, the length search sequence L is {5, 7, …, 23, 25}, and the weighting factor search sequence λ is {0.05, 0.1, …, 0.9, 0.95}. By performing an exhaustive search across all combinations of the aforementioned H, L, and λ, the SNR distribution under various parameter combinations is shown in Figure 10. Statistical analysis reveals that the maximum SNR is 27.037 dB. The parameter combination at this point is: Hopt = 25, Lopt = 19, λopt = 0.8 (i.e., the proportion of sine to triangle is 8:2). In subsequent simulation analyses, the ACMF will maintain this fixed parameter set to simulate the online detection performance of the system after tuning.

5.2. ACMF Performance Analysis

To evaluate the performance of the ACMF, a second-order Butterworth low-pass filter with a cutoff frequency of 100 Hz and a moving average filter with a window width of 0.01 s were selected as comparison objects. In Figure 11, the top plot displays the original noisy sag waveform, and the subsequent three plots present the filtered output waveforms obtained by the three aforementioned filters in their respective order.
Through comparison, while the Butterworth low-pass filter produces a smooth output waveform, it introduces an obvious time delay, severely impacting the real-time capability of the sag detection. The moving average filter exhibits significantly inadequate suppression capabilities against impulsive interference, and it introduces an inherent delay of approximately half a window width. The ACMF can achieve zero-phase removal of Gaussian white noise and impulsive interference, and preserve the sharp transitions when there is an abrupt voltage change. The signal-to-noise ratio after filtering is 26.913 dB, which shows that it has a good denoising effect and signal fidelity performance in complex noise environments.

5.3. MSTOGI Performance Analysis

To verify the superiority of the MSTOGI, this section conducts a comparative test against the SOGI under the premise of shielding front-end noise (both gain parameters are configured as k = 1.8).

5.3.1. DC Offset Rejection Capability Comparison

A single-phase voltage sag model was constructed with a grid RMS voltage of 220 V. A 50% depth voltage sag occurs at t = 0.1 s and recovers at t = 0.3 s, with a 10V DC offset component superimposed across the entire duration. The detection results using MSTOGI-PLL and SOGI-PLL were recorded, with the RMS detection results expressed as percentages, and the detection results are shown in Figure 12.
In Figure 12, the SOGI fails to isolate the DC component, causing the calculated voltage RMS to contain significant fundamental frequency AC ripples after the coordinate transformation. This significantly reduces the detection accuracy and may erroneously trigger the protection threshold due to the excessive ripple amplitude. The MSTOGI completely blocks the DC path, and the detection result shows a smooth straight-line trajectory before and after the sag, reflecting that the MSTOGI has a superior DC suppression effect.

5.3.2. Dynamic Response Speed Comparison

An ideal, noise-free single-phase voltage sag model was constructed. A 50% depth voltage sag occurs at t = 0.1 s and recovers at t = 0.3 s. Considering the randomness of fault occurrence, voltage sags can initiate at any phase angle. The natural zero-crossing point, peak point, and the quarter-point of the positive half-cycle were selected as three typical inception moments for the voltage. Using the voltage RMS dropping to 85% of its nominal value as the sag determination threshold, the response times for both methods were recorded. The simulation waveforms and locally magnified details are shown in Figure 13, and the detection times are statistically summarized in Table 1.
Data indicates that under all three typical inception moments, the dynamic response speed of the MSTOGI is significantly superior to that of the SOGI, reducing detection time by over 30%. When the sag occurs at the voltage zero-crossing point, the voltage waveform is smooth and lacks significant step changes, resulting in relatively longer detection times for both methods; however, even under this extreme condition, the MSTOGI’s detection speed remains faster than the SOGI. When the sag occurs at a non-zero-crossing point, the voltage signal changes abruptly, and the MSTOGI’s extremely high sensitivity to the rate of signal change allows the detection time to be controlled within 1 ms, demonstrating exceptional rapidity.

5.4. Synergistic Detection Architecture Ablation Study

To verify the necessity of each individual module within the constructed “ACMF-MSTOGI-CNF-PLL” synergistic detection architecture under complex grid conditions, ablation simulation conditions containing multiple mixed disturbances were designed: a single-phase RMS voltage of 220 V undergoes a 50% depth sag at t = 0.1 s, recovers at t = 0.3 s, and is superimposed with a 10 V DC offset, 20 dB Gaussian white noise, 3% third harmonic, 3% fifth harmonic, 1% seventh harmonic, and random impulse interference. Comparative analyses were performed using the complete ACMF-MSTOGI-CNF-PLL, the MSTOGI-PLL-CNF (removing front-end filtering), and the ACMF-MSTOGI-PLL (removing back-end notching).
Figure 14 shows the comparison of detection results before and after the removal of the ACMF module. When the system lacks the ACMF pre-filtering, the detection results exhibit significant instantaneous jumps and irregular oscillations under impulse impact; after employing the ACMF for pre-filtering, the impulsive interference in the input signal is filtered out, and the detection waveform regains smoothness.
Figure 15 shows the comparison of detection results before and after the removal of the CNF module. When the CNF is removed, low-frequency odd harmonics in the input signal translate into prominent even-order AC ripples on the DC side, causing periodic sawtooth distortions to be superimposed on the steady-state envelope. Upon using the CNF for targeted filtering, the steady-state ripples are thoroughly eliminated, and the detection results recover smoothness.
Evidently, when facing complex grid voltage signals containing impulses, noise, DC, and harmonics, the ACMF and CNF respectively undertake the critical roles of front-end impulse suppression and back-end harmonic filtering. The two complement the MSTOGI, jointly constituting a highly robust synergistic detection architecture.

5.5. Performance Verification Under Complex Conditions

To further validate the performance of the proposed synergistic detection architecture in extremely harsh grid environments, a composite disturbance simulation model was established: the single-phase voltage undergoes a 50% depth sag at t = 0.1 s accompanied by a 30° phase jump, recovering at t = 0.3 s. The entire process involves a 10 V DC offset, 20 dB Gaussian white noise, 5% third harmonic, 4% fifth harmonic, 2% seventh harmonic, and random impulsive interference. Detection comparisons were conducted among the ACMF-MSTOGI-CNF-PLL, SOGI-PLL, Sliding Discrete Fourier Transform PLL (SDFT-PLL), and Enhanced Adaptive Phase-Locked Loop (EASOGI-PLL). The RMS voltage detection results and phase tracking error results of the four algorithms are shown in Figure 16 and Figure 17, respectively, using 85% as the sag detection threshold, and the voltage sag detection times for each algorithm are statistically summarized in Table 2.
Due to a complete lack of protective mechanisms, the traditional SOGI-PLL experienced severe distortion under composite disturbances, with steady-state phase errors reaching up to ±5° and violent fluctuations in the RMS value. Relying on its fixed-cycle integration window mechanism, the SDFT-PLL demonstrated extremely strong steady-state anti-interference capability, producing a smooth curve without overshoot; however, its inherent moving data window led to a severe dynamic delay, resulting in a detection time of 2.6 ms. The EASOGI-PLL achieved an extremely fast detection time of 0.7 ms, but this rapidity was attained at the expense of system dynamic stability. As is clearly visible from Figure 16 and Figure 17, at the instant of sag recovery at 0.3 s, triggered by high-order poles within its all-pass feedback loop, its RMS output exhibited a severe transient overshoot exceeding 120%, accompanied by violent oscillations in phase error. In actual industrial applications, such severe waveform distortions can easily lead the controller to misjudge a voltage swell, subsequently triggering protective device maloperation. The proposed ACMF-MSTOGI-CNF-PLL not only constrains steady-state phase errors within ±2° and steady-state RMS calculation errors within ±2%, but also completes the sag detection assessment within 1.0 ms following a smooth trajectory without overshoot at the instants of inception and recovery, thereby verifying the high robustness and low false detection rate of the proposed method.
To further comprehensively evaluate the dynamic tracking fidelity of the proposed method under more challenging realistic industrial scenarios, a voltage sag condition caused by the starting of a large induction motor is simulated. The single-phase voltage undergoes a 60% depth sag at t = 0.1 s, followed by a slow nonlinear recovery, and fully recovers to the initial steady state at t = 0.5 s. The entire process involves a 10 V DC offset, 20 dB Gaussian white noise, 5% third harmonic, 4% fifth harmonic, 2% seventh harmonic, and random impulsive interference. Detection comparisons were conducted among the ACMF-MSTOGI-CNF-PLL, SOGI-PLL, SDFT-PLL, and EASOGI-PLL. The RMS voltage detection results and phase tracking error results of the four algorithms are shown in Figure 18 and Figure 19, respectively. Using 85% as the sag detection threshold, the voltage sag detection times for each algorithm are statistically summarized in Table 3.
As can be seen from the results, the traditional SOGI algorithm cannot maintain good filtering performance in complex environments, and its RMS curve exhibits severe sawtooth fluctuations. Although the SDFT demonstrates a certain degree of steady-state anti-interference capability relying on its internal integration mechanism, its inherent fixed-cycle sliding data window introduces dynamic tracking lag. During the continuous variation in the quadratic envelope, the detection trajectory of the SDFT consistently lags behind the actual voltage profile. Although the EASOGI can respond relatively quickly to amplitude changes, its internal control loop is extremely sensitive to high-frequency noise and the signal change rate, causing jitter and glitches in the RMS detection results. Furthermore, it triggers strong system cross-coupling at the instant of the sudden change, leading to a massive distortion spike of nearly 8° in the phase tracking error, as shown in Figure 19. In contrast, the proposed ACMF-MSTOGI-CNF-PLL not only constrains steady-state phase errors within ±1° and steady-state RMS calculation errors within ±2%, but also completes the sag detection assessment within 1.0 ms following a smooth trajectory without overshoot at the instant of abrupt change, thereby verifying the high robustness and low false detection rate of the proposed method.

6. Experiments

A hardware experimental platform was built using a programmable AC/DC power supply GKP-2302 (GW Instek, New Taipei City, Taiwan), a voltage transformer, and an STM32 microcontroller (STMicroelectronics, Geneva, Switzerland), as shown in Figure 20. Two types of experiments were conducted: a 50% depth voltage sag under ideal noise-free conditions, and a 50% depth voltage sag containing white noise and impulsive interference. The sag voltage signal, the calculated RMS percentage signal, and the high/low logic level signal for sag determination were all recorded using a GDS-2304A oscilloscope (GW Instek, New Taipei City, Taiwan), as shown in Figure 21 and Figure 22 (Yellow: sag voltage signal; Pink: high/low logic level signal for sag determination; Cyan: calculated RMS percentage signal).
As can be seen from Figure 21 and Figure 22, using the RMS dropping to 85% as the determination threshold, the detection times in both experiments do not exceed 1 ms, which verifies the rapidity and feasibility of the proposed method.

7. Conclusions

This study proposes a robust single-phase voltage sag detection architecture integrating an Adaptive Composite Morphological Filter (ACMF) and an improved Mixed Second- and Third-Order Generalized Integrator (MSTOGI). To address the limitations of traditional detection techniques under complex grid conditions, the proposed architecture employs a highly synergistic operational mechanism. The front-end ACMF utilizes an offline periodic parameter optimization strategy to accurately filter high-frequency random impulses without distorting transient voltage edges. Concurrently, the high-gain MSTOGI structurally blocks DC offset penetration to ensure zero steady-state error, while the cascaded notch filter (CNF) effectively eliminates even-order harmonic ripples induced by coordinate transformations.
Comprehensive simulation analyses under extreme composite grid distortions quantitatively demonstrate the superiority of the proposed methodology. The ACMF-MSTOGI-CNF-PLL approach strictly restricts steady-state phase errors within a ±2° range. Furthermore, it successfully reduces the dynamic sag detection time to within 1.0 ms under typical operating conditions.
Although the proposed methodology achieves excellent detection performance, the periodic parameter optimization mechanism of the ACMF module exhibits limited adaptability to sudden and severe mutations in grid noise. Moving forward, this synergistic detection architecture is expected to be practically applied and further evaluated in power quality compensation equipment, such as DVR and UPS.

Author Contributions

Conceptualization, J.Z. and E.W.; methodology, E.W.; software, E.W.; validation, E.W., J.X. and Y.Y.; formal analysis, E.W. and J.X.; investigation, E.W., J.X. and Y.Y.; resources, J.Z.; data curation, E.W. and Y.Y.; writing—original draft preparation, E.W.; writing—review and editing, E.W. and J.Z.; visualization, E.W.; supervision, J.Z.; project administration, J.Z.; funding acquisition, J.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Development and Reform Commission of Jilin Province, grant number 2019C057-3 (Project Name: Research on Key Technologies and Device Development of Energy-saving and Environmental-friendly Emergency Power Supply ISPS).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. 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]
  2. Bollen, M.H. Understanding Power Quality Problems; IEEE Press: New York, NY, USA, 2000. [Google Scholar]
  3. 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]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. 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]
  9. 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]
  10. 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]
  11. 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]
  12. 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]
  13. 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]
  14. 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]
  15. 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]
  16. 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]
  17. 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]
  18. 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]
  19. 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]
  20. 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]
  21. 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]
  22. 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]
  23. 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]
  24. 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]
  25. 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]
  26. 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]
  27. 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]
  28. 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]
  29. 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]
  30. 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]
  31. 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]
  32. 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]
  33. 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]
  34. 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]
  35. 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]
  36. 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]
Figure 1. Schematic diagram of the SRF.
Figure 1. Schematic diagram of the SRF.
Energies 19 01621 g001
Figure 2. Structural block diagram of the SOGI-PLL.
Figure 2. Structural block diagram of the SOGI-PLL.
Energies 19 01621 g002
Figure 3. Structural block diagram of the MSTOGI.
Figure 3. Structural block diagram of the MSTOGI.
Energies 19 01621 g003
Figure 4. Bode diagrams of MSTOGI.
Figure 4. Bode diagrams of MSTOGI.
Energies 19 01621 g004
Figure 5. Step response curves of DMSTOGI(s).
Figure 5. Step response curves of DMSTOGI(s).
Energies 19 01621 g005
Figure 6. Pole-zero maps of DMSTOGI(s).
Figure 6. Pole-zero maps of DMSTOGI(s).
Energies 19 01621 g006
Figure 7. Diagram of the improved MSTOGI-CNF-PLL voltage sag detection algorithm.
Figure 7. Diagram of the improved MSTOGI-CNF-PLL voltage sag detection algorithm.
Energies 19 01621 g007
Figure 8. Overall flowchart of the synergistic detection algorithm.
Figure 8. Overall flowchart of the synergistic detection algorithm.
Energies 19 01621 g008
Figure 9. Non-ideal grid voltage waveform.
Figure 9. Non-ideal grid voltage waveform.
Energies 19 01621 g009
Figure 10. The SNR under structuring elements of different scales.
Figure 10. The SNR under structuring elements of different scales.
Energies 19 01621 g010
Figure 11. Performance comparison waveforms of different filters.
Figure 11. Performance comparison waveforms of different filters.
Energies 19 01621 g011
Figure 12. Comparison of RMS voltage detection results under DC offset.
Figure 12. Comparison of RMS voltage detection results under DC offset.
Energies 19 01621 g012
Figure 13. Detection performance at typical sag inception moments.
Figure 13. Detection performance at typical sag inception moments.
Energies 19 01621 g013
Figure 14. Ablation study of the ACMF module.
Figure 14. Ablation study of the ACMF module.
Energies 19 01621 g014
Figure 15. Ablation study of the CNF module.
Figure 15. Ablation study of the CNF module.
Energies 19 01621 g015
Figure 16. RMS voltage detection under complex grid conditions 1.
Figure 16. RMS voltage detection under complex grid conditions 1.
Energies 19 01621 g016
Figure 17. Phase tracking errors under complex grid conditions 1.
Figure 17. Phase tracking errors under complex grid conditions 1.
Energies 19 01621 g017
Figure 18. RMS voltage detection under complex grid conditions 2.
Figure 18. RMS voltage detection under complex grid conditions 2.
Energies 19 01621 g018
Figure 19. Phase tracking errors under complex grid conditions 2.
Figure 19. Phase tracking errors under complex grid conditions 2.
Energies 19 01621 g019
Figure 20. Hardware experimental platform.
Figure 20. Hardware experimental platform.
Energies 19 01621 g020
Figure 21. Experimental waveforms under ideal noise-free conditions.
Figure 21. Experimental waveforms under ideal noise-free conditions.
Energies 19 01621 g021
Figure 22. Experimental waveforms containing white noise and impulsive interference.
Figure 22. Experimental waveforms containing white noise and impulsive interference.
Energies 19 01621 g022
Table 1. Detection times at typical sag inception moments.
Table 1. Detection times at typical sag inception moments.
Sag Occurrence MomentMSTOGI-PLLSOGI-PLL
Zero-crossing point2.4 ms3.6 ms
Peak point0.7 ms1.1 ms
Quarter-point0.7 ms1.15 ms
Table 2. Detection times of different algorithms under complex conditions 1.
Table 2. Detection times of different algorithms under complex conditions 1.
AlgorithmDetection
Time
Steady-State RMS
Error
Steady-State Phase
Error
ACMF-MSTOGI-CNF-PLL1.0 ms±2%±2°
SOGI-PLL1.85 ms±17%±7°
SDFT-PLL2.6 ms±1%±2°
EASOGI-PLL0.7 ms±9%±2°
Table 3. Detection times of different algorithms under complex conditions 2.
Table 3. Detection times of different algorithms under complex conditions 2.
AlgorithmDetection
Time
Steady-State RMS
Error
Steady-State Phase
Error
ACMF-MSTOGI-CNF-PLL1.0 ms±2%±1°
SOGI-PLL1.85 ms±14%±6°
SDFT-PLL2.6 ms±1%±1.5°
EASOGI-PLL0.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.

Share and Cite

MDPI and ACS Style

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

AMA Style

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 Style

Zhou, 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 Style

Zhou, 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

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop