# Direct Harmonic Voltage Control Strategy of Shunt Active Power Filters Suitable for Microgrid Applications

• Munir, Hafiz Mudassir (School of Automation Engineering, University of Electronic Sciences and Technology of China) ;
• Zou, Jianxiao (School of Automation Engineering, University of Electronic Sciences and Technology of China) ;
• Xie, Chuan (School of Automation Engineering, University of Electronic Sciences and Technology of China) ;
• Li, Kay (School of Automation Engineering, University of Electronic Sciences and Technology of China) ;
• Younas, Talha (Department of Electrical Engineering, COMSATS University Islamabad) ;
• Guerrero, Josep M. (Department of Energy Technology, Aalborg University)
• Accepted : 2018.10.23
• Published : 2019.01.20

#### Abstract

The application of shunt active power filters (S-APFs) is considered to be the most popular approach for harmonic compensation due to its high simplicity, ease of installation and efficient control. Its functionality mainly depends upon the rapidness and precision of its internally built control algorithms. A S-APF is generally operated in the current controlled mode (CCM) with the detection of harmonic load current. Its operation may not be appropriate for the distributed power generation system (DPGS) due to the wide dispersion of nonlinear loads. Despite the fact that the voltage detection based resistive-APF (R-APF) appears to be more appropriate for use in the DPGS, the R-APF experiences poor performance in terms of mitigating harmonics and parameter tuning. Therefore, this paper introduces a direct harmonic voltage detection based control approach for the S-APF that does not need a remote harmonic load current since it only requires a local point of common coupling (PCC) voltage for the detection of harmonics. The complete design procedure of the proposed control approach is presented. In addition, experimental results are given in detail to validate the performance and superiority of the proposed method over the conventional R-APF control. Thus, the outcomes of this study approve the predominance of the discussed strategy.

# I. INTRODUCTION

Due to the rapid growth of non-linear loads and power electronic devices, electrical power systems have become a source of harmonics pollution. The harmonic currents caused by these non-linear loads and power electronic devices are not suitable for microgrids or electrical distribution systems. Due to excessive unbalance currents and damaged voltage waveforms, power quality has deteriorated, which results in either interference or resonance. Active power filters (APFs) have been studied with considerable interest in the field of power systems [1]. They achieve a fast response in the case of transient load trip variations and they can help alleviate harmonics. It has been demonstra ted in [2] that the shunt active power filter (S-APF) can be the most effective technique in order to regulate and compensate load voltage harmonics due to its easiness, effectiveness and harmonic compensation features.

Normally, unbalance voltage harmonic compensation for the distributed generators (DGs) in a microgrid is accomplished by series active power filters or shunt active power filters [2], [3]. In [4], a hybrid active power filter has been used in a islanded microgrid for selective harmonic compensation. Generally, a shunt active power filter (S-APF) injects harmonic currents that are opposite in phase angle to compensate unbalance voltage harmonics. In [5], a coordinated control strategy of DGs and an APF has been carried out. However, the APF used for the DGs in a microgrid is highly dependent on its control strategy for effective harmonic compensation performance. The compensation capability of a S-APF mainly depends on existing control schemes. The control schemes comprise of two main functions, which are a harmonic detection function and a control function [6], [7]. Many control techniques have been investigated in the past including deadbeat control [8], resonant control [9], proportional integral control [10], hysteresis control [11], proportional resonant control and repetitive control [9], [12]. The main aim of this paper is to improve the control technique of a current controller in order to make a better control strategy of the current controller, and to enhance the compensation performance of an APF under transient and steady state conditions. Generally, nonlinear loads and unbalanced loads are highly dispersed in distributed power generation systems (DPGSs), which magnifies the difficulty and cost of detecting harmonic load current for S-APFs operating in the current controlled mode (CCM) [13]. Therefore, in [14]-[17] a local harmonic voltage detection based resistive active power filter (R-APF) has been explored. Its harmonic compensation performance varies remarkably by the matching condition that exists between the harmonic conductance and the grid impedance. The handling capability problem of the shunt R-APF in compensating harmonics decreases since the grid impedance does not remain stable due to different nonlinear loads and variable power factor correction capacitors [18], [19].

Conventionally, in a R-APF, the point of common coupling (PCC) voltage is considered and measured at the PCC. Then the harmonic elements are extracted and scaled by 1/R to get the harmonic currents according to the instantaneous values of the PCC voltage. Moreover, while controlling the R-APF, two main fundamental controls are targeted in its control part to dampen the harmonics and make the system stable, which are the emulation of virtual impedance and dc-link voltage control [4], [20]. In [4], [21] the dynamic virtual resistance is tuned at the PCC for the purpose of getting a low total harmonic distortion (THD). In [22], [23] cooperative control is implemented for distributed generation interfaced converters and with a distributed APF. In [24], an attempt has been made to emulate the virtual resistance with an improved accuracy using a grid-voltage-sensorless control technique. However, this technique has a disadvantage since the accuracy and precision of the virtual impedance emulation is highly dependent on the accuracy of the plant model.

Using a R-APF does not require any remote current signals. However, it needs to calculate the harmonic current reference according to the PCC voltage, which can sometimes be considered the most irritating task. Therefore, this control strategy is not suitable for microgrid applications [25], [15]. Aiming at this objective in determining the virtual harmonic impedance without the worry of tuning the parameters, a harmonic voltage controlled mode compensation approach in terms of local voltage measurement is presented in [26].

Various studies have demonstrated the advantages of an APF working in the CCM, while others indicated inadequate performance in terms of robustness and stability [15], [26]. Presently, a growing body of literature acknowledges the significance of the voltage-controlled mode for S-APFs both in the grid connected and islanding modes. The same approach has been investigated in [27]. Hence, to avoid the challenge of adjusting and tuning the resistance (R), a voltage controlled mode S-APF has been designed by using Vpcc at the PCC [28]. This strategy deals with the instantaneous value PCC voltage and directly adjusts its harmonic compensation. Therefore, both of these control schemes deal with the PCC voltage and can handle the realization of harmonic compensation without current measurement.

The rest of paper is structured as follows. The working of the conventional harmonic compensation control strategy has been provided in section II. The proposed control approach is discussed in section III. In section IV, the design control procedure of the proposed method is presented, which is considered to be suitable for microgrid applications. Section V illustrates comprehensive laboratory experimental results and a discussion of these results. Lastly, section VI provides some concluding remarks.

# II. CONVENTIONAL HARMONIC COMPENSATION STRATEGY

Voltage harmonic compensation at the PCC can be made to produce a harmonic current with nearly the same amplitude and phase angle with respect to the harmonic load current. In other words, the fundamental current is injected into the grid to produce a better PCC voltage power quality. The conventional S-APF harmonic compensation control approach is depicted in Fig. 1. An active power filter (converter) is connected in shunt with the grid through an LCL filter and a nonlinear load is also attached at the PCC.

Fig. 1. Traditional harmonic compensation strategy using a current controlled R-APF.

It can be seen from Fig. 1 that the CCM APF controller contains a fundamental current controller, active damping and a DC voltage controller.

Two different control schemes are generally adopted in the current generation reference block. The first one measures the harmonic load current (IL), and the corresponding harmonic components are extracted from it using the harmonic detection method so it can be utilized as a compensation reference. Meanwhile, in the other control scheme, the PCC voltage is used and current is drawn from it, which is proportional to the PCC voltage, i*=VPCC_h/Rh, where Rh indicates the harmonic resistance at the hth order harmonic frequencies since the R-APF is taken into account as resistive in nature. Therefore, this method offers a very low-impedance path for these harmonic currents. The later method does not require any remote load monitoring measurement arrangement. However, due to the different phase angle of the injected harmonic current with the voltage drop generated across unfamiliar and unpredictable grid impedance, it is a very difficult task to tune the exact parameters for the R-APF in real time microgrid applications. Therefore, another method is proposed for APFs based on the voltage controlled mode (VCM). In this scheme, the PCC voltage can be directed to the harmonic detection module for the detection of harmonics, where numerous bandpass filters (BPFs) have been used to carry out the extraction process for its various harmonic component orders Vpcch. Then the output harmonic reference voltage is carried out as V*=K.Vpcch, where Kh represents the harmonic voltage feedback element at the hth corresponding harmonic frequencies.

# III. PROPOSED HARMONIC COMPENSATION STRATEGY

When compared to the R-APF compensation method, a novel control approach is presented. The design comprises a fundamental current controller, active damping control loop and voltage harmonic compensation controller (HCC). Additionally, a DC voltage controller is presented in this paper. The equivalent control layout is depicted in Fig. 2. The studied scheme includes a VCM APF connected at the PCC with the grid through an LCL filter, and a nonlinear load based on a three-phase diode rectifier. When compared with the conventional harmonic compensation shunt R-APF shown in Fig. 1, the proposed scheme offers better compensation performance since its harmonic voltage can be regulated in a closed-loop manner. Moreover, by not performing remote load current measurements, a sufficient cost reduction of the overall system can be observed. In addition, no extra sensors are required when compared with the conventional current detection method. The capacitor current can easily be achieved by taking the difference between the grid side and the converter side inductor current [15]. Similarly, in the CCM, the capacitor current is also needed to improve system stability. Hence, it can be assumed that the proposed strategy is compatible with an LCL filter without adopting extra sensors in the system.

Fig. 2. Proposed experimental microgrid test setup.

To accomplish harmonic compensation utilizing only locally measured signals, the capacitor voltage is used and considered as a feedback closed control loop variable [29]. Note that K is regarded as the voltage feedback gain. It is worth noting that the harmonic compensation performance can be realized by settling both the sign and value of K.

Precise characterization of the grid voltage and correct extraction of the corresponding harmonics under distorted load conditions are considered as crucial issues for effective harmonic compensation. Therefore, the use of bandpass filters for the extraction of harmonics seems to be a very promising solution in active power filter applications since it gives information about the magnitude and phase angle of the corresponding harmonic frequencies in order to determine proper harmonic compensation controller gains for effective harmonic compensation. The controller gains can easily be determined based on their phases and the magnitudes of the selected harmonic frequencies. The concept of BPF for the detection of harmonics has been widely applied in [30] and [31] due to its good harmonic detection accuracy for APF applications. Hence, BPF increases the effectiveness of the detection system and extracts the harmonic of Vpcc when the grid voltage offers high order harmonics. Therefore, BPF is used, as illustrated in Fig. 3, to calculate the harmonics of Vpcc to ensure an effective and accurate voltage harmonic extraction. The corresponding transfer function of the bandpass filter can be shown in the z-domain as below

$G_{B P F}(z)=\frac{K_{m}\left\{z^{2}-\cos \left(2 \pi T_{s} f_{pll} n\right) z\right\}}{\left.a_{n} z^{2}-b_{n} \cos \left(2 \pi T_{s} f_{pll} n\right) z\right)+1}$       (1)

where Km=KimTs, an=1+Km and bn=2+Km. In this case, Km represents integral coefficient, Ts shows the sampling period and m represents the harmonic order. Up to the 13th harmonic have been compensated at the same time by using the adopted BPF. Bode plots of the adopted BPF are shown in Fig. 4 for easy understanding of its performance. After the extraction of the harmonics from Vpcc, the harmonic reference voltage can be achieved after scaling it by K.

Fig. 3. Bandpass filter for the extraction of harmonics.

Fig. 4. Bode plot of the bandpass filter BPF.

# IV. DESIGN AND STABILITY ANALYSIS OF THE PROPOSED HC

In order to validate the performance of the proposed method, Fig. 5 shows a laboratory-scale microgrid test bed, which comprises of two 2.2-kW Danfoss inverters. One of the inverters emulate as a grid-forming unit, while the other one acts as grid parallel unit, for the proposed voltage controlled S-APF. The DC link voltage is maintained at 250 V, the nominal phase supply voltage and grid frequency are set to be 110 V and 50 Hz, respectively. The control algorithm is carried out in a dSPACE 1005 test setup and the switching frequency is set as 10kHz. A three-phase diode rectifier based nonlinear load is connected at the PCC.

Fig. 5. Proposed experimental microgrid test setup.

As indicated in Fig. 5, the grid forming inverter receives both the inverter output current and capacitor voltage. The integration of these signals is used as a feedback control signal to control the PCC voltage. The double loop control scheme contains a voltage/current inner control loop, which is based on proportional resonant (PR) controllers that are used for tracking the sinusoidal reference variables in the αβ reference frame. The designing of PR controllers has already been discussed in the literature [30]. Thus, it is not going to be discussed again here. However, the grid parallel unit which is the proposed voltage controlled S-APF, takes the measurable signals directly to accomplish power injection and harmonic voltage compensation. The grid side inverter current is utilized to regulate the output power whereas the inner capacitor current is used to stabilize the system. In addition, grid synchronization and harmonic compensation can be carried out by implementing PCC voltage measurement. Hence, no additional remote measurements or sensor are required.

The harmonic compensator designed for the proposed active power filter (APF) includes four parts which are an active damping compensator, fundamental current loop, harmonic voltage compensator control loop and DC voltage control loop. This is discussed step by step in the following section.

## A. Active Damping Loop

According to Fig. 5, the transfer function in the s-domain from the inverter-side output voltage Vo to the grid side current I2 of the converter can be derived. The LCL filter parasitic parameters are ignored here for the sake of simplicity:

$G_{m 1}(s)=\frac{I_{2}(s)}{V_{o}(s)}=\frac{1}{L_{l} L_{2} C_{f} s} \cdot \frac{1}{s^{2}+\omega_{s}^{2}}$       (2)

Where L1 represents the inverter side inductor and L2 represents the grid side inductor. Meanwhile, C indicates the capacitor LCL filter, and ωs defines the resonance which can be written as follows:

$\omega_{s}=\sqrt{\frac{L_{1}+L_{2}}{L_{1} L_{2} C_{f}}}$       (3)

In accordance with Fig. 2, the transfer function Gc from the inverter output side voltage Vo to the capacitor current Ic can be shown as below:

$G_{c}(\mathrm{s})=\frac{I_{c}(\mathrm{s})}{V_{o}(\mathrm{s})}=\frac{1}{L_{1}} \cdot \frac{s}{s^{2}+\omega_{r}^{2}}$       (4)

Since the implementation of the control algorithms are executed in the discrete time domain, the transformations for the expressions of (2) and (4) are carried out from the discrete time domain into the z-domain as given in (5) and (6) by means of the zero order hold (ZOH) transformation method for the sake of convenience while designing the controller.

\begin{aligned} G_{m 1}(z) &=Z\left\{\left(1-e^{-T_{s} s}\right) \frac{G_{m 1}(s)}{s}\right\} \\ &=\frac{\omega_{s} T_{s}\left[z^{2}-2 \cos \left(\omega_{s} T_{s}\right) z+1\right]-\sin \left(\omega_{s} T_{s}\right)(z-1)^{2}}{\omega_{s}\left[L_{1}+L_{2}\right](z-1)\left[z^{2}-2 \cos \left(\omega_{s} T_{s}\right) z+1\right]} \end{aligned}       (5)

\begin{aligned} G_{c}(z) &=Z\left\{\left(1-e^{-T_{s} s}\right) \frac{G_{c}(s)}{s}\right\} \\ &=\frac{\sin \left(\omega_{s} T_{s}\right)}{\omega_{s} L_{1}} \cdot \frac{z-1}{z^{2}-2 \cos \left(\omega_{r} T_{s}\right) z+1} \end{aligned}       (6)

where Ts indicates the sampling period.

Since resonance peaks are present in the expressions (5) and (6), the capacitor-current-feedback active-damping loop is displayed in Fig. 5. It is used to suppress resonances, where L(z) refers to the lead-lag compensator used for the compensation of the delays in the active damping loop.

The mathematical active damping plant model can be deduced as follows:

$L(z)=K_{d} \frac{z-1}{z-0.5}$       (7)

Where Kd shows the active damping loop gain.

Referring to expression (7), the root locus of the active damping (AD) can be drawn as presented in Fig. 7. In order to increase the active damping loop performance, the gain is chosen as 7.84 in this paper.

Fig. 6. Active damping plant model.

Fig. 7. Root locus of active damping.

## B. Fundamental Current Control Loop

The main functions of the current loop are to maintain a smooth power flow, and to track the fundamental current and its harmonic components. PR and PI controllers are usually adopted to handle the tracking of the current reference for a given control system.

Fig. 8 elaborates on the control block diagram of a PI control loop expressed in the z-domain for an active power filter, where z-1 denotes the inherent unit delay in the digital control system.

Fig. 8. Block diagram of a current controller in the z-domain.

The current controller Gp(z) is indicated in this paper. It consists of a fundamental proportional integral (PI) controller. Based on the block diagram of a PI controller, which is shown below, in the z-domain, the open loop and closed loop gains transfer functions are denoted by GOL2 and GCL2,respectively. This can be expressed as below:

$G_{O L 2}(z)=\frac{P I(z) z^{-1} G_{m 1}(z)}{1+z^{-1} L(z) G_{c}(z)}$       (8)

In the light of the above expression (8), a root locus plot to design the fundamental PI controller is plotted as shown in Fig. 9.

$G_{C L 2}(z)=\frac{G_{O L 2}(z)}{1+G_{O L 2}(z)}$       (9)

Fig. 9. Root locus of the inner PI control loop.

## C. Harmonic Voltage Control Loop

Despite the fact that active damping is employed to make the current loop stable, an extra phase lag is injected into the capacitor voltage feedback circuit. This introduced phase shift can be avoided and ignored at the fundamental frequency. Therefore, this problem may become severe when the phase lag intensifies and enters into the high frequency range, which may affect the performance of harmonic tracking. In order to clarify this issue, the following is the transfer function for the harmonic compensation loop in the s-domain:

$G_{h v}(s)=\frac{V_{c}}{V_{i}}=\frac{1}{L_{1} C_{f} s^{2}+K_{d} C_{f} s+1}$       (10)

Due to advances in the digital control methods and techniques, the above continuous-time transfer function of the controller is then discretized using the method of zero order hold (ZOH) as given below in (11). Then it is checked for further stability issues.

\begin{aligned} G_{i v}(z) &=Z\left\{\frac{1-e^{-s T}}{s} \cdot G_{i v}(s)\right\} \\ &=\left(1-z^{-1}\right) \cdot Z\left\{\frac{G_{i v}(s)}{s}\right\} \\ &=\left(1-z^{-1}\right) \cdot Z\left\{\frac{1}{s\left(L_{1} C_{f} s^{2}+K_{d} C_{f} s+1\right)}\right\} \\ &=\left(1-z^{-1}\right) \cdot Z\left\{\frac{z}{z-1}-\frac{z \sqrt{1-\xi_{0}^{2}}+e^{-\xi \omega_{0} T} \sin \left(\omega_{0} \sqrt{1-\xi^{2}} T-\phi\right)}{z^{2}-2 z e^{-\xi \omega_{0} T} \cos \left(\omega_{0} \sqrt{1-\xi^{2}} T\right)+e^{-2 \xi \omega_{0} T})}\right\} \end{aligned}       (11)

The effect of the ZOH method is significant at higher frequencies because an extra phase lag appears in the control loop. This can be addressed and compensated while tuning the Gc(z).

To compensate for those phase lags, it is desirable to propose a harmonic compensator based on resonant controllers that can be modeled to compensate for phase lags through active damping, and perform the computational delay (z-1) and PWM converter operations [32].

The transfer function in the s-domain for the resonant controller is written as follows:

$G_{r e s h}(s)=k_{r e s} \frac{s \cos \phi_{c}-h \omega \sin \phi_{c}}{s^{2}+(h \omega)}$       (12)

This defines the resonant controller gain, where h denotes the order of the harmonics, Ts is the sampling time period, and φ is the leading phase angle at the resonance frequency. By adopting an impulse invariant transformation technique for discretizing the resonant controller, an effective compensation can be made towards accuracy and the computational burden can be reduced. Hence, the transfer function after discretization can be obtained as follows:

$G_{resh}(z)=k_{res} T_{s} \frac{\cos \varphi_{c}-z^{-1} \cos \left(\varphi_{c}-h \omega T_{s}\right)}{1-2 z^{-1} \cos \left(h \omega T_{s}\right)+z^{-2}}$       (13)

It is worth mentioning that the harmonic compensator uses a set of arrays Gresh(z) for compensating numerous orders of harmonics. Taking into account the time delays caused by the calculation and estimation as well as processing the PWM, the damped control plant together with the harmonic voltage control loop is illustrated in the z-domain as shown in Fig. 10. As a result, the open loop transfer function of the harmonic voltage compensation loop can be inferred as follows:

$\begin{array}{c} G_{o l}(z)=G_{r e s h}(z) G_{d e l a y}(z) G_{p l}(z) \\ G_{d e l a y}(z)=z^{-1} \end{array}$       (14)

where Gdelay(s) denotes the computational delay inherited from the digital control system.

Fig. 10. Block diagram of the harmonic compensation loop.

Normally, the Nyquist stability criterion is used to evaluate the stability of the closed loop system by only considering its open loop performance. This also determines the stability of the system and provides an accurate stability margin with reference to the sensitivity function [22], [23].

Fig. 11. Nyquist harmonic voltage control loop.

## D. DC Voltage Controller

The control of a shunt active power filter is made in such a way that an external DC voltage loop is connected with an inner fundamental current loop. In order to adjust and stabilize DC voltage, the DC voltage controller considers the voltage Vdc of the DC capacitor and compares it with the DC voltage reference Vdcref to generate the current reference ∇id for the fundamental current controller. In this paper, the reference for the DC link voltage is kept at 250 V to prevent DC link voltage ripple, switching losses and other problems that may affect the overall cost and size of the LCL filters.

Fig. 12. DC voltage control loop.

The transfer function for the dc voltage loop Gv(s) is obtained as:

$G_{v}(z)=T_{s} \frac{z}{(z-1) C_{d c}}$       (15)

Bode plots for the DC voltage are shown in Fig. 13.

Fig. 13. Bode plot of the DC voltage loop.

# V. EXPERIMENTAL RESULTS

In order to investigate the performance of the proposed control strategy, an experiment has been performed in the laboratory as shown in Fig. 14.

Fig. 14. Experimental test setup.

Experimental results are presented below. The control parameters of the power stage are listed in Table I. Fig. 15(a) and (b) illustrate the PCC harmonic voltages before and after enabling the harmonic compensation. From these figures it can be seen that the PCC voltage is more sinusoidal after implementing the proposed harmonic compensation strategy. It can also be seen that the corresponding total harmonic distortions THDs of the PCC voltage shows a marked decrease from 9.61% to 2.99%. Fig. 16(a) and (b) show the corresponding frequency spectrum of the PCC voltage before and after compensation.

TABLE I APF SYSTEM PARAMETERS

Fig. 15. PCC voltage (Proposed APF): (a) Before compensation; (b) After compensation.

Fig. 16. Frequency spectrum of the PCC voltage in the proposed APF: (a) Before compensation; (b) After compensation.

It can be analyzed from Fig. 17(a) that the grid-side current is more distorted due to nonlinear load. It can also be seen that the THD of the grid side current is 21% without compensation. In addition, a while after applying the harmonic compensation, the total harmonic distortion THD of the grid current is decreased noticeably from 21% to 5.5%, as shown in Fig. 17(b). As a result, the harmonic components of the load current get distorted at the cost of grid current compensation. The frequency spectrum of the grid current before and after compensation is depicted in Fig. 18 (a) and (b).

Fig. 17. Grid current in the proposed APF: (a) Before compensation; (b) After compensation.

Fig. 18. Frequency spectrum of the grid current in the proposed APF: (a) Before compensation; (b) After compensation.

It can be observed that the higher order harmonics like the 5th, 7th, 11th and 13th orders distortions of current and voltage have been considerably decreased in the proposed method since it was an anticipated goal while designing the controller part. Hence, the grid current is improved. The same can be seen from Fig. 16(b) and Fig. 18(b). To have a better understanding of the harmonic mitigation, the dynamic and transient responses of the APF output current, grid current and corresponding load current are depicted in Fig. 19 (a), (b) and (c).

Fig. 19. Dynamic waveforms of the proposed method: (a) APF output current; (b) Grid current; (c) Load current.

It is obvious after 0.2 sec that the APF is going to reach its steady state and that the load side current gets amplified. Once the proposed APF is activated, the grid current varies in a sinusoidal manner. The cost of achieving this goal suffers from high distortion in the load current as shown in Fig. 19 (c). This shows the effectiveness of the proposed controller.

A experimental study is conducted to investigate the harmonic compensation capability and performance of the proposed controller in comparison to the conventional R-APF method. The PCC voltage and grid current after activating the harmonic compensation of the R-APF are presented in Fig. 20 (a) and (b). Meanwhile, Fig. 21 (a) and (b) illustrate the frequency spectrum of the THDs of the PCC voltage and grid current, respectively. Based on the associated harmonic analysis of the PCC voltage and grid currents of the R-APF depicted in Fig. 21, it is possible to conclude that even though the voltage quality of the PCC voltage and grid currents can be enhanced by utilizing the R-APF, the PCC voltage and the grid current, the harmonic component is much higher than that of the proposed controller.

Fig. 20. R-APF (conventional method) after compensation: (a) PCC voltage; (b) Grid current.

Fig. 21. R-APF (conventional method) frequency spectrum after compensation: (a) PCC voltage; (b) Grid current.

# VI. CONCLUSIONS

In this paper, a new control harmonic compensation approach based on local PCC voltage detection for a S-APF has been investigated. The control strategy of the proposed scheme comprises four parts: active damping, fundamental current controller, harmonic voltage compensation controller and DC voltage controller. The PCC voltage and grid current compensation can be achieved at the same time without taking any remote load current measurements. This harmonic compensation is acquired by implementing a voltage controlled active power filter that is shunt connected to the grid at the PCC using an LCL filter. The comprehensive design of the proposed method is given. In addition, the proposed method is compared with the conventional control scheme R-APF and it can be concluded that the proposed control approach is more suitable for microgrid applications. Therefore, better harmonic compensation can be achieved without tuning the parameter of Rh by utilizing PCC voltage measurement. Experimental results verify the flexible control of harmonics by adopting the proposed scheme.

#### References

1. H. Akagi, “New trends in active filters for power conditioning,” IEEE Trans. Ind. Appl., Vol. 32, No. 6, pp. 1312-1322, Nov./Dec. 1996. https://doi.org/10.1109/28.556633
2. P. Jintakosonwit, H. Fujita, and H. Akagi, “Control and performance of a fully-digital- controlled shunt active filter for installation on power distribution system,” IEEE Trans. Power Electron., Vol. 17, No. 1, pp. 132-140, Jan. 2002. https://doi.org/10.1109/63.988679
3. X. Wang, J. Liu, C. Yuan, and Z. Wang, "A family of control methods for parallel active power filters based on current detection," in APEC 07 - Twenty-Second Annual IEEE Applied Power Electronics Conference and Exposition, pp. 675-681, 2007.
4. W. Xiaoyu, J. Liu, G. Zhao, C. Yuan, Z. Wang, and J. Li, "A family of voltage-mode control methods for active power filters and comparative analysis," PESC Rec. - IEEE Annu. Power Electron. Spec. Conf., pp. 1188-1194, 2007.
5. Y. Han, L. Xu, M. M. Khan, C. Chen, G. Yao, and L. D. Zhou, “Robust deadbeat control scheme for a hybrid APF with resetting filter and ADALINE-based harmonic estimation algorithm,” IEEE Trans. Ind. Electron., Vol. 58, No. 9, pp. 3893-3904, Sep. 2011. https://doi.org/10.1109/TIE.2010.2093475
6. X. Yuan, W. Merk, H. Stemmler, and J. Allmeling, “Stationary-frame generalized integrators for current control of active power filters with zero steady-state error for current harmonics of concern under unbalanced and distorted operating conditions,” IEEE Trans. Ind. Appl., Vol. 38, No. 2, pp. 523-532, Mar./Apr. 2002. https://doi.org/10.1109/28.993175
7. S. Buso, L. Malesani, and P. Mattavelli, “Comparison of current control techniques for active filter applications,” IEEE Trans. Ind. Electron., Vol. 45, No. 5, pp. 722-729, Oct. 1998.
8. S. Buso, S. Fasolo, L. Malesani, and P. Mattavelli, “A dead-beat adaptive hysteresis current control,” IEEE Trans. Ind. Appl., Vol. 36, No. 4, pp. 1174-1180, Jul./Aug. 2000. https://doi.org/10.1109/28.855976
9. C. Xie, X. Zhao, M. Savaghebi, L. Meng, J. Guerrero, and J. Vasquez, “Multi-rate fractional-order repetitive control of shunt active power filter,” IEEE J. Emerg. Sel. Top. Power Electron., Vol. 5, No. 2, pp. 809-819, Jun. 2017. https://doi.org/10.1109/JESTPE.2016.2639552
10. H. Akagi, “Control strategy and site selection of a shunt active filter for damping of harmonic propagation in power distribution systems,” IEEE Trans. Power Del., Vol. 12, No. 1, pp. 354-363, Jan. 1997. https://doi.org/10.1109/61.568259
11. M. M. Hashempour, M. Savaghebi, J. C. Vasquez, and J. M. Guerrero, “A control architecture to coordinate distributed generators and active power filters coexisting in a microgrid,” IEEE Trans. Smart Grid, Vol. 7, No. 5, pp. 2325-2336, Sep. 2016. https://doi.org/10.1109/TSG.2015.2488980
12. X. Zhao, L. Meng, J. M. Guerrero, M. Savaghebi, J. C. Vasquez, C. Xie, and X. Wu, "An embedded voltage harmonic compensation strategy for current controlled DG interfacing converters," ECCE 2016 - IEEE Energy Convers. Congr. Expo. Proc., 2016.
13. T. Basso, "IEEE 1547 and 2030 Standards for Distributed Energy Resources Interconnection and Interoperability with the Electricity Grid IEEE 1547 and 2030 Standards for Distributed Energy Resources Interconnection and Interoperability with the Electricity Grid," Technical Report, NREL, Dec. 2014.
14. T. Lee, J. Li, and P. Cheng, “Discrete frequency tuning active filter for power system harmonics,” IEEE Trans. Power Electron., Vol. 24, No. 5, pp. 1209-1217, May 2009. https://doi.org/10.1109/TPEL.2009.2013863
15. X. Zhao, L. Meng, C. Xie, J. M. Guerrero, and X. Wu, “A unified voltage harmonic control strategy for coordinated compensation with VCM and CCM converters,” IEEE Trans. Power Electron., Vol. 33, No. 8, pp. 7132-7147, Aug. 2017. https://doi.org/10.1109/TPEL.2017.2756688
16. X. Sun, R. Han, H. Shen, B. Wang, Z. Lu, and Z. Chen, “A double-resistive active power filter system to attenuate harmonic voltages of a radial power distribution feeder,” IEEE Trans. Power Electron., Vol. 31, No. 9, pp. 6203-6216, Sep. 2016. https://doi.org/10.1109/TPEL.2015.2500913
17. T. L. Lee, Y. C. Wang, J. C. Li, and J. M. Guerrero, “Hybrid active filter with variable conductance for harmonic resonance suppression in industrial power systems,” IEEE Trans. Ind. Electron., Vol. 62, No. 2, pp. 746-756, Feb. 2015. https://doi.org/10.1109/TIE.2014.2347008
18. R. B. Gonzatti, S. C. Ferreira, C. H. Da Silva, R. R. Pereira, L. E. Borges Da Silva, and G. Lambert-Torres, “Smart impedance: A new way to look at hybrid filters,” IEEE Trans. Smart Grid, Vol. 7, No. 2, pp. 837-846, Mar. 2016. https://doi.org/10.1109/TSG.2015.2466613
19. T. Lee, P. Cheng, H. Akagi, and H. Fujita, “A dynamic tuning method for distributed active filter systems,” Control, Vol. 44, No. 2, pp. 612-623, Mar./Apr. 2008.
20. T. L. Lee and P. T. Cheng, “Design of a new cooperative harmonic filtering strategy for distributed generation interface converters in an islanding network,” IEEE Trans. Power Electron., Vol. 22, No. 5, pp. 1919-1927, Sep. 2007. https://doi.org/10.1109/TPEL.2007.904200
21. T. L. Lee, P. T. Cheng, H. Akagi, and H. Fujita, “A dynamic tuning method for distributed active filter systems,” IEEE Trans. Ind. Appl., Vol. 44, No. 2, pp. 612-623, Mar./Apr. 2008. https://doi.org/10.1109/TIA.2008.916596
22. H. Bai, X. Wang, and F. Blaabjerg, “A grid-voltagesensorless resistive-active power filter with series LC-filter,” IEEE Trans. Power Electron., Vol. 33, No. 5, pp. 4429-4440, May 2018. https://doi.org/10.1109/TPEL.2017.2717183
23. J. He, Y. W. Li, and F. Blaabjerg, “Flexible microgrid power quality enhancement using adaptive hybrid voltage and current controller,” IEEE Trans. Ind. Electron., Vol. 61, No. 6, pp. 2784-2794, Jun. 2014. https://doi.org/10.1109/TIE.2013.2276774
24. X. Zhao, L. Meng, C. Xie, J. M. Guerrero, X. Wu, J. C. Vasquez, and M. Savaghebi, “A voltage feedback based harmonic compensation strategy for current-controlled converters,” IEEE Trans. Ind. Appl., Vol. 54, No. 3, pp. 2616-2627, May/Jun. 2017.
25. J. He, Y. W. Li, R. Wang, and C. Zhang, “Analysis and mitigation of resonance propagation in grid-connected and islanding microgrids,” IEEE Trans. Energy Convers., Vol. 30, No. 1, pp. 70-81, Mar. 2015. https://doi.org/10.1109/TEC.2014.2332497
26. J. He, Y. W. Li, and M. S. Munir, “A flexible harmonic control approach through voltage-controlled DG-grid interfacing converters,” IEEE Trans. Ind. Electron., Vol. 59, No. 1, pp. 444-455, Jan. 2012. https://doi.org/10.1109/TIE.2011.2141098
27. S. Mousavi, Y. Mousazadeh, A. Jalilian, M. Savaghebi, and J. M. Guerrero, "Autonomous control of current and voltage controlled dg interface inverters for reactive power sharing and harmonics compensation in islanded microgrids," IEEE Trans. Power Electron. Vol. 3, No. 2, pp. 9375-9386, Nov. 2018.
28. H. M. Munir, J. Zou, C. Xie, K. Li, X. Zhao, and J. M. Guerrero, "Direct harmonic voltage control strategy for shunt active power filter," in IECON 2017 - 43rd Annual Conference of the IEEE Industrial Electronics Society, Vol. 8, pp. 5-10, 2017,
29. Y. Tang, P. C. Loh, P. Wang, F. H. Choo, and F. Gao, “Exploring inherent damping characteristic of LCL-filters for three-phase grid-connected voltage source inverters,” IEEE Trans. Power Electron., Vol. 27, No. 3, pp. 1433-1443, Mar. 2012. https://doi.org/10.1109/TPEL.2011.2162342
30. D. G. Holmes, T. A. Lipo, B. P. McGrath, and W. Y. Kong, “Optimized design of stationary frame three phase AC Current regulators,” IEEE Trans. Power Electron., Vol. 24, No. 11, pp. 2417-2426, Nov. 2009. https://doi.org/10.1109/TPEL.2009.2029548
31. R. Bojoi, G. Griva, M. Guerriero, F. Farina, F. Profumo, and V. Bostan, "Improved current control strategy for power conditioners using sinusoidal signal integrators in synchronous reference frame," PESC Rec. - IEEE Annual Power Electron. Spec. Conf., Vol. 6, No. 6, pp. 4623-4629, 2004.
32. P. Mattavelli, “A closed-loop selective harmonic compensation for active filters,” IEEE Trans. Ind. Appl., Vol. 37, No. 1, pp. 81-89, Jan./Feb. 2001. https://doi.org/10.1109/28.903130