Improved harmonic detection method based on ip-iq theory

. Based on the traditional ip-iq harmonic detection theory, the accuracy of harmonic detection is easily affected by the phase-locked loop (PLL) output phase error, and the single low-pass filter (LPF) detection accuracy and filtering effect cannot be simultaneously. In this paper, an improved harmonic detection method based on the second-order generalized integrator-frequency locked loop (SOGI-FLL) technique is proposed to generate sine and cosine signals with the same frequency as the grid voltage; The traditional low-pass filter and average filter are used in series to improve the response speed and accuracy. Through theoretical analysis of the improved harmonic detection method and simulation in MATLAB environment, the theory and simulation results prove the effectiveness of the improved method.


Introduction
In recent years, with the development of renewable energy such as wind energy, light energy, more and more power electronic devices and a large number of non-linear loads are inclined to enter the grid, so that the harmonic pollution problem of the grid cannot be ignored. APF is an effective way to suppress harmonic pollution, and harmonic detection is the premise of harmonic suppression. Only when harmonics are detected accurately and quickly, can effective harmonic suppression be carried out according to detected harmonics. Therefore, choosing appropriate harmonic detection method can make harmonic suppression produce a good effect.
At present, the commonly used harmonic detection method mainly has a detection method based on Fourier transform, a method based on wavelet transform, a harmonic detection method based on a neural network, and a harmonic detection method based on instantaneous reactive power theory. Fourier Transform (FFT) cannot detect non-stable signals, only the smooth signal is detected, so the scope of application is small; the wavelet transform needs to determine one optimum wavelet base selection in the harmonic detection process, and its selection process is very complicated.
The time required is long and difficult; The development of neural network methods is very rapid, in principle, neural network detection method has a good application prospect, however, this method has not been widely used because of its large amount of calculation and lack of unified standard; the harmonic detection method based on instantaneous reactive power theory based on this article is a traditional harmonic detection method, but the conventional detection method has the performance of the phase-locked loop output phase and LPF limit. Therefore, many scholars have proposed various improvements based on this principle. Document [3] proposes a method of detection without locked loop, but its detection accuracy is easily influenced by the signal of lower frequency, and its design requires high design requirements, more complicated. Document [4] proposes a new method of mixing harmonic detection, using the ip-iq detection method and the method of the slip-window iterative (DFT) principle instead of LPF, but this method is affected by the accuracy of the output phase. The literature [5] proposed a modified harmonic detection method, but this method suppresses the limited capacity of grid voltage disturbance, and is susceptible to DC components.
This paper improves two problems in the traditional detection method. First, a technique for non-locked loop is proposed for the detection accuracy of the phaselocked loop. At the same time, the delay and filtering effect of the conventional single low-pass filter cannot simultaneously balance the problem to propose a mixed filter.
Thus, the conventional detection method replaces the modified harmonic detection method of the phase-locked loop output reactive current in the conventional detection method, and uses the hybrid filter in series with the average filter phase to improve the high-end harmonics. The filtering effect is accelerated to speed up the response speed of the detection, which is improved relative to the conventional ip-iq harmonic detection method.

Traditional ip-iq harmonic detection method
The conventional ip-iq harmonic current detecting method obtains a phase-phase grid voltage ea in the same phase, the corresponding cosine signal sinwt with the corresponding cosine signal -sinωt, respectively, the corresponding cosine signal-cosωt. In this method, if need to detect the reactive current, you only need to reverse the iq to reverse it. In the figure, ia, ib, ic is three-phase three-wire load current value, in the case of three-phase voltage symmetry, all voltages can be expressed as: In the formula, the effective value of the fundamental wave of the power supply voltage is, and the load current corresponding to the three-phase symmetrical voltage can be expressed as follows: iα, iβ is the current value of two phase stationary coordinate system, and the Park transform formula calculates the power current ip and reactive current iq, the formula is as follows: sin cos cos sin The system discussed herein is three-phase threewire system, ω is the angular velocity of the three-phase load signal; it is the amplitude of the load current signal; m  is an initial phase of the a phase m phase harmonics in the load signal.
It can be seen from the formula (4), when the active current ip and reactive current iq are m = 1, the power grid is removed from the power grid through the lowpass filter, and the current passes through the filter. The inverse transformation of the current obtains the fundamental amount iaf, ibf, icf of the three-phase current, and the harmonic current iah, ibh, ich to be compensated, and the three-phase current ia, ib, ic minus filter filter The fundamental component iaf, ibf, icf obtained later: Through the above theoretical analysis, the detection effect of conventional ip-iq harmonic current detection method mainly depends on the design of the LPF parameter, due to the phase size of the harmonic positive cosine current detected by the phase lock ring and the difference in the size of the true phase.
The value will also affect the effect of harmonic current detection. Therefore, many scholars have made a large number of research on the parameters of LPF for the problem of traditional detection methods: the filter cutoff is high, but the accuracy is not high; the filter accuracy is high, but the dynamic response is more slow.
In summary, the response speed of the low-pass filter is contradictory and the filtering effect, and the traditional reactive power harmonic detection method is difficult to achieve the balance of detection accuracy and response speed.

New method for improving harmonic current detection
For the disadvantage of the conventional ip-iq harmonic detection method described above, this paper proposes an improved ip-iq based harmonic detection method in principle in principle, this paper proposes two aspects: 1. For the filtering part, in this paper, a hybrid filter in series of average filter and Butterworth low-pass filter is used as an improved filter for harmonic detection.
2. For phase-locked loop and sine and cosine signal acquisition part, in this paper, the second order generalized integrator -frequency locked loop (SOGI-FLL) technology is used. To solve the limitation of traditional phase-locked loop (PLL) on the accuracy of harmonic current detection, the PLL technology is used to replace the PLL in traditional detection method.
The two improved methods can not only improve the reliability and accuracy of harmonic detection, but also improve the efficiency of detection. The optimized harmonic current detection principle is shown in

Low pass filter (LPF) series average average filtering
The traditional reactive power detection method generally uses the ButterWorth low pass filter to detect the DC signal of the current, the higher the step of the filter, the better the filter effect, but its filter is longer, the response speed is slower; When the order is low, the dynamic response is fast but the filtering effect is poor. In short, the traditional filter has a problem that the response speed and the filtering effect are contradictory. In order to take care of the filtering effect and the response speed, the second-order ButterWorth filter is generally selected, and the cutoff frequency is 35 Hz.
The output waveform obtained by the Butterworth low pass filter contains a higher alternating current component, which is large, especially when the threephase voltage imbalance and the respective load imbalance, resulting in a stronger pattern, resulting in a positive order of the fundamental wave. The current contains high harmonics to make the final harmonic detection result generate errors. The improvement scheme is to increase the average filtering on the basis of the original low-pass filter.
Based on the traditional ip-iq method, the current average value method is based on this method. By the transformation of the synchronous coordinates, calculating the current ip, iq average rather than the instantaneous value, instead of the traditional single lowpass filter, detection The current average is the threephase current DC component corresponding to the current-based wave frequency component, thereby implementing the filtering function of the filter. Instead of the LPF, the dynamic response speed is the T / 6 basis period of the compensation response time, and the algorithm is easily realized when the voltage is stable or the load symmetry, and the performance is better, but the disadvantage is that the voltage is distortion and The detection performance of the average filter is poor in the case where the load is asymmetric.
Considering the advantages and disadvantages of the two filtering algorithms, a modified low-pass filter in which the average value filter and the Butterworth filter phase is used as a harmonic detection, and the model block diagram is shown in

Second-Order Generalized Integrators -Locking Rings (Sogi-FLL)
Since the change in the grid frequency is not large in real life, the phase accuracy of the positive cosine signal output by the phase-locked loop is slightly poor when the positive sputum signal output by the phase-locked loop is slightly inferior, thereby generating detection error, and affects the ultimate the result of harmonic detection, so this paper proposes that the SOGI-FLL instead of the phase-locked loop produces a positive cosine signal.
Since the structure of the locking ring is simple and has the advantage of stabilizing and reliability, the locking ring can be used to improve the robustness of the harmonic detection.
In order to prevent PLL from obtaining positive sequence fundamental wave component with deviation, the positive sequence component of three-phase voltage is transformed to the orthogonal coordinate system of αβ through Park: Wherein, the voltage in Formula 6 is the positive sequence component and the negative sequence component of the three-phase voltage respectively.
By replacing the detected sine and cosine signals generated by the sine and cosine generator and phaselocked loop, a more accurate fundamental active current can be obtained. At the same time, the phase accuracy difference occurs in the case of grid voltage distortion, and the lock-up ring output is the rotation signal with the frequency phase of the voltage, and the latch ring technology accelerates the response speed and accuracy. By transforming the signal by the lock frequency ring, the transform matrix of the output signal can be written as the following form.
The initial phase angle  in the matrix is arbitrary, which is inconsistent with the three-phase load voltage phase m  . Therefore, it is obtained after the coordinate transformation.
    According to the formula (5), when the fundamental current component obtains the DC component of the current, only the detected no longer the active current ip and reactive current iq in the conventional sense, m = 1 can be obtained.
However, in addition to the low-pass filter and average filter filtering, this method is in addition to highefficiency filtering, and the second-order low-pass filter has also introduced certain delays while ensuring SOGI-FLL steady state performance. The phase delay compensation can be performed on the phase angle of the locking ring input, so that ip, iq can still be filtered out by a filter.
It can be seen that in the improved method, the locking ring is used instead of the phase-locked ring, which can not only solve the problem of error in the phase accuracy detected in the case where the threephase grid voltage is distorted, but because the lock The frequency rings are more likely to achieve more easily and detect relatively stable, which is very important for improving the accuracy and reliability of the harmonic current detection system.

Simulation results and analysis
In order to verify the effectiveness of the improved harmonic detection method, the system simulates the system via MATLAB / AIMULINK. The three-phase grid is unbalanced. In order to take care of the filtering effect and the response speed, the second-order ButterWorth filter is selected, and the design of the cutoff frequency is 35 Hz. Fig. 5 and Fig. 6 show the traditional harmonic detection method based on instantaneous reactive power theory. Fig. 5 shows the output waveform after adding the second-order Butterworth low-pass filter. Fig. 6 shows the output waveform after adding the average filter.  As can be seen from Fig. 5 and Fig. 6, the conventional low-pass filter will cause a large number of ripple in the detected DC component. The existence of ripple makes the detected positive sequence current of fundamental wave contain high harmonic, and the response speed of the traditional low-pass filter is lower than that of the average filter.
Although the response time of the average filter is short, it can be seen from the figure that its output waveform fluctuates greatly and is easily affected by changes in the fundamental current, Thus, the precision of harmonic current detection is affected.  Fig. 7 shows the current output waveform of the improved low-pass filter. By comparing Figure 5 and Figure 7, it can be seen that the output ripple of the improved filter is greatly reduced. It not only has the advantages of low pass filter with better detection accuracy, but also adds flat filter to reduce detection time. It can be seen that the improved harmonic detection method has good detection accuracy and response speed.

Conclusion
This paper analyzes the traditional ip-iq harmonic detection method, based on the APF harmonic detection, the average value filtering and the ButterWorth filter are used in series and the lock-up ring instead of the phaselocked loop as an improved method of harmonic detection. By expatiating the characteristics of the improved filter and analyzing the stability and reliability of the frequency locking loop. Theoretical analysis and simulation results show that the improved ip-iq method has better detection accuracy and dynamic response speed, which has theoretical research and application value.