1. Introduction
Voltage sags and swells represent some of the most critical power quality challenges in modern power systems [
1,
2,
3]. These disturbances pose significant threats to the safe operation of sensitive industrial loads, such as precision machining equipment and automated control systems, making them an active area of research in the international power engineering community. According to the International Electrotechnical Commission standard IEC 61000-4-30 [
4], a voltage sag is defined as a sudden reduction in the RMS voltage to between 10% and 90% of the rated value for durations ranging from 0.5 cycles to 1 min [
5,
6,
7]. Similarly, a voltage swell is characterized by an increase in the RMS voltage to 110–180% of the nominal value, with the same duration range as sags. These precise definitions establish a unified basis for studying and managing voltage fluctuations [
8,
9,
10,
11]. The ongoing attention from authoritative organizations, including the International Council on Large Electric Systems (CIGRE) and the Institute of Electrical and Electronics Engineers (IEEE), further underscores the importance of these issues. The Dynamic Voltage Restorer (DVR) [
12,
13], which serves as a critical power electronic device for mitigating voltage sags, swells, and transient interruptions, is connected in series between the power grid and the load. It rapidly and effectively compensates for grid voltage anomalies, thereby protecting sensitive equipment from voltage fluctuations and playing a vital role in ensuring the stable operation of critical loads. Conventional DVRs typically employ energy storage batteries as the DC-link energy source and utilize inverters for precise voltage control. These systems exhibit high energy conversion efficiency, compatibility with power systems of various scales, and the ability to handle diverse voltage disturbances such as sags, swells, and flickers, demonstrating considerable operational flexibility [
14]. In recent years, with the rapid advancement of renewable energy technologies, there has been growing interest in integrating photovoltaic (PV) generation into the DC side of the DVR as an alternative to traditional energy storage. This integration not only diversifies the energy supply for the DVR but also leverages the structural similarities between DVRs and PV inverters, enabling dual operational modes: voltage compensation and PV power generation with storage. This approach holds significant potential for enhancing renewable energy utilization and advancing power quality management. Traditional DVR compensation strategies struggle to balance energy consumption and duration. Li et al. [
15,
16] proposed an Energy-Optimal Compensation (EOC) strategy that dynamically switches between energy-minimization and pre-sag compensation modes based on sag depth, incorporating voltage limiting to optimize performance under complex voltage quality issues. Phase delay in voltage detection critically affects DVR accuracy. Ko [
17] developed a circular multi-pointer memory filter using equivalent-time sampling and phase-shift techniques to eliminate analog filter lag, enabling delay-free, high-precision voltage measurement with low computational cost—ideal for feedforward control. To simplify PI controller tuning in DVRs, Ibrahim et al. applied the Artificial Rabbits Optimization (ARO) algorithm. The ARO-tuned controller improves dynamic response and reduces output voltage THD, demonstrating AI’s strong potential for enhancing DVR robustness and compensation quality [
17,
18].
However, existing studies still exhibit three major limitations. First, the output of photovoltaic (PV) power generation is highly stochastic and intermittent due to factors such as solar irradiance and ambient temperature [
19], making it challenging to sustain the power balance of the PV-storage DVR system and often compromising the response speed and accuracy of voltage compensation. Second, grid voltage fluctuations are frequently accompanied by harmonic pollution; however, most PV-storage DVR control strategies fail to incorporate harmonics into a unified detection and compensation framework, leading to unsatisfactory compensation performance under complex grid conditions. Third, conventional phase-locked loops (PLLs) struggle to accurately extract the positive-sequence component under distorted voltage conditions [
20], which compromises the accuracy of voltage detection and adversely affects the precision of compensation command generation.
To address the aforementioned challenges, this paper focuses on the optimal design of a photovoltaic-storage integrated DVR system, with the aim of enhancing its performance under complex grid conditions through advancements in control strategies and detection methodologies. Specifically, the contributions include the following:
- (1)
Developing a voltage detection model that incorporates harmonics based on instantaneous reactive power theory and enabling high-accuracy identification of voltage parameters through a combination of a software phase-locked loop (SPLL) and a Butterworth filtering algorithm;
- (2)
Designing a multi-mode power coordination strategy to dynamically switch operating modes according to PV power generation, enabling a balance between energy utilization and compensation requirements;
- (3)
Validating the effectiveness of the proposed approach through detailed simulation studies.
The key innovations of this work are primarily reflected in the following aspects:
- (1)
The incorporation of harmonic components into a unified detection framework for the PV-storage DVR system and the introduction of a composite detection method combining SPLL with Butterworth filtering, leading to a significant improvement in parameter identification accuracy under distorted voltage conditions;
- (2)
The development of an adaptive multi-mode switching strategy based on real-time PV output, which facilitates seamless coordination between voltage compensation and PV-storage operation and effectively addresses the power balance challenge inherent in conventional systems;
- (3)
A comprehensive demonstration of the stability and efficiency of the proposed system under combined scenarios of voltage sags, swells, and harmonics, offering a new technical pathway for the deep integration of renewable energy and power quality management.
2. Construction of Fast-Response System for Photovoltaic Energy Storage Based on Dynamic Voltage Restorer
The schematic diagram of the DVR is shown in
Figure 1. The Dynamic Voltage Restorer (DVR) is a power-quality device connected in series between the power grid and the customer, designed to enhance voltage quality in electrical systems. It is primarily employed to protect voltage-sensitive loads from short-duration voltage disturbances such as sags and momentary fluctuations. Over time, the structure of the DVR has undergone continuous development and refinement in both theoretical research and engineering practice. Nevertheless, the fundamental configuration of the DVR has remained consistent; a schematic diagram of the typical DVR topology is presented in
Figure 1.
The Dynamic Voltage Restorer (DVR) operates in two primary modes. In its compensation mode, when a grid voltage disturbance occurs, the bypass switch Ks is opened to integrate the DVR into the circuit. The DVR then injects a compensating voltage through the coupling transformer, which superimposes with the grid voltage to maintain the voltage across sensitive loads within the allowable range. A schematic diagram of this operating structure is shown in
Figure 2.
Bypass mode: During grid voltage fluctuations that do not require compensation for the sensitive loads, the bypass switch Ks remains closed. In this state, the DVR is bypassed from the compensation circuit and remains inactive, with its structure as illustrated in
Figure 3.
The main modules of the Dynamic Voltage Restorer primarily consist of: the energy storage unit, the inverter unit, the filtering unit, and the coupling unit. A schematic diagram of its structure is provided in
Figure 4.
The capacity of the energy storage unit is a key factor in determining the compensation duration of the Dynamic Voltage Restorer, making the selection of a suitable and well-sized energy storage system essential. In distributed energy applications, renewable energy sources are often integrated with storage batteries—for instance, through a combined strategy of wind power generation and batteries, or using photovoltaic (PV) arrays coupled with batteries as the DC-side energy supply unit for the DVR. This approach overcomes the limitation of traditional battery-only DVR systems, which often suffer from short compensation times. In this paper, a hybrid energy storage system consisting of a PV system and a battery (DVR-BES-PV) is adopted.
- (1)
Mathematical Modeling of the Photovoltaic System and Battery
The equivalent circuit of the photovoltaic cell is shown in
Figure 5, and the parameters of its equivalent model are summarized in
Table 1.
The internal relational equation of the PV array is as follows:
where
is the diode forward saturation current, with the magnitude of its value being independent of the light intensity;
is the electrical charge,
;
is the diode equivalent voltage; A is the PN junction constant inside a photovoltaic cell; K is the Boltzmann’s constant;
is the difference between the actual and reference temperatures of photovoltaic cells;
and
are two different light intensities.
- (2)
Control Algorithm for Photovoltaic Power Generation
Photovoltaic (PV) cells are influenced by factors such as light intensity and temperature, among others. The output characteristics of PV modules are strongly influenced by changes in irradiance and temperature, leading to voltages, currents, and powers that exhibit a pronounced nonlinear relationship. To ensure that PV arrays operate optimally under varying conditions, consistently deliver maximum power, and minimize energy loss, a control technique known as Maximum Power Point Tracking (MPPT) was developed. Among the well-established and widely adopted MPPT methods are the Perturb and Observe method and the Incremental Conductance method. A schematic of the control algorithm for both methods is provided in
Figure 6.
The Perturb and Observe method, also referred to as the hill-climbing method, operates by periodically applying a small perturbation to the output voltage or current of the PV array and then comparing the resulting change in output power. As illustrated in the left panel of
Figure 6, this process involves adjusting the operating point based on the power variation: if the power increases, the perturbation continues in the same direction; if it decreases, the direction of perturbation is reversed. This iterative process enables the PV system to converge toward the maximum power point. A simulation model of the Perturb and Observe method is shown in
Figure 7.
The Incremental Conductance method is based on the power–voltage (P–V) characteristic curve of the PV cell. It operates by differentiating the power with respect to voltage and using the sign of the derivative (dP/dV) to determine the relative position of the operating point with respect to the maximum power point (MPP). Specifically, when dP/dV = 0, the operating point is at the MPP; when dP/dV > 0, it is to the left of the MPP and the voltage should be increased; and when dP/dV < 0, it is to the right of the MPP and the voltage should be decreased. This process is repeated iteratively until the MPP is reached. A simulation model of the Incremental Conductance method is presented in
Figure 8.
The relative merits and limitations of the two primary MPPT control algorithms were evaluated; a summary of this comparison is provided in
Table 2.
- (3)
Energy Storage Battery Unit
Due to the inherent intermittency and instability of photovoltaic power generation, which is highly dependent on solar irradiance, its output power fluctuates significantly with varying light conditions. The energy storage system serves to store surplus energy during periods of strong illumination, such as daytime, and releases the stored electricity during nighttime, cloudy days, or other conditions with low irradiance or power generation. Furthermore, the energy storage system improves the reliability and stability of the power supply. It can provide backup power in the event of grid failure, support islanded operation, and respond to unforeseen contingencies. Additionally, it facilitates flexible energy dispatch, integrates distributed energy resources, and supports grid peak shaving and valley filling.
The equivalent circuit of the battery is presented in
Figure 9.
It is obtained from Ohm’s law:
In Equation (6),
is the electric potential of storage batteries,
is the equivalent resistance of the battery, and
is the discharge current of storage batteries. The electric potential is calculated as follows:
In Equation (7), , , and are energy storage battery charging and discharging curve fitting coefficients, is the rated capacity of the battery, and is the actual discharge capacity of the battery.
The State of Charge (SOC) of the battery exerts a considerable influence on both its own performance and that of associated systems, affecting critical parameters such as charge–discharge efficiency and output power. When the SOC is either excessively high or low, it results in diminished charging and discharging efficiency, compromised output power, and a reduction in usable capacity. Moreover, SOC is intrinsically linked to battery longevity; prolonged operation under extreme SOC conditions accelerates aging and shortens the battery’s life cycle. Therefore, it is imperative to establish appropriate upper and lower SOC thresholds to ensure system stability and reliable operation.
In Equation (8), is the lower limit of the state of charge of the storage battery, whose value is set to 20%, and is the upper limit of the charge state of the storage battery, and its value is set to 90%.
The three-phase, three-level Neutral Point Clamped (NPC) inverter (structure shown in
Figure 10) is a high-performance power electronic converter based on multilevel topology. Its operating principle relies on dividing the DC bus voltage into three levels through the use of four sets of switching devices and two clamping diodes per phase leg. By appropriately combining the switching states, a stepped voltage waveform is generated that closely approximates a sinusoidal waveform.
In the NPC-type three-level inverter, the voltage stress on each switching device during operation is half of the DC bus voltage, significantly enhancing the voltage and power-handling capability of the converter. Compared to conventional two-level topologies, this structure offers substantial performance benefits: first, it produces output line and phase voltages with an increased number of levels, which effectively reduces the total harmonic distortion (THD) of the voltage waveform; second, its switching losses are only 50% of those in a two-level inverter under the same DC voltage and phase current, enabling higher switching frequencies and further improved harmonic performance. The Dynamic Voltage Restorer (DVR) investigated in this study employs an NPC-type three-level inverter as its core power conversion topology.
The inverter circuit typically generates high-order harmonics during operation, necessitating a filter circuit to suppress these harmonic components. As shown in
Figure 11, the filter can be installed at one of two locations: Position A (on the inverter output side) effectively filters high-frequency components immediately after inversion, while Position B (on the sensitive load side) prevents high-frequency noise or harmonics introduced by the DVR during voltage compensation from affecting downstream equipment. In this work, the active NPC three-level inverter used exhibits inherently low harmonic distortion; therefore, configuration C—placing the filter on the transformer side—is adopted. This design utilizes the leakage inductance of the coupling transformer to replace a dedicated filter inductor, requiring only an additional capacitor, thereby reducing hardware cost without compromising filtering performance.
The integration of the Dynamic Voltage Restorer (DVR) with the grid voltage typically employs two primary coupling methods: series transformer coupling and capacitor coupling (transcapacitor coupling), each exhibiting distinct characteristics in terms of performance and application. The corresponding structural diagrams are illustrated in
Figure 12.
As illustrated in
Figure 12A, the DVR is connected to the grid via a series transformer, through which the compensation voltage is injected. Additionally, the transformer turn ratio can be designed to reduce the required DC-link voltage level of the inverter while providing electrical isolation. The DVR system investigated in this paper employs series transformer coupling.
Figure 12B shows an alternative coupling method using capacitors, which offers a simpler structure and lower cost by eliminating the need for a transformer and reducing the installation footprint. However, the absence of galvanic isolation in this approach introduces potential safety risks.
Following the system configuration described in previous sections, a simulation model of the PV-storage-integrated DVR system was developed. To thoroughly evaluate the performance of the hybrid PV-storage DVR in addressing voltage sags, swells, and other disturbances, a comprehensive system was constructed, incorporating the PV generation model, the NPC inverter circuit, and the coupling unit. Subsequently, power quality issues were analyzed in detail, accounting for various practical influencing factors. Specific fault conditions common in DVR applications were designed, and simulation results were used to validate the effectiveness and feasibility of the proposed PV-storage DVR in providing reliable voltage compensation.
A variety of control strategies have been developed for Dynamic Voltage Restorers (DVRs). Among the classical methods, Proportional–Integral (PI) control [
21] uses proportional and integral actions to regulate voltage, offering simplicity and reliability, though it suffers from slow dynamic response and poor adaptability to sudden load changes. Proportional–Resonant (PR) control [
22] provides high gain at resonant frequency to eliminate steady-state error. In [
23], a single-phase DVR with an elliptical restoration algorithm and dual-loop PR and PR with Sequence Decoupling Resonant (PRSDR) controllers in a stationary frame showed improved performance. Proportional–Integral–Derivative (PID) control combines three terms to dynamically adjust system input, maintaining the controlled variable near the reference with high flexibility. Beyond classical approaches, numerous advanced strategies have emerged. Optimal sliding mode control [
24,
25] enhances robustness and control performance through optimized surfaces and switching functions, maintaining stability under parameter variations and external disturbances while reducing steady-state error. References [
26,
27] proposed a momentum-adapted Fractional Least Mean Square (ma-FLMS) algorithm using a Fractional-Order PID (FOPID) controller optimized by an Autonomous Group Particle Swarm Optimizer (AGPSO), significantly improving dynamic response and steady-state accuracy. In [
28], a strategy combining fractional calculus and an adaptive Variable Step-Size LMS (FMA VLMS) with a Fractional-Order PI (FOPI) controller was introduced. Its parameters were optimized via a Black Widow Optimization Algorithm (BWOA) to achieve optimal convergence and minimal steady-state error in DVR applications. These evolving strategies provide diverse pathways for enhancing DVR performance.
3. High-Precision Dynamic Voltage Recovery Control Strategy with Harmonic Suppression
As a core power quality management device, the Dynamic Voltage Restorer (DVR) not only mitigates voltage sags and swells but also plays a significant role in harmonic compensation. In a photovoltaic energy storage system integrated with a DVR, the quality of the control strategy critically influences system performance. In particular, a fast-response control method capable of harmonic suppression is essential.
This study employs instantaneous reactive power theory to detect grid voltage abnormalities and designs a software phase-locked loop (SPLL) to accurately track the grid voltage phase angle, thereby overcoming the limitations of conventional phase-locked loops under distorted voltage conditions. Furthermore, to suppress harmonics present in the transformed components after coordinate transformation, a Butterworth low-pass filter is introduced for high-precision harmonic attenuation. Based on these techniques, a rapid-response control architecture is established.
The proposed strategy ensures a swift system response to voltage sags and swells, effectively suppresses harmonic distortion, and achieves coordinated operation among the photovoltaic system, energy storage, and DVR functionality. Through this control framework, the system maintains stable and efficient performance even under complex grid conditions involving simultaneous voltage sags, swells, and harmonic pollution.
3.1. Voltage Fluctuation Extraction Based on Software Phase-Locked Loop (SPLL)
Traditional phase-locked loops (PLLs) achieve phase synchronization through hardware circuits by detecting zero-crossing points of the system voltage and typically employ a synchronous rotating coordinate transformation for phase locking. However, this method exhibits limited performance in highly distorted grid voltage environments, particularly under conditions such as phase jumps and three-phase imbalance. Under these scenarios, it often fails to accurately extract the positive-sequence components, leading to reduced response speed and accuracy of the phase-locking process.
To overcome these limitations, this study adopts a software phase-locked loop (SPLL) to replace the conventional hardware-based PLL. Owing to its superior adaptability and stability, the SPLL can operate reliably even in complex grid scenarios and significantly enhance the accuracy of positive-sequence component extraction.
Specifically, the SPLL implemented in this work combines the dq-transformation method with a PI control algorithm, forming a robust and precise phase-tracking system suitable for distorted voltage conditions.
Its working principle is shown in
Figure 13. The three-phase voltage is transformed into the dq coordinate system to obtain
and
DC components. The difference between the DC component and the reference 0 value is processed through the PI link to obtain the error signal
that needs to be tracked, which is then added to the fundamental wave angular frequency
to obtain the angular frequency
. Then, the phase angle
output by the phase-locked loop is obtained through the PI link.
Figure 14 shows the closed-loop control block diagram of the software phase-locked loop, where
is the three-phase power frequency voltage cycle,
is the proportional coefficient, and
is the integral coefficient. Thus, the closed-loop transfer function of the software phase-locked loop is as follows:
In addition, the sufficient and necessary conditions for the stability of the system are obtained as follows:
For the frequency domain analysis of the SPLL closed-loop control system, by taking
and
, the Bode diagram shown in
Figure 15 can be obtained.
Through analysis, it can be seen that the software phase-locked loop system maintains stability, and its gain curve has similar characteristics to that of a low-pass filter.
3.2. High-Precision Grid Voltage Harmonic Extraction
After the coordinate transformation, the angular frequency of the positive-sequence component decreases, exhibiting low-frequency characteristics, while the negative-sequence component’s angular frequency increases, demonstrating high-frequency behavior. Therefore, a filter is required to eliminate the negative-sequence component and prevent voltage distortion. In addition, when a voltage sag occurs in the grid, the sagged voltage often contains high-order harmonic components, so it is necessary to further suppress these harmonics from the dq-axis components using a low-pass filter. The parameter configuration of the low-pass filter critically influences both the accuracy of signal decoupling and the dynamic response performance of the system.
Based on a frequency-domain impedance characteristics approach, a Butterworth filter is selected. This filter exhibits an approximately flat magnitude response in the passband. Although higher filter orders yield a flatter passband response, they also introduce increased group delay. Thus, a suitable order must be chosen to balance dynamic response speed and harmonic suppression effectiveness. In accordance with the IEEE 519-2014 harmonic standard [
29], the target suppression frequency band is identified. The design process employs the magnitude-response constraint equation of the Butterworth filter and determines the minimal required order and cutoff frequency by considering both passband and stopband attenuation requirements.
The squared magnitude of the amplitude–frequency characteristic of the Butterworth filter is as follows:
where
is the filter order,
is the angular frequency, and
is the cut-off frequency.
It is also necessary to meet the attenuation requirements of the passband and stopband. The passband constraint is as follows: at the passband cut-off frequency , the attenuation does not exceed (dB); the stopband constraint is as follows: at the stopband cut-off frequency , the attenuation is at least (dB). This is expressed by the following formulas:
Passband constraint equation:
Stopband constraint equation:
By taking the logarithm of Equations (12) and (13) and dividing them,
is eliminated, to obtain
Then, the inequality related to the filter order
is obtained:
N takes the smallest integer that satisfies the condition.
Then, we substitute into the passband constraint equation to calculate
:
After repeated calculations, it is found that when the designed passband cut-off frequency
= 1 rad/s, the maximum attenuation
= 3 dB, the stopband cut-off frequency
= 2 rad/s, and the minimum attenuation
= 15 dB, the calculated filter order
and cut-off frequency
are
Taking the positive integer
, then
. The normalized frequency curve of the Butterworth filter is compared, as shown in
Figure 16 below.
After simulation analysis, it is determined that the order of the Butterworth filter
is 3; the Simulink software is then used to verify that the system has the performance of quickly compensating voltage fluctuations and reducing the total harmonic distortion to less than the limit defined in the IEEE 519 standard [
29].
3.3. Power Coordination Regulation Control Method for Dynamic Voltage Restorer Based on Vector Angle Control Strategy
This paper proposes a power coordination control method for Dynamic Voltage Restorers based on a vector angle control strategy. The method establishes a multi-mode power coordination mechanism between the PV storage system, the grid, and the load, dividing the system operation into multiple modes tailored to power coordination under varying solar irradiance levels, and analyzes the active power transfer in each mode. The proposed multi-mode coordination strategy enables smooth transitions between grid-dominant, PV-storage-dominant, and grid feedback modes in real time, by adjusting the vector angle according to changes in PV output. This significantly improves the energy utilization of the PV storage system and enhances its active support capability for the grid. Given that the system uses PV storage as the DC source—which enables high-magnitude compensation—the pre-sag compensation method is adopted. This strategy is considered ideal for DVRs. Through precise calculation and control, it quickly determines the magnitude and phase of the compensation voltage required for injection. The core objective of this approach is to fully restore the load-side voltage to its pre-fault condition, thereby eliminating the impact of voltage sags, swells, and other power quality issues. A phasor diagram illustrating the characteristics of the pre-sag compensation strategy is shown in
Figure 17.
Vector control is an advanced control technique that achieves precise regulation of power transfer among the grid, PV storage units, and the load by dynamically adjusting the phase angle of the load-side voltage. The core of this strategy lies in modulating the phase angle to dynamically control the output power from the PV storage system. Under low solar irradiance, the grid preferentially supplies the load while enabling energy feedback from storage. Under moderate irradiance, power complementation between the PV storage system and the grid improves utilization efficiency. Under strong irradiance, the PV storage system dominates power output and feeds surplus energy back to the grid, thereby reducing grid burden and providing effective grid support.
Figure 18 shows the schematic phasor diagram of the vector angle control. Using the phase angle of the grid voltage as the reference,
denotes the phase angle of the load voltage, and
represents the load power factor angle.
Figure 18a illustrates the scenario under normal grid voltage without any fluctuation. By controlling the phase angle of the load voltage, the PV-storage DC source is inverted through a three-level inverter topology to output a specific voltage value. This method enables power transfer control across the entire DVR system while maintaining stable load voltage, thereby improving the utilization of energy from the PV storage side.
Figure 18b depicts the situation when grid voltage fluctuates, such as the sagging or swelling of certain values,
and
. While the DVR’s compensation function operates normally and the load-side voltage remains constant, controlling the phase angle of the load voltage achieves overall system power transfer, ultimately maximizing the utilization of energy on the DC side.