# Control for the Three-Phase Four-Wire Four-Leg APF Based on SVPWM and Average Current Method

Authors: Xiangshun Li; Jianghua Lu
Journal: Active and Passive Electronic Components
 (2015)

---

## Abstract

A novel control method is proposed for the three-phase four-wire four-leg active power filter (APF) to realize the accurate and real-time compensation of harmonic of power system, which combines space vector pulse width modulation (SVPWM) with triangle modulation strategy. Firstly, the basic principle of the APF is briefly described. Then the harmonic and reactive currents are derived by the instantaneous reactive power theory. Finally simulation and experiment are built to verify the validity and effectiveness of the proposed method. The simulation results show that the response time for compensation is about 0.025 sec and the total harmonic distortion (THD) of the source current of phaseA is reduced from 33.38% before compensation to 3.05% with APF.


---

## Body

## 1. Introduction

As the power electronic devices are extensively used in the industrial and commercial areas, a large number of nonlinear loads such as electrical machines, static power converters, and electric arc furnaces have been connected to the power system, which lead to waveforms distortion of voltage and current in the grid and seriously degrade the power quality [1–3]. Distorted currents and voltages contain a large number of harmonics, which not only cause additional heating and loss of power system components, but also lead to voltage drop at their respective harmonic frequencies distorting the voltage waveform at the point of common coupling (PCC). Active power filter (APF) is an electrical equipment, which can dynamically suppress the harmonic, compensate reactive power, eliminate the asymmetric loads, and overcome the shortcomings of passive filter (LC filter).The compensation performances of APF depend largely on the control method. Reference [4] summarizes the control strategies of the main circuit for the APF. There are two kinds of topologies, three-leg split capacitive structure and four-leg inverter structure, for the main circuit of three-phase four-wire APF [5, 6]. In the split capacitor structure, the three-phase inverter essentially is made up of three signal-phase half-bridge inverters, so it suffers from insufficient utilization of the DC link voltage. In addition the DC-bus capacitor of the three-leg split capacitive structure must be Voltage-Sharing. So the control strategy is very complex [7]. References [8–10] analyse the three-dimensional space vector pulse width modulation (3D-SVPWM) control theory and introduce 3D-SVPWM strategies based on the αβγ coordinate systems or the abc coordinate systems to the three-phase four-leg shunt APF. Though these strategies provide good ideas and measures to solve the zero-sequence current compensation, they come up with some shortcomings such as high complexity and slow speed in computing. As a result, the generated current signals based on these control algorithms cannot timely achieve phase synchronization with the harmonic current of the power system in engineering.This paper proposes a novel kind of control method based on the three-phase four-leg inverter for the shunt APF. TheABC three-legs and zero-line leg (N leg) can be separated and independently controlled. Not only are the control theory and computation of this method very simple, which is based on the two dimensional SVPWM control algorithm and triangle modulation strategy, but also the engineering application in the three-phase four-wire power system can come true.


## 2. Working Principle

APF mainly consists of detecting circuit to measure the harmonic and reactive current and compensation current generating circuit. And the compensation circuit is made up of control circuit of the compensation current, drive isolation circuit, and main circuit. The topology of the APF is shown in Figure1.Figure 1
The topology of the APF.The working principle of APF is through the detecting control circuit to detect accurately in real time the corresponding harmonic components of the load current (il), and at the same time the compensation current generating circuit generates current signals equal in amplitude and opposite in phase to the harmonic currents, which is injected into the load current circuit to offset the harmonic component of original load current, so that the source current (is) just contains the fundamental active current and a small amount of harmonic components; that is, the purpose of eliminating harmonic and compensating reactive power is achieved.


## 3. The Harmonic Extraction Method Based on the Instantaneous Reactive Power Theory

In this paper, we choose theip-iq method [11–13] based on instantaneous reactive power theory to detect the harmonic current components compared with the p-q method, which cannot effectively separate the fundamental current component and harmonic current components when the grid current distorts. The diagram of harmonic current detection is shown in Figure 2. Consider(1)i0=ia+ib+ic3,(2)ia′=ia-i0,ib′=ib-i0,ic′=ic-i0.Figure 2
The diagram of harmonic current detection.In Figure2, ia, ib, and ic are the load currents, which contain zero-sequence component. And the zero-sequence component is given in (1). The ia′, ib′, and ic′ are calculated by (2), which just contain the positive-sequence and negative-sequence components. Then ia′, ib′, and ic′ are transferred to the instantaneous active current ip and instantaneous reactive current iq through the following coordinate transformations:(3)iαiβ=231-12-12032-32ia′ib′ic′,ipiq=sinωt-cos⁡ωt-cos⁡ωt-sinωt·iαiβ.Phase A voltage ea is input into the phase-locked loop (PLL) module and the sine and cosine signal circuit module. Then sine signal (sin(ωt)) and cosine signal (-cos⁡(ωt)) are produced, which is in phase with the ea. The ip and iq obtain the DC components i¯p and i¯q through low-pass filter (LPF), which correspond to the fundamental positive sequence components iaf, ibf, and icf of ia′, ib′, and ic′. Then the nonharmonic current components of the three-phase current are deduced through inverse transform. The ia, ib, and ic are subtracted from the fundamental wave components to get the reference compensation current values iah, ibh, and ich:(4)iah=ia-iaf,ibh=ib-ibf,ich=ic-icf.Theniah, ibh, and ich are used to calculate the current signals in the compensation current generating circuit. Furthermore, this paper adopts the traditional proportional integral (PI) control method to realize voltage regulation of the inverter DC voltage.


## 4. Control Strategy of the Compensation Current Generation Circuit

### 4.1.3D-SVPWM Based on the αβγ Coordinate System

The main circuit of the three-phase four-legLCL APF is shown in Figure 3, where L1, L2, and C are the inverter-side inductor, grid-side inductor, and filter capacitor.Figure 3
The main circuit of the three-phase four-leg APF.As shown in Figure3, the topology of the three-phase four-leg inverter consists of four legs: A, B, C, and N, which increase a degree of freedom compared with the three-phase three-wire three-leg APF. The switching function is defined as Sk (k=a, b, c, and n). At any time there is one and only one switch which keeps turning on among the switches of the same bridge leg. That is, the upper leg is on and the lower leg is off when Sk=1. By contrast, when Sk=0, this refers to the upper leg being off and the lower leg being on. So there exist 16 different switching states from 0000 to 1111 over the 8 switching devices, which correspond to 16 switching vectors: fourteen active nonzero vectors (V1–V14) and two null vectors (V0 and V15). The relationship between the AC side voltage of the four-leg converter in αβγ coordinate and abc coordinate is as follows:(5)UαUβUγ=231-12-12032-32121212UaUbUc.Table1 shows the switching states, the corresponding voltages of the four-leg, and the resultant voltage vectors according to different switching states. Furthermore, Figure 4 shows the switching vectors under the αβγ static coordinate.Table 1
Switching states and the corresponding voltages.
S
a
S
b
S
c
S
n
U
a
n
U
b
n
U
c
n
U
α
U
β
U
γ
V
0
0
0
0
0
0
0
0
0
0
0
V
1
0
0
0
1
-
U
dc
-
U
dc
-
U
dc
0
0
-
6
/
2
U
dc
V
2
0
0
1
0
0
0
U
dc
-
6
/
6
U
dc
-
2
/
2
U
dc
6
/
6
U
dc
V
3
0
0
1
1
-
U
dc
-
U
dc
0
-
6
/
6
U
dc
-
2
/
2
U
dc
-
6
/
3
U
dc
V
4
0
1
0
0
0
U
dc
0
-
6
/
6
U
dc
2
/
2
U
dc
6
/
6
U
dc
V
5
0
1
0
1
-
U
dc
0
-
U
dc
-
6
/
6
U
dc
2
/
2
U
dc
-
6
/
3
U
dc
V
6
0
1
1
0
0
U
dc
U
dc
-
6
/
3
U
dc
0
6
/
3
U
dc
V
7
0
1
1
1
-
U
dc
0
0
-
6
/
3
U
dc
0
-
6
/
6
U
dc
V
8
1
0
0
0
U
dc
0
0
6
/
3
U
dc
0
6
/
6
U
dc
V
9
1
0
0
1
0
-
U
dc
-
U
dc
6
/
3
U
dc
0
-
6
/
3
U
dc
V
10
1
0
1
0
U
dc
0
U
dc
6
/
6
U
dc
-
2
/
2
U
dc
6
/
3
U
dc
V
11
1
0
1
1
0
-
U
dc
0
6
/
6
U
dc
-
2
/
2
U
dc
-
6
/
6
U
dc
V
12
1
1
0
0
U
dc
U
dc
0
6
/
6
U
dc
2
/
2
U
dc
6
/
3
U
dc
V
13
1
1
0
1
0
0
-
U
dc
6
/
6
U
dc
2
/
2
U
dc
-
6
/
6
U
dc
V
14
1
1
1
0
U
dc
U
dc
U
dc
0
0
6
/
2
U
dc
V
15
1
1
1
1
0
0
0
0
0
0Figure 4
The switching vectors under theαβγ coordinate.


### 4.2. The Novel Control Method for Three-Phase Four-Leg APF

Based on the analysis of Table1 and Figure 4, the switching states of the neutral line leg just affect the value of the Uγ when the states of the A, B, and C legs are determined. By contrast, the switching states of the A, B, and C legs only have an effect on the values of the Uα, Uβ, and Uγ but do not affect the symbol of the Uγ except the zero vectors V0 and V15 when the states of the N leg are determined. In a world, the switching states of the N leg just affect the zero sequence component of the three-phase output voltage, and A, B, and C legs determine the positive-sequence and negative-sequence components of the three-phase inverter output voltage. So the A, B, and C legs and zero-line leg can be separated and independently controlled.For theA, B, and C legs, the two-dimensional SVPWM control algorithm is used to generate 6 complementary PWM waves in the αβ coordinate to drive the A, B, and C legs of the inverter. Figure 5 shows the control diagram of the SVPWM control algorithm. The essence of control for the N leg is to control the switching states of Sn to make the neutral line current tracking the sum of three-phase load currents. Figure 6 shows the diagram of the control of the N leg based on triangle modulation strategy.Figure 5
Control diagram of the SVPWM.Figure 6
The diagram of the control of theN leg based on triangle modulation strategy.


## 4.1.3D-SVPWM Based on the αβγ Coordinate System

The main circuit of the three-phase four-legLCL APF is shown in Figure 3, where L1, L2, and C are the inverter-side inductor, grid-side inductor, and filter capacitor.Figure 3
The main circuit of the three-phase four-leg APF.As shown in Figure3, the topology of the three-phase four-leg inverter consists of four legs: A, B, C, and N, which increase a degree of freedom compared with the three-phase three-wire three-leg APF. The switching function is defined as Sk (k=a, b, c, and n). At any time there is one and only one switch which keeps turning on among the switches of the same bridge leg. That is, the upper leg is on and the lower leg is off when Sk=1. By contrast, when Sk=0, this refers to the upper leg being off and the lower leg being on. So there exist 16 different switching states from 0000 to 1111 over the 8 switching devices, which correspond to 16 switching vectors: fourteen active nonzero vectors (V1–V14) and two null vectors (V0 and V15). The relationship between the AC side voltage of the four-leg converter in αβγ coordinate and abc coordinate is as follows:(5)UαUβUγ=231-12-12032-32121212UaUbUc.Table1 shows the switching states, the corresponding voltages of the four-leg, and the resultant voltage vectors according to different switching states. Furthermore, Figure 4 shows the switching vectors under the αβγ static coordinate.Table 1
Switching states and the corresponding voltages.
S
a
S
b
S
c
S
n
U
a
n
U
b
n
U
c
n
U
α
U
β
U
γ
V
0
0
0
0
0
0
0
0
0
0
0
V
1
0
0
0
1
-
U
dc
-
U
dc
-
U
dc
0
0
-
6
/
2
U
dc
V
2
0
0
1
0
0
0
U
dc
-
6
/
6
U
dc
-
2
/
2
U
dc
6
/
6
U
dc
V
3
0
0
1
1
-
U
dc
-
U
dc
0
-
6
/
6
U
dc
-
2
/
2
U
dc
-
6
/
3
U
dc
V
4
0
1
0
0
0
U
dc
0
-
6
/
6
U
dc
2
/
2
U
dc
6
/
6
U
dc
V
5
0
1
0
1
-
U
dc
0
-
U
dc
-
6
/
6
U
dc
2
/
2
U
dc
-
6
/
3
U
dc
V
6
0
1
1
0
0
U
dc
U
dc
-
6
/
3
U
dc
0
6
/
3
U
dc
V
7
0
1
1
1
-
U
dc
0
0
-
6
/
3
U
dc
0
-
6
/
6
U
dc
V
8
1
0
0
0
U
dc
0
0
6
/
3
U
dc
0
6
/
6
U
dc
V
9
1
0
0
1
0
-
U
dc
-
U
dc
6
/
3
U
dc
0
-
6
/
3
U
dc
V
10
1
0
1
0
U
dc
0
U
dc
6
/
6
U
dc
-
2
/
2
U
dc
6
/
3
U
dc
V
11
1
0
1
1
0
-
U
dc
0
6
/
6
U
dc
-
2
/
2
U
dc
-
6
/
6
U
dc
V
12
1
1
0
0
U
dc
U
dc
0
6
/
6
U
dc
2
/
2
U
dc
6
/
3
U
dc
V
13
1
1
0
1
0
0
-
U
dc
6
/
6
U
dc
2
/
2
U
dc
-
6
/
6
U
dc
V
14
1
1
1
0
U
dc
U
dc
U
dc
0
0
6
/
2
U
dc
V
15
1
1
1
1
0
0
0
0
0
0Figure 4
The switching vectors under theαβγ coordinate.


## 4.2. The Novel Control Method for Three-Phase Four-Leg APF

Based on the analysis of Table1 and Figure 4, the switching states of the neutral line leg just affect the value of the Uγ when the states of the A, B, and C legs are determined. By contrast, the switching states of the A, B, and C legs only have an effect on the values of the Uα, Uβ, and Uγ but do not affect the symbol of the Uγ except the zero vectors V0 and V15 when the states of the N leg are determined. In a world, the switching states of the N leg just affect the zero sequence component of the three-phase output voltage, and A, B, and C legs determine the positive-sequence and negative-sequence components of the three-phase inverter output voltage. So the A, B, and C legs and zero-line leg can be separated and independently controlled.For theA, B, and C legs, the two-dimensional SVPWM control algorithm is used to generate 6 complementary PWM waves in the αβ coordinate to drive the A, B, and C legs of the inverter. Figure 5 shows the control diagram of the SVPWM control algorithm. The essence of control for the N leg is to control the switching states of Sn to make the neutral line current tracking the sum of three-phase load currents. Figure 6 shows the diagram of the control of the N leg based on triangle modulation strategy.Figure 5
Control diagram of the SVPWM.Figure 6
The diagram of the control of theN leg based on triangle modulation strategy.


## 5. Simulation and Experimental Analysis

### 5.1. Simulation Analysis

According to the above analysis, the simulation for the three-phase four-wire four-leg shunt APF is built in MATLAB/Simulink based on SVPWM and average current method. The Simulink simulation circuit is shown in Figure7. And the parameters of the simulation system are given in Table 2. Figure 8 shows the simulation waveforms of the load currents before compensation. The load currents and the source currents are the same without APF. Figure 9 shows the simulation waveforms of the source currents after compensation. It can be observed from Figure 9 that the response time for compensation is about 0.025 sec. Furthermore, the source currents of the phases of A, B, and C are balanced, and the current of phase N is improved obviously after compensation. Figure 10 shows the spectrum analysis of the current of phase A before and after compensation. Observed from Figure 10, the THD of the load current of the phase A are up to 33.38%, and the load current of phase A contains numerous harmonic waves (especially third and fifth harmonic current) without APF. But the THD of source current of phase A reduces to 3.05% with APF, which meet the IEEE-519 standard.Table 2
Simulation parameters.
Source, load voltage magnitude
380 V/50 Hz
Frequency of the main circuit
10 kHz
DC bus capacitor (C1 and C2)
9600 uF
Filter resistance (L1, L2)
0.3 mH, 0.05 mH
Filter capacitor (C)
80 uF
Damping resistance (Rd)
0.5Ω
Unbalanced nonlinear load
R
=
3 Ω, L=2 mH R1=2 Ω, L1=1.5 mHFigure 7
The Simulink simulation circuit for the three-phase four-wire four-leg APF.Figure 8
The load current waveforms before compensation.Figure 9
The source current waveforms after compensation.Figure 10
Harmonic spectrum analysis of phaseA before compensation and after compensation.
(a)
The %THD without APF
(b)
The %THD with APF


### 5.2. Experimental Results

To confirm the validity of theory analysis and simulation results of the proposed APF, we design the actual prototype. Control system adopts two-core processor TMS320F28335 for the function of exchanging data and real-time performances. What shown in Figure11 are the experimental waveforms of the power systems three-phase four-wire currents before and after compensation. Comparing Figure 9 with Figure 11(b), the current waveforms are very similar when the system is stable. Both of the simulation and experiment results show that the proposed method can suppress the harmonic and improve the current waveforms of the power system.Figure 11
The experimental waveforms before and after compensation.
(a)
Current waveforms on the load side before compensation
(b)
The source current waveforms after compensation


## 5.1. Simulation Analysis

According to the above analysis, the simulation for the three-phase four-wire four-leg shunt APF is built in MATLAB/Simulink based on SVPWM and average current method. The Simulink simulation circuit is shown in Figure7. And the parameters of the simulation system are given in Table 2. Figure 8 shows the simulation waveforms of the load currents before compensation. The load currents and the source currents are the same without APF. Figure 9 shows the simulation waveforms of the source currents after compensation. It can be observed from Figure 9 that the response time for compensation is about 0.025 sec. Furthermore, the source currents of the phases of A, B, and C are balanced, and the current of phase N is improved obviously after compensation. Figure 10 shows the spectrum analysis of the current of phase A before and after compensation. Observed from Figure 10, the THD of the load current of the phase A are up to 33.38%, and the load current of phase A contains numerous harmonic waves (especially third and fifth harmonic current) without APF. But the THD of source current of phase A reduces to 3.05% with APF, which meet the IEEE-519 standard.Table 2
Simulation parameters.
Source, load voltage magnitude
380 V/50 Hz
Frequency of the main circuit
10 kHz
DC bus capacitor (C1 and C2)
9600 uF
Filter resistance (L1, L2)
0.3 mH, 0.05 mH
Filter capacitor (C)
80 uF
Damping resistance (Rd)
0.5Ω
Unbalanced nonlinear load
R
=
3 Ω, L=2 mH R1=2 Ω, L1=1.5 mHFigure 7
The Simulink simulation circuit for the three-phase four-wire four-leg APF.Figure 8
The load current waveforms before compensation.Figure 9
The source current waveforms after compensation.Figure 10
Harmonic spectrum analysis of phaseA before compensation and after compensation.
(a)
The %THD without APF
(b)
The %THD with APF


## 5.2. Experimental Results

To confirm the validity of theory analysis and simulation results of the proposed APF, we design the actual prototype. Control system adopts two-core processor TMS320F28335 for the function of exchanging data and real-time performances. What shown in Figure11 are the experimental waveforms of the power systems three-phase four-wire currents before and after compensation. Comparing Figure 9 with Figure 11(b), the current waveforms are very similar when the system is stable. Both of the simulation and experiment results show that the proposed method can suppress the harmonic and improve the current waveforms of the power system.Figure 11
The experimental waveforms before and after compensation.
(a)
Current waveforms on the load side before compensation
(b)
The source current waveforms after compensation


## 6. Conclusion

The shunt APF is a kind of new electronic device, which is used to dynamically suppress the harmonic and compensate reactive power. This paper makes a brief description for the basic principle of the APF and proposes a novel control method for the three-phase four-wire four-leg APF based on SVPWM and average current method; then the MATLAB/Simulink simulation and experimental platform for the APF are built. Finally, the simulation and experimental results demonstrate effectively the effectiveness of the proposed method for APF; that is, the method can improve significantly electric energy quality. Concretely speaking, not only does the proposed method for the three-phase four-wire four-leg APF dynamically suppress the harmonic and compensate reactive power, but also it simplifies the calculation and has good performance in the engineering applications.



---

*Source: 528360-2015-03-16.xml*