As an energy source that people are widely using, electric energy is used to measure the development status of a country and is also one of the standards that reflect the country’s comprehensive strength. On the basis of meeting the people’s requirements for daily electricity consumption, and after further satisfying industrial production, improving power quality is a sign of a country’s development, science and technology at a first-class level, and the progress of social civilization. In modern development, it is in line with the development of the times to enhance the utilization rate of electric energy, save energy, improve the electrical environment, and meet the people’s growing material culture directly with the development power.
With the continuous development and progress of modernization, in the industrial requirements and people’s daily lives, our power quality requirements are also constantly improving. But in practice, the power grid often causes the quality of the power we use to decline due to various reasons. The power supply of the urban distribution network is insufficient, the reliability of the user’s power supply is not high, and it is not suitable for the modern urban economy. The gap between the demands for residential electricity is large, and the line loss rate of some urban networks and the national power grid is constantly increasing.
 There are many reasons for the decline in power quality, mainly the operation of some non-linear and shocking loads in the grid, and the worse case is artificial. These declines in quality will seriously affect the power system. If the factory is powered off or temporarily turned off, it will cause huge property losses. In serious cases, it will also threaten people’s lives, so it is very important to solve the problem of power instability.
2. DVR Compensation Strategy
As far as the development of DVR is concerned, the compensation strategies of DVR are generally divided into three types: complete compensation, in-phase compensation, and minimum energy compensation. For an ideal DVR, when a voltage drop occurs, the voltage before the drop will be used as a reference point to output a certain voltage as compensation. Of course, when the phase angle changes, we also need to compensate the phase angle, etc., so that When the load and the voltage of the power grid return to the same state as before, we say that the compensation is completed. Here is a brief introduction to this common voltage compensation strategy   .
2.1. Minimum Energy Compensation
The purpose of minimum energy compensation is to achieve optimal output active power. The minimum energy compensation (Figure 1) can be divided into zero active power compensation and minimum active power compensation. To achieve zero active power compensation, it is necessary to adjust the phase of the load voltage so that the phase of the compensation voltage and the load current are perpendicular to each other, so that only zero active power needs to be output, and the grid provides all the active power required by the load. To achieve minimum active power compensation, it is necessary to adjust the phase of the load voltage to minimize the lease of the grid voltage and load current, so that the grid outputs the maximum active power.
2.2. Research on Control Strategy
2.2.1. Feedforward Control
Generally speaking, due to the short compensation time, the requirements for
Figure 1. Minimum energy compensation.
control accuracy are not high. Early research only used pure feedforward control, that is, open-loop control, with fast response speed, simple control method, and convenient implementation. However, under light load, the damping characteristics are poor, the output voltage has a large overshoot, and the accuracy is relatively low. At the same time, the feedforward control belongs to the advance control. It is to pre-judge the errors that may occur before the errors occur, and generate signals to control the possible deviations.
2.2.2. PI Control
Compared with feedforward control, the controllability of closed-loop control is stronger. The regulator has strong robustness and simple algorithm, and is most widely used in engineering. The proportional coefficient can increase the gain, the integral coefficient can reduce the steady-state error, and the controller parameter design is relatively easy. In order to suppress the resonance peak of the system, the single closed-loop control needs to greatly reduce the system bandwidth, resulting in slower dynamic response. At the same time, such feedback control can more accurately eliminate errors, so it will be much better in actual effect.
2.2.3. Hysteresis Control
Hysteresis control has the advantages of simple design and easy implementation, and good stability and transient performance. However, the switching frequency is not fixed, and the controllability of the switching frequency is poor, which will generate harmonics with a wide spectrum distribution, which makes the design of the post-stage filter difficult. This is the main reason for limiting the application of hysteresis control. In order to achieve constant switching frequency of the hysteresis control, the constant frequency control can be realized by changing the width of the hysteresis band through the control circuit.
3. DVR Detection and Dq0 Detection Method
     in addition to the above methods, the most commonly used method is the dq0 transformation method, which is also used for detection in subsequent simulations. Compared with other voltage detection algorithms, the dq0 transformation method has good real-time characteristics. If the three-phase voltage is balanced and without distortion, the dq0 conversion method can instantly find the effective value of the voltage. However, in actual life, the three-phase voltages generally used are often unbalanced, so a filter needs to be added to solve the problem of unbalance.
The common three-phase power system is represented by the abc coordinate system, which is a dq coordinate that is stationary in space and is composed of two-phase coordinates that rotate synchronously with the generator in space, from the abc coordinate system to the dq coordinate system The transformation is called dq transformation. The dq transform makes it possible to control each control variable separately, which can eliminate the influence of harmonic voltage and asymmetric voltage. Due to the application of synchronous rotating coordinate transformation, it is easy to separate the fundamental wave from the harmonic wave.
After the three-phase voltage Va, Vb, Vc of the system is sampled and detected, the dd transformation is used to obtain Vd, Vq, and then the phase angle and amplitude of the voltage can be known, and then the voltage drop can be used to determine whether a voltage drop has occurred (Figure 2).
Before this, a fundamental voltage component should be designed as the standard voltage for each item:
According to the formula, we know how much we have to recover after the voltage drops. Using this as the reference voltage, the following simulation is also based on this recovery. This is the three-phase voltage we usually use.
The formula of coordinate transformation is as follows: Transform the voltage signal from a-b-c three-phase coordinate system to α-β transformation coordinate:
Figure 2. Voltage drop detection principle.
Then change the α-β to the d-q coordinates, so that the coordinate transformation is completed, formula 3:
Through the final Ud and Uq, the amplitude and phase angle of the voltage can be obtained, so that the latter part can be carried out, and the detection is regarded as a success.
In the simulation, the two parts are merged into a single operation, and the average voltage output of the three phases is more accurate. In fact, the value here can be different in different situations, depending on the specific situation.
The formula in the above simulation is actually that when a voltage sag occurs in the system, the system voltage contains positive sequence components, negative sequence components, and 5th harmonic, and the three-phase voltages are:
Finally get Vd and Vq through this. Then use Vd and Vq to calculate the value to get the voltage of the load, and then perform subsequent comparison and other operations.
Figure 3. Control block diagram simulation.
Figure 4. Testing link.
Figure 5. Result.
4. Simulation Results
For the simulation part of the entire DVR, the simulation graphs of load voltage, grid voltage, and compensation voltage of the inverter test output were made (Figures 3-5). The final result obtained a good response, which proved the correctness of the previous description, and then proceeded to this analysis.
 Wang, P., Jenkins, N. and Bollen, M.H.J. (1998) Experimental Investigation of Voltage Sag Mitigation by an Advanced Static VAr Compensator. IEEE Trans on Power Delivery, 13, 1461-1467. https://doi.org/10.1109/61.714772