2. Overview of active power filters for current and voltage compensation

Due to the power grid dynamics, an instantaneous or, at least, a quasi-instantaneous response of the active filters is desirable, which leads the use of time domain control algorithms together with synchronizing circuits. Hence, in this section, we exploit control algorithms to the seriesand shunt-active filters with simulation results.

#### 2.1. Control algorithms for shunt active filter

Basically, control algorithms for shunt active filters can be divided into a set of algorithms for determining the reference current and other algorithms for controlling the produced current by the VSI, which depends on the applied switching technique.

Algorithms for determining the reference current are related to which features we expect that the active filter be able to compensate. It is important to comment that control algorithms for shunt active filters have been proposed in the literature for more than 30 years. Among all these proposals, those derived from the instantaneous power theory [23–25], dq reference frame [26–28], conservative power theory [7], and the active and non-active currents [29–31] are widely applied.

The instantaneous power theory, or p-q theory, was emerged at the beginning of the 1980s, with the main purpose to provide new power definitions in time domain for three-phase threewire circuits and, in sequence for three-phase four-wire circuits. Based on the αβ0 system coordinates, the p-q theory has the advantage of instantaneously separating the homopolar (zero-sequence) from the nonhomopolar (positive- and negative-sequence) components [31]. This issue allowed new proposals on control algorithms to three-phase four-wire active filters. An enhanced version of the p-q theory, known as the p-q-r theory, was conceived based on a different coordinate translation, where voltages and currents are translated from αβ0 to p-q-r system coordinates [32, 33]. Another approach is the use of Park transformation with a synchronizing circuit (d-q coordinate system) to conceive control algorithms based on the dq reference frame. A comparison involving all of these algorithms for active power filters was introduced in [33].

A different methodology from the aforementioned corresponds to the active and non-active currents, which does not present any kind of coordinate translation. It derives from Fryze active current concept and presents a very simple formulation as introduced in [34]. Essentially, this algorithm determines the minimum (active) current component that transports the same energy of a generic three-phase load current. Due to its simplicity, we choose the control algorithms based on the active and non-active currents as basis to exploit the performance of the active filters, considering a power grid with unbalanced voltages and nonlinear loads.

Figure 4 presents a control algorithm for constant instantaneous active power concept, whereas Figure 5 for sinusoidal grid current concept, with the grid voltages (vSa, vSb, vSc) replaced by the control signals plla, pllb, pllc. These signals are unitary sinusoidal waveforms synchronized with the fundamental positive-sequence component of the grid voltages

present a sag compensation proposal through the combined operation of the series and shunt

Series active filter Harmonic and unbalanced voltages compensation

Shunt active filter Harmonic and unbalanced currents compensation

Voltage sags/swells compensation Improvement of the power grid stability

Power factor correction

2. Overview of active power filters for current and voltage compensation

Due to the power grid dynamics, an instantaneous or, at least, a quasi-instantaneous response of the active filters is desirable, which leads the use of time domain control algorithms together with synchronizing circuits. Hence, in this section, we exploit control algorithms to the series-

Basically, control algorithms for shunt active filters can be divided into a set of algorithms for determining the reference current and other algorithms for controlling the produced current

active filters for the maximum utilization of both active filters.

Figure 3. Simplified scheme of the unified power quality conditioner (UPQC).

Active filter Functionality

68 Power System Harmonics - Analysis, Effects and Mitigation Solutions for Power Quality Improvement

In next section, we exploit their control algorithms.

Table 1. UPQC functionalities.

and shunt-active filters with simulation results.

2.1. Control algorithms for shunt active filter

by the VSI, which depends on the applied switching technique.

Figure 4. Control algorithm based on the Fryze active currents for constant instantaneous active power concept.

Figure 5. Control algorithm based on the Fryze active currents for sinusoidal grid current concept.

(vSa, vSb, vSc), and they were obtained through a PLL circuit [35–38]. It is important to highlight that when sinusoidal grid currents are required, considering unbalanced or distorted grid voltages, a circuit capable to extract the fundamental positive-sequence component of the grid voltages must be added to the control algorithm of the active filter, independently of the chosen methodology.

Based on both control algorithms, one can see that the control signal pL presents different meanings. Indeed, for constant instantaneous power concept (Figure 4), pL derives from the active power of the grid, whereas for sinusoidal current concept (Figure 5), pL derives from the active power involving the fundamental positive-sequence component of the load currents only.

This issue can be better understood through the illustrated results in Figures 6 and 7. According to the simulation results in Figure 6, for providing constant active power, the compensated grid current still presents some harmonic components from the load current. It is important to comment that, according to the definitions proposed by Fryze, pgrid corresponds to the active power, whereas all the other components represent the non-active power. In this case study, there is only active power due to applied control algorithm.

On the other hand, as shown in Figure 7, the compensated current is sinusoidal even with a distorted grid voltage. Moreover, once the average component of qgrid is equal to zero, it is possible to affirm that the compensated current is in phase with the fundamental positivesequence component of the grid voltage. A negative aspect of this concept is the presence of oscillating components at pgrid and qgrid, which may compromise the performance of other equipment and devices connected to this power grid, where the active power corresponds to the average component of pgrid, with the remaining components representing the non-active power.

Particularly, for minimizing the involved costs of the active filter, one can consider selective harmonic filtering as a feasible possibility. In this case, the compensation of a few harmonic components, especially the lower harmonic orders (third and fifth harmonics, for instance), may result in the compensated grid current with a total harmonic distortion (THD) lower than

Figure 7. Simulation results with the control algorithm based on the sinusoidal grid current concept.

Figure 6. Simulation results with the control algorithm based on the constant active power concept.

New Trends in Active Power Filter for Modern Power Grids

http://dx.doi.org/10.5772/intechopen.72195

71

Figure 6. Simulation results with the control algorithm based on the constant active power concept.

(vSa, vSb, vSc), and they were obtained through a PLL circuit [35–38]. It is important to highlight that when sinusoidal grid currents are required, considering unbalanced or distorted grid voltages, a circuit capable to extract the fundamental positive-sequence component of the grid voltages must be added to the control algorithm of the active filter,

Figure 5. Control algorithm based on the Fryze active currents for sinusoidal grid current concept.

70 Power System Harmonics - Analysis, Effects and Mitigation Solutions for Power Quality Improvement

Based on both control algorithms, one can see that the control signal pL presents different meanings. Indeed, for constant instantaneous power concept (Figure 4), pL derives from the active power of the grid, whereas for sinusoidal current concept (Figure 5), pL derives from the active power involving the fundamental positive-sequence component of the load currents

This issue can be better understood through the illustrated results in Figures 6 and 7. According to the simulation results in Figure 6, for providing constant active power, the compensated grid current still presents some harmonic components from the load current. It is important to comment that, according to the definitions proposed by Fryze, pgrid corresponds to the active power, whereas all the other components represent the non-active power.

On the other hand, as shown in Figure 7, the compensated current is sinusoidal even with a distorted grid voltage. Moreover, once the average component of qgrid is equal to zero, it is possible to affirm that the compensated current is in phase with the fundamental positivesequence component of the grid voltage. A negative aspect of this concept is the presence of oscillating components at pgrid and qgrid, which may compromise the performance of other equipment and devices connected to this power grid, where the active power corresponds to the average component of pgrid, with the remaining components representing the non-active

Particularly, for minimizing the involved costs of the active filter, one can consider selective harmonic filtering as a feasible possibility. In this case, the compensation of a few harmonic components, especially the lower harmonic orders (third and fifth harmonics, for instance), may result in the compensated grid current with a total harmonic distortion (THD) lower than

In this case study, there is only active power due to applied control algorithm.

independently of the chosen methodology.

only.

power.

Figure 7. Simulation results with the control algorithm based on the sinusoidal grid current concept.

5%, which is acceptable for most of power quality norms and recommendations. Other possibility is to replace the compensation of a specific harmonic component by a harmonic symmetrical component, in case of unbalance load currents, as proposed in [39].

### 2.2. Control algorithms for series active filter

As depicted in Figure 8, the main control algorithms to the series active filter comprehend a PLL circuit, an algorithm to extract the fundamental positive-sequence component of the grid voltages, the DC-link voltage controller, and a damping algorithm. With these control algorithms, the series active filter is able to provide full compensation of harmonics and unbalanced components; and moreover, it is also capable to improve the power grid stability through the damping controller. In sequence, the algorithm for determining the positivesequence component of the grid voltages and the damping algorithm are exploited.

According to the block diagrams illustrated in Figure 9, one can see a similar methodology for determining the control signals, vS1 + \_a, vS1 + \_b, vS1 + \_c, when compared with the one applied for determining the reference currents of the shunt active filter, based on the sinusoidal grid current concept.

A preliminary result of the series active filter is illustrated in Figure 10. With the introduced control algorithms shown in Figure 8, the amplitude of the compensated grid voltage is slightly decreased. It occurs due to the amount of energy necessary for keeping the DC-link voltage regulated, which is directly related to the power losses of the VSI and the small passive filters as well.

As alternative to mitigate this problem, one can consider the addition of an algorithm to obtain a controlled voltage in quadrature with the control signals vS1+\_a, vS1+\_b, vS1+\_c. It is important to comment that these added voltages do not produce active power with the grid currents, and, consequently, they do not interfere on the flow of energy between the active filter with the power grid. A block diagram of this algorithm is shown in Figure 11, where the amplitude

Figure 8. Block diagrams of the control algorithms to the series active filter, with damping controller and DC-link voltage controller.

reference of the load voltages is compared with their aggregated value, being the amplitude of the controlled voltages determined by this algorithm. Furthermore, the control signals pllaq, pllbq, pllcq are determined through the PLL circuit, which are unitary sinusoidal waveforms

Figure 11. Block diagrams of the algorithm for determining controlled voltages in quadrature with the fundamental

Figure 10. Preliminary results of the series active filter (a) with the control algorithms introduced in Figure 8 and (b)

Figure 9. Block diagrams of the algorithm to determine the fundamental positive-sequence component of the grid

New Trends in Active Power Filter for Modern Power Grids

http://dx.doi.org/10.5772/intechopen.72195

73

adding an algorithm for compensating the drop voltage derived from the DC-link voltage controller.

leading the control signals plla, pllb, pllc by 90.

positive-sequence component of the grid voltages.

voltage.

5%, which is acceptable for most of power quality norms and recommendations. Other possibility is to replace the compensation of a specific harmonic component by a harmonic symmet-

As depicted in Figure 8, the main control algorithms to the series active filter comprehend a PLL circuit, an algorithm to extract the fundamental positive-sequence component of the grid voltages, the DC-link voltage controller, and a damping algorithm. With these control algorithms, the series active filter is able to provide full compensation of harmonics and unbalanced components; and moreover, it is also capable to improve the power grid stability through the damping controller. In sequence, the algorithm for determining the positive-

According to the block diagrams illustrated in Figure 9, one can see a similar methodology for determining the control signals, vS1 + \_a, vS1 + \_b, vS1 + \_c, when compared with the one applied for determining the reference currents of the shunt active filter, based on the sinusoidal grid

A preliminary result of the series active filter is illustrated in Figure 10. With the introduced control algorithms shown in Figure 8, the amplitude of the compensated grid voltage is slightly decreased. It occurs due to the amount of energy necessary for keeping the DC-link voltage regulated, which is directly related to the power losses of the VSI and the small passive

As alternative to mitigate this problem, one can consider the addition of an algorithm to obtain a controlled voltage in quadrature with the control signals vS1+\_a, vS1+\_b, vS1+\_c. It is important to comment that these added voltages do not produce active power with the grid currents, and, consequently, they do not interfere on the flow of energy between the active filter with the power grid. A block diagram of this algorithm is shown in Figure 11, where the amplitude

Figure 8. Block diagrams of the control algorithms to the series active filter, with damping controller and DC-link voltage

sequence component of the grid voltages and the damping algorithm are exploited.

rical component, in case of unbalance load currents, as proposed in [39].

72 Power System Harmonics - Analysis, Effects and Mitigation Solutions for Power Quality Improvement

2.2. Control algorithms for series active filter

current concept.

filters as well.

controller.

Figure 9. Block diagrams of the algorithm to determine the fundamental positive-sequence component of the grid voltage.

Figure 10. Preliminary results of the series active filter (a) with the control algorithms introduced in Figure 8 and (b) adding an algorithm for compensating the drop voltage derived from the DC-link voltage controller.

Figure 11. Block diagrams of the algorithm for determining controlled voltages in quadrature with the fundamental positive-sequence component of the grid voltages.

reference of the load voltages is compared with their aggregated value, being the amplitude of the controlled voltages determined by this algorithm. Furthermore, the control signals pllaq, pllbq, pllcq are determined through the PLL circuit, which are unitary sinusoidal waveforms leading the control signals plla, pllb, pllc by 90.

In case of adding tuned passive filters together with the series active filter, some constraints must be taken into account. In this topology, the passive filters provide a low impedance path to some of the harmonic components of the load currents, improving the performance of the series active filter. On the other hand, instability problems due to resonance phenomena involving the passive filters with the grid impedance may occur. An alternative to overcome this problem is to add the damping algorithm [29]. Through this algorithm, the series active filter produces a controlled voltage that behaves as a resistance to the harmonic currents that should be drawn by the passive filters.

Based on the block diagrams illustrated in Figure 12, the damping voltages (vSha, vShb, vShc) results from the direct product involving the non-active components of the grid currents (iSha, iShb, iShc) with the controlled signal Rh that can be understood as a controlled resistance to the non-active currents. Nevertheless, note that Rh must be designed for providing a controlled resistance to the non-active currents only. Otherwise it may compromise the flow of the active component of the grid current.

In sequence, we provide simulation results from a test case of the series active filter combined with shunt passive filters, as shown in Figure 13. The nonlinear load corresponds to the six-pulse thyristor bridge rectifier and the passive filters comprehend two selective passive filters at fifth and seventh harmonics, plus a passive filter for high-order harmonics. In this test case, while the active filter was turned OFF, there was a resonance among the passive filters with the grid impedance with some undesirable effects as, for example, distorted grid voltages (Figure 13a). When the active was turned ON, the resonance was damped in a time period lower than one cycle period (Figure 13b), with the active filter providing a controlled resistance to the non-active components of the grid current and, as a consequence, the active and passive filters presented a better performance as illustrated in Figure 13c and d, respectively. In this test case, at steady state, the THD of the grid currents decreased from 35% to less than 5%, which is acceptable by most of recommendations and norms related to power quality indexes.

## 2.3. Control algorithms for unified power quality conditioner

Essentially, the UPQC control algorithms combine those from the series and the shunt active filters with simplifications. Indeed, as illustrated in Figure 14, the UPQC control algorithms

comprehend the control algorithms of the shunt active filter, with a PLL circuit and the damping algorithm. The reference voltages are determined from a combination involving the

Figure 13. Simulation results of the series active filter combined with shunt passive filters; (a) load voltages with the active filter turned OFF, (b) grid and load currents at the transient when the active filter is turned ON, (c) load voltages with the active filter turned on under steady state, and (d) grid currents with the active filter turned on under steady state.

New Trends in Active Power Filter for Modern Power Grids

http://dx.doi.org/10.5772/intechopen.72195

75

Note that the algorithm to determine the fundamental positive sequence of the grid voltages was removed, with their outputs replaced by the PLL output signals. Indeed, if the measured system voltage is normalized such that an unity amplitude represents its nominal value, this normalized voltage signal can be directly compared with the PLL output to achieve the compensating voltage references. In this case, the difference between the PLL outputs and the

grid voltages and the output signals of the damping algorithm and the PLL circuit.

Figure 14. Block diagrams of the unified power quality conditioner.

Figure 12. Block diagrams of the damping algorithm.

New Trends in Active Power Filter for Modern Power Grids http://dx.doi.org/10.5772/intechopen.72195 75

Figure 13. Simulation results of the series active filter combined with shunt passive filters; (a) load voltages with the active filter turned OFF, (b) grid and load currents at the transient when the active filter is turned ON, (c) load voltages with the active filter turned on under steady state, and (d) grid currents with the active filter turned on under steady state.

Figure 14. Block diagrams of the unified power quality conditioner.

In case of adding tuned passive filters together with the series active filter, some constraints must be taken into account. In this topology, the passive filters provide a low impedance path to some of the harmonic components of the load currents, improving the performance of the series active filter. On the other hand, instability problems due to resonance phenomena involving the passive filters with the grid impedance may occur. An alternative to overcome this problem is to add the damping algorithm [29]. Through this algorithm, the series active filter produces a controlled voltage that behaves as a resistance to the harmonic currents that

74 Power System Harmonics - Analysis, Effects and Mitigation Solutions for Power Quality Improvement

Based on the block diagrams illustrated in Figure 12, the damping voltages (vSha, vShb, vShc) results from the direct product involving the non-active components of the grid currents (iSha, iShb, iShc) with the controlled signal Rh that can be understood as a controlled resistance to the non-active currents. Nevertheless, note that Rh must be designed for providing a controlled resistance to the non-active currents only. Otherwise it may compromise the flow of the active

In sequence, we provide simulation results from a test case of the series active filter combined with shunt passive filters, as shown in Figure 13. The nonlinear load corresponds to the six-pulse thyristor bridge rectifier and the passive filters comprehend two selective passive filters at fifth and seventh harmonics, plus a passive filter for high-order harmonics. In this test case, while the active filter was turned OFF, there was a resonance among the passive filters with the grid impedance with some undesirable effects as, for example, distorted grid voltages (Figure 13a). When the active was turned ON, the resonance was damped in a time period lower than one cycle period (Figure 13b), with the active filter providing a controlled resistance to the non-active components of the grid current and, as a consequence, the active and passive filters presented a better performance as illustrated in Figure 13c and d, respectively. In this test case, at steady state, the THD of the grid currents decreased from 35% to less than 5%, which is acceptable by

Essentially, the UPQC control algorithms combine those from the series and the shunt active filters with simplifications. Indeed, as illustrated in Figure 14, the UPQC control algorithms

most of recommendations and norms related to power quality indexes.

2.3. Control algorithms for unified power quality conditioner

Figure 12. Block diagrams of the damping algorithm.

should be drawn by the passive filters.

component of the grid current.

comprehend the control algorithms of the shunt active filter, with a PLL circuit and the damping algorithm. The reference voltages are determined from a combination involving the grid voltages and the output signals of the damping algorithm and the PLL circuit.

Note that the algorithm to determine the fundamental positive sequence of the grid voltages was removed, with their outputs replaced by the PLL output signals. Indeed, if the measured system voltage is normalized such that an unity amplitude represents its nominal value, this normalized voltage signal can be directly compared with the PLL output to achieve the compensating voltage references. In this case, the difference between the PLL outputs and the

normalized voltages includes also sags or swells, as well as imbalances and distortions, which may be affecting the grid voltages.

Basically, to cover the power losses of the UPQC converters and the compensation of voltage sag or voltage swell, the shunt active filter produces a controlled current to keep the DC-link voltage regulated, with the amplitude of the grid currents being dynamically modified according to the UPQC power losses and the short duration voltage variations (SDVVs) compensated the series active filter as well.

Simulation results exploiting the UPQC compensation capabilities are shown in Figures 15 and 16. The nonlinear load corresponds to the 12-pulse thyristor bridge rectifier, and an unbalanced load was connected and removed from the power grid. One can see the capability of the shunt active filter compensating the harmonic and unbalance components of the load currents, with the compensated grid currents with low harmonic distortion (THD lower than 3%) and balanced. There is a dynamics at the amplitude of the grid currents due to the lowpass filter and the DC-link voltage controller as well. Based on the acquired results, it has taken more than 100 ms to the grid currents to reach their novel steady-state condition when a transient at the load current has occurred.

Figure 16 illustrates the performance of series active filter compensating harmonic and unbalanced components at the grid voltage and a voltage sag occurrence. It can be noted a faster dynamic response of the series active filter, in comparison with the shunt active filter, once the series active filter is not affected by the DC-link voltage dynamics, enabling a quasiinstantaneous capability for transient compensation as shown in Figure 16b and d. In this section, we could verify the capability of the active filters for compensating most of the power quality problems. Nevertheless, there is another feature of them considered to be as interface for renewable energy sources, particularly, to the photovoltaic panels and wind systems as

Figure 16. Simulation results of the UPQC series converter: (a) distorted grid voltages at the time transient when they become unbalanced; (b) compensated load voltages at the transient when the distorted grid voltages become unbalanced; (c) distorted and unbalanced grid voltages at the transient when a voltage sag occurs; (d) compensated load voltages at

New Trends in Active Power Filter for Modern Power Grids

http://dx.doi.org/10.5772/intechopen.72195

77

extremely diffused in the literature. This issue is exploited in the next section.

the transient when a voltage sag occurs.

3. Integrating active power filters with renewable energy sources

Researches on high-performance power electronic converters combined with renewable energy sources (RENs) capable to extract more energy at a lower cost leads this technology to become technically and economically feasible to meet all the global energy needs. Encompassed by this course of events, there is a novel tendency for replacing the conventional centralized generation systems, with long transmission lines, to the distributed generation (DG) systems. In this novel concept on DG systems, renewable energy sources and storage

Figure 15. Simulation results of the UPQC shunt converter: (a) distorted load currents at the time transient when the unbalanced load was connected; (b) compensated grid currents at the transient when the unbalance load was connected; (c) distorted load currents at the transient when the unbalanced load was removed; and (d) compensated grid-currents at the transient when the unbalanced load was removed.

normalized voltages includes also sags or swells, as well as imbalances and distortions, which

76 Power System Harmonics - Analysis, Effects and Mitigation Solutions for Power Quality Improvement

Basically, to cover the power losses of the UPQC converters and the compensation of voltage sag or voltage swell, the shunt active filter produces a controlled current to keep the DC-link voltage regulated, with the amplitude of the grid currents being dynamically modified according to the UPQC power losses and the short duration voltage variations (SDVVs)

Simulation results exploiting the UPQC compensation capabilities are shown in Figures 15 and 16. The nonlinear load corresponds to the 12-pulse thyristor bridge rectifier, and an unbalanced load was connected and removed from the power grid. One can see the capability of the shunt active filter compensating the harmonic and unbalance components of the load currents, with the compensated grid currents with low harmonic distortion (THD lower than 3%) and balanced. There is a dynamics at the amplitude of the grid currents due to the lowpass filter and the DC-link voltage controller as well. Based on the acquired results, it has taken more than 100 ms to the grid currents to reach their novel steady-state condition when a

Figure 15. Simulation results of the UPQC shunt converter: (a) distorted load currents at the time transient when the unbalanced load was connected; (b) compensated grid currents at the transient when the unbalance load was connected; (c) distorted load currents at the transient when the unbalanced load was removed; and (d) compensated grid-currents at

may be affecting the grid voltages.

compensated the series active filter as well.

transient at the load current has occurred.

the transient when the unbalanced load was removed.

Figure 16. Simulation results of the UPQC series converter: (a) distorted grid voltages at the time transient when they become unbalanced; (b) compensated load voltages at the transient when the distorted grid voltages become unbalanced; (c) distorted and unbalanced grid voltages at the transient when a voltage sag occurs; (d) compensated load voltages at the transient when a voltage sag occurs.

Figure 16 illustrates the performance of series active filter compensating harmonic and unbalanced components at the grid voltage and a voltage sag occurrence. It can be noted a faster dynamic response of the series active filter, in comparison with the shunt active filter, once the series active filter is not affected by the DC-link voltage dynamics, enabling a quasiinstantaneous capability for transient compensation as shown in Figure 16b and d. In this section, we could verify the capability of the active filters for compensating most of the power quality problems. Nevertheless, there is another feature of them considered to be as interface for renewable energy sources, particularly, to the photovoltaic panels and wind systems as extremely diffused in the literature. This issue is exploited in the next section.
