# An Improvedip − iq Harmonic Detection Method Based on Time-Varying Integral Duration

Authors: Jifang Li; Jidong Wang; Kunlin Song; Zhen Feng
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

By analyzing harmonic related to instantaneous active current and instantaneous reactive current, we propose an improved harmonic detection method to remedy long response delay and low detection accuracy corresponding to harmonic of power system. This method introduces a series connection scheme composed of Low-Pass Filter (LPF) and a current average module firstly. Then, detection accuracy of harmonic current is enhanced by adaptive tuning cut-off frequency of LPF and integration time which was obtained by proposed algorithm of the current average module. Moreover, feedback loop is introduced to compensated delay caused by LPF. Simulations including uncontrollable rectifier and three-phase voltage type inverter show proposed method has many advantages such as high detection accuracy, low response delay and good generality. Our method provides reliable harmonic current detection for later harmonic suppression and harmonic compensation.


---

## Body

## 1. Introduction

With the wide use of power electronic equipment in power system, coupled with a large number of nonlinear loads, a large number of harmonic pollution appears in the power grid, which has a serious impact on the power quality of the power grid. Active power filter (APF) is a main method to alleviate harmonic pollution [1, 2]. Accurately and quickly detecting harmonic current is one of the key technologies of active power filters. The existing harmonic detection methods mainly include Fourier analysis [3], Neural network [4–6], adaptive interference cancellation [7, 8], wavelet transform [9, 10], and instantaneous reactive power theory. It is precisely because of the characteristics of insensitivity to power grid frequency changes, high detection accuracy of harmonic detection, and low response delay that instantaneous reactive power theory has been widely used. This detection method is divided into p-q detection method [11, 12], ip−iq detection method [13–17], etc. A single-phase harmonic current detection method without phase-locked loop is proposed [14]. This method avoids voltage phase shift caused by voltage fluctuations and eliminates detection errors caused by phase-locked loop. However, the LPF in this method cannot improve the delay effect and makes the detection real-time poor. Sun et al. [15] proposed a harmonic detection method using single-phase circuit structures and introduced harmonics and reactive current as feedback signals to compensate for the delay of the LPF. Although this method improves the dynamic response speed of harmonic detection, it cannot significantly enhance accuracy of harmonic detection. Li Shui-xiang series connects a current average module with LPF to effectively improve the accuracy of harmonic detection and response speed [16]. However, this method does not effectively use the harmonic components which may contain the same phase as the fundamental wave of active current. Wang Yang added a PI controller after LPF to improve detection accuracy and introduced PD controller as feedback to improve response speed [17], while harmonic detection ability of its method is weaker than that of current average module method. Using theory of instantaneous reactive power, this paper proposes a harmonic detection method which adaptively changes the integration time following detection current changing and improves detection accuracy and response speed. Finally, simulation results verify the good performance of the improved harmonic detection method.


## 2.ip − iq Harmonic Detection Algorithms

### 2.1. Traditionalip − iq Harmonic Detection Algorithm

Theip−iq algorithm uses instantaneous reactive power theory to obtain instantaneous active current ip and instantaneous reactive current iq firstly. Then, uses structure described in Figure 1 to detect harmonic of power grids.Figure 1
Principle ofip−iq harmonic detection method.Firstly, three-phase currentsia, ib, ic are converted the iα, iβ by transform matrix C32, and then multiplied matrix C which is constructed by a sine and cosine signal generation circuit to obtain instantaneous active current ip and instantaneous reactive current iq.(1)ipq=C⋅C32⋅i,where ipq=ipiqT, i=iaibicT. Meanwhile, ipq obtained by formula (1) is filtered by a low-pass filter LPF to obtain its DC component i¯pq. So, the fundamental current if can be calculated from i¯pq according to formula (2).(2)if=C32T⋅C−1i¯pq=2I11sinωt+ϕ112I11sinωt+ϕ11−2π32I11sinωt+ϕ11+2π3,where if=iafibficfT, i¯pq=i¯pi¯qT. The first element and the second element of subscript related to I11 and ϕ11 indicate the positive sequence and order of the harmonic, respectively. I11 and ϕ11 are the effective value and phase angle of the positive sequence component corresponding to current fundamental wave, respectively. Then the three-phase load harmonic current is obtained by subtracting the three-phase load current from its fundamental current:(3)ih=i−if,where ih=iahibhichT.


### 2.2. Principle ofip − iq Harmonic Detection Algorithm Non-Phase-Locked Loop

In the traditional detection algorithm, we use PLL to detect the phase-A voltage and generate a synchronous signal corresponding to sine and cosine. However, when the load voltage is distorted, the PLL is interfered by the distortion voltage signal, which affects the detection effect and lead to signal asynchrony. To tackle this problem, we changeC into C0 when angular frequency ω of power grids is a fixed value ω0:(4)C0=sinω0t−cosω0t−cosω0t−sinω0t.So, the three-phase load current fundamental wave component is described as(5)if=C32TC0−1i¯pq=2I11sinωt+ϕ112I11sinωt+ϕ11−2π32I11sinωt+ϕ11+2π3.We find that the three-phase current fundamental wave components calculated by formulas (2) and (5) are exactly the same. Therefore, for the angular frequency ω0 in the transformation matrix, in the entire process, it only plays a transition role and does not affect the acquisition of the final fundamental wave component. The value of ω0 will not affect the harmonic detection result and accuracy. Moreover, the detection accuracy of if is positive correlation detection accuracy of i¯pq; meanwhile, the detection accuracy of i¯pq is determined by difference of ω0−ω. So, we can conclude that the detection accuracy of if is determined by difference of ω0−ω with respect to detected voltage and current. Generally, we take ω0=2πf=100π as the angular velocity in the preset transformation matrix C0. Details of transformation matrix C0 is described as(6)C0=C0−1=sin314t−cos314t−cos314t−sin314t.


## 2.1. Traditionalip − iq Harmonic Detection Algorithm

Theip−iq algorithm uses instantaneous reactive power theory to obtain instantaneous active current ip and instantaneous reactive current iq firstly. Then, uses structure described in Figure 1 to detect harmonic of power grids.Figure 1
Principle ofip−iq harmonic detection method.Firstly, three-phase currentsia, ib, ic are converted the iα, iβ by transform matrix C32, and then multiplied matrix C which is constructed by a sine and cosine signal generation circuit to obtain instantaneous active current ip and instantaneous reactive current iq.(1)ipq=C⋅C32⋅i,where ipq=ipiqT, i=iaibicT. Meanwhile, ipq obtained by formula (1) is filtered by a low-pass filter LPF to obtain its DC component i¯pq. So, the fundamental current if can be calculated from i¯pq according to formula (2).(2)if=C32T⋅C−1i¯pq=2I11sinωt+ϕ112I11sinωt+ϕ11−2π32I11sinωt+ϕ11+2π3,where if=iafibficfT, i¯pq=i¯pi¯qT. The first element and the second element of subscript related to I11 and ϕ11 indicate the positive sequence and order of the harmonic, respectively. I11 and ϕ11 are the effective value and phase angle of the positive sequence component corresponding to current fundamental wave, respectively. Then the three-phase load harmonic current is obtained by subtracting the three-phase load current from its fundamental current:(3)ih=i−if,where ih=iahibhichT.


## 2.2. Principle ofip − iq Harmonic Detection Algorithm Non-Phase-Locked Loop

In the traditional detection algorithm, we use PLL to detect the phase-A voltage and generate a synchronous signal corresponding to sine and cosine. However, when the load voltage is distorted, the PLL is interfered by the distortion voltage signal, which affects the detection effect and lead to signal asynchrony. To tackle this problem, we changeC into C0 when angular frequency ω of power grids is a fixed value ω0:(4)C0=sinω0t−cosω0t−cosω0t−sinω0t.So, the three-phase load current fundamental wave component is described as(5)if=C32TC0−1i¯pq=2I11sinωt+ϕ112I11sinωt+ϕ11−2π32I11sinωt+ϕ11+2π3.We find that the three-phase current fundamental wave components calculated by formulas (2) and (5) are exactly the same. Therefore, for the angular frequency ω0 in the transformation matrix, in the entire process, it only plays a transition role and does not affect the acquisition of the final fundamental wave component. The value of ω0 will not affect the harmonic detection result and accuracy. Moreover, the detection accuracy of if is positive correlation detection accuracy of i¯pq; meanwhile, the detection accuracy of i¯pq is determined by difference of ω0−ω. So, we can conclude that the detection accuracy of if is determined by difference of ω0−ω with respect to detected voltage and current. Generally, we take ω0=2πf=100π as the angular velocity in the preset transformation matrix C0. Details of transformation matrix C0 is described as(6)C0=C0−1=sin314t−cos314t−cos314t−sin314t.


## 3. Time-Varying Integral Duration (TVID) Improvedip − iq Detection Method

### 3.1. LPF with Time-Varying Integral Duration

In theip−iq detection method, in order to improve the detection accuracy and response speed of the harmonic current, we describe ipq as harmonic form:(7)ipq=3∑n=1∞I1ncosnω−ω0t+ϕ1n−I2ncosnω+ω0ωt+ϕ2n−∑n=1∞I1nsinnω−ω0t+ϕ1n+I2nsinnω+ω0t+ϕ2n,where n is the harmonic order and n∈ℕ∗. The role of LPF here is to filter out harmonic components of ipq to get the fundamental wave positive sequence DC component or to obtain slip frequency component i¯pq between power grid and C0. According to equation (7), in the phase-locked loop detection stage, the obtained i¯pq is described as(8)i¯pq=3I11cosϕ11−I11sinϕ11.In non-phase-locked loop detection stage, the obtainedi¯pq is described as(9)i¯pq=3I11cosω−ω0t+ϕ11−I11sinω−ω0t+ϕ11.The harmonic components ofipq is described as(10)i˜pq=3−I21cosω+ω0ωt+ϕ2n+∑n=2∞I1ncosnω−ω0t+ϕ1n−I2ncosnω+ω0ωt+ϕ2n−I21sinω+ω0t+ϕ2n+∑n=2∞I1nsinnω−ω0t+ϕ1n+I2nsinnω+ω0t+ϕ2n,where ipq=ipiqT. Due to the negative relation of respond speed and accuracy filter, LPF cannot meet the dual requirements of response speed and detection accuracy. To tackle this problem, we propose a new structure to contact an average module whose integration time can adaptively change according to load current at the back of LPF. In addition, we properly set the cutoff frequency of the LPF to further enhance its performance. The details of method are shown in Figure 2. It is clearly found that LPF and average module are filter high-order harmonic components and low-order harmonic components of ipq, respectively. In this way, we can simultaneously enhance the accuracy and response speed corresponding to harmonic detection.Figure 2
Schematic of time-varying integration duration.Now, we discuss the problem of cutoff frequency setting with respect to LPF. Analyzing equations (8) and (9), we find that i¯pq denotes low-frequency AC component of ω0−ω with respect to phase-locked loop detection stage and low-frequency AC components phase with respect to nonlocked loop detection stage, respectively. As we know, frequency tolerance and maximum deviation of power system are generally set to 50 ± 0.2 Hz and 50 ± 0.5 Hz [18], respectively. Suppose angular frequency ω0 of C0 set by 2πf (100 π), we find that the frequency range of i¯pq is from 0 Hz to 0.5 Hz. To guarantee i¯pq no distortion, we set the cut-off frequency of LPF equal to 150 Hz.Next, we use average value module to eliminate AC component ofipq, so that we can get the DC component of the i¯pq (in phase-locked loop scene) or the slip periodic component of i¯pq (in non-phase-locked loop scene). Suppose harmonic order of power grid is known as α1,α2,…,αn,αi∈ℕ∗ and so on, we can set integer time TI=lcmT/α1,T/α2,…,T/αn, where TI=lcm•,•,…,• denotes least common multiple of element, T is the power frequency period. Integer equation (7) in the t−TI,t section, it can be denoted as(11)i¯p=3TI∫t−TItI11cosϕ11dt+∫t−TIti˜pdt=3I11cosϕ11,i¯q=3TI∫t−TIt−I11sinϕ11dt+∫t−TIti˜qdt=−3I11sinϕ11.It clearly that AC component ofipq is completely eliminated if integer time TI is known. Now, we discuss the obtain method of integer time TI. We firstly define the similarity degree of between ipqt and ipqt−TI which can be described as(12)SpqTIt=1TI∫t−TItipt−TI−ipt24ip2tdt1TI∫t−TItiqt−TI−iqt24iq2tdt,where SpqTIt=spTItsqTItT. Supposing ipqt and ipqt−TI to be periodic signal, we obtain SpqTIt=00T when TI are N∗lcmT/α1,T/α2,…,T/αn, N∈ℕ∗. Moreover, we find that SpqTIt increases with difference between ipqt and ipqt−TI. SpqTIt could get maximum value 11T when ipqt and ipqt−TI has a completely opposite waveform. It inspires us to use SpqTIt to describe the coherence between ipqt and ipqt−TI. From the above discussion, we can determine integer time TI using match filtering scheme as follow:(1)
Sampling output of the LPF relate toipqt(2)
Initializing threshold parameterFpq=FpFqT and integer time parameter Tpqn=TpnTqnT(3)
CalculatingSpqTIt by (12)(4)
ifSpqTIt>Fpq, updating step factor of integer time λpqn=λpnλqnT and getting integer time Tpqn+1 by equation (13), go to stage 3.(5)
IfSpqTIt<=Fpq and TI⟸Tpqn, end.(13)Tpqn+1=Tpqn+λpqn=Tpn+λpnTqt+λqnT.In the above scheme, step factor of integer timeλpqn is a key problem that should to be considered. We defined a function listed as equation (14) to describe the relation between λpqn and SpqTIt. It is clear that λpn is monotone increasing function with respect to SpqTIt. Moreover, to guarantee robust and convergence of algorithm, we constraint λpqn to satisfy the inequality (15) and (16)(14)λpn=21−exp−SpTP2,λqn=21−exp−SqTq2,(15)λpn=λmax,λpn≥λmax,λpn,λmin<λpn<λmax,λmin,λpn≤λmin,(16)λqn=λmax,λqn≥λmax,λqn,λmin<λqn<λmax,λmin,λqn≤λmin,


### 3.2. Introduce Feedback Link

In order to improve the response speed of harmonic detection, we introduce harmonic and reactive current feedback at the input of harmonic detection. When the fundamental wave active current increases, the delayed effect of LPF on the detection makes the detected fundamental wave active current unable to real-time track the actual fundamental wave active current in time, resulting in the detected value being smaller than the actual. Therefore, the harmonics and reactive current at the output will inevitably contain the same phase components as the fundamental wave active current. We feed these components back to the input and compensate for the effects of errors due to LPF delay. Similarly, when the fundamental wave active current decreases, the harmonics and reactive currents at the output have phase components opposite to the fundamental wave active current, so that the detected fundamental wave active current rapidly decays to compensate for the delay of the LPF. The principle block diagram of theip−iq harmonic detection algorithm with feedback link is shown in Figure 3.Figure 3
PD feedback module block diagram.When the feedback link is tracking the harmonic current, the feedback signal shortens the response time by adjusting the value of the gainK. The larger the gain K, the faster the response speed, but the detection accuracy will also decrease. Therefore, in this paper, a proportional derivative (PD) control link is added before the feedback gain. Suppose the fundamental wave instantaneous active current detection link transfer function is Gfs, the PD controller transfer function is as follows:(17)Hfs=Kp1+TDs.Then the transfer function of the improved harmonic detection is as follows:(18)Gs=1−Gfs1+K1+KHsGfs.We substitute equation (17) into equation (18) to get the following formula:(19)Gs=1−Gfs1+K1+KKpGfs1+TDs.It can be known from formula (19) that the PD controller is a lead correction device. The differential link can reflect the trend of load current changes, provide advanced correction signals, and compensate for the poor dynamic performance of harmonic detection at transient moments. Therefore, this method makes up for the lack of detection accuracy and low response speed. The principle block diagram of the improved ip−iq harmonic detection method based on the instantaneous reactive power theory is shown in Figure 4.Figure 4
Fundamental diagram of time-varying integral durationip−iq harmonic detection.


## 3.1. LPF with Time-Varying Integral Duration

In theip−iq detection method, in order to improve the detection accuracy and response speed of the harmonic current, we describe ipq as harmonic form:(7)ipq=3∑n=1∞I1ncosnω−ω0t+ϕ1n−I2ncosnω+ω0ωt+ϕ2n−∑n=1∞I1nsinnω−ω0t+ϕ1n+I2nsinnω+ω0t+ϕ2n,where n is the harmonic order and n∈ℕ∗. The role of LPF here is to filter out harmonic components of ipq to get the fundamental wave positive sequence DC component or to obtain slip frequency component i¯pq between power grid and C0. According to equation (7), in the phase-locked loop detection stage, the obtained i¯pq is described as(8)i¯pq=3I11cosϕ11−I11sinϕ11.In non-phase-locked loop detection stage, the obtainedi¯pq is described as(9)i¯pq=3I11cosω−ω0t+ϕ11−I11sinω−ω0t+ϕ11.The harmonic components ofipq is described as(10)i˜pq=3−I21cosω+ω0ωt+ϕ2n+∑n=2∞I1ncosnω−ω0t+ϕ1n−I2ncosnω+ω0ωt+ϕ2n−I21sinω+ω0t+ϕ2n+∑n=2∞I1nsinnω−ω0t+ϕ1n+I2nsinnω+ω0t+ϕ2n,where ipq=ipiqT. Due to the negative relation of respond speed and accuracy filter, LPF cannot meet the dual requirements of response speed and detection accuracy. To tackle this problem, we propose a new structure to contact an average module whose integration time can adaptively change according to load current at the back of LPF. In addition, we properly set the cutoff frequency of the LPF to further enhance its performance. The details of method are shown in Figure 2. It is clearly found that LPF and average module are filter high-order harmonic components and low-order harmonic components of ipq, respectively. In this way, we can simultaneously enhance the accuracy and response speed corresponding to harmonic detection.Figure 2
Schematic of time-varying integration duration.Now, we discuss the problem of cutoff frequency setting with respect to LPF. Analyzing equations (8) and (9), we find that i¯pq denotes low-frequency AC component of ω0−ω with respect to phase-locked loop detection stage and low-frequency AC components phase with respect to nonlocked loop detection stage, respectively. As we know, frequency tolerance and maximum deviation of power system are generally set to 50 ± 0.2 Hz and 50 ± 0.5 Hz [18], respectively. Suppose angular frequency ω0 of C0 set by 2πf (100 π), we find that the frequency range of i¯pq is from 0 Hz to 0.5 Hz. To guarantee i¯pq no distortion, we set the cut-off frequency of LPF equal to 150 Hz.Next, we use average value module to eliminate AC component ofipq, so that we can get the DC component of the i¯pq (in phase-locked loop scene) or the slip periodic component of i¯pq (in non-phase-locked loop scene). Suppose harmonic order of power grid is known as α1,α2,…,αn,αi∈ℕ∗ and so on, we can set integer time TI=lcmT/α1,T/α2,…,T/αn, where TI=lcm•,•,…,• denotes least common multiple of element, T is the power frequency period. Integer equation (7) in the t−TI,t section, it can be denoted as(11)i¯p=3TI∫t−TItI11cosϕ11dt+∫t−TIti˜pdt=3I11cosϕ11,i¯q=3TI∫t−TIt−I11sinϕ11dt+∫t−TIti˜qdt=−3I11sinϕ11.It clearly that AC component ofipq is completely eliminated if integer time TI is known. Now, we discuss the obtain method of integer time TI. We firstly define the similarity degree of between ipqt and ipqt−TI which can be described as(12)SpqTIt=1TI∫t−TItipt−TI−ipt24ip2tdt1TI∫t−TItiqt−TI−iqt24iq2tdt,where SpqTIt=spTItsqTItT. Supposing ipqt and ipqt−TI to be periodic signal, we obtain SpqTIt=00T when TI are N∗lcmT/α1,T/α2,…,T/αn, N∈ℕ∗. Moreover, we find that SpqTIt increases with difference between ipqt and ipqt−TI. SpqTIt could get maximum value 11T when ipqt and ipqt−TI has a completely opposite waveform. It inspires us to use SpqTIt to describe the coherence between ipqt and ipqt−TI. From the above discussion, we can determine integer time TI using match filtering scheme as follow:(1)
Sampling output of the LPF relate toipqt(2)
Initializing threshold parameterFpq=FpFqT and integer time parameter Tpqn=TpnTqnT(3)
CalculatingSpqTIt by (12)(4)
ifSpqTIt>Fpq, updating step factor of integer time λpqn=λpnλqnT and getting integer time Tpqn+1 by equation (13), go to stage 3.(5)
IfSpqTIt<=Fpq and TI⟸Tpqn, end.(13)Tpqn+1=Tpqn+λpqn=Tpn+λpnTqt+λqnT.In the above scheme, step factor of integer timeλpqn is a key problem that should to be considered. We defined a function listed as equation (14) to describe the relation between λpqn and SpqTIt. It is clear that λpn is monotone increasing function with respect to SpqTIt. Moreover, to guarantee robust and convergence of algorithm, we constraint λpqn to satisfy the inequality (15) and (16)(14)λpn=21−exp−SpTP2,λqn=21−exp−SqTq2,(15)λpn=λmax,λpn≥λmax,λpn,λmin<λpn<λmax,λmin,λpn≤λmin,(16)λqn=λmax,λqn≥λmax,λqn,λmin<λqn<λmax,λmin,λqn≤λmin,


## 3.2. Introduce Feedback Link

In order to improve the response speed of harmonic detection, we introduce harmonic and reactive current feedback at the input of harmonic detection. When the fundamental wave active current increases, the delayed effect of LPF on the detection makes the detected fundamental wave active current unable to real-time track the actual fundamental wave active current in time, resulting in the detected value being smaller than the actual. Therefore, the harmonics and reactive current at the output will inevitably contain the same phase components as the fundamental wave active current. We feed these components back to the input and compensate for the effects of errors due to LPF delay. Similarly, when the fundamental wave active current decreases, the harmonics and reactive currents at the output have phase components opposite to the fundamental wave active current, so that the detected fundamental wave active current rapidly decays to compensate for the delay of the LPF. The principle block diagram of theip−iq harmonic detection algorithm with feedback link is shown in Figure 3.Figure 3
PD feedback module block diagram.When the feedback link is tracking the harmonic current, the feedback signal shortens the response time by adjusting the value of the gainK. The larger the gain K, the faster the response speed, but the detection accuracy will also decrease. Therefore, in this paper, a proportional derivative (PD) control link is added before the feedback gain. Suppose the fundamental wave instantaneous active current detection link transfer function is Gfs, the PD controller transfer function is as follows:(17)Hfs=Kp1+TDs.Then the transfer function of the improved harmonic detection is as follows:(18)Gs=1−Gfs1+K1+KHsGfs.We substitute equation (17) into equation (18) to get the following formula:(19)Gs=1−Gfs1+K1+KKpGfs1+TDs.It can be known from formula (19) that the PD controller is a lead correction device. The differential link can reflect the trend of load current changes, provide advanced correction signals, and compensate for the poor dynamic performance of harmonic detection at transient moments. Therefore, this method makes up for the lack of detection accuracy and low response speed. The principle block diagram of the improved ip−iq harmonic detection method based on the instantaneous reactive power theory is shown in Figure 4.Figure 4
Fundamental diagram of time-varying integral durationip−iq harmonic detection.


## 4. Simulation Experiment Analysis

### 4.1. Simulation Model and Parameters

In order to verify the effectiveness of the time-varying integration time improvementip−iq detection method, we use Matlab Simulink software to set up a simulation experiment model based on the principle shown in Figure 4. Since the methods in the paper [14] and paper [15] are harmonic detection methods of single-phase circuit, they are unsuitable to be compared with proposed method. Thus, we use harmonic detection method of three-phase circuit phase which were presented in the paper [16] and paper [17] to compare to proposed method. We carry out simulation experiment research from three aspects. (1) To verify the performance of LPF using time-varying integral duration, we use a three-phase uncontrollable rectifier as the harmonic source and compare the DC component i¯pq of the instantaneous active and reactive current ipq of the time-varying integral duration detection method with the improved ip−iq detection method at different cut-off frequencies. (2) To verify the effectiveness of the improved ip−iq harmonic detection method, we compare the proposed method with the method presented in [16, 17] in some aspects including fundamental wave current if, harmonic current ih, and fundamental wave current total distortion rate THD. The results are shown in Figure 4. (3) To verify the general applicability of the improved ip−iq harmonic detection method, we change the harmonic source to a three-phase voltage inverter firstly and then use Fourier transform to analyse the fundamental wave current if and obtain the total distortion current THD of the fundamental current finally. The parameters involved in the simulation experiment are shown in Table 1.Table 1
Table of simulation experiment parameters.
ParameterValueSimulation powerThree-phase, 50 Hz, 220 VHarmonic sourceThree-phase uncontrolled rectifier, voltage inverterLow-pass filter2nd order butterworthLoad resistance82.5 ΩInductance25 mHFeedback gain0.05Differential coefficient0.02PresetC050 HzActive similarity threshold1×10−4Reactive similarity threshold1×10−3


### 4.2. Simulations Analysis Related to DC Component of Instantaneous Current

The keypoint ofip−iq detection method is to compute the DC component i¯p related to instantaneous active current ip and the DC component i¯q related to instantaneous reactive current iq. As it is known, harmonic detection accuracy and response time of system are mainly determined by detection accuracy and response time of i¯p and i¯q. To verify effectiveness of proposed method, we firstly compare proposed method with methods which presented in the paper [16, 17] in the aspects of i¯p and i¯q detection. The results are shown in Figure 5. It is not difficult to find that when average module is introduced behind the LPF, the method in paper [16] has some good characteristic including ripples of ip and iq small and detection accuracy of i¯p and i¯q high. However, respond delay time of this method is long, leading to slow respond speed. Although PI controller is series connected behind the LPF, ripple of i¯p and i¯q related to method of paper [17] is slightly great since low-order harmonic of ip−iq can not to be entirely filtered in this scene, leading to low detection accuracy of harmonic. However, since PD feedback is introduced in harmonic detection system to effectively employ in phase components of fundamental active current which may contain the harmonic, response speed related to method of paper [17] is fast. Now, observing the proposed harmonic detection method, we find that the proposed method has good characteristic such as small ripple of i¯p and i¯q, high detection accuracy of i¯p and i¯q, small dynamic delay and fast response speed of systems (delay period less than T/4) and so on. Thus, effectiveness of proposed detection method based on time-varying integral LPF is verified.Figure 5
DC components after instantaneous active and reactive current filtering. (a) DC component of instantaneous active current. (b) DC component of instantaneous reactive current.
(a)(b)In non-phase-locked loop scene, we apply the time-varying integral methods to theip−iq harmonic detection to obtain the i¯p component of the instantaneous active current ip and the i¯q component of the instantaneous reactive current iq, and the result is shown in Figure 6. We can find that at this time, i¯p and i¯q are AC, and their amplitudes are equal ip and iq in the scene of a phase-locked loop. The frequency of i¯p and i¯q is the difference value between the system frequency f and the slip frequency f0 related to initial transformation matrix C0, namely f0−f=0.2Hz, which verifies the previous analysis. The curve of i¯p and i¯q in the figure are very smooth, indicating that the filtering effect is better. It is clear that the time-varying integral method also can be applied in the ip−iq harmonic detection method non-phase-locked loop.Figure 6
Instantaneous currentsi¯p and i¯q without phase-locked loop.


### 4.3. Simulation Experiment Analysis with Respect to Similarity DegreeSpqTt

Three-phase uncontrolled rectifier is used as harmonic generator, and the curve of the similarity degreeSpqTt versus the integration duration T is shown in Figure 7. The load changes abruptly at 0.1 seconds, and the similarity degree of active current or reactive current suddenly increases. It needs the conductive integration time to be updated. Our algorithm adaptively changes the integration time to follow the change of the load current. When the detection is stable, the active current integration time is stabilized at 0.0033 (T/6) seconds, and the reactive current integration time is stabilized at 0.01 (T/2) seconds. For a three-phase uncontrollable rectifier circuit, the load current mainly contains 6k±1,k∈ℕ∗ harmonics, and these harmonics become 6k,k∈ℕ∗ harmonics after 3/2 transformation. For ip, Tp=lcmT/6,T/12,…,T/6k=T/6 is consistent with the simulation results. We can verify the previous analysis. For iq, because the component value of i¯q is small, the amplitude of the harmonic component is large. We can see that there are obvious low-order harmonics, so the average module integration time is stable at T/2.Figure 7
Similarity and integration duration of active and reactive currents, (a) active current similarity and integration duration, (b) reactive current similarity and integration time.
(a)(b)


### 4.4. Simulation Analysis of Improved Harmonic Detection Method

The simulation model is built according to Figure4. In Figure 8, we compare the A-phase fundamental current obtained by the method presented in paper [16] and paper [17] with that of proposed methods. In Figure 9, we compare the A-phase harmonic current obtained by the method presented in paper [16] and paper [17] with that of proposed methods.Figure 8
Fundamental current waveform comparison.Figure 9
Harmonic current waveform comparison.It can be seen from Figure8 that method presented in paper [16] has one period (T) delay before the detection of the fundamental instantaneous current, so it conducts the harmonic current detection that also has a delay time of T, which can also be confirmed by Figure 9. As we know, dynamic response speed affects the real-time action of system. If the method presented in paper [16] is used for harmonic compensation equipment, it will also affect the response speed of compensation and lead to some twists in its output waveform, which proves that there is a certain deficiency in detection accuracy. We also find that detection delay related to the fundamental instantaneous current of method presented in paper [17] is apparently small, it is reveal that this method has good characteristic such as fast dynamic response and good real-time detection. While the error between the detection value and true value of this method is slightly great, it is revealed that the accuracy of method presented in paper [17] is low. The fundamental current obtained by the proposed method has a delay of less than T/2, it indicates that our method has fast dynamic response, good real-time detection and smooth waveform. Moreover, it can be seen from the partial enlarged image of the simulation, compared with that of method presented in paper [16, 17], fundamental current and the harmonic current with respect to our method are closer to the theoretical value, which proves that the detection accuracy has also significantly improved.In order to compare detection accuracy of difference methods more intuitively, we use harmonic sources of three-phase including uncontrollable rectification and three-phase voltage inverter to discussion performance of proposedip−iq harmonic detection method in different cut-off frequency conditions. The fundamental current Fourier analysis (FFT) is shown in Figure 10 (considering accuracy of method presented in paper [16] greater than that of method presented in paper [17], we only compare accuracy of our method with hat of method presented in paper [16]).Figure 10
Fourier spectrum analysis comparison of fundamental current.It can be seen from Figure10 that when the three-phase uncontrollable rectification is used as the harmonic source, the total distortion rate (THD) of the phase A fundamental wave current obtained by the traditional detection method and method presented in paper [16] are 0.38% and 0.27%, respectively. Our methods reduce 0.11% THD of the fundamental wave. When a three-phase voltage inverter is used as the harmonic source, THD of the fundamental wave current obtained by traditional detection method and method presented in paper [16] is 0.89%(cut-off frequency 25 Hz) and 0.68%, respectively. Our methods reduce 0.21% THD of the fundamental wave. Table 2 also shows that under different cut-off frequency conditions, THD of the fundamental wave current corresponding to proposed method is significantly lower than that of method presented in paper [16]. This means the proposed detection method has faster dynamic response and higher detection accuracy than that of method presented in paper [16] in acquiring fundamental current and harmonic detection. It can also be seen from Figure 10, in different harmonic sources condition, THD of the fundamental wave current corresponding to proposed method is 2/3 of traditional method. This shows that, for different harmonic sources, our method has more applicable than that of traditional method, which verifies the universality of the our method.Table 2
Comparison of the total distortion rate (%) of the fundamental current.
Harmonic sourceCut-off frequency (Hz)2550100150Three-phase non-rectifierReference [16]0.380.692.685.91Proposed method0.27Three-phase voltage inverterReference [16]0.891.032.465.52Proposed method0.68


## 4.1. Simulation Model and Parameters

In order to verify the effectiveness of the time-varying integration time improvementip−iq detection method, we use Matlab Simulink software to set up a simulation experiment model based on the principle shown in Figure 4. Since the methods in the paper [14] and paper [15] are harmonic detection methods of single-phase circuit, they are unsuitable to be compared with proposed method. Thus, we use harmonic detection method of three-phase circuit phase which were presented in the paper [16] and paper [17] to compare to proposed method. We carry out simulation experiment research from three aspects. (1) To verify the performance of LPF using time-varying integral duration, we use a three-phase uncontrollable rectifier as the harmonic source and compare the DC component i¯pq of the instantaneous active and reactive current ipq of the time-varying integral duration detection method with the improved ip−iq detection method at different cut-off frequencies. (2) To verify the effectiveness of the improved ip−iq harmonic detection method, we compare the proposed method with the method presented in [16, 17] in some aspects including fundamental wave current if, harmonic current ih, and fundamental wave current total distortion rate THD. The results are shown in Figure 4. (3) To verify the general applicability of the improved ip−iq harmonic detection method, we change the harmonic source to a three-phase voltage inverter firstly and then use Fourier transform to analyse the fundamental wave current if and obtain the total distortion current THD of the fundamental current finally. The parameters involved in the simulation experiment are shown in Table 1.Table 1
Table of simulation experiment parameters.
ParameterValueSimulation powerThree-phase, 50 Hz, 220 VHarmonic sourceThree-phase uncontrolled rectifier, voltage inverterLow-pass filter2nd order butterworthLoad resistance82.5 ΩInductance25 mHFeedback gain0.05Differential coefficient0.02PresetC050 HzActive similarity threshold1×10−4Reactive similarity threshold1×10−3


## 4.2. Simulations Analysis Related to DC Component of Instantaneous Current

The keypoint ofip−iq detection method is to compute the DC component i¯p related to instantaneous active current ip and the DC component i¯q related to instantaneous reactive current iq. As it is known, harmonic detection accuracy and response time of system are mainly determined by detection accuracy and response time of i¯p and i¯q. To verify effectiveness of proposed method, we firstly compare proposed method with methods which presented in the paper [16, 17] in the aspects of i¯p and i¯q detection. The results are shown in Figure 5. It is not difficult to find that when average module is introduced behind the LPF, the method in paper [16] has some good characteristic including ripples of ip and iq small and detection accuracy of i¯p and i¯q high. However, respond delay time of this method is long, leading to slow respond speed. Although PI controller is series connected behind the LPF, ripple of i¯p and i¯q related to method of paper [17] is slightly great since low-order harmonic of ip−iq can not to be entirely filtered in this scene, leading to low detection accuracy of harmonic. However, since PD feedback is introduced in harmonic detection system to effectively employ in phase components of fundamental active current which may contain the harmonic, response speed related to method of paper [17] is fast. Now, observing the proposed harmonic detection method, we find that the proposed method has good characteristic such as small ripple of i¯p and i¯q, high detection accuracy of i¯p and i¯q, small dynamic delay and fast response speed of systems (delay period less than T/4) and so on. Thus, effectiveness of proposed detection method based on time-varying integral LPF is verified.Figure 5
DC components after instantaneous active and reactive current filtering. (a) DC component of instantaneous active current. (b) DC component of instantaneous reactive current.
(a)(b)In non-phase-locked loop scene, we apply the time-varying integral methods to theip−iq harmonic detection to obtain the i¯p component of the instantaneous active current ip and the i¯q component of the instantaneous reactive current iq, and the result is shown in Figure 6. We can find that at this time, i¯p and i¯q are AC, and their amplitudes are equal ip and iq in the scene of a phase-locked loop. The frequency of i¯p and i¯q is the difference value between the system frequency f and the slip frequency f0 related to initial transformation matrix C0, namely f0−f=0.2Hz, which verifies the previous analysis. The curve of i¯p and i¯q in the figure are very smooth, indicating that the filtering effect is better. It is clear that the time-varying integral method also can be applied in the ip−iq harmonic detection method non-phase-locked loop.Figure 6
Instantaneous currentsi¯p and i¯q without phase-locked loop.


## 4.3. Simulation Experiment Analysis with Respect to Similarity DegreeSpqTt

Three-phase uncontrolled rectifier is used as harmonic generator, and the curve of the similarity degreeSpqTt versus the integration duration T is shown in Figure 7. The load changes abruptly at 0.1 seconds, and the similarity degree of active current or reactive current suddenly increases. It needs the conductive integration time to be updated. Our algorithm adaptively changes the integration time to follow the change of the load current. When the detection is stable, the active current integration time is stabilized at 0.0033 (T/6) seconds, and the reactive current integration time is stabilized at 0.01 (T/2) seconds. For a three-phase uncontrollable rectifier circuit, the load current mainly contains 6k±1,k∈ℕ∗ harmonics, and these harmonics become 6k,k∈ℕ∗ harmonics after 3/2 transformation. For ip, Tp=lcmT/6,T/12,…,T/6k=T/6 is consistent with the simulation results. We can verify the previous analysis. For iq, because the component value of i¯q is small, the amplitude of the harmonic component is large. We can see that there are obvious low-order harmonics, so the average module integration time is stable at T/2.Figure 7
Similarity and integration duration of active and reactive currents, (a) active current similarity and integration duration, (b) reactive current similarity and integration time.
(a)(b)


## 4.4. Simulation Analysis of Improved Harmonic Detection Method

The simulation model is built according to Figure4. In Figure 8, we compare the A-phase fundamental current obtained by the method presented in paper [16] and paper [17] with that of proposed methods. In Figure 9, we compare the A-phase harmonic current obtained by the method presented in paper [16] and paper [17] with that of proposed methods.Figure 8
Fundamental current waveform comparison.Figure 9
Harmonic current waveform comparison.It can be seen from Figure8 that method presented in paper [16] has one period (T) delay before the detection of the fundamental instantaneous current, so it conducts the harmonic current detection that also has a delay time of T, which can also be confirmed by Figure 9. As we know, dynamic response speed affects the real-time action of system. If the method presented in paper [16] is used for harmonic compensation equipment, it will also affect the response speed of compensation and lead to some twists in its output waveform, which proves that there is a certain deficiency in detection accuracy. We also find that detection delay related to the fundamental instantaneous current of method presented in paper [17] is apparently small, it is reveal that this method has good characteristic such as fast dynamic response and good real-time detection. While the error between the detection value and true value of this method is slightly great, it is revealed that the accuracy of method presented in paper [17] is low. The fundamental current obtained by the proposed method has a delay of less than T/2, it indicates that our method has fast dynamic response, good real-time detection and smooth waveform. Moreover, it can be seen from the partial enlarged image of the simulation, compared with that of method presented in paper [16, 17], fundamental current and the harmonic current with respect to our method are closer to the theoretical value, which proves that the detection accuracy has also significantly improved.In order to compare detection accuracy of difference methods more intuitively, we use harmonic sources of three-phase including uncontrollable rectification and three-phase voltage inverter to discussion performance of proposedip−iq harmonic detection method in different cut-off frequency conditions. The fundamental current Fourier analysis (FFT) is shown in Figure 10 (considering accuracy of method presented in paper [16] greater than that of method presented in paper [17], we only compare accuracy of our method with hat of method presented in paper [16]).Figure 10
Fourier spectrum analysis comparison of fundamental current.It can be seen from Figure10 that when the three-phase uncontrollable rectification is used as the harmonic source, the total distortion rate (THD) of the phase A fundamental wave current obtained by the traditional detection method and method presented in paper [16] are 0.38% and 0.27%, respectively. Our methods reduce 0.11% THD of the fundamental wave. When a three-phase voltage inverter is used as the harmonic source, THD of the fundamental wave current obtained by traditional detection method and method presented in paper [16] is 0.89%(cut-off frequency 25 Hz) and 0.68%, respectively. Our methods reduce 0.21% THD of the fundamental wave. Table 2 also shows that under different cut-off frequency conditions, THD of the fundamental wave current corresponding to proposed method is significantly lower than that of method presented in paper [16]. This means the proposed detection method has faster dynamic response and higher detection accuracy than that of method presented in paper [16] in acquiring fundamental current and harmonic detection. It can also be seen from Figure 10, in different harmonic sources condition, THD of the fundamental wave current corresponding to proposed method is 2/3 of traditional method. This shows that, for different harmonic sources, our method has more applicable than that of traditional method, which verifies the universality of the our method.Table 2
Comparison of the total distortion rate (%) of the fundamental current.
Harmonic sourceCut-off frequency (Hz)2550100150Three-phase non-rectifierReference [16]0.380.692.685.91Proposed method0.27Three-phase voltage inverterReference [16]0.891.032.465.52Proposed method0.68


## 5. Conclusion

Aiming at the shortcomings of the traditionalip−iq harmonic detection method, using instantaneous reactive power theory, we propose an improved ip−iq harmonic detection method including time-varying integral module. We connect a current averaging module in series after LPF firstly, and then analyze harmonic components filtered by this current average module. On this basis, we reasonably set the cut-off frequency of LPF reasonably and change the integration time of current average module to adaptive change of load current. Moreover, feedback loop is introduced to compensate the delay caused by LPF. Abundant simulations are used to demonstrate our method not only has higher detection accuracy and lower response delay than that of traditional method but also has good universality.



---

*Source: 5420987-2020-10-29.xml*