#### Abstract

In view of the high-quality requirements of the power supply quality of the user-side sensitive equipment, the system for voltage sag in the grid operation is stable and efficient. This paper proposes a new virtual voltage comparison compensation dynamic voltage recovery method. The algorithm that uses the invariant constant signal as the input quantity, and the real-side input load side signal reduces the influence of the input quantity uncertainty change on the generated compensation signal and improves the simplicity of the system operation control and the system stability. The flexibility of the proposed control strategy, as well as the effectiveness of the optimal design method, is verified by both simulation and experimental results.

#### 1. Introduction

With the widespread use of electronic equipment, the short-term voltage sags and swells have gradually affected the impact on industrial production. And increasing sensitive loads such as uninterrupted power supply (UPS), speed controller of electric motors, and semiconductors are challenging the capacity and voltage quality of the power grid. Since problems such as single-phase ground fault would contribute to voltage sags and surges, the creation of dynamic voltage restorer (DVR) seems to be necessary for modern manufacturing. The DVR could ameliorate the voltage quality and compensate for the sagged voltage, and eventually protect sensitive loads. Many solutions and problems using DVR have been published. In recent years, industrial examples of DVR are given in [1–4], while more meaningful questions associated with DVRs are proposed in [5]. In [6], different control methods are analyzed according to different reasons of voltage dip, and voltage sag correction is required for applications that range from a few hundred watts to several megawatts. Energy optimized control is included in [7]. The operation of the DVR under grid fault conditions is analyzed [8]. The researches innovatively proposed DVR as a harmonic compensator method and obtained more research results in [9, 10].

The problem of poor distributing power systems (DPS) power quality caused by other causes is analyzed. By comparison, it is found that the voltage sag is still considered as main power quality problem [11–16].

In [17], a phase-locked loop method based on cross-decoupling frequency adaptive complex filtering is proposed, which can quickly and accurately extract the grid synchronization signal. A new control method for instantaneous reference voltage is generated by dual P-Q theory, and the corresponding system load voltage is compensated by the direct power flow control in [18]. In [19, 20], an improved phase-locked loop based on synchronous reference coordinate transformation combined with a single-phase phase-locked loop and positive-sequence voltage calculation unit is proposed. Variable modified and improved DVR configurations are applied to the integration of renewable energy sources [21–23]. New developments have also been made in the field of energy storage, such as matrix converter as a dynamic voltage restorer in document [24]. A series of latest achievements put forward that novel control technologies have successfully met the active power requirements of solar photovoltaic power generation load and sent the excess power to the power grid [25–29]. In recent years, a series of achievements have been made in microgrid and new energy power generation systems, which is not only the development direction of power quality management but also a novel trend of comprehensive management of renewable energy [30–32].

In the future, more DVR-related research and experiments would be proposed [33–35]. In this passage, a new strategy of simulating a virtual grid will be introduced and this kind of strategy could help future researches easier and convenient.

#### 2. System Principle and Mathematical Analysis of Dynamic Voltage Restorer

The DVR system consists of four components: storage unit, PWM inverter, filter circuit, and injection transformer, respectively, and each component has various functions. DVR system circuit topology is shown in Figure 1. The required AC voltage provides active power injection to the load requires energy storage, which restores the supply voltages during deep voltage dips. In this passage, the design of DVR system will be used to guarantee that the power for compensating voltage can be uninterruptible. The new virtual voltage comparison DVR system is a design that replaces traditional power supply to a voltage rectifier connected to the grid.

The DVR is a device that provides a compensation voltage in series between the grid and the load to achieve the compensation voltage requirement. Series transformers are not used in all DVRs. In series applications with low voltage levels, series transformers are eliminated, and bus-side power frequency power transformers are used to isolate buses from the grid in Figure 2.

The system can be described as follows:where is the current of loads, is the current of inductor, is the current of the capacitor , is the voltage of the capacitor , is the voltage of loads, is the unstable voltage of power supply, is the output voltage of the inverter circuit, is the current of the inductor , and is the equivalent resistance of the LC filter.

#### 3. Operating Principles

The operation of DVR could be described as follows: first, DVR detects the voltage sag in the power supply at any time. If any voltage sag or surge is detected, the storage unit provides power from the grid to the PWM inverter to generate compensating voltage [4–6]. In the next step, the PWM inverter transforms direct voltage from the storage unit to alternating voltage for compensation. The amplitude and phase of the voltage generated from the PWM inverter can be adjusted to fit in the expected voltage. After the generation of compensating voltage, the filter circuit would block high-frequency harmonics to make sure that the final compensating voltage has no ripples because high-frequency ripples would damage sensitive loads, and without high-frequency harmonics will guarantee the quality of voltage provided. The procedure of DVR operation is described in Figure 3.

##### 3.1. Generation of Driving Power

In this design, the energy storage unit has been replaced by a VSR (voltage supply rectifier). In this case, the power to drive the PWM inverter is provided by the VSR, and the power to drive the inverter can be infinite. The design of the redesigned energy storage unit is shown in Figure 1.

By analyzing the design of Figure 1, it can be concluded as following equation:where is the voltage of DVR and is voltage of sensitive load.

By solving the integral, the equation (3) can be simplified as following equation:where is angular frequency of the AC power supply, is input voltage of the PWM inverter, and is conduction angle of the controllable thyristor.

By adjusting the value of input voltage and conduction angle, the magnitude of the output voltage can be adjusted.

##### 3.2. PWM Inverting

When the DC voltage is delivered to the inverting unit, the inverter should transform DC voltage to AC voltage in which sensitive loads required. The strategy of PWM modulation is that by controlling the duty cycle of the PWM wave, it can simulate the sine wave by area equivalence law. The area equivalence law can be explained as the following equation:where is sample time of the voltage and is amplitude of the voltage of the power supply.

##### 3.3. High-Frequency Ripples Filtering

Since nonlinear characteristics in the switching unit might generate harmonics, the filter circuit will block the high-frequency waves to guarantee the quality of voltage and protect sensitive loads. By setting parameters of the circuit components, the filtering circuit can output wave with a certain frequency. And the relationship between cutoff frequency () and capacitance (*C*) and inductance (*L*) can be described as equations below. Because , the parameters of capacitor and inductor are deduced as follows:where is called characteristic impedance.

With the value of frequency and amplitude of harmonics, as well as the needed output of harmonics, the capacitance and inductance of the filtering circuit can be figured out.

#### 4. Analysis of a Virtual Quantity Dynamic Voltage Restorer

##### 4.1. Model Analysis

Traditionally, the DVR system needs 3 voltage detectors to operate: one responsible for monitoring the voltage of the generator, one for the output voltage of the compensation unit, and one for the load. The data collected from the generator side will be sent into MCU, and the MCU will calculate the needed voltage to compensate for the voltage sag or swell. The detector at the load side provides data for experiment use. The strategy of voltage compensation can be explained by the following equation:where is voltage of generator (vector), is voltage generated by compensation unit (vector), and is voltage of the sensitive load (vector).

The equation reveals that the compensating strategy can be realized only by knowing those 3 factors, and such a strategy is currently used. The graph reveals the compensation strategy using 3 factors in Figure 4.

To simplify such a strategy, the concept of virtual comparison is introduced, and by using this concept, the operation can be more efficient compared to the classic one.

##### 4.2. The Rationale of Virtual Comparison

Since voltage sag and voltage swell happen occasionally in systems, the voltage of generator detected can be replaced by the value of power frequency voltage (220 V, 50 Hz), and by comparing the actual voltage with this virtual power frequency voltage, the voltage for compensating voltage sag can be calculated. In this case, one voltage detector can be abbreviated. And the operation principle can be easier to process by MCU or DSP. The strategy of virtual comparison can be illustrated by the following equation:where is initial phase. By using two voltage detectors, the operating strategy should be altered to satisfy the new system.

##### 4.3. Algorithm of New DVR Compensation Strategy

In the traditional DVR system, the voltage detector at the generator would supervise the voltage changes. Once a voltage sag or swell detected, the compensator will inject a voltage to the grid so that the voltage delivered to the load can get rid of voltage quality problems. The processor receives the magnitude of sagged or swelled voltage, and then, the processor would calculate the needed voltage that compensator should inject. The principle of the traditional strategy of the DVR system is shown in Figure 5.

However, since voltage sag or swell happens occasionally, which means that the voltage of the generator usually keeps steady (220 V and 50 Hz), the detection of can be replaced by the constant of power frequency voltage. By comparing the voltage of loads to that constant, the voltage needed for compensation can be calculated. The virtual comparison can be illustrated by the flow chart in Figure 6.

The minimum-energy compensation is a strategy that injects a voltage that has the preceding phase than the grid voltage. The voltage injected is almost vertical to the current of loads so that the active power from the power source could reach the maximum, and the active power given by the compensator is the least. In this circumstance, the compensating circuit can provide longer compensation time if the capacity of the energy storage unit is limited. Because of sound power management, minimum-energy compensation is one of the frequently used methods in DVR products.

The circuit of the DVR system is shown in Figure 7.

In virtual comparison, the source voltage has been treated as a constant [5, 6]. Therefore, the voltage injected is as follows:

In the equation above, and are phase angle of the voltage of DVR () and voltage of sensitive load () and is current of sensitive load. The output of the apparent power of DVR is as shown in the following equation:

In equation (10), , .

According to different voltage sag situations, different strategies would be applied.

Before the introduction of the compensation strategy, the concept of is the difference between line voltage and the amplitude of the standard voltage [12, 13, 16]. The definition of is given in the following equation:

By setting as a standard, different strategies could be used if certain conditions are satisfied.

###### 4.3.1. Full Reactive Power Compensation

When , the vector of voltage injected from DVR can be vertical to the current of load (), and thus, the active power injected is 0. In other words, the power injected is fully reactive. Therefore,

So, the condition that full reactive compensation should satisfy

###### 4.3.2. Minimum Active Power Compensation

When , full reactive power compensation cannot be realized, and thus, the active power that DVR injected is not 0. By calculation, the needed active power can be figured out.

The equivalent circuit of the DVR system is shown in Figure 8, and the compensating unit is treated as a controlled voltage source. By controlling the amplitude and phase angle of DVR output, will be stable at 1 p.u. The active power of load and source can be illustrated by following equations:

So the active power of DVR can be described as following equation:

Setting and as standards, the injected active power can be described as following equation:

The standardized voltage of power source is as follows:

When , or , the could reach the minimum.

In this case, the DVR-injected voltage is given in the following equation:

And its amplitude and phase angle can be described as following equations:

By analyzing the equation (21), if , the DVR system can inject reactive power only, and the vector of should be vertical to . However, when , the value of is positive. In order to recover , the DVR compensator must inject active power; only if and have the identical value of phase angle, the DVR system could have minimum injected active power.

###### 4.3.3. Comparison between Traditional Strategy and Virtual Comparison

The difference between the traditional compensation strategy and the strategy of virtual comparison is shown in Table 1.

#### 5. Model Simulation Experiment

##### 5.1. Single-Phase Virtual Quantity Comparison Quantity Simulation Model

###### 5.1.1. Simulink Model of Traditional Voltage Compensation Strategy

The simulation of the DVR model is shown in Figure 9. The structure of single-phase dynamic voltage restorer is added in the text modification, and the compensation is realized by parallel compensation method. The main power device is IGBT. The output scope is responsible for displaying the voltage of the generator, the voltage of the compensator, and the voltage of sensitive loads [12, 13, 16]. The IGBT control signal scope is for revealing the signal to control the IGBT switches of the inverter. The AC power supply in the picture is 220 V 50 Hz, , , and .

In this circuit, two blocks are used to simulate voltage sag and voltage swell. For the voltage sag simulator, the breaker will be triggered if the external switching time has been set, and a fault would happen in the main circuit to emulate voltage sag. When talking to the voltage swell simulator, the block contains a breaker and a voltage source, which has the same frequency and initial phase as the generator. Once the trigger time of the breaker is set, the voltage source in the block will inject voltage into the grid. Therefore a voltage swell can be emulated. Figure 10 shows the structure of voltage swing simulator. By setting the time to generate impact fault, different fault types can be set according to requirements. The voltage sag happens from 0.05 s to 0.1 s, and the voltage swell happens from 0.12 s to 0.17 s.

By using the traditional compensation strategy, the phase locked loop (PLL) should be used to acquire the frequency of source voltage () so that the reference voltage is generated in Figure 11. Figure 11 generates a reference voltage by comparing the traditional method of the circuit and the phase-locked loop circuit. Then, by calculating the difference between and , the voltage needed, or , can be figured out.

###### 5.1.2. Simulink Model of Virtual Comparison

The model of the DVR model using virtual comparison is shown in Figure 12. The main topology of Figure 12 is similar to that of Figure 9, and the parallel compensation method is adopted to realize the compensation. The difference between traditional strategy and virtual comparison is that the input of the reference voltage calculation block has changed to (the voltage of sensitive load). In this situation, the voltage needed can be calculated by making a difference between and standard voltage with zero phase angle. The structure of the reference voltage calculation unit is shown in Figure 13. Figure 13 shows the structure of reference voltage calculation unit by using the strategy of virtual comparison. The virtual comparison is realized by comparing the load terminal voltage with the ideal output voltage.

##### 5.2. 3-Phase Virtual Quantity Comparison Quantity Simulation Model

By using the PI controller, the source voltage or the simulated virtual voltage can be corrected after the calculation of the voltage needed to inject. Basically, 2 types of virtual comparison models can be applied to the 3-phase system [16, 17, 19]. One is applying the single-phase virtual comparison system to each phase, and another is using Park Transformation to transform from ABC phase voltage to direct and quadrature voltage. In this paper, the model of using Park Transformation will be discussed.

When Park Transformation is applied, the compensation voltage would be calculated since Park Transformation can transform 3-phase voltage vectors into 2-phase vectors. The transformation matrix is given in the following equation:

And by Park Transformation, the 3-phase voltage will be transferred to the following equation:

Then, the dq0 voltage would be

In this case, the voltage for injection can be calculated as follows:

And

After the voltage needed to inject is figured out, the dq0 voltage should be inversely transformed to 3-phase voltage. Therefore, the Park Inverse Transformation should be needed to finish the process. The Park Inverse Transformation matrix is shown as follows:

Then, the 3-phase inject voltage is given in following equation:

If the compensation voltage is generated, then the equations of DVR can be described as following equation:

Finally, the process of 3-phase voltage comparison is realized.

The compensation side uses a 200 V DC voltage source, and the LC filter is placed on the inverter side. A short circuit simulator is used to simulate the occurrence of voltage drops on the sensitive load side line. LC filter parameters are as follows: *R* is , and *L* is . Load parameters are as follows: active power is 1500 W, inductive reactive power is , and capacitive reactive power is .

#### 6. Simulation Model Analysis

The system used in this design uses 380 V power source as the main power. By using the step-down transformer, the voltage will be downgraded to the standard voltage. In order to simulate the 3-phase fault, the module of the three-phase fault will be used to simulate all the fault in 3-phase lines.

For the voltage controller, which is the core of the voltage compensator, the PI controller is used to correct the output and eliminate noises and harmonic interference. Table 2 gives the results of two methods in the number of voltage sensors, calculation difficulty, and output quality.

##### 6.1. Analysis of Single-Phase Simulation Results

By using the MATLAB simulation, the performance of DVR is shown in Figure 14.

As shown in Figure 14, during the voltage sag period, the compensating circuit injects an AC voltage with the same phase as the generator voltage so that the voltage of sensitive loads keeps steady. The result of the compensating voltage sag is shown in Figure 15. The results show that the compensated load voltage can be obtained when the sag voltage is applied to the novel virtual voltage comparison compensation input.

When voltage swell happens, the compensator injects an antiphase voltage to counteract the swelled voltage from generators. The result of neutralizing swelled voltage is shown in Figure 16.

As shown in Figure 17, during the voltage sag period, the compensating circuit injects an AC voltage with the same phase as the generator voltage so that the voltage of sensitive loads keeps steady. The result of the compensating voltage sag is shown in Figure 18.

When voltage swell happens, the compensator injects an antiphase voltage to counteract the swelled voltage from generators. The result of neutralizing swelled voltage is shown in Figure 19. The filter capacitor voltage is well tracking the voltage reference within several sampling intervals. The results show that the voltage waveform effect of transient interval is very good.

Besides, when using virtual comparison as a compensation strategy, the outcome reveals the eligibility of this strategy.

Same as what traditional strategy does, the compensation unit would inject a same-phase voltage to inhibit voltage sag. But the voltage needed originates from the difference of and standard voltage, rather than the difference of and .

For the output of the simulation, we can conclude that the system has good output performance and achieves a compensated sinusoidal waveform.

##### 6.2. Analysis of 3-Phase Simulation Results

When the virtual comparison strategy is applied to the 3-phase system, the result of voltage sag simulation is shown in Figure 20. As is shown, when voltage sag happens, the compensator can instantly inject the voltage needed to stabilize the voltage on the load side. Results in different situations illustrate that the compensator would inject a sine wave with 40 V peak-to-peak voltage in each sagged phase, as shown in Figure 21.

Similarly, if we use the traditional strategy of voltage compensation, we can get the same output in Figure 22. By adding a voltage sampling module in the voltage controller, the traditional strategy can be applied to the simulation system. The results show that the system can keep the load voltage constant during fault by detecting and compensating the load voltage disturbance, as shown in Figure 23.

The results of the virtual compensation method and the traditional compensation method in the system tend to be consistent, and the results show that the concept of virtual comparison is an effective compensation strategy.

#### 7. Experimental Analyses

According to Figure 1, the experiment is further studied, and the prototype experimental platform is designed in Figure 24. The main circuit structure of DVR system is composed of rectifier, DC filter capacitor, inverter, and AC LC filter. DSP (TMS320F2812) generates PWM driving signal and inverter generates compensation signal.

In this paper, the experimental test is carried out. The model of the voltage sensor is VSM025A. It transmits the grid voltage and load voltage values to the conditioning circuit in real time. After conditioning, it is supplied to the DSP for sampling. The DSP realizes the lock-in function according to the grid voltage sampling and calculates the effective value of the load voltage according to the load voltage sampling value. As shown in Figure 25, it is the inverter result generated by the control algorithm, and the output waveform is stable. Here, without filtering, the generated output is consistent with the DSP output waveform.

In order to achieve effective control, the dead zone setting is adopted. The IGBT Drivers are controlled by two PWM complements. The amplitude reaches 3 V, and the frequency is 4.9 k. The PWM waveform is shown in Figures 26 and 27. There is a dead zone within this 0.27 us, which helps reduce and improve the reliability of the drive.

#### 8. Conclusions

In this paper, a novel virtual voltage comparison compensation is proposed, which is different from traditional strategy, which has high output quality and simple calculation characteristics. By comparing the actual voltage with this virtual power frequency voltage, the voltage for compensating voltage sag can be calculated.(1)In this case, one voltage detector can be abbreviated. The novel virtual voltage comparison DVR can track the grid voltage in real time. The introduction of virtual compensation amount realizes the rapid calculation of the compensation voltage and effectively guarantees the voltage quality of the system.(2)The minimum-energy compensation is a strategy that injects a voltage that has the preceding phase than the grid voltage. The algorithm uses the invariant constant signal as the input, which reduces the influence of the uncertainty of the input on the generated compensation signal.(3)The active power provided by a compensator is the smallest, the active power of the power supply is the largest, and the injected voltage is almost perpendicular to the load current.

The proposed concept has been supported with experimental results. The experimental results confirm the effectiveness of the novel virtual comparison method.

#### Data Availability

The data used to support the findings of this study are included within the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The authors are greatly grateful to the Anhui Polytechnic University for facilitating access and use of their facilities and equipment to carry out this research. This study was supported by Anhui province Key Projects of Natural Science Research in Colleges and Universities under grant KJ2021A0491, Pre-research of National Natural Science Fund Project of Anhui Polytechnic University under grant Xjky02201905, and Open Research Fund of Anhui Key Laboratory of Detection Technology and Energy Saving Devices, Anhui Polytechnic University, under grant DTESD2020A04.