1 Introduction

The broadness of static converters in industrial activities and public consumers leads to an increase in harmonic injection in the network and a lower power factor. This causes various problems in power systems and in domestic appliances such as equipment overheating, capacitor blowing, motor vibration, excessive neutral currents and low power factor. Active power filter involving two levels voltage source inverters have been widely studied and used to eliminate harmonics and compensate reactive power (Akagi 1994). Due to power handling capabilities of power semiconductors, these active power filters are limited in medium power applications. Then hybrid topologies have been proposed to achieve high power filters (Chiang et al. 2005; Wanfang et al. 2003). The interest in using multilevel inverters for high power drives, reactive power and harmonics compensation has increased (Vodyakho et al. 2008). Multilevel pulse width modulation inverters can be used as active power filter for high power applications solving the problem of power semiconductor limitation. The use of neutral-point-clamped (NPC) inverters allows equal voltage shearing of the series connected semiconductors in each phase.

The performances of different reference current generation strategies under balanced, sinusoidal, alternating current (AC) voltages conditions (Chang and Yeh 2005; Montero et al. 2007), such as the so-called p–q theory and synchronous reference frame theory (SRF) which provide similar performances. Differences arise when one works under distorted and/or unbalanced AC voltages which is the case in real conditions, where the mains voltages are distorted that decreases filter performances (Green and Marks 2005). Under such conditions, control of the four-leg APF using the p–q theory does not provide good performance. In this paper, the reference current generation for shunt active power filter control under unbalanced non-linear load and distorted voltage conditions is essentially based on the use of self-tuning filters (STF). The STF is used to extract the fundamental component directly from electrical signals (distorted voltage and current) in α–β reference frame power filter under distorted voltage conditions (Abdusalama et al. 2009). The major advantages of the STF are cited hereby:

  • Operate efficiently under steady state and transient condition;

  • No phase delay and unity gain at the fundamental frequency;

  • No PLL required;

  • Easy to implement in digital or analog control system.

The controller is the main part of the active power filter operation and has been a subject of many researches in recent years (Hamadi et al. 2004; Bhat and Agarwal 2007). Conventional PI voltage and current controllers have been used to control the harmonic current and DC voltage of the shunt APF. However, they requires precise linear mathematical model of the system, which is difficult to achieve under parameter variations, non linearity and load disturbances. These limitations are overridden by using fuzzy logic technics. In this case, fuzzy logic control schemes are proposed for harmonic current and inverter DC voltage control to improve the performances of the four-leg five-level shunt APF. The performance of fuzzy controller and reference current generation strategy (STF) are evaluated through computer simulations under unbalanced non-linear load and distorted voltage conditions.

The following are used to improve the performances of the shunt APF:

  • Five level APF taking advantages of the multilevel inverter such as low harmonic distortion and reduced switching losses and solving the problem of power semiconductor limitation in high power application.

  • Self-tuning filters to extract the fundamental component.

  • Fuzzy logic control for harmonic current and inverter DC voltage control.

2 System configuration

Figure 1, presents the shunt active filter topology based on a three-phase four-leg voltage source inverter, using IGBT switches, connected in parallel with the AC three-phase four-wire system through four inductors. The capacitors are used in the DC side to smooth the DC terminal voltage. Three-phase thyristor rectifier and 1-phase diode rectifier non-linear loads are connected to the power system, in order to produce an unbalance, harmonic and reactive current in the phase currents and zero-sequence harmonics in the neutral current. The structure in Fig. 1, describes this shunt APF based on a three-phase four-leg five-level VSI.

Fig. 1
figure 1

Power system configuration

In order to produce an inverter (active filter) of N levels, N − 1 capacitors are required. The voltage across each capacitor is equal to \( {{v_{dc} } \mathord{\left/ {\vphantom {{v_{dc} } {(N - 1)}}} \right. \kern-0pt} {(N - 1)}} \), \( v_{dc} \) is the total voltage of the DC source. Each couple of switches (T11, T15) form a cell of commutation, the two switches are ordered in a complementary way.

The inverter provides five voltage levels according to Eq. (1):

$$ v_{io} = k_{i} \frac{{v_{dc} }}{2} $$
(1)

where, \( v_{io} \) is the phase-to-middle fictive point voltage, \( k_{i} \) is the switching state variable (\( k_{i} \) = 1, 1/2, 0, −1/2, −1), \( v_{dc} \) is the total voltage of the DC source, and \( i \) is the phase index (\( i \) = a, b and c). The five voltage values are shown in Table 1 (\( {{v_{dc} } \mathord{\left/ {\vphantom {{v_{dc} } 2}} \right. \kern-0pt} 2} \), \( {{v_{dc} } \mathord{\left/ {\vphantom {{v_{dc} } 4}} \right. \kern-0pt} 4} \), 0, \( {{ - v_{dc} } \mathord{\left/ {\vphantom {{ - v_{dc} } 4}} \right. \kern-0pt} 4} \), \( {{ - v_{dc} } \mathord{\left/ {\vphantom {{ - v_{dc} } 2}} \right. \kern-0pt} 2} \)).

Table 1 Voltage states of one five-level phase leg

3 Reference current calculation

3.1 Self tuning filter

Hong-Scok Song, had presented in his PhD work how recovered the equivalent transfer function of the integration in the synchronous references frame «SRF» expressed by the equation (Hong-Scok 2001):

$$ v_{xy} (t) = e^{jwt} \int {e^{ - jwt} u_{xy} (t)dt} $$
(2)

where \( u_{xy} \) and \( v_{xy} \) are the instantaneous signals, respectively before and after integration in the synchronous reference frame. The previous equation can be expressed by the following transfer function after Laplace transformation.

$$ H(s) = \frac{{v_{xy} (s)}}{{u_{xy} (s)}} = \frac{s + jw}{{s^{2} + w^{2} }} $$
(3)

We think of introducing a constant \( k \) in the transfer function \( H(s) \), to obtain a STF with a cut-off frequency \( w_{c} \) so the previous transfer function \( H(s) \) becomes:

$$ H(s) = \frac{{v_{xy} (s)}}{{u_{xy} (s)}} = \frac{{(s + k) + jw_{c} }}{{(s + k)^{2} + w_{c}^{2} }} $$
(4)

By replacing the input signals \( u_{xy} (s) \) by \( x_{\alpha \beta } (s) \) and the output signals \( v_{xy} (s) \) by \( \mathop x\limits^{ \wedge }_{\alpha \beta } (s) \), the following expressions can be obtained:

$$ \hat{x}_{\alpha } (s) = \frac{k}{s}\left[ {x_{\alpha } (s) - \hat{x}_{\alpha } (s)} \right] - \frac{{w_{c} }}{s}\hat{x}_{\beta } (s) $$
(5)
$$ \hat{x}_{\beta } (s) = \frac{k}{s}\left[ {x_{\beta } (s) - \hat{x}_{\beta } (s)} \right] - \frac{{w_{c} }}{s}\hat{x}_{\alpha } (s) $$
(6)

The block diagram of the STF tuned at the pulsation \( w_{c} \) is depicted in Figs. 2 and 3, shows the frequency response of the STF versus different values of the parameter \( k \) for \( f_{c} \) = 60 Hz. One can notice that no displacement is introduced by this filter at the system pulsation. One can see that small value of \( k \) increases filter selectivity. Thus, by using a STF, the fundamental component can be extracted from distorted electrical signals (voltage or current) without any phase delay and amplitude changing.

Fig. 2
figure 2

Self-tuning filter tuned to the pulsation w c

Fig. 3
figure 3

Self-Bode diagram for the STF versus pulsation for different values of the parameter k (f c = 60 Hz)

3.2 Harmonic isolator

The load currents,\( i_{La} \), \( i_{Lb} \) and \( i_{Lc} \) of the three-phase four-wire system are transformed into the α–β axis (Fig. 4) as follows:

Fig. 4
figure 4

Block diagram of the STF-based harmonic isolator

$$ \left[ {\begin{array}{*{20}c} {i_{0} } \\ {i_{\alpha } } \\ {i_{\beta } } \\ \end{array} } \right] = \sqrt {\frac{2}{3}} \left[ {\begin{array}{*{20}c} {1/\sqrt {2} } & {1/\sqrt {2} } & {1/\sqrt {2}} \\ 1 & { - 1/2} & { - 1/2} \\ 0 & {\sqrt {3 /2}} & { - \sqrt {3 /2}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{La} } \\ {i_{Lb} } \\ {i_{Lc} } \\ \end{array} } \right] $$
(7)

As known, the currents in the α–β axis can be respectively decomposed into DC and AC components by:

$$ i_{\alpha } = \hat{i}_{\alpha } + \tilde{i}_{\alpha } $$
(8)
$$ i_{\beta } = \hat{i}_{\beta } + \tilde{i}_{\beta } $$
(9)

Then, the STF extracts the fundamental components at the pulsation \( w_{c} \) directly from the currents in the α–β axis. After that, the α–β harmonic components of the load currents are computed by subtracting the STF input signals from the corresponding outputs (Fig. 4). The resulting signals are the AC components, \( \tilde{i}_{\alpha } \) and \( \tilde{i}_{\beta } \), which correspond to the harmonic components of the load currents \( i_{La} \), \( i_{Lb} \) and \( i_{Lc} \) in the stationary reference frame.

For the source voltage, the three voltages \( v_{sa} \), \( v_{sb} \) and \( v_{sc} \) are transformed to the α–β reference frame as follows:

$$ \left[ {\begin{array}{*{20}c} {v_{0} } \\ {v_{\alpha } } \\ {v_{\beta } } \\ \end{array} } \right] = \sqrt{\frac{2}{3}} \left[ {\begin{array}{*{20}c} {1/\sqrt {2}} & {1/\sqrt {2}} & {1/\sqrt {2}} \\ 1 & { - 1/2} & { - 1/2} \\ 0 & {\sqrt {3 /2}} & { - \sqrt {3 /2}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {v_{sa} } \\ {v_{sb} } \\ {v_{sc} } \\ \end{array} } \right] $$
(10)

Then, we applied self-tuning filtering to these α–β voltage components. This filter allows suppressing of any harmonic component of the distorted mains voltages and consequently leads to improve the harmonic isolator performance.

After computation of the fundamental component \( \hat{v}_{\alpha \beta } \) and the harmonic currents \( \tilde{i}_{\alpha \beta } \), we calculate the \( p \), \( q \) and \( p_{0} \) powers as follows (Afonso et al. 2000):

$$ p = i_{\alpha } \hat{v}_{\alpha } + i_{\beta } \hat{v}_{\beta } \,\left( {\text{Instantaneous active power}} \right) $$
(11)
$$ q = i_{\beta } \hat{v}_{\alpha } - i_{\alpha } \hat{v}_{\beta } \,\left( {\text{Instantaneous reactive power}} \right) $$
(12)
$$ p_{0} = v_{0} i_{0} \;\left( {{\text{Instantaneous zero}} - {\text{sequence power}}} \right) $$
(13)

where

$$ p = \hat{p} + \tilde{p} $$
(14)
$$ q = \hat{q} + \tilde{q} $$
(15)
$$ p_{0} = \hat{p}_{0} + \tilde{p}_{0} $$
(16)

with \( \hat{p} \), \( \hat{q} \) and \( \hat{p}_{0} \): fundamental components, \( \tilde{p} \), \( \tilde{q} \) and \( \tilde{p}_{0} \): alternative components.

The power components \( \tilde{p} \) and \( \tilde{q} \) related to the same α–β voltages and currents can be written as follows:

$$ \left[ {\begin{array}{*{20}c} {\tilde{p}} \\ {\tilde{q}} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\hat{v}_{\alpha } } & {\hat{v}_{\beta } } \\ { - \hat{v}_{\beta } } & {\hat{v}_{\alpha } } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\tilde{i}_{\alpha } } \\ {\tilde{i}_{\beta } } \\ \end{array} } \right] $$
(17)

To calculate the reference compensation currents in the α–β coordinates, the expression (17) is inverted, and the powers to be compensated ((\( \tilde{p} \) − \( \hat{p}_{0} \)) and \( q \)) are used.

After adding the active power required for regulating DC bus voltage, \( p_{c} \), to the alternative component of the instantaneous real power \( \tilde{p} \) (Fig. 4).

The current references in the α–β reference frame,\( i_{\alpha \beta 0}^{ * } \), are calculated by:

$$ i_{\alpha }^{ * } = \frac{{\hat{v}_{\alpha } }}{{\hat{v}_{\alpha }^{2} + \hat{v}_{\beta }^{2} }}(\tilde{p} + p_{c} - \hat{p}_{0} ) - \frac{{\hat{v}_{\beta } }}{{\hat{v}_{\alpha }^{2} + \hat{v}_{\beta }^{2} }}q $$
(18)
$$ i_{\beta }^{ * } = \frac{{\hat{v}_{\beta } }}{{\hat{v}_{\alpha }^{2} + \hat{v}_{\beta }^{2} }}(\tilde{p} + p_{c} - \hat{p}_{0} ) + \frac{{\hat{v}_{\alpha } }}{{\hat{v}_{\alpha }^{2} + \hat{v}_{\beta }^{2} }}q $$
(19)
$$ i_{0}^{ * } = i_{0} $$
(20)

Then, the filter reference currents in the a–b–c coordinates are defined by:

$$ \left[ {\begin{array}{*{20}c} {i_{fa}^{ * } } \\ {i_{fb}^{ * } } \\ {i_{fc}^{ * } } \\ \end{array} } \right] = \sqrt {\frac{2}{3}} \left[ {\begin{array}{*{20}c} {1/\sqrt {2}} & 1 & 0 \\ {1/\sqrt {2}} & { - 1/2} & {\sqrt 3 /2} \\ {1/\sqrt {2} } & { - 1/2} & { - \sqrt {3 /2}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {i_{0}^{ * } } \\ {i_{\alpha }^{ * } } \\ {i_{\beta }^{ * } } \\ \end{array} } \right] $$
(21)
$$ i_{fn}^{ * } = - (i_{fa}^{ * } + i_{fb}^{ * } + i_{fc}^{ * } ) $$
(22)

The block diagram of the STF-based harmonic isolator is shown in Fig. 4.

4 Inverter control using phase distortion PWM

This control implements a fuzzy logic controller which starts from the difference between the injected current (active filter current) and the reference current (identified current) that determines the reference voltage of the inverter (modulating wave). This standard reference voltage is compared with four carrying triangular identical waves.

These carrier waves have the same frequency and are arranged on top of each other, with no phase shift, so that they together span from maximum output voltage to minimum output voltage (McGrath and Holmes 2002; Jouanne et al. 2002).

The switching states of one five-level phase leg are summarized in Table 2:

Table 2 Switching states of one five-level phase leg

General block diagram of currents control is illustrated in Fig. 5.

Fig. 5
figure 5

PWM block diagram of currents control

5 Fuzzy logic control application

The synoptic scheme of Fig. 6, shows a fuzzy controller, which possesses two inputs and one output. The inputs are namely the error (e), which is the difference between the reference current(harmonic current) and the active filter current (injected current) (e = iref − if) and its derivative (de) while the output is the command (cde).

Fig. 6
figure 6

Fuzzy controller synoptic diagram

6 Active power filter current control

The objective is to get sinusoidal source currents in phase with the supply voltages. This consists on replacing the conventional controllers by fuzzy logic controllers (Saad et al. 2008). Characteristics of the fuzzy control used in this work are:

  • Three fuzzy sets for each input (e, de) with Gaussian membership functions,

  • Five fuzzy sets for the output with triangular membership functions,

  • Implications using the ‘minimum’ operator, inference mechanism based on fuzzy implication containing five fuzzy rules,

  • Defuzzyfication using the ‘centroïd’ method.

The establishment of the fuzzy rules is based on the error (e) sign, variation and knowing that (e) is increasing if its derivative (de) is positive, constant if (de) is equal to zero, decreasing if (de) is negative, positive if (iref > if), zero if (iref = if), and negative if (iref < if), fuzzy rules are summarized as following:

  • If (e) is zero (Z), then (cde) is zero (Z).

  • If (e) is positive (P), then (cde) is large positive (LP).

  • If (e) is negative (N), then (cde) is large negative (LN).

  • If (e) is zero (Z) and (de) is positive (P), then (cde) is negative (N).

  • If (e) is zero (Z) and (de) is negative (N), then (cde) is positive (P).

7 DC capacitors voltages stabilization

In this section, a DC link voltages stabilization system is introduced to balance the four DC input voltages, avoid NP potential drift and improve the performances of the five level active power filters. The structure of the bridge balancing is shown in Fig. 7. If the voltage \( u_{Cx} \) gets higher then an impose reference \( u_{Cref} \) (200 V), the transistor Tx is opened to slow down the charging of Cx. The transistors are controlled as follows:

Fig. 7
figure 7

Structure of the bridge balancing

\( u_{Cx} - u_{Cref} = \Updelta_{x} \) with \( x = 1,2,3,4 \)

If \( \Updelta_{x} > 0 \) then \( F_{x} = 1 \) with \( i_{rx} = F_{x} \frac{{u_{Cx} }}{{R_{x} }} \)

else \( F_{x} = 0 \)

8 DC capacitor voltage control

In this application, the fuzzy control algorithm is implemented to control the DC capacitor inverter voltage based on DC voltage error e(t) processing and its variation Δe(t) in order to improve the dynamic performance of APF and reduce the total harmonic source current distortion.

In the design of a fuzzy control system, the formulation of its rule set plays a key role in improving the system performance. The rule table contains 49 rules as shown in Table 3, where (LP, MP, SP, ZE, LN, MN, and SN) are linguistic codes (LP: large positive; MP: medium positive; SP: small positive; ZE: zero; LN: large negative; MN: medium negative; SN: small negative).

Table 3 Fuzzy control rule table

9 Simulation model

Simulation is performed using system parameters presented in Table 4.

Table 4 Simulation parameters

10 Results and discussions

Harmonic current filtering, reactive power compensation, load current balancing and neutral current elimination performance of four-leg, five-level APF with the proposed method theory have been examined under unbalanced non-linear load, distorted voltage conditions. Three-phase thyristor rectifier non-linear loads and 1-phase diode rectifier non-linear loads are connected to the power system, in order to produce an unbalance, harmonic and reactive current in the phase currents and zero-sequence harmonics in the neutral current. In order to evaluate the dynamic performance of the four-leg, five-level APF, at 0.2 s, a single-phase diode bridge rectifier load is connected to phase “b”. The comprehensive simulation results are discussed below.

The resulting switching signals shown in Fig. 8, illustrates a low frequency commutation process showing, thus, advantages of the multilevel inverter. Figure 9, illustrates that the supply voltage is not sinusoidal and includes a 5th harmonic component (THD = 11.10 %). The total harmonic distortion (THD) of the load current (supply current without filter) is equal to 21.84 % (Fig. 10).

Fig. 8
figure 8

Switching pulses of APF arms

Fig. 9
figure 9

Supply voltage Vsa waveform

Fig. 10
figure 10

Supply current Is waveform without filtering

Figure 11, the THD of the supply current with the proposed method under this condition is equal to 1.45 % after filtering.

Fig. 11
figure 11

Proposed method supply current Isa waveform with filter

The neutral current elimination is successfully done with the proposed control as shown in Fig. 12.

Fig. 12
figure 12

Neutral current elimination

The unbalanced non-linear load and distorted voltage conditions in a three-phase four-wire power system will not affect the four-leg, five-level APF performance with proposed method.

The proposed harmonic isolation and fuzzy control schemes allows harmonic currents and reactive power compensation simultaneously under unbalanced non-linear load and distorted voltage conditions, the obtained current and voltage waveforms are in phase as illustrated in Fig. 13.

Fig. 13
figure 13

Power factor correction Vsa, Isa

Five-level shunt active power filter performances are related to current references quality, self tuning filters theory is used for harmonic currents identification and calculation, the obtained current is shown in Fig. 14. The line to line output voltage Vab is shown in Fig. 15.

Fig. 14
figure 14

Active filter current Ifa

Fig. 15
figure 15

APF output voltage Vab for a five-level with PDPWM

The five level active filter with the proposed harmonic isolation and fuzzy control schemes has imposed a sinusoidal source current wave form as illustrated in Fig. 13, and a constant and ripple free DC voltage in Fig. 16.

Fig. 16
figure 16

DC voltage Vdc

Figures 17, 18, 19 and 20 shown the different voltages obtained by using the stabilization bridge. We can see that the output voltages of the DC side of the five level active filter (u c1, u c2, u c3, u c4) stabilize around 200 V.

Fig. 17
figure 17

DC voltage u c1

Fig. 18
figure 18

DC voltage u c2

Fig. 19
figure 19

DC voltage u c3

Fig. 20
figure 20

DC voltage u c4

Harmonic current suppression and load current balancing simulation results with proposed method for the four-leg, five-level APF under unbalanced non-linear load and distorted voltage conditions are shown in Fig. 21. The three-phase compensated source currents with the proposed method are balanced and sinusoidal as shown in Fig. 21c.

Fig. 21
figure 21

ac Harmonic currents filtering under unbalanced load-distorted voltage conditions

11 Conclusion

In this paper, five level shunt APF, STF for the reference current generation and a fuzzy logic control for harmonic current and inverter DC voltage control have been proposed to improve the performances of the four-leg five-level shunt APF under unbalanced non-linear load and distorted voltage conditions.

The simulation results prove that the following objectives have been successfully achieved even if under unbalanced load and distorted voltage conditions.

  • Current harmonics filtering;

  • Reactive power compensation;

  • Load current balancing;

  • Elimination of excessive neutral current;

  • High performance under both dynamic and steady state operation.

The five-level APF provides numerous advantages such as improvement of supply current waveform, less harmonic distortion and possibilities to use it in high power applications.

The use of the self-tuning filter leads to satisfactory improvements since it perfectly extracts the harmonic currents under distorted conditions.

With fuzzy logic control, the active filter can be adapted easily to other more severe constraints, such as unbalanced conditions.

The obtained results show that, the proposed five level four leg shunt active power filter with fuzzy controller and current generation strategy (STF) suppress successfully harmonic current, compensate reactive power and neutral line current and balance the load currents under unbalanced non-linear load and distorted voltage conditions.