## Figures

## Abstract

With the increasing penetration of power electronic equipment in modern residential distribution systems, harmonics mitigation through the distributed generation (DG) interfacing converters has received significant attention. Among recently proposed methods, the so-called active resonance damper (ARD) and harmonic voltage compensator (HVC) based on voltage detection can effectively reduce the harmonic distortions in selected areas of distribution systems. However, it is found out that when traditional ARD algorithm is used to eliminate harmonic current injected by non-linear loads, its performance is constrained by stability problems and can at most eliminate half of the load harmonic currents. Thus, inspired by the duality between ARD and HVC, this paper presents a novel improved resistive active power filter (R-APF) algorithm based on integral-decoupling control. The design guideline for its parameters is then investigated through carefully analyzing the closed-loop poles’ trajectory. Computer studies demonstrate that the proposed algorithm can effectively mitigate the load harmonic currents and its performance is much better than traditional ARD based on proportional control.

**Citation: **Tan T, Dong S, Huang Y, Liu J, Le J, Liu K (2016) Improved Active Harmonic Current Elimination Based on Voltage Detection. PLoS ONE 11(6):
e0157057.
https://doi.org/10.1371/journal.pone.0157057

**Editor: **Xiaosong Hu, Chongqing University, CHINA

**Received: **December 31, 2015; **Accepted: **May 24, 2016; **Published: ** June 13, 2016

**Copyright: ** © 2016 Tan et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the paper.

**Funding: **This research was supported by the National Science Foundation for Young Scientists of China (https://isisn.nsfc.gov.cn/egrantweb/). The Grand No. is 51307127 and the receipt is TT. The funder had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## Introduction

With the rapid development of power electronics technology, energy efficient but harmonic producing power converters have been widely used in both commercial and residential installations, including motor-type loads fed through variable frequency drives (VFDs), personal computers (PCs), television sets (TVs), fluorescent lamps(FLs), etc. Despite the relative small capacity of each power electronic device, these non-linear loads combined are known to contribute considerable harmonics into the power systems, resulting in extra losses, adverse impact on system stability as well as other equipment [1–3].

At the same time, increasing number of distributed generation (DG) units such as photovoltaic panels, wind turbines, and energy storage devices are being connected to the grid [4], [5]. Most of these DG systems are connected to the grid through power electronic converters [6]. If designed and controlled improperly, the DG interfacing converters may also introduce harmonics into the power system and cause power quality concerns [7]. On the contrary, if designed and controlled properly, these DG interfacing converters can potentially provide many ancillary services to improve the system efficiency and power quality, including the power factor compensation and system harmonic compensation, etc. [8]

Although shunt active power filters (APF) have been researched and put into practice for decades, most of the research are focused on their use for a specific harmonic-producing customer. Typically, traditional shunt APF is controlled to inject harmonic currents with the same characteristics (amplitude and frequency) and opposite polarity of the harmonic currents drawn by the distorting load. The APFs must be installed in the vicinity of the non-linear loads. However, the locating place of DG interfacing converters are mainly decided by other considerations and are most often than not far away from the non-linear loads or the entrance of the feeder. So, traditional harmonic mitigating strategy based on current detection does not suit these converters anymore. Alternatively, two novel control schemes based on harmonic voltage detection have been proposed, namely the active resonance damper (ARD) or resistance-active power filter (R-APF) [9] and the harmonic voltage compensator (HVC) [10][11]. Instead of injecting harmonic currents to compensate those drawn by distorting loads, the R-APF acts as a small harmonic resistance installed at the end of a radial line to damp harmonic resonance between power factor correction capacitors and system inductances. The HVC directly generates the harmonic voltages to compensate those at the point of common coupling. Both methods can effectively mitigate harmonics caused by harmonic voltage source on the system side, without the need to detect harmonic currents of the load (or the total harmonic currents injected to the utility after compensation).

This paper considers the distribution system of a representative educational building (which has considerable non-linear loads), and investigates into the active harmonic mitigation algorithm which is based on voltage detection and suitable for DG interfacing converters. It is found out that although traditional proportional R-APF algorithm can extend to eliminate harmonic current injected by non-linear loads, its performance is constrained by stability problems and can at most eliminate half of the load harmonic currents. Thus, inspired by the iterative HVC algorithm, this paper proposes a novel improved R-APF algorithm, which is based on integral-decoupling control in the synchronous rotating reference frame at each harmonic frequency. The design of *d-q* axes decoupling control and the selection of integral coefficient are then analyzed in details. Finally, computer simulations are presented to validate the proposed methodology.

## Configuration of the Subject System

For the purpose of this paper, the integrated ac-dc system of a representative educational Building is considered as depicted in Fig 1. Therein, the ac-dc system consists of two main parts, i.e., the ac distribution system connected to utility grid through step-down transformers, and the dc system comprising a large volume of battery storage system and a set of solar PV panels. In particular, the dc system can work as an islanding network, or connect to the ac system through the interfacing DC/AC converter. Additionally, a smart meter is installed at the outlet of the building’s main transformer TX1, which monitors and records the total active power and reactive power consumed by the building, as well as the harmonic voltage at Bus 1 and the total harmonic currents injected into the grid.

The simplified equivalent circuit of this subject system is then modeled in PSCAD as shown in Fig 2. Since the background harmonics from the ac grid are typically small, the harmonic currents are assumed to be generated by non-linear loads within the building. Therein, they can be approximated as two lumped equivalent harmonic current sources connected to Bus 1 and 2, respectively. Similarly, the linear loads are lumped into two equivalent *R-L* loads as shown in Fig 2. In order to mitigate harmonic currents, the DG interfacing converters is controlled as a three-phase controlled current source at the each harmonic frequency. The methods to control the voltage source converter as a controlled current source have been well studied in the literature, including algorithms such as hysteresis control, ramp comparison control, and deadbeat control [12]. Therefore, this paper will only focus on how to get the reference value of harmonic current for the inner control loop.

## Harmonic Elimination Methods based on Voltage Detection

### A.The Duality between R-APF and HVC

Originally designed to damp harmonic propagation caused by harmonic voltage source on the system side [9], the R-APF has been lately used as harmonic compensation methods to eliminate harmonic currents from non-linear loads on the customer side [13]. In contrast, the HVC [10], [11] was proposed as a voltage-control-method based harmonic control method suitable for DG units which are desired to provide direct voltage and frequency support for loads in micro grids. In fact, HVC and R-APF are duals, harmonic voltage compensation instructions for HVC can be easily converted into harmonic current compensation commands for R-APF by simply converting the HVC’s Thevenin equivalent circuit into R-APF’s Norton equivalent circuit, and vice versa. Therefore, here we will only focus on the R-APF algorithm.

### B. Shortcomings of Traditional R-APF Algorithms

Traditional R-APF algorithm [13] controls the converter’s output current and make it proportional to the PCC voltage at the harmonic frequencies, as shown in Fig 3. Wherein,

Principle circuit for R-APF: (a) per-phase equivalent circuit; (b) simplified.

*Z*_{sh} is the harmonic impedance of the supply network at order *h*

is the harmonic current phasor inject into the supply network at order *h*

is the current phasor for the equivalent harmonic current source of the nonlinear loads at order *h*

*Z*_{Lh} is the equivalent linear load impedance at order *h*

is the injected compensation current phasor of R-APF at order *h* and its value is set to *K*_{vh}* , where *K*_{vh} is a fix real number

is the harmonic voltage phasor of PCC at order *h*

*Z*_{eqh} is the parallel equivalent impedance of *Z*_{sh} and *Z*_{Lh}

is the current phasor injected to the equivalent parallel impedance, the relationship between and is

Applying KCL and KVL to the circuit in Fig 3(A) yields (1)

As shown in (1), *I*_{sh} (the amplitude of *phasor* ) decreases with a larger *K*_{Vh} for any fixed *Z*_{sh} and *Z*_{Lh}. If *K*_{Vh} tends to infinite, both *I*_{sh} and *U*_{PCCh} (the amplitude of *phasor* ) would tend to be zero. That’s how the R-APF eliminates the non-linear load currents.

However, in practical systems the digital controller is used and the corresponding discrete-time compensation algorithm yields (2)

Where, *k* is the discrete sample and control interval, *i*_{Ch} *and u*_{PCCh} are the instantaneous value of phasor and respectively.

It means the R-APF can only adjust its present output according to the last sample value instead of the present value, because it needs time to sample, calculate, and generate outputs. I.e., there exists control delay. Unfortunately, the control delay, no matter how small it can be, will always lead to stability problems.

Applying KCL and KVL to the circuit in Fig 3(A), the mathematical model of discrete system can be obtained as (3) (4)

Substitute Eqs (2) and (3) into Eq (4) yields (5)

It’s obviously that the stable convergence condition for this discrete system described by Eq (5) is (6)

As |Z_{sh}|<<|Z_{Lh}| holds most cases, and R-APF can be regarded as a resistor with the value of 1/*K*_{Vh}, from Fig 3 we have
(7)

Where, *I*_{sh} and *I*_{Lh} *are the RMS amplitude of phasor* and respectively.

It means that the optimal performance that traditional R-APF can achieve is eliminating about 50% of the load harmonic currents. Note that if *K*_{Vh} is too large, system will become unstable.

### C. A novel improved integral control R-APF algorithm

In order to improve R-APF algorithm’s performance, this paper proposes an integral control by its duality to the iterative HVC method [11].

(8)As known to all, compared to the proportional control, the greatest advantage of integral control is that there is no need for a very large proportional *K*_{Vh} to realize zero static error control. If the system is stable, the controller can ideally track the dc reference signal within a finite time.

Thus, the integral controller is implemented in the synchronous rotating reference frame at harmonic frequency. As *U*_{PCChd}(*s*) and *U*_{PCChq}(*s*) are coupled together at the synchronous rotating reference frame, this paper adds an additional decoupling control loop following the integral controller to improve the controller’s performance, as shown in Fig 4. Wherein,

*R*_{eqh} is the parallel equivalent resistance, real part of *Z*_{eqh};

*X*_{eqh} is the parallel equivalent reactance, imaginary part of *Z*_{eqh};

is the transfer function for the discrete integral controller.

### D.Parameters design for impoved R-APF algorithm

The closed-loop transfer function of the system in Fig 4 is (9) (10)

The characteristic polynomial equation is (11)

Solved Eq (11) gets the closed-loop poles of the system, (12)

Eq (12) can be written as, (13)

According to Eq (13), the close-loop poles’ trajectory can be shown as Fig 5. When *K'*_{Vh} is zero, the system has a pair of identical closed-loop poles at point of +1. If *K'*_{Vh} increases from zero, the closed-loop poles will move symmetrically towards left along the straight lines *l*_{1} and *l*_{2}. And, the angle between the straight lines and the negative direction of real-axis is *θ*_{1}−*θ*_{2}. Without decoupling control, this angle is determined by the equivalent impedance *Z*_{eqh}. With completely decoupled control, the angle becomes zero.

As is known to all, to ensure the discrete system’s stability, all the poles at the Z plane should be placed within the unit circle. And the smaller the modulus of the closed-loop pole is, the faster state variables in the system converge. Based on these stability analysis guidelines, the added decoupling control can extend the system’s stability range and accelerate the convergence. E.g. If *Z*_{eqh} is purely inductive and decoupling control is not added, the close-loop poles’ trajectory will be perpendicular to the real axis at the point of +1. In this case, no matter what value *K'*_{Vh} takes, the system is always unstable. But if decoupled control is adopted, whatever the value of *Z*_{eqh} is, the system can always be stable and converge quickly as long as *K'*_{Vh} is set to approximately 1.

However, the equivalent impedance of loads and systems fluctuate all the time and their exact values are not available. Thus, only partial decoupling control with an estimated value of *Z'eqh* can be used. With proper estimated parameters, the angle difference *θ*_{1}−*θ*_{2} would be relatively small. And when *K'*_{Vh} increases from 0, the closed-loop poles will move symmetrically towards the left side along the straight line *l*_{1} or *l*_{2} and their moduli continuously decrease. The system becomes stable and its convergence speed will also continuously increase until *K'*_{Vh} reaches the optimal value *K*′_{Vhopt} = cos(*θ*_{1}−*θ*_{2}), which is slightly smaller than 1. When *K'*_{Vh} is set to *K'*_{Vhopt}, the closed-loop poles’ moduli take the minimum value and the system achieves the optimal control performance. After that, if *K'*_{Vh} keeps increase, the closed-loop poles’ moduli will increase rather than go down and the control performance begins deteriorating. Once *K'*_{Vh} is equal or greater than *K*′_{Vhmax} = 2cos(*θ*_{1}−*θ*_{2}), the closed-loop poles will be out of the unit circle and the system becomes unstable again. In conclusion, it is still practical to set *K'*_{Vh} to 1 as it is very close to the optimal value *K'*_{Vhopt}, and the system can be stable with a satisfying convergence speed.

## Computer Studies

### A.Comparison of R-APF and Improved R-APF Algorithm

To simplify the comparison process, the circuit displayed in Fig 3A) is used as the simulation model. Assume all the impedance *Z*_{Sh} and *Z*_{Lh} are pure resistance, and the circuit has only *h*^{th} harmonic frequency components. In this case, there is no need to do harmonic detection and decoupling control, Eqs (2) and (8) can directly applied to the instantaneous value of *i*_{C} and *u*_{PCC}.

Fig 6 shows the instantaneous value of system harmonic current *i*_{Sh} before and after compensated by the traditional R-APF algorithm. It is obvious that traditional R-APF can only filter out half of the load harmonic currents at most, as shown in Fig 6(A). If *K*_{Vh}×*Z*_{eqh} keeps increasing and becomes larger than 1, the system harmonic current will diverge instead of decrease as shown in Fig 6(B). On the contrary, the improved R-APF can filter out almost all the load harmonic currents with a relative small *K*_{Vh}, as shown in Fig 7. In this paper, the characteristic harmonic of nonlinear load, i.e. h^{th}, is set to 5^{th}, *Z*_{Sh} and *Z*_{Lh} are set to 1.2Ω and 6Ω respectively. But the conclusion is not confined to these particular set of simulation parameters, instead it can be extended to any other general parameters.

Performance of traditional R-APF algorithm: (a) With *K*_{Vh} set to 0.95/*Z*_{eqh}; (b) With *K*_{Vh} set to 1.05/*Z*_{eqh}.

### B.Verify the effect of Decoupling Link

In order to verify the effect of decoupling link, let’s assume all the impedance *Z*_{Sh} and *Z*_{Lh} are purely inductive. Here Z_{sh} and Z_{Lh} are set to j1.2Ω and j6Ω respectively, *K*_{Vh} is set to 0.95, and single-phase single-order harmonic detection algorithm (as shown in Fig 8 [14][15]) is adopted. Fig 9 shows improved R-APF’s performance under this extreme test condition. It clearly shows that without decoupling loop (*R*'_{eqh} and *X*'_{eqh} are set to 1Ω and0Ωrespectively), the load harmonic currents cannot be filtered out at all. While by partial decoupling control (*R*'_{eqh} and *X*'_{eqh} are both set to 0.707Ω), system harmonic currents are reduced to nearly zero within less than 8 seconds. And finally with completely decoupling (*R*'_{eqh} and *X*'_{eqh} are set to 0Ω and 1Ωrespectively, the exactly true value of *Z*_{eqh}), the system harmonic currents are reduced to almost zero in less than 4 seconds, the fastest converge speed among the three algorithms. These simulation results confirmed that decoupling control can effectively improve the controller’s convergence speed and extend its stability region.

Purely inductive circuit compensate by improved R-APF: (a) Without decoupling by set θ_{1} to 0°; (b) With partial decoupling by set θ_{1} to 45°; (c) With completely decoupling by set θ_{1} to 90°.

n is a, b, c respectively;

h is the specific harmonic order for detection;

*ω*_{0} is the fundamental frequency of the ac system.

### C.Compensation effects for the example building

Finally, we applied both traditional and improved R-APF algorithm to the simulation model shown in Fig 2. The dominant harmonics of non-linear load and non-linear load II are both set to third, fifth, and seventh orders, and the three dominant harmonic current values are all set equal to 10A according to the average weekday’s recorded data from the smart meter [16]. As the system harmonic voltage is very small compared with the fundamental voltage (The total harmonic distortion of U_{PCC} is less than 1%), Butterworth low pass filter (with cut off frequency at 5 Hz) is connected in series to the slide cycle average filter to realize the LPF link for accurate harmonic detection. The simulation results are shown in Fig 10. It shows that improved R-APF can filter out much more non-linear load’s harmonic current, but converges slower than the traditional R-APF due to the integral process. However, the required convergence time is less than 15 seconds which is still within the acceptable range for most harmonic elimination applications.

System current distortion dynamics during the compensation progress: (a) Compensated by traditional R-APF; (b) Compensated by improved R-APF.

## Conclusion

This paper presented an investigation into the active harmonic elimination algorithm which is based on voltage detection and suitable for DG interfacing converters. It is found out that although traditional proportional R-APF algorithm can extend to eliminate harmonic current injected by non-linear loads, its performance is constrained by stability problems and can at most eliminate half of the load harmonic currents. Thus, inspired by the iterative HVC algorithm, this paper proposed a novel improved R-APF algorithm based on integral-decoupling control in the synchronous rotating reference frame at each harmonic frequency. By theoretically analyzing the trajectory of the discrete system’s closed-loop poles, the benefits of decoupling control and the design guidelines for integral coefficient are both clearly demonstrated. Simulation results confirm that the proposed harmonic elimination algorithm can effectively mitigate all the load harmonic currents within 15 seconds.

## Acknowledgments

The authors would like to thanks NSFC (National Science Foundation of China) for their fund supporting to this research under Grant No. 51307127.

## Author Contributions

Conceived and designed the experiments: TT KL. Performed the experiments: TT JLe. Analyzed the data: TT YH. Contributed reagents/materials/analysis tools: TT JLi. Wrote the paper: TT SD.

## References

- 1.
Bagheri P., Xu W., "A technique to mitigate zero-sequence harmonics in power distribution systems,"
*IEEE Trans*.*on Power Del*., vol. 29, no. 1, pp. 215–223, Feb. 2014. - 2.
McBee K. D., Simoes M. G., "Evaluating the long-term impact of a continuously increasing harmonic demand on feeder-level voltage distortion,"
*IEEE Trans*.*on Ind*.*Appl*., vol.50, no.3, pp.2142–2149, May 2014. - 3.
J. Desmet, G. Vanalme, C. Debruyne, L. Vandevelde, "Influence of harmonic currents on cable losses for different grid configurations," in
*ICHQP2010*, Bergamo, Italy, Sept., 2010. - 4.
Carrasco J., Franquelo L., Bialasiew J., etc., “Power-electronic systems for the grid integration of renewable energy sources: A survey,”
*IEEE Trans*.*on Power Electron*., vol.53, no.4, pp. 1002–1016, Aug. 2006. - 5.
Lasseter R., “Smart distribution: Coupled microgrids,”
*Proc*.*of The IEEE*, vol.99, no.6, pp. 1074–1082, Jun. 2011. - 6.
Blaabjerg F., Chen Z., and Kjaer S. B., “Power electronics as efficient interface in dispersed power generation systems,”
*IEEE Trans*.*Power Electron*., vol. 19, no. 5, pp. 1184–1194, Sep. 2004. - 7.
I. El-Samahy and E. El-Saadany, “The effect of DG on power quality in a deregulated environment,”
*IEEE Power Engineering Society General Meeting*,*2005*, vol.3, pp. 2969–2976, San Francisco, USA, 16 Jun. 2005. - 8.
He J., Li Y., and Munir S. A Flexible harmonic control approach through voltage-controlled DG-Grid Interfacing Converters.
*IEEE Trans*.*on Ind*.*Electron*., vol.59, no.1, pp.444–455, Jan. 2012. - 9.
Akagi H. "Control Strategy and Site Selection of a Shunt Active Filter for Damping of Harmonic Propagation in Power Distribution Systems,”
*IEEE Trans*.*on Power Delivery*, vol.12, no.1, pp.354–363, Jan. 1997. - 10.
Jinwei He, Md. Shirajum Munir, Yun WeiLi. "Opportunities for power quality improvement through DG-Grid Interfacing Converters,”
*IPEC2010*, Sapporo, Japan, 21–24 Jun. 2010. - 11.
Menniti D., Burgio A., Sorrentino N., Pinnarelli A. “Implementation of the shunt harmonic voltages compensation approach,”
*Electric Power Syst*.*Res*., vol.81, no.3, pp. 798–804, Jan. 2011. - 12.
Tianyuan Tan, Qirong Jiang, Gang Li, Yuxiang Lai. “Comparison of direct and indirect current control strategy for DSTACTOM,”
*POWERCON2006*, Chongqing, China, 22–26 Oct. 2006. - 13.
Z.H. Yuan, Y. Du. "A shunt active harmonic filter based on a voltage detection method for harmonic voltage control,”
*DRPT2004*, vol. 2, pp. 763–768, Hong Kong, China, 5–8 April 2004. - 14.
Tan Tianyuan, Jiang Qirong, Ji Jianhui, Yue Jian. “Design of Security and Protection System for Shunt Active Power Filter,”
*Automation of Electric Power Syst*., vol.13, no.12, pp. 81–85, Jun. 2007. (in Chinese) - 15.
Yi Fei Wang Yun WeiLi. “A Grid Fundamental and Harmonic Component Detection Method for Single-Phase Systems,”
*IEEE Trans*.*on Power Electron*., vol.28, No.5, pp.2204–2213, May 2013. - 16.
http://ion.energy.ubc.ca/ion/default.aspx?dgm=//bis-appionpme-p/ION-Ent/config/diagrams/ud/UBC_SUS/ sub_diagrams/Kaiser_313-device_template_elec.dgm&node=Buildings.Kaiser_313&logServerName=QUERYSERVER.BIS-APPIONPME-P&logServerHandle=327952