Design of a Virtual Lab to Evaluate and Mitigate Power Quality Problems Introduced by Microgeneration

The technological advances of the last decades favored a widespread of power electronics converters in the majority of household appliances, industrial equipment connected to the Low Voltage (LV) grid and, more recently, in distributed power generation, near the consumer – microgeneration (μG). Most of this electronic equipment is a strong producer of current harmonics, polluting the LV network and generating sensitivity to dips, unbalances and harmonics, being also more sensitive to Power Quality issues. In the future, the massive use of renewable and decentralized sources of energy will probably worsen the problem, increasing Total Harmonic Distortion (THD), RMS voltage values, increasing unbalances and decreasing Power Factor in Low Voltage Networks. In these and in other Power Quality related issues, power electronics became, to a certain extent, the cause of the problem. However, due to the continuous development of power semiconductors characteristics, less demanding drive circuits, integration in dedicated modules, microelectronic control circuits improvement, allowing their operation at higher frequencies and with higher performance modulation and control methods, power electronics converters also have the potential to become the solution for the problem. Still, even the non polluting grid connected converters are not usually exploited to their full capability as, in general, they are not used to mitigate Power Quality problems. The smart exploitation of μG systems may become very attractive, using power electronics converters and adequate control strategies to allow the local mitigation of some power quality problems, minimizing the LV grid harmonics pollution (near unitary power factor) and guaranteeing their operation as active power filters (APF). Based on these new challenges, the main aim of this work is to create a virtual LV grid laboratory to evaluate some power quality indicators, including power electronics based models to guarantee a more realistic representation of the most significant loads connected to the LV grid. The simulated microgenerators are represented as Voltage Source Inverters (VSI) and may be controlled to guarantee: a) near unity power factor (conventional μG); b) local compensation of reactive power and harmonics (active μG).


Introduction
The technological advances of the last decades favored a widespread of power electronics converters in the majority of household appliances, industrial equipment connected to the Low Voltage (LV) grid and, more recently, in distributed power generation, near the consumer -microgeneration (µG).Most of this electronic equipment is a strong producer of current harmonics, polluting the LV network and generating sensitivity to dips, unbalances and harmonics, being also more sensitive to Power Quality issues.In the future, the massive use of renewable and decentralized sources of energy will probably worsen the problem, increasing Total Harmonic Distortion (THD), RMS voltage values, increasing unbalances and decreasing Power Factor in Low Voltage Networks.In these and in other Power Quality related issues, power electronics became, to a certain extent, the cause of the problem.However, due to the continuous development of power semiconductors characteristics, less demanding drive circuits, integration in dedicated modules, microelectronic control circuits improvement, allowing their operation at higher frequencies and with higher performance modulation and control methods, power electronics converters also have the potential to become the solution for the problem.Still, even the non polluting grid connected converters are not usually exploited to their full capability as, in general, they are not used to mitigate Power Quality problems.The smart exploitation of µG systems may become very attractive, using power electronics converters and adequate control strategies to allow the local mitigation of some power quality problems, minimizing the LV grid harmonics pollution (near unitary power factor) and guaranteeing their operation as active power filters (APF).Based on these new challenges, the main aim of this work is to create a virtual LV grid laboratory to evaluate some power quality indicators, including power electronics based models to guarantee a more realistic representation of the most significant loads connected to the LV grid.The simulated microgenerators are represented as Voltage Source Inverters (VSI) and may be controlled to guarantee: a) near unity power factor (conventional µG); b) local compensation of reactive power and harmonics (active µG).
From the obtained results, active µG have the capability to guarantee an overall Power Quality improvement (voltage THD decrease and Power Factor increase) allowing a voltage THD decrease when compared to voltage THD values obtained with conventional µG.

Model of Low Voltage grid
The power electronics based low voltage network model is obtained using the SimPowerSystems Toolbox of Matlab/ Simulink.The models include the Medium/ Low voltage (MV/ LV) transformer, the distribution lines, the most significant electrical loads and the microgenerators connected to the grid.

Distribution transformer
It is assumed that the distribution MV/ LV transformer is ∆YN, with the secondary neutral directly connected to ground.The transformer used in the simulations is fed by a 30kV voltage on MV (medium voltage) and, in LV (Low Voltage) the line/ phase voltage is 400V / 230V.The magnetization and the primary and secondary windings reactance and resistance are calculated from the transformer manufacturer no-load, short-circuit and nominal load tests [Elgerd, 1985].
Fig. 1.Equivalent single phase model of a distribution transformer From the no-load test, applying the nominal voltage U n to the secondary side of the transformer, and leaving the primary side open, it is possible to obtain the transformer magnetizing current I m .As the series impedance is much lower than the magnetizing impedance, it is assumed that the iron losses are nearly equal to the no-load losses P 0 .Then, from the nominal voltage U n , the magnetizing current I m and the no load losses P 0 , it is possible to determine the transformer magnetizing reactance and resistance.The magnetizing conductance is given by (1).
The magnetizing resistance R m (2) is obtained from the magnetizing conductance G m (1).
From the magnetizing current I m and the magnetizing conductance R m it is possible to determine the magnetizing susceptance B m (3): The magnetizing reactance X m is given by ( 4): The magnetizing impedance is much higher than the series branch impedances (Fig. 1).
Then, from the short-circuit test, it is possible to obtain the short-circuit impedance Z cc (5) and the total resistance R t (6) from the transformer primary and secondary windings, knowing the short-circuit voltage U cc , necessary to guarantee the current nominal value I n and the short-circuit losses P cc .
Then, from ( 5) and ( 6) it is possible to determine the leakage reactance X t (7): The resistance and leakage reactance from the primary and secondary windings may be assumed to be equal.Then: In this work a 400kVA 30kV/ 400V distribution transformer (base values S b =400kVA, ) is used.From the no-load test a magnetizing current I m =2.9% and no-load losses of P 0 =1450W are considered.From the short-circuit test it is assumed U cc =4.5%, with nominal current I n (1 pu) and short-circuit losses P cc =8.8 kW.

Distribution cables
The distribution cables models are based on the π model (Fig. 2) and their section is chosen according to the current nominal values.The series resistance and inductance and the shunt admittance may be obtained from the manufacturers values depending on the cables section and length.In LV distribution networks four-wire cables are used (three phase conductors and a neutral conductor insulated separately), all enclosed by an outer polyethylene insulation mantle.Usually the conductors are sector shaped.The shunt and series impedance are determined by the physical construction of the cable.Based on the single phase model of Fig. 2, the model of a three phase distribution cable is obtained, Fig.
3 [Ciric et all 2003], [Ciric et all 2005].The series resistance R (Ω/ km) [Jensen et all, 2001] depends on the cable internal resistance, on the ground resistance (there is no screen and the current diverted to ground must be included in the model) and on the proximity effect resistance.The skin effect and the proximity effect result in the increase of the conductors resistance.
The cable apparent inductance L s depends on the self inductance, on the mutual inductance and on the inductance due to non-ideal ground.
The cable shunt admittance depends on the capacitances between conductors and on the conductors to ground capacitances [Jensen et all, 2001].
In overhead lines only the series impedance is considered.The capacitance is usually negligible.
Both for underground cables and overhead lines, the length should be adequate to guarantee their protection, according to the manufacturer values, and to assure that despite the voltage drops, the compliance with RMS voltage standard values [EN 50160] is always guaranteed.

Linear loads
Linear loads are represented as simple resistances (R) and inductances (RL).Resistive loads may be used to simulate incandescent lamps or conventional heaters, whether inductive loads may be used to simulate refrigerators, according to the measurements performed with a FLUKE 435 and shown in figure 4.

Nonlinear loads
Nonlinear loads are assumed to be mainly represented as diode rectifiers and are divided in three groups depending on their rated power.The first group includes low power electronic equipment as TV sets, DVD players or computers.Usually, these electronic apparatus have isolated DC supplies connected to the grid through single phase rectifiers and they can be modelled as their first stage converter: a single phase rectifier feeding a DC R o / / C o load (Fig. 5) [Mohan et all, 1995].Fig. 7 shows the voltage and current measurements obtained for a washing machine and the equivalent simulated waveforms.The virtual lab models of these non linear loads are sized based on their rated power.Then, assuming an adequate DC voltage V o av , the value of the equivalent output resistance R o is obtained from (10).For the TV set an output voltage average value V o av =300V is assumed.
The capacitor C o is designed to limit the output voltage ripple ∆V o .Also, it depends on the output voltage average value V o av , on the equivalent output resistance R o , and on the time interval when all the diodes are OFF (approximately equal to one half of the grid period ∆t=10ms).In the simulations, the ripple is assumed to be lower than ∆V o =50V.To smooth the current absorbed from the LV network, the rectifier is connected to the grid through a filtering inductance, which is calculated as a percentage of the output load impedance (3), where f represents the grid frequency and k is a constant, usually k=0.03 for lower power equipment as TV sets.As an example, with the designed model it is possible to obtain current waveforms similar to those measured on a TV set (Fig. 6), using the previously calculated values of R o , C o and L R and assuming P=150W.
For other higher power household appliances as modern washing or dishwashing machines, a similar model may be used but the average rated power P should be higher, as well as the input filtering inductance.The voltage and current measurements obtained for a washing machine are shown in Fig. 7  Even though the majority of LV grid connected loads are single phase, there may be a few three phase loads, as welding machines or three phase drives in small industries.Again, this equipment may be represented as their first stage converter, usually a three phase diode rectifier feeding an equivalent R o3 / / C o3 load (Fig. 8).In this model the equivalent output load may be calculated from (1) assuming P=6kW and V o av =520V.The output filter capacitor is obtained from (2) considering ∆t=3.3ms(in a 6 pulse rectifier ∆t=T/ 6).The input filtering inductance is obtained from (3) considering k=0.03.Fig. 9 shows the voltage and current waveforms obtained with the designed model.

Conventional single phase microgenerators
Microgenerators are connected to the LV grid through single phase VSI (voltage source inverters) (Fig. 10) [Pogaku et all, 2007] and they are designed to guarantee the compliance with international standards (as EN 50438) and to have characteristics similar to the authorized equipment (maximum rated power, current THD and input power factor).For simplicity reasons and minimization of simulation times, the microgenerators are simulated considering only the grid connection stage, as current controlled inverters fed by a DC voltage source U DC (Fig. 11).
It is assumed that the VSI is connected to the grid through a filtering inductance designed to guarantee a current ripple lower than ∆I grid .To minimize filtering, a three level PWM is used.Then, the inductance L L (Fig. 11) is calculated according to (13), where U DC is the DC link voltage, f s is the switching frequency and ∆I grid is the current ripple.

Fig. 11. Model of the single phase microgenerator
The VSI is controlled using a linear control approach, assuming that the maximum power is supplied to the grid and guaranteeing that the current injected in LV grid has a nearly unitary power factor.
Generally, the association of the modulator and the power converter may be represented as a first order model ( 14), with a gain K D and a dominant pole dependent on the average delay time T d (usually one half of the switching period T d =T s / 2) [Rashid, 2007].To control the current injected in the LV grid it is usual to choose a PI compensator (to guarantee fast response times and zero steady-state error to the step response).The block diagram of the current controller is then represented in Fig. 12, where α i represents the gain of the current sensor.
Input Filter

Fig. 12. Block diagram of the current controlled VSI
To design the current controller it is then necessary to obtain the closed loop transfer function of the whole system.To guarantee some insensitivity to the disturbance introduced by the grid voltage V grid , it is assumed that the disturbance is known (is the grid voltage).For simplicity in the controller design, it is considered that the µG sees an equivalent resistance R 0 =V grid / i grid connected to its terminals.From the controller point of view, this results in R=R L +R 0 .Then, making the compensator zero T z coincident with the pole introduced by the input filter ZL TL R = , the second order transfer function of the current controlled VSI is obtained from (16).
The transfer function ( 16) is then compared to the second order transfer function ( 17) written in the canonical form.From ( 16) and ( 17), assuming a damping factor 22 ξ= , the value of T p is obtained from (18). Figure 13 shows the results obtained for the proposed µG model, assuming that the µG apparent power is S=3450VA, the DC voltage is U DC =400V, the switching frequency is near 10kHz and ∆I grid <0.1 I grid.The µG power factor is negative, even though nearly unitary as the displacement factor between the voltage and the current is 180º.The current THD is lower than 3%.However, considering only the first 50 harmonics, as in most power quality meters, the current THD decreases to THD i =0.35%These results are according to the manufacturers values, guaranteeing the compliance with international standards.Even though these microgenerators are designed to present high power quality parameters (high power factor and low current THD), still they are not usually exploited to their full extent as in general, they are sized and the controllers are designed only to minimize the impact on the LV grid.The mitigation of Power Quality issues is not considered.As an example, consider a small LV grid, as the one represented in figure 14, with a µG and a non-linear load.Using the previously designed µG the current i µG (Fig. 14) will be equal to the one obtained in Fig. 13.The non-linear load current i nl is represented in Fig. 15 and is characterized by THD i =47.55%.The grid current i grid is represented in Fig. 16 and, as a result of the non-linear load THD i =18.79%.From this example it is possible to conclude that even though the µG injects nearly sinusoidal currents in the grid (Fig. 13), still it is not capable of guaranteeing sinusoidal currents when other nonlinear loads are connected to the grid.

Active microgenerators
To minimize some power quality problems as current and voltage THD, an active µG is included in this Lab (Fig. 17).Even though using the same power electronics converters as the conventional µG, with adequate control strategies and adequate filtering, it is possible to guarantee its operation as active power filter (APF), allowing the local mitigation of some

Fig. 17. Block diagram of an active µG
Based on the conventional µG model (Fig. 11), the proposed active µG is simulated according to Fig. 18, considering the DC link filtering stage and the disturbance introduced by the current i pv of the photovoltaic panel + boost stage.

V c C i pv i
Non-linear load Fig. 18.Model of the single phase active microgenerator Assuming that the V c voltage dynamics in the DC link is considerably slower than the dynamics of the microgenerator AC current i µG , then the active µG current i µG and the voltage V c may be controlled according to the diagram block of Fig. 19.The active µG current controller design is equal to the design of the controller used for the conventional µG.Then, neglecting the high frequency poles, the current controlled system may be represented according to (19), where the controller gain G i (20) is obtained from the input/ output power constraint, where V max represents the amplitude of the grid voltage.
Then, the current controlled system may be represented as a current source ( 19), as shown in Fig. 20.
Simplifying ( 21) it is possible to obtain the transfer function in the canonical form ( 22).
( ) From the final value theorem ( 23), the response to the disturbance introduced by i pv current is zero, meaning that in steady-state, the PI controller guarantees the minimization of the disturbances.
To determine the PI controller parameters, the denominator of ( 22) is compared to the third order polynomial (24). Then: Solving (25), the proportional gain K p and the integral gain K i are obtained: Assuming that the dynamics of V c voltage is considerably slower than the dynamics of the microgenerator AC current i µG , then the pole T dv is assumed to be 2 dv TT ≈ , where T is the grid period.Figures 22 to 24 show the results obtained for the proposed active µG model, assuming that the µG apparent power is S=3450VA, the DC voltage is controlled to be V c =400V, the semiconductors switching frequency is near 10kHz and ∆I grid <0.1 I grid .The DC link capacitor www.intechopen.comElectrical Generation and Distribution Systems and Power Quality Disturbances 200 is C=2.7mF, guaranteeing a voltage ripple lower than 5%.The results obtained for the nonlinear load are those presented in figure 15.From Fig. 22 it is possible to conclude that the proposed active µG acts as an active power filter, guaranteeing nearly sinusoidal grid currents.Comparing the results of Fig. 22 and Fig. 16, there is a clear reduction of the grid current THD.This reduction will become more obvious for more complex grids and highly non-linear loads.To guarantee nearly sinusoidal grid currents, the µG current will be the one presented in Fig. 23.The average value of the capacitor voltage is V c =400V, as shown in Fig. 24.The proposed models will be further tested in a low voltage grid.

www.intechopen.com
Electrical Generation and Distribution Systems and Power Quality Disturbances 202

Modelling the Low Voltage grid
The performance of microgenerators can be compared in this virtual lab using the designed low voltage grid model with six clusters of loads (Fig. 25).It is assumed that 85% of these loads are non-linear and 15% are linear.Also, on the transformer Medium Voltage side the 5 th and 7 th harmonics are considered.At the Low Voltage side it is assumed that the voltage RMS value is 2.5% above the nominal value.The simulations are carried out assuming two different load scenarios: a. Distribution transformer at 15% of its nominal power (S N ) (nearly no load scenario, assuming 15% of values represented in Fig. 25); b.Distribution transformer at 85% of its nominal power (full load scenario, assuming 85% of values represented in Fig. 25).Each one of these scenarios is tested: a. without µG; b. with conventional µG; c. with active µG.It is assumed that the microgeneration total power never exceeds 25% of the transformer rated power S N .Figure 26 presents the results obtained without µG, assuming that the transformer may be at 15 % or at 85 % of its rated power S N .The measurements of phase voltages and currents are carried out on the transformer LV side for each one of the groups of loads L 1 to L 6 .Fig. 26 shows that the voltage THD increases more than 50% (as in load 6) from the no-load (15% S N ) to the full load (85% S N ) scenario.As the percentage of linear and non-linear loads is nearly equal for both scenarios, the current THD does not present significant changes (it even decreases slightly in the full load scenario).Also, the Power Factor results are similar for both scenarios, even though slightly lower for the no-load scenario.As for the load voltages RMS values, higher loads result in higher voltage drops.Also, as the transformer to load distance increases, the voltage drop increases as well.

www.intechopen.com
Figure 27 presents the results obtained with µG assuming that the transformer is at 15 % of its rated power S N (no load scenario).The measurements of phase voltages and currents are carried out on the transformer LV side for each one of the groups of loads L 1 to L 6 .Voltage THD Current THD From the results obtained for the first scenario (15% S N ) (Fig. 27), the use of active µG guarantees a clear improvement of voltage a n d c u r r e n t T H D , wh e n c om pa r e d t o t h e conventional µG.Also, the use of active µG guarantees near unity power factor, even though it is negative.This results from the fact that the power flows from the microgenerators to the transformer, instead of flowing from the transformer to the loads.Figure 28 presents the results obtained with µG assuming that the transformer is at 85 % of its rated power S N (full load scenario).The measurements of phase voltages and currents are carried out on the transformer LV side for each one of the groups of loads L 1 to L 6 .The results obtained for the full load scenario (85% S N ) (Fig.

Conclusions
In this paper a virtual lab was designed to evaluate and mitigate some power quality problems introduced by µG.The virtual lab includes the Medium/ Low voltage (MV/ LV) transformer, the distribution lines, linear and non-linear loads, conventional µG and active µG.To validate the designed models, the current waveforms and distortion obtained for each one of the virtual lab loads were compared to those measured with the most used electric and electronic equipment, showing that the obtained results are similar.
The µG model is simulated based on its final stage converter, a single phase inverter, while the active µG also includes high order harmonics compensation, to perform as an active power filter.
Using the proposed models a small low voltage grid model with six clusters of loads is designed to evaluate the impact of conventional µG and active µG on Power Quality for a no-load and a full load scenario.
From the results obtained with the virtual lab LV grid, it was possible to conclude that conventional µG slightly increases voltage THD, while active µG reduces voltage THD (up to 30% when compared to voltage THD values obtained with conventional µG), guaranteeing an overall Power Quality improvement (Power Factor increase).
Even though the µG total power never exceeds 25% of the transformer rated power S N , with a high percentage of non linear loads, as the one considered in the proposed virtual lab LV grid model (85% of the transformer rated power), the active µG presents promising results and it can be concluded that it may be a solution to mitigate some power quality problems.

Fig. 2 .
Fig. 2. π model of the distribution electrical network

Fig. 3 .
Fig. 3. Modified π model of the distribution electrical network

Fig. 5 .
Fig. 5. Single phase rectifier as a model for the majority of electronic apparatus

Fig. 6 Fig. 6 .
Fig.6shows the voltage and current measurements obtained for a TV set and the equivalent simulated waveforms.

Fig. 7 .
Fig. 7. Grid voltage and current waveform obtained for a washing machine; a) b) Measured with a Fluke 435, THD i =46.7%; c) Obtained with the simulated model, considering voltage THD v =5%; d) Simulated current harmonics, THD i =47.85% and PF=0.76; e) Obtained with the simulated model, considering voltage THD v =5% and a saturated inductance; f) Simulated current harmonics, THD i =45% and PF=0.5 www.intechopen.comElectrical Generation and Distribution Systems and Power Quality Disturbances 192 a) b) and the equivalent simulated waveforms are shown in figures 7 c) d) where P=1kW, and the filtering inductance is obtained from (12) assuming k=0.1.Comparing figures 7 b) and 7 d) the measured and simulated currents THD as well as the harmonic contents are similar.Still, the current waveforms of Fig. 7 a) c) present some differences.To obtain similar current waveforms, the saturation effect of the input inductance should be considered, as shown in Fig. 7 c) d).

Fig. 8 .
Fig. 8. Three phase rectifier as a model for an electronic equipment of a small industry

Fig. 10 .
PhotovoltaicPanel K D (15) depends on U DC voltage and on the maximum value max 2 www.intechopen.comDesign of a Virtual Lab to Evaluate and Mitigate Power Quality Problems Introduced by Microgeneration 195 Fig. 13.a) Current and voltage waveforms of a single phase VSI obtained with the simulated model; b) Current harmonics and THD i =2.33%, PF=-0.999

Fig. 14 .
Fig. 14.Example of a small LV grid with a µG and a non-linear load Fig. 15.a) Grid voltage V grid and current waveform i nl obtained for the non-linear load; b) Current harmonics and THD i =47.55%,PF=0.15 Fig. 16.a) Waveforms of grid voltage V grid and current i grid ; b) Current harmonics and THD i =18.79%

Fig. 19 .
Fig. 19.Diagram block of the DC voltage controller and of the grid current controller to guarantee active filtering of the current harmonics introduced by the non-linear load

Fig. 20 .
Fig. 20.Simplified block diagram used to design the voltage controller From Fig. 20, the block diagram of the DC voltage controller is obtained and represented in figure 21.

Fig. 21 .
Fig. 21.Block diagram of DC stage voltage controller From Fig. 21, the voltage response to the disturbance introduced by the photovoltaic panel is given by (21): Fig. 22. a) Waveforms of grid voltage and current; b) Grid current harmonics and THD i =3.56%, PF=0.9999.; c) Grid current harmonics and THD i50 =1.55% (considering only till the 50 th order harmonic)

Fig. 25 .
Fig. 25.Topology of the simulated LV grid Design of a Virtual Lab to Evaluate and Mitigate Power Quality Problems Introduced by Microgeneration 203 No load scenario (15% S N ) -phase A No load scenario (15% S N ) -phase B No load scenario (15% S N ) -phase C Full load scenario (85% S N ) -phase A Full load scenario (85% S N ) -phase B Full load scenario (85% S N ) -phase C Voltage THD Current THD

Fig. 26 .
Fig. 26.Results obtained for 15 % and 85 % of the transformer rated power, without µG.Measurements carried out on the transformer LV side for each one of the groups of loads L1 to L6: a) Voltage THD; b) Current THD; c) Power Factor; d) Value of RMS voltage www.intechopen.comElectrical Generation and Distribution Systems and Power Quality Disturbances 204 Active µG -phase A Active µG -phase B Active µG -phase C Conventional µG -phase A Conventional µG -phase B Conventional µG -phase C

Fig. 27 .
Fig. 27.Results obtained for 15% S N of conventional µG or active µG: a) Voltage THD; b) Current THD; c) Power Factor; d) Value of RMS voltage Fig. 28.Results obtained for 85% S N of conventional µG or active µG; a) Voltage THD; b) Current THD; c) Power Factor Design of a Virtual Lab to Evaluate and Mitigate Power Quality Problems Introduced by Microgeneration 197 power quality issues, as current THD, reducing the LV grid harmonic pollution (and near unitary power factor). www.intechopen.com