Active Power Conditioners to Mitigate Power Quality Problems in Industrial Facilities

Non-linear loads are commonly present in industrial facilities, service facilities, office build‐ ings, and even in our homes. They are the source of several Power Quality problems such as harmonics, reactive power, flicker and resonance [1-3]. Therefore, it can be observed an in‐ creasing deterioration of the electrical power grid voltage and current waveforms, mainly due to the contamination of the system currents with harmonics of various orders, including inter-harmonics. Harmonic currents circulating through the line impedance produces distor‐ tion in the system voltages (see Figure 1). Moreover, since many of the loads connected to the electrical systems are single-phase ones, voltage unbalance is also very common in threephase power systems [2]. The distortion and unbalance of the system voltages causes several power quality problems, including the incorrect operation of some sensitive loads [4,5]. Fig‐ ure 1 presents a power system with sinusoidal source voltage (vS ) operating with a linear and a non-linear load. The current of the non-linear load (iL1) contains harmonics. The har‐ monics in the line-current (iS) produce a non-linear voltage drop (∆v) in the line impedance, which distorts the load voltage (vL ). Since the load voltage is distorted, even the current at the linear load (iL2) becomes non-sinusoidal.


Introduction
Non-linear loads are commonly present in industrial facilities, service facilities, office buildings, and even in our homes.They are the source of several Power Quality problems such as harmonics, reactive power, flicker and resonance [1][2][3].Therefore, it can be observed an increasing deterioration of the electrical power grid voltage and current waveforms, mainly due to the contamination of the system currents with harmonics of various orders, including inter-harmonics.Harmonic currents circulating through the line impedance produces distortion in the system voltages (see Figure 1).Moreover, since many of the loads connected to the electrical systems are single-phase ones, voltage unbalance is also very common in threephase power systems [2].The distortion and unbalance of the system voltages causes several power quality problems, including the incorrect operation of some sensitive loads [4,5].Figure 1 presents a power system with sinusoidal source voltage (v S ) operating with a linear and a non-linear load.The current of the non-linear load (i L1 ) contains harmonics.The harmonics in the line-current (i S ) produce a non-linear voltage drop ( ∆ v) in the line impedance, which distorts the load voltage (v L ).Since the load voltage is distorted, even the current at the linear load (i L2 ) becomes non-sinusoidal.
The problems caused by the presence of harmonics in the power lines can be classified into two kinds: instantaneous effects and long-term effects.The instantaneous effects problems are associated with interference problems in communication systems, malfunction or performance degradation of more sensitive equipment and devices.Long-term effects are of thermal nature and are related to additional losses in distribution and overheating, causing a reduction of the mean lifetime of capacitors, rotating machines and transformers.Because of these problems, the issue of the power quality delivered to the end consumers is, more than ever, an object of great concern.International standards concerning electrical power quality (IEEE-519, IEC 61000, EN 50160) impose that electrical equipments and facilities should not produce harmonic contents greater than specified values, and also indicate distortion limits to the supply voltage.According to the European COPPER Institute -Leonard Energy Initiative, costs related to power quality problems in Europe are estimated in more than €150.000.000 per year.Therefore, it is evident the necessity to develop solutions that are able to mitigate such disturbances in the electrical systems, improving their power quality.

Non-linear Load
Linear Load

Electrical
Power Grid Single line block diagram of a system with non-linear loads.
Passive filters have been used as a solution to solve harmonic current problems, but they present several disadvantages, namely: they only filter the frequencies they were previously tuned for; their operation cannot be limited to a certain load; the interaction between the passive filters and other loads may result in resonances with unpredictable results [6].To cope with these disadvantages, in the last years, research engineers have presented various solutions based in power electronics to compensate power quality problems [6][7][8][9][10][11][12].These equipments are usually designated as Active Power Conditioners.Examples of such devices are the Shunt Active Power Filter, the Series Active Power Filter, and the Unified Power Quality Conditioner (UPQC).
Active Power Filters are conditioners connected in parallel or in series with the electrical power grid.When connected in parallel is called Shunt Active Power Filter, and when connected in series is named Series Active Power Filter.The Shunt Active Power Filter behaves as a controlled current-source draining the undesired components from the load currents, such that the currents in the electrical power grid become sinusoidal, balanced, and in phase with fundamental positive sequence component of the system voltages.On the other hand, the Series Active Power Filter works as a voltage-source connected in series with the electrical power grid, compensating voltage harmonics, sags (sudden reduction of the voltage followed by its recovery after a brief interval), swells (sudden increase of the voltage followed by its recovery after a brief interval) and flicker (cyclic variation of light intensity of lamps caused by fluctuation of the supply voltage).Three-phase Series Active Power Filters can also compensate unbalances in the phase voltages [12].If the DC link of the Series Active Power Filter inverter is connected to a power supply, its compensation capabilities increases, allowing also the compensation of long term undervoltages and overvoltages [10,11].
The Unified Power Quality Conditioner (UPQC) is composed by two power converters sharing the DC Link.One of these power converters is connected in series with the electrical power grid and the other is connected in parallel with the electrical power grid.This conditioner offers many compensation options in function of the type of control used.Some of the power quality problems that the UPQC can compensate are: voltage harmonics, voltage unbalance, voltage sags, voltage swells, current harmonics, current unbalance, undervoltages, overvoltages, reactive power, and neutral wire current in three-phase four wire systems.
The utilization of equipment like Shunt Active Power Filters, Series Active Power Filters and UPQCs presents significant advantages to the power system.In this way, the research of new topologies and new control algorithms to improve the performance and capabilities of these equipments is object of great interest [13,14].
The aforementioned Active Power Conditioners are the most suited for industrial applications, so they will be presented with more detail in the following topics.

Shunt Active Power Filter
The Shunt Active Power Filter is a device which is able to compensate for both current harmonics and power factor.Furthermore, in three-phase four wire systems it allows to balance the currents in the three phases, and to eliminate the current in the neutral wire [15][16][17].Figure 2 presents the electrical scheme of a Shunt Active Power Filter for a three-phase power system with neutral wire.
The power stage is, basically, a voltage-source inverter with a capacitor in the DC side (the Shunt Active Filter does not require any internal power supply), controlled in a way that it acts like a current-source.From the measured values of the phase voltages (v a , v b , v c ) and rectifiers, etc) there is no need to compensate for the current in neutral wire, so the forth wire of the inverter is not required, simplifying the Shunt Active Power Filter hardware.Since they compensate the power quality problems upstream to its coupling point they should be installed as near as possible of the non-liner loads, avoiding the circulation of current harmonics, reactive currents and neutral wire currents through the facility power lines.Therefore it is advantageous to use various small units, spread along the electrical installation, instead of using a single high power Shunt Active Power Filter at the input of the industry, at the PCC (Point of Common Coupling -where the electrical installation of the industry is connected to the electrical power distribution system).

Electrical Power Grid
Figure 2. Shunt Active Power Filter for a three-phase power system with neutral wire.

Typical Waveforms
Typical waveforms of an electrical installation equipped with a Shunt Active Power Filter are presented in Figure 3.It can be seen that the currents in the load present high harmonic content (THD% of 58%, in average, see Figure 4), and are also unbalanced, which results in a considerable neutral wire current (Figure 3 (d)).The Shunt Active Power Filter makes the currents in the source sinusoidal and balanced (see Figure 3 (b)).The THD% of the source currents is only of about 1% (Figure 4).
In Figure 4 is presented the THD% of the different currents in the system (at the load, source and active filter).The THD% was, in all the cases, calculated in relation to the fundamental frequency of the power grid source (50 Hz).That is why the values of THD% presented for the compensation currents injected by the active filter are so high.

Series Active Power Filter
The Series Active Power Filter is the dual of the Shunt Active Power Filter, and is able to compensate for voltage harmonics, voltage sags, voltage swells and flicker, making the voltages applied to the load almost sinusoidal (compensating for voltage harmonics) [18,19].The three-phase Series Active Filter can also balance the load voltages [20].Figure 5 shows the electrical scheme of a Series Active Power Filter for a three-phase power system.

Power Quality Issues
The Series Active Power Filter consists of a voltage-source inverter (behaving as a controlled voltage-source) and requires 3 single-phase transformers to interface with the power system.However, some authors have presented research results of Series Active Power Filter topologies without the use of line transformers [21,22].From the measured values of the phase voltages at the source side (v sa , v sb , v sc ) and of the load currents (i a , i b , i c ), the controller calculates the reference compensation voltages (v ca * , v cb * , v cc * ), used by the inverter to produce the compensation voltages (v ca , v cb , v cc ).The Series Active Power Filter does not compensate for load current harmonics but it acts as high-impedance to the current harmonics coming from the electrical power grid side.Therefore, it guarantees that passive filters eventually placed at the load side will work appropriately and not drain harmonic currents from the rest of the power system.

Typical Waveforms
Typical waveforms of an installation equipped with a Series Active Power Filter are presented in Figure 6.In Figure 7 is presented the THD% of the different voltages in the system (load, source and series active filter).It can be seen that the voltages in the source present some harmonic content (THD% between 2.5% and 4%).The Series Active Power Filter makes the voltages in the load practically sinusoidal, with almost none distortion (see Figure 6 (a)).The THD% of the load voltages is below or equal to 0.4%.The THD% was, in all the cases, calculated in relation to the fundamental frequency of the power grid source (50 Hz).That is the motive way the values presented for the compensation voltages produced by the active filter are so high.

Unified Power Quality Conditioner
The Unified Power Quality Conditioner (UPQC) combines the Shunt Active Power Filter with the Series Active Power Filter, sharing the same DC Link, in order to compensate both voltages and currents, so that the load voltages become sinusoidal and at nominal value, and the source currents become sinusoidal and in phase with the source voltages [23,24].In the case of three-phase systems, a three-phase UPQC can also balance the load voltages and the source currents, and eliminate the source neutral current.Figure 8 shows the electrical scheme of a Unified Power Quality Conditioner for a three-phase power system.
From the measured values of the source phase voltages (v sa , v sb , v sc ) and load currents (i a , i b , i c ), the controller calculates the reference compensation currents (i ca

Electrical Power Grid
Unified Power Quality Conditioner

Typical Waveforms
Typical waveforms of an installation equipped with a Unified Power Quality Conditioner are presented next.In Figure 9 are shown the load currents, source currents, compensation currents, neutral wire currents, load voltages, and source voltages.It can be seen that the currents in the load present a high harmonic content (THD% between 32% and 41%, see Figure 10 (a)), and are also unbalanced, which results in a considerable neutral wire current (i n in Figure 9 (d)).The THD% of the source voltages is also high (about 6%, as shown in Figure 10 (e)).
By the action of the Unified Power Quality Conditioner the currents in the source become sinusoidal, in phase with the voltages, and balanced (Figure 6 (b)).The THD% of the source currents is reduced to about 1% (Figure 10 (b)).Also, the load voltages become sinusoidal with almost none distortion (Figure 6 (e)).The THD% of the load voltages is reduced to only 0.4% (Figure 10 (d)).
In Figure 10 is presented the THD% of the different currents and voltages in the electrical system (at the load, source and UPQC).The THD% was, in all the cases, calculated in relation to the fundamental frequency of the power grid source (50 Hz).That is way the values presented for the compensation currents injected by the UPQC are so high.

Control Methods for Active Power Filters
The control methods applied to Active Power Filters and Unified Power Quality Conditioners are decisive in achieving the goals of compensation, in the determination of the conditioner power rate, and in theirs dynamic and steady-state performances.Basically, the different approaches regarding the calculation of the compensation currents and voltages from the measured distorted quantities can be grouped into two classes: frequency-domain and time-domain.
The frequency-domain approach implies the analysis of the Fourier transform, which leads to a huge amount of calculations, making the control method very heavy in terms of processing time and required computational capacity.The time-domain approach uses the traditional concepts of circuit analysis and algebraic transformations associated with changes of reference frames, which greatly simplify the control task.In general, power definitions in the time domain offer a more appropriate basis for the design of controllers for power electronic devices, because they are also valid during transients.This is especially true for applications in three-phase electrical power systems if the definitions are done already considering a three-phase circuit, instead of considering a single-phase circuit and then summing up to have a three-phase system [14].
In a three-phase electrical power system the three-phase power delivered to a load by the source has the well-known expression: where v a (t), v b (t), and v c (t) represents the instantaneous load voltages referred to the neutral point, and i a (t), i b (t), and i c (t) are the load instantaneous currents.However, for the given voltages, there is more than one set of currents producing the same instantaneous power.So, what is the optimal set of currents for a given power?One possible answer is the set of currents that minimizes power loss in the lines.On the other hand, it is known that for a balanced sinusoidal system, in voltage and current, the instantaneous power is constant, and equal to the active power, since this value corresponds to the average value of the instantaneous power.Therefore, the best set of currents can be the one that leads to a constant instantaneous power.
Different time-domain power definitions can be found in the literature.The most important are: the p-q Theory (Instantaneous Power Theory) proposed by Akagi et al. [25,26]; FBD (Fryze -Buchholz -Depenbrock) proposed by Depenbrock [27]; the CPT (Conservative Power Theory) proposed by Tenti [28]; and the CPC (Current's Physical Components) proposed by Czarnecki [29,30].It can be also found in the literature p-q Theory inspired control algorithms for switching compensators, as for example, the p-q-r Theory [31][32][33].A comparison involving the p-q-r and the p-q theories is provided in [33].The control algorithm denominated as Synchronous Reference Frame (SRF) [34] also presents similar aspects related with the p-q-r and the p-q theories.The SRF control algorithm is defined in the d-q-0 reference frame.All of these control algorithms can be applied to control switching compensators connected in three-phase systems, with or without neutral wire.

The p-q Theory Fundamentals
In 1983, Akagi et al. [25,26] have proposed "The Generalized Theory of the Instantaneous Reactive Power in Three-Phase Circuits", also known as Instantaneous Power Theory, or p-q Theory, for the control of Active Power Filters.The fact of being a time-domain theory makes it viable for operation in steady state or transient state, as well as for generic voltage and current waveforms, allowing a real time control of the Active Power Filters.Another ad-vantage of the p-q Theory is the simplicity of its calculations, which consists only in algebraic operations, being the only exception the extraction of the average and alternating components of the calculated powers.

Clarke for Three-Phase Four-Wire Electrical Power Systems
The p-q Theory was initially developed for three-phase electrical power systems without neutral wire, with a short reference to three-phase systems with neutral wire.Later, Watanabe et al. [35] and Aredes et al. [36] extended it to three-phase electrical power systems with neutral wire.
This theory consists in an algebraic transformation (the Clarke transformation) of the threephase voltages and currents in the a-b-c coordinates to the α-β-0 coordinates, where α-β are orthogonal, and the 0 coordinate corresponds to the zero-sequence component.The p-q Theory transformation applied to the electrical power grid voltages and load currents is given by: The instantaneous three-phase electrical power, in the a-b-c coordinates is defined as: In the α-β-0 coordinates the instantaneous three-phase electrical power is defined as: The two components of p 3 are defined as follow: The instantaneous imaginary power is defined as: The qpower difers form the conventional reactive three-phase electrical power, since it also takes into consideration all the voltage and current harmonics.
Since the pand qpowers do not depend on the zero-sequence components of the voltages and currents, but only on the same α-β components, they can be written together:

Physical Meaning of the p-q Theory Electrical Powers
The different p-q Theory electrical powers are illustrated in Figure 11, for an electrical power system represented in α-β-0 and in Figure 12 for an electrical power system represented in a-b-c coordinates, and have the following physical meaning: p ¯: mean value of the instantaneous real power -corresponds to the energy per time unity that is transferred from the power supply to the load, through the α-β coordinates, or through the a-b-c coordinates, in a balanced way (it is the desired power component).
p ˜: alternated value of the instantaneous real power -It is the energy per time unity that is exchanged between the power supply and the load, through the α-β coordinates, or through the a-b-c coordinates.
q: instantaneous imaginary power -corresponds to the power that is exchanged between the α-β coordinates, or between the a-b-c coordinates.This power does not imply any transference or exchange of energy between the power supply and the load, but is responsible for the existence of undesirable currents, which circulate between the system phases.In the case of a balanced sinusoidal voltage supply and a balanced load, with or without harmonics, q (the mean value of the instantaneous imaginary power) is equal to the conventional reactive power (q ¯= 3VI 1 sin ϕ 1 ).p ¯0: mean value of the instantaneous zero-sequence power -corresponds to the energy per time unity which is transferred from the power supply to the load through the zero-sequence components of voltage and current.p ˜0:alternated value of the instantaneous zero-sequence power -it means the energy per time unity that is exchanged between the power supply and the load through the zero-sequence components.
The zero-sequence power, p 0 , only exists in three-phase systems with neutral wire.Further- more, the systems must have unbalanced voltages and currents and/or 3rd harmonics in both voltage and current of at least one phase.

The p-q Theory Powers Compensation
From the concepts seen before, p ¯and p ¯0 are usually the only desirable p-q Theory power components that the source must supply.The other power components can be compensated using a Shunt Active Power Filter. Figure 13 shows the Shunt Active Power Filter for an electrical power system represented in a-b-c coordinates, and Figure 14 shows the Shunt Active Power Filter for an electrical power system represented in α-β-0 coordinates.With the Shunt Active Power Filter in operation, the p ˜ and p ˜0 power components cease to be exchanged between the load and the electrical power source and start to be exchanged between the load and the Shunt Active Power Filter DC link capacitor, which continuously stores and delivers energy, to compensate these pulsating electrical powers.
The power componentq is not associated with any energy transference, so the currents associated with this electrical power component start to circulate only between the Shunt Active Power Filter and the load, and not anymore through the electrical power grid.
The power component p 0 only can exist in three-phase four-wire systems with voltage and current distortions or/and unbalances (when simultaneously i 0 ≠ 0 and v 0 ≠ 0, at the same frequencies), in these conditions it is necessary to compensate the electrical power component p 0 to allow the balancing of the currents, and to make the current in the neutral wire assume a null value upstream of the Shunt Active Power Filter, or in other words, to make that the zero-sequence component of the current between the electrical power source and the Shunt Active Power Filter is eliminated.
The compensation of p ¯0, requires that the Shunt Active Power Filter delivers energy to the load.To do this there are two possibilities: • Include a power supply on the Shunt Active Power Filter inverter DC link to deliver this energy.
• Drain the energy required for the p ¯0 compensation from the electrical power grid itself, in a balanced way by the three-phases.
The second possibility, was proposed by Aredes et al. [36], and is implicit in Figure 13.It is also possible to conclude that the Shunt Active Power Filter DC link capacitor is only neces-sary to compensate p ˜ andp ˜0, since these quantities must be stored in this component at one moment to be later delivered back to the load.The instantaneous imaginary power (q), which includes the conventional reactive power, is compensated without the contribution of this capacitor.This means that, the size of the DC link capacitor does not depend on the amount of reactive power to be compensated.

Calculations for theShunt Active Power Filter Control
The p-q Theory presents some interesting features when applied to the control of Active Power Filters for three-phase power systems, namely: • It is inherently a three-phase system theory; • It can be applied to any three-phase system (balanced or unbalanced, with or without harmonics, for compensation of both voltages and/or currents); • It is based in instantaneous values, allowing excellent dynamic response; • Its calculations are relatively simple (it only includes algebraic expressions that can be implemented using a simple controller); • It allows two control strategies: "constant instantaneous real power at source"and "sinusoidal current at source".
As can be seen in Figure 15, the inputs of the control system are the instantaneous values of the voltages and currents in the phases that feed the load to be compensated (v a , v b , v c and i a , i b , i c ).These currents and voltages are calculated in the α-β-0 coordinates through the equations given in (2).Using the equations ( 5), ( 6) and ( 7) are calculated the instantaneous powers p, p 0 and q, respectively.The separation of the p-q Theory power components in their average and alternating values can be obtained using analog or digital filters, according to the type of control system.
To calculate the reference compensation currents in the α-β-0 coordinates is used the equation (9): In the previous equation, p x and q x are the values of the power components to be provided by the Shunt Active Power Filter.Always that the Shunt Active Power Filter compensates the zero-sequence power (p 0 ) , p x must be subtracted of the average value of the zero-se- quence power,p ¯0, as presented in equation (10).In this way the energy per time unit, which p ¯0 represents, can be delivered to the load by the electrical power grid.The q x power compo- nent usually assumes the value ofq, as shown in equation (11).
Since the zero-sequence current must be compensated, the reference compensation current in the 0 coordinate is i 0 itself: For a proper operation of the inverter of the Shunt Active Power Filter, the DC link voltage (V dc ), which corresponds to the capacitor voltage, should be regulated to be kept within appropriate levels.The p-q Theory calculations allow a simple method to regulate that voltage: if the Shunt Active Power Filter receives energy from the electrical power grid, it is stored in the capacitor and its voltage (V dc ) will increase, otherwise, V dc will decrease.It is set a regu- lation power (p reg ), that is included in the value ofp x : And the regulation power, p reg , can be calculated according to: Power Quality Issues where K is a proportional gain1 , V ref is the reference of the desired voltage in the DC link, and V dc is the average voltage in the DC link. So: the Shunt Active Power Filter delivers energy to the electrical power grid and V dc decreases.
• If V dc < V ref -the Shunt Active Power Filter absorbs energy from the electrical power grid and V dc increases.
The reference compensation currents in the a-b-c coordinates can be obtained by the transformation given in equation ( 15) and equation ( 16): The calculations presented so far are synthesized in Figure 15, and correspond to a Shunt Active Power Filter control strategy for "constant instantaneous real power at source".This approach, when applied to a three-phase system with balanced sinusoidal voltages, produces the following results: • The phase supply currents become sinusoidal, balanced, and in phase with the voltages (in other words, the power supply "sees" the load as a purely resistive symmetrical load); • The neutral current is made equal to zero (even 3rd order current harmonics are compensated); • The three-phase instantaneous power supplied, equation (17), is made constant.
The p-q Theory is also a valid control strategy for the Shunt Active Power Filter when the voltages are distorted and/or unbalanced, and sinusoidal supply currents are desired.However, with this strategy the total instantaneous power supplied will not be constant, since it is not physically possible to achieve both sinusoidal currents and constant power in systems with unbalanced and/or distorted voltages.
In the case of a non-sinusoidal or unbalanced supply voltage, with the control strategy "constant instantaneous real power at source", the compensated supply currents will include harmonics, but in practical cases, when the voltage distortion and the voltage unbalance are within the limits established by the standards for the supply voltage at industries, the distortion in the source currents will be negligible after the compensation made by the Shunt Active Power Filter.
With the control strategy "sinusoidal current at source", even with highly distorted and/or unbalanced source voltages, are obtained sinusoidal supply currents with the compensation made by the Shunt Active Power Filter.When this approach is used the results are: • The phase supply currents become sinusoidal, balanced, and in phase with the fundamental voltages; • The neutral current is made equal to zero (even 3rd order current harmonics are compensated); • The total instantaneous power supplied (p 3s ) is not made constant, but in real cases when voltages and unbalance are within normal limits, it will present a small ripple (much smaller than before the compensation).
The only difference of the control strategy "sinusoidal current at source" in relation to the control strategy "constant instantaneous real power at source" is that its control system uses the fundamental positive sequence component of the system voltages, instead of using the real measured system voltages.It is usually accomplished using a PLL (Phase Locked Loop) algorithm, as described in [37][38][39].

Shunt Active Power Filter Implementation and Field Results
The Shunt Active Power Filter previously described in this chapter was implemented in the form of prototypes in order to validate the topology and control algorithms.To strength this validation it is advisable to test the active filter in different operation conditions, so it were developed four prototypes to be tested in real operation conditions in four different electrical installations, with different load profiles.
The target installations were previously monitorized, and simulation models of each installation were developed using a simulation tool.The simulation models were used to foresee the Shunt Active Power Filter behavior and to help sizing the hardware components and the protection systems.
According to the performed measurements and studies, the four Shunt Active Power Filters were constructed within three different compensation ranges: two 20 kVA prototypes to be used in a computation center and in an hospital, a 35 kVA prototype to be used in a textile industry installation, and a 55 kVA prototype to be applied in a medical drugs distribution warehouse.
In terms of hardware the main components that were used are: • A DSP (Digital Signal Processor) from Texas Instruments (the control system was implemented using only fixed point calculations in order to enhance performance in terms of execution time); • Hall effect sensors (used to measure the voltages and currents); • Semikron IGBTs (the inverter stage was implemented using 4 Semikron IGBT modulesone for each leg of the inverter).
Two of the most important aspects when an equipment prototype is installed in field environment are security and reliability.The security of the human operators, the security of the industry plant, and the integrity of the equipment are factors that must be evaluated carefully.Therefore, it is very important to protect the Shunt Active Power Filter prototype against phenomena that usually do not exist in a laboratory environment, but that may occur in real industry installations.To accomplish these constraints, the laboratory prototypes were designed to be assembled in an electric switchboard (Figure 16).To prevent that anomalous operations could damage the Shunt Active Power Filter components, or other equipment connected to the electrical installation, various protections schemes were implemented.A supervision and protection system was developed to permanently monitor the Shunt Active Power Filter operation parameters, and to disconnect the device if any anomalous values are detected.Some of the implemented protections have two levels of actuation, in a first level the problem can be detected through software algorithms, and the Shunt Active Power Filter is softly turned off if the problem persists.More extreme malfunctions will activate implemented hardware protections that instantaneously disconnect the Shunt Active Power Filter from the electrical power grid and also discharge the DC link capacitors.The supervision and protection system also has the responsibility to correctly operate the Shunt Active Power Filter.It is responsible for the soft connection of the Shunt Active Power Filter to the electrical power grid, performing the pre-charge of the DC capacitor.Some of the implemented protections are: • Protection against abnormal system voltages (protections for different values of transitory and RMS values are implemented).
• Protection against overcurrents produced by the Shunt Active Power Filter (the maximum compensation currents are limited by software, but several malfunctions can origin a current higher than the parameterized limit, triggering the protection).
• Protections against high temperature are also implemented through temperature sensors assembled in various representative points.Temperature sensors also allow the ON/OFF control of the electric board ventilation fans, which are responsible for cooling the heatsinks of the IGBTs modules, and the inductors (that connect the inverter to the electricalpower grid).
In Figure 17

Results at the Textile Industry
The first place selected to test the Shunt Active Power Filters consisted in an electrical switchboard that feeds a cloth whitening machine, in a large textile industry.In this place, the load is composed by eight variable speed drives with different power rates.The load currents presented a Total Harmonic Distortion (THD%) greater than 60% in all the three phases, the fifth and seventh harmonics are the highest ones, but other harmonics are also present (see .In this load the neutral wire current was nearly zero.According to the measurements presented in Figure 19, the source current THD% of all the three phases decreased to values smaller than 3%.

Results at the Computational Center
The second test installation consisted in the main electrical switchboard of a computational center, at the University of Minho, where the main loads are computers, deskJet and laser printers, lighting and air-conditioning circuits.
At this electrical installation the load current presented a THD% near to 50%, the third harmonic was especially high, although other harmonics were present (Figure 21).The load presented significant unbalances at certain periods of the day, and the neutral current was high, not only due to the unbalance, but specially due to the third order harmonics at the phase currents, resulting in a neutral wire current with a higher value at the frequency of 150 Hz.As result of the Shunt Active Power Filter operation, the three phase currents were enhanced, the waveforms became approximately sinusoidal (Figure 20), with a THD% around 6%.At the source side the three phase currents became balanced, the neutral wire current was reduced from 16.5 A to 1 A, and the total power factor was increased from 0.88 to 0.99.

Results at the Clinical Analysis Laboratory of an Hospital
The third test site was the electrical switchboard of the clinical analyses laboratory of a hospital.Here, the loads were composed by some computers, diverse medical equipments, and lighting and air-conditioning circuits.The load currents presented low harmonic distortion (the worst case was phase A with a THD% near to 11%), but the unbalance was very significant during certain periods of the day (see Figure 21 and Figure 23).In Figure 22 it is possible to see that the phase A current was almost 29 A, while the phase B current was smaller than 9 A. The phases B and C also presented low power factor (less than 0.78).When the Shunt Active Power Filter was operating, the current THD% at the source side decreased in all the three phases, reaching values near to 3%, and became balanced with unitary power factor.The current in the neutral wire decreased from 16 A to approximately 1 A.

Results at the Medical Drugs Distribution Warehouse
The fourth test site consisted in a medical drugs distribution warehouse.Here, the Shunt Active Power Filter was installed at the main switchboard of the warehouse.The principal loads of this installation were illumination circuits (composed by a large number of fluorescent tube lamps with magnetic ballasts), chest refrigerators, conveyor belt systems, and a central air-conditioning unit.The load current presented low distortion (the worst case was in phase A with a THD% near to 5%), as it can be seen in Figure 25.The current unbalance was also small, resulting in a neutral wire current of around only 8 A (also there were not large values of third order harmonics).The major problem of this installation was the power factor.According to the Portuguese legislation, if an installation presents a tan φ higher than 0.4 (equivalent to a cos φ lower than 0.93), the Reactive Energy is taxed.It is possible to see in Figure 24 that the total power factor of the installation was lower than 0.7.When the Shunt Active Power Filter was connected, the current THD% at the electrical power grid side decreased in all the three phases, reaching values of less than 2%.The three phase currents became sinusoidal, in phase with the system voltages, and perfectly balanced.The power factor increased from 0.69 to 1, and the current in the neutral wire decreased from 8 A to 3 A.  The presented results confirm the ability of the Shunt Active Power Filters to compensate problems like current harmonics, current unbalance and power factor.The developed prototypes presented a good performance in all the four demonstration installations.

Conclusions
The growing use of non-linear loads in industrial facilities is the source of several power quality problems, such as harmonics, reactive power, flicker and resonance.These problems affect not only the facility but also the electrical power system by distorting the voltage and current waveforms with harmonics of various orders, including inter-harmonics.Active Power Conditioners are an up-to-date solution to mitigate these power quality problems.It can be found conditioners to mitigate current problems, others to mitigate voltage problems, and others that mitigate both current and voltage problems, both in power systems and in industrial facilities.In this chapter were presented the Active Power Conditioners more suitable for use in industrial facilities, explaining in detail their concepts, presenting their power electronics topologies and typical waveforms.
Shunt Active Power Filters allow the compensation of problems related to the consumed currents, like current harmonics and current unbalance, together with power factor correction, and can be a much better solution than the conventional approach (capacitors for power factor correction and passive filters to compensate for current harmonics).They are most suitable for facilities with a high level of distortion and/or unbalance of the consumed currents.There are some situations in which the use of Shunt Active Power Filters to compensate the current problems also improves the power grid voltage waveforms due to the reduction of the current harmonics flowing through the line impedances.
Series Active Power Filters permit the compensation of problems related to the supplied voltages, like voltage harmonics, voltage unbalance, sags, swells and flicker.They are most suitable for facilities with loads sensitive to voltage problems.In installations that use shunt passive filters to mitigate current harmonics they also improve the behavior of those passive filters and the overall installation power quality.
Unified Power Quality Conditioners (UPQCs) can compensate both and simultaneously problems related to the consumed currents and to the supplied voltages.So, it is suitable for facilities that have problems in the consumed currents and that also have loads which are sensitive to voltage problems.The UPQC topology allows the power flow between the shunt and series conditioners, so it is able to compensate undervoltages and overvoltages in steady-state.This is a great advantage comparing to the use of shunt and series active power filters operating independently.
The control of the conditioners is also a matter of great importance, and different control theories can be found.The p-q Theory is a suitable tool to the analysis of three-phase electrical systems with non-linear loads and for the control of Active Power Conditioners.Based on this theory, two control strategies for Shunt Active Power Filters were described in this chapter, one leading to constant instantaneous real power at source and the other leading to sinusoidal currents at source.
The experimental results obtained in four different test facilities, and presented in this chapter, show that the developed Shunt Active Power Filters have a good performance.They dynamically compensate for harmonic currents, and correct power factor.They also compensate for load current unbalance, and almost eliminate the current in the neutral wire at the source side.Therefore, the Shunt Active Power Filters allow the power source to see an unbalanced and non-linear load, with reactive power consumption, as if the load is a symmetrical linear resistive load.By the action of the Shunt Active Power Filters, the currents at the three phases of the source side become almost sinusoidal and in phase with the voltages, and the neutral wire current become almost null.Since all the source currents are reduced in relation to the load currents, the electrical installation losses also decrease.

Figure 3 .
Figure 3.Typical waveforms of an installation with a Shunt Active Power Filter: (a) Load currents; (b) Source currents; (c) Active filter compensation currents; (d) Neutral wire currents.

Figure 4 .
Figure 4. Harmonic spectrum and THD% of the currents in an installation with a Shunt Active Power Filter: (a) Load currents; (b) Source currents; (c) Compensation currents.

Figure 5 .
Figure 5. Series Active Power Filter for a three-phase power system.

Figure 6 .
Figure 6.Typical waveforms of an installation with a Series Active Power Filter: (a) Load voltages; (b) Source voltages; (c) Active filter compensation voltages.

Figure 7 .
Figure 7. Harmonic spectrum and THD% of the voltages in an installation with a Series Active Power Filter: (a) Load voltages; (b) Source voltages; (c) Compensation voltages.

Figure 8 .
Figure 8. Unified Power Quality Conditioner for a three-phase power system.

Figure 10 .
Figure 10.Harmonic spectrum and THD% of the currents and voltages in an installation with an UPQC: (a) Load currents; (b) Source currents; (c) Compensation currents; (d) Load voltages; (e) Source voltages.

Figure 12 .
Figure 12.Power components of the p-q Theory in a-b-c coordinates.

Figure 13 .
Figure 13.Compensation of power componentsp ˜, q, p ˜0, and p ¯0 in a-b-c coordinates.

Figure 15 .
Figure 15.Control system structure for the control strategy "constant instantaneous real power at source".

Figure 16 .
Figure 16.Two of the four final prototypes of Shunt Active Power Filters.
is presented the generic electrical diagram of the case studies installations with the Shunt Active Power Filter.It shows the main electrical signals that were measured to validate the installation's power quality improvement achieved with the active filter.In blue are the source currents that are expected to become sinusoidal and balanced by the action of the active filter.In red are the non-sinusoidal currents of the load.In green are represented the compensation currents produced by the Shunt Active Power Filter.The experimental results achieved in the four demonstration installations are presented in the following topics.

Figure 17 .
Figure 17.Generic electrical diagram of the case studies installations with the Shunt Active Power Filter.
Figure 18   shows the voltage and current waveforms and RMS values measured with the Shunt Active Power Filter in operation.In this figure it is possible to see that at the load side (waveforms of current in red color) the three phase currents are distorted, and at the source side (blue waveforms) the three phase currents become almost sinusoidal, and in phase with the system voltages (black waveforms).The total power factor increased from 0.82 to 1.

Figure 18 .
Figure 18.System voltages (black) and currents waveforms at Load (red) and Source (blue) sides of the Shunt Active Power Filter, registered in installation 1 (Textile Industry).

Figure 19 .
Figure 19.Current harmonics and THD% at Load and Source sides of the Shunt Active Power Filter, registered in installation 1 (Textile Industry).

Figure 20 .Figure 21 .
Figure 20.System voltages (black) and currents waveforms at Load (red) and Source (blue) sides of the Shunt Active Power Filter, registered in installation 2 (Computational Center)

Figure 22 .
Figure 22.System voltages (black) and currents waveforms at Load (red) and Source (blue) sides of the Shunt Active Power Filter, registered in installation 3 (Clinical Analysis Laboratory).

Figure 23 .
Figure 23.Current harmonics and THD% at Load and Source sides of the Shunt Active Power Filter, registered in installation 3 (Clinical Analysis Laboratory).

Figure 24 .
Figure 24.System voltages (black) and currents waveforms at Load (red) and Source (blue) sides of the Shunt Active Power Filter, registered in installation 4 (Medical Drugs Distribution Warehouse).

Figure 25 .
Figure 25.Current harmonics and THD% at Load and Source sides of the Shunt Active Power Filter, registered in installation 4 (Medical Drugs Distribution Warehouse).