Distributed Renewable Power Sources in Weak Grids — Analysis and Control

This chapter describes the main aspects about distributed generation (DG) systems and investigates the operation of DG systems based on static power converters connected to weak grids. Initially, the concept of DG is discussed, and the main topologies for the con‐ nection of DG systems to the grid are covered. Converters used in such applications are also introduced. When connected to weak grids, DG systems based on static power con‐ verters suffer with problems related to the total harmonic distortion (THD) at the connec‐ tion point. To address this issue, initially, a definition of weak grid is presented. Then, the dynamic behaviour of the most common small DG system when connected to a weak grid and the relation between the voltage harmonic distortion and the weak grid impe‐ dance are analyzed. Aiming to comply with the THD requirements, the main topologies of passive filter used in the connection of inverter-based DG units with weak grids are also discussed. Finally, a controller design that considers the grid side impedance in its formulation is developed. Experimental results are provided to support the theoretical analysis and to illustrate the performance of the grid-connected DG in a weak grid case operation scenario.


Introduction
A large amount of research effort has been made in order to diversify the primary energy sources and to accommodate the growth in consumption. This consumption growth, allied to the limited power generation capacity of traditional power plants, is encouraging the development of distributed generation (DG) systems. Figure 1 illustrates a simplified diagram of a grid-connected DG concept. The use of generation near to the consumption centres instead of the traditional large centralized power plants provides many advantages such as reduction of the power losses in transmission and distribution lines, improvement in power quality, reduction of the power usage of the high voltage (HV)/medium voltage (MV) transformers and reliability improvement of the power supply. It also provides less environmental impact. However, the DG systems are frequently connected in rural areas where weak grids are prominent. MV radial distribution feeders serving relatively wide areas are common in rural areas of developing countries. Usually, these grids are connected to radial subtransmission systems (up to 110 kV) that can also cover long distances. As a result, high short-circuit impedances characterize these distribution networks. Consequently, noticeable voltage differences between different locations are to be expected and certain power quality issues can arise.
The main forms of primary sources used in DG are wind generation, photovoltaic generation and hydro generation. Other primary sources such as fuel cells, geothermal generation and cogeneration are less used. Particularly, wind and photovoltaic generations are becoming more cost-effective because of the evolution of material technology and the advances in power electronics solutions.
DG systems based on photovoltaic or wind depend on the use of power converters to adequately process the power to allow the connection to the grid. The use of such converters allows the use of same DG system in grid-tied operation or, in some cases, in stand-alone operation. In grid-tied mode, the power is injected in the grid, while in the stand-alone operation, the DG is the electrical supply for a local load that is not connected to the grid. Figure 2 illustrates this concept. In this figure, a hybrid DG system composed of a wind generator and a solar panel is connected to the grid. In addition, a stand-alone DG system supplies a local load and possesses the capability to store energy that can be used when the primary energy source is unavailable.
In the electrical system depicted in Figure 2, the synchronous generator G 2 represents a large hydroelectric power plant and it is connected to the step-up transformer T 4 through the impedance Z g2 . The transformer T 4 raises the voltage from B 6 to B 5 ( V B 5 > 230kV ). From the bus B 2 , the energy generated by G 2 reaches the step-down transformer T 2 passing through the line impedance Z LT2 . The transformer T 2 takes the transmission voltage level and adapts itself to transmission-level voltage to the primary distribution voltage (13.8 kV). Distribution lines whose impedances are Z LT1 and Z LT3 and the power transformers T 1 and T 2 are shown in the central region of Figure 1. The central region between the buses B 2 , B 3 and B 7 marks the interconnection between DG units and the centralized generation G 2 .
The B 1 bus from Figure 2 represents the connection point of a single-phase hybrid wind/ photovoltaic distribution generation unit with the grid. Note that the coupling of the two forms of primary energy (G 1 -wind and P 1 -photovoltaic) is done through a shared DC bus represented by B CC . The inverter of the hybrid DG unit located between the buses B CC and B 1 is connected to the local load C 1 and the distribution transformer T 1 . The inverter of the DG unit works at secondary distribution voltage level (e.g. 220 V line-to-line root mean square, RMS).
The bus B 8 in Figure 2 represents the connection point of a wind generation unit to the threephase distribution grid. This unit is formed by an induction generator with a gearbox. The induction generator allows generation of constant frequency independent of the shaft speed. The equivalent series impedance of the induction generator G 4 is represented by Z g4 . The nominal voltage of the G 4 connection point with the distribution grid is the secondary distribution voltage. The generator G 4 shares the connection point with the loads C 3 -C 5 , represented by C 3..5 , which are typical residential or commercial consumption loads at the secondary distribution voltage level. Figure 2 also depicts the stand-alone use of DG. This situation can arise from an intentional or unintentional disconnection of some subsystem from the main grid where the load is critical and cannot tolerate power outages. The bus B 10 represents the connection point of the standalone distribution generation with the critical load C 2 . In this example, the DG is connected to the load through a three-phase inverter and a transformer T 5 . Since the load C 2 is critical, a battery bank is used to store energy to be used in the cases that the prime source is not available.
As previously mentioned, several DG systems use static power converters to connect the primary energy source to the grid. These converters use passive filters, based on inductive and capacitive elements, to mitigate the harmonic content of the pulse width modulation (PWM). When the DG connection is made at the secondary distribution voltage level, in several cases, the length of the distribution line is large so that the equivalent series impedance between the DG system and the substation transformer is not negligible. In those cases, the interaction of the coupling filter of the inverter with the grid impedance can lead to undesirable resonances that must be considered in the design stage of the control system. In addition, the dynamic interaction of the DG with a weak grid can degrade the power quality even if the resonance is not an issue.
This chapter considers a wind single-phase DG system and explores the problem of the power quality degradation when the system is connected to weak grids. In addition, the main concepts of DG are covered, such as main topologies for DG connected to the grid, power converters for DG, definition of weak grids and the effects of the use of inductive (L) or inductive-capacitive-inductive (LCL) filters in weak grids connection. It also presented a complete control system design model, some simulations and experimental results to illustrate the analysis. Figure 2 showed a typical distribution grid in which different possible connection topologies for DG were illustrated. In this section, further attention is given to describe possible connection topologies for DG. The main static power converters used in such applications are also addressed. Then, a mathematical model of a commonly used DG system, adequate for the purposes of dynamic analysis and control design, is developed.

Topologies to connect DG into the grid
Two main approaches are usually used to connect DG systems to the grid. In the first one, an AC bus is shared among the DG units. Each DG unit has its own DC bus and output inverter. In the second approach, a DC bus is shared among the different generator units. Then a single inverter is responsible for the connection of the DG to the grid. Figure 3(a) illustrates the first case and represents two different DG systems based on power inverters sharing the same AC bus, denoted by B AC . The outputs of the inverters are synchronized with the voltages at the connection point B AC. A transformer T 1 connects the system and the load C 1 to the main grid. Figure 3(b) depicts the second case where two DG units share the same DC bus, for example, photovoltaic arrangement and a permanent magnet synchronous generator (PMSG) with controlled rectifier. Note that, in the case of DC coupling, there are no individual inverters. However, DC/DC (for photovoltaic unit) and AC/DC converters (for wind generation) are necessary. It is worth pointing out in Figure 3(b) that the synchronization with the AC bus is done by only one inverter, which connects the generation unit to the main grid through a transformer T 1 . The choice of coupling the units through a unified DC bus has the advantages of allowing centralized control of parameters as power, voltage and current. With the AC coupling, a single synchronization algorithm with the utility grid can be used.
generation unit to the main grid through a transformer T1. The choice of coupling the units through a unified DC bus has the advantages of allowing centralized control of parameters as power, voltage and current. With the AC coupling, a single synchronization algorithm with the utility grid can be used.   Figure 4 shows a hybrid bus connection where some DG units are grouped in a DC bus and other units are grouped in an AC bus. It can be noted that DG3 and DG4 units are grouped into the AC bus via separate converters, as well as in Figure 3(a). The difference is that in Figure 4, there is also a group of DG units sharing the same single DC bus. As can be noted, DG1 and DG2 units are engaged on the bus BCC by means of suitable converters. The rectifier of DG1 controls the BCC voltage. Likewise, the DC/DC converter for DG2 regulates the DC output voltage in order to deliver power to the BCC bus.    Figure 3(a). The difference is that in Figure  4, there is also a group of DG units sharing the same single DC bus. As can be noted, DG 1

Static power converter for DG applications
The most common converter topology in DG is the full-bridge converter in an AC/DC/AC configuration known as a back-to-back converter. In this configuration, two full-bridge converters share the same DC bus. One converter acts as a rectifier (on the generator side) and the second converter acts as the inverter (connected to the grid). When insulated gate bipolar transistors (IGBTs) are used, the converter allows bidirectional flow of energy. The schematic diagram of a full-bridge three-phase AC/DC/AC converter is shown in Figure 5. to an arrangement of the panels in the DC bus [1] or the uses of a DC/DC [2] boost converter. A full-bridge inverter is usually used at the output of the DG system for the grid connection.
Wind generators have alternating output voltage and current. Usually, PMSGs, doubly fed induction generators (DFIG) and traditional synchronous generators also employ power inverters for the connection with the grid. A DFIG-based system has a power conversion rating of 30% of the nominal power of the wind turbine.
In the case of the PMSG, the frequency is directly proportional to the machine rotor speed [3]. Thus, generation units with PMSG without static power converters must have a mechanical speed adjustment system. In certain applications, the mechanical speed control has a slow time response that cause variations in the frequency generated. In the cases in which mechanical adjustment of the angle of the blades is insufficient, the DG system will work with variable voltage frequency. To cope with that problem, a static power converter is mandatory.
Applications of PMSG with variable speed use an inverter to synchronize the generation with the grid (for grid-tied applications) or to ensure constant frequency and voltage at the load (for stand-alone applications). For PMSG-based systems, an AC/DC/AC converter may also be used. Figure 6 illustrates the elements of an AC/DC/AC converter used to connect a DG unit to a single-phase grid. In this converter, a three-phase noncontrollable rectifier to lower the converter cost is used on the machine side converter (MSC). On the grid side converter (GSC), a full-bridge inverter is responsible for the connection with the grid.
The DC bus may consist of batteries, capacitors or super capacitors. Batteries have improved the stability of bus voltage level but have a high charge and discharge time. Capacitors have a low charge time constant, but in return, the constancy of the voltage on the bus is impaired compared with the battery systems. Finally, circuits with super capacitors promise quick charge maintaining a constant voltage at DC bus, but at a higher cost than the other two technologies.
bipolar transistors (IGBTs) are used, the converter allows bidirectional flow of energy. The schematic diagram of a full-bridge three-phase AC/DC/AC converter is shown in Figure 5. The topologies of static converters used in DG units depend on the generator technology. In photovoltaic systems, the voltage and current of the photovoltaic panel are continuous and generally have low amplitude. The connection of PV systems to the distribution network leads to an arrangement of the panels in the DC bus [1] or the uses of a DC/DC [2] boost converter. A full-bridge inverter is usually used at the output of the DG system for the grid connection.
Wind generators have alternating output voltage and current. Usually, PMSGs, doubly fed induction generators (DFIG) and traditional synchronous generators also employ power inverters for the connection with the grid. A DFIG-based system has a power conversion rating of 30% of the nominal power of the wind turbine.
In the case of the PMSG, the frequency is directly proportional to the machine rotor speed [3]. Thus, generation units with PMSG without static power converters must have a mechanical speed adjustment system. In certain applications, the mechanical speed control has a slow time response that cause variations in the frequency generated. In the cases in which mechanical adjustment of the angle of the blades is insufficient, the DG system will work with variable voltage frequency. To cope with that problem, a static power converter is mandatory.
Applications of PMSG with variable speed use an inverter to synchronize the generation with the grid (for grid-tied applications) or to ensure constant frequency and voltage at the load (for stand-alone applications). For PMSG-based systems, an AC/DC/AC converter may also be used. Figure 6 illustrates the elements of an AC/DC/AC converter used to connect a DG unit to a single-phase grid. In this converter, a three-phase noncontrollable rectifier to lower the converter cost is used on the machine side converter (MSC). On the grid side converter (GSC), a full-bridge inverter is responsible for the connection with the grid.

Renewable Energy -Utilisation and System Integration
Another important feature of the AC/DC/AC circuit in Figure 6 is the possibility to regulate the DC bus voltage using decoupled controllers. The DC bus voltage control gives the possibility of hybrid generation systems where the different generations are connected at the DC bus. This is illustrated in Figure 6, for example, where a photovoltaic unit G 2 (with regulated DC output voltage) and a wind power unit G 1 are connected to the grid by the DC bus.
The connection of wind and photovoltaic units to the distribution network is extensively discussed in the literature. With the advances in power electronics, full-power switched converters or full-bridge AC/DC/AC converters are widely used to control the current and voltage at the connection point. The strategy of PWM is used in most applications, which use the full-power converters. The PWM is used to synthesize the control actions needed to ensure that the reference tracking of the output quantities (current, voltages, frequency or power) are achieved. Several PWM strategies are found in the literature. The more common techniques are the following: three-level sinusoidal modulation, two-level sinusoidal modulation, space vector modulation and multilevel modulation. Each modulation strategy is associated with a different frequency spectrum obtained by the Fourier series of the output voltage of the inverter.
The voltage that arises from the switching of the PWM logic is a discontinuous function and has high total harmonic distortion (THD). To ensure minimum levels of power quality, lowpass filters are used at the output of the inverters used in wind and photovoltaic generations.

Mathematical models for DG primary sources
About the nature of primary energy, the DG units can be classified as wind, photovoltaic, hydro, biomass and cogeneration. Each form of conversion of primary energy into electrical energy has its own dynamic characteristic. This dynamic feature determines the design and operation and the connection of the device to the load. The most promising primary energy sources for DG, which has become widespread in recent years, are wind, solar and hydro power plants.
The main DG power primary sources are as follows: Figure 6. AC/DC/AC converter for single-phase connection.
The DC bus may consist of batteries, capacitors or super capacitors. Batteries have improved the stability of bus voltage level but have a high charge and discharge time. Capacitors have a low charge time constant, but in return, the constancy of the voltage on the bus is impaired compared with the battery systems. Finally, circuits with super capacitors promise quick charge maintaining a constant voltage at DC bus, but at a higher cost than the other two technologies.
Another important feature of the AC/DC/AC circuit in Figure 6 is the possibility to regulate the DC bus voltage using decoupled controllers. The DC bus voltage control gives the possibility of hybrid generation systems where the different generations are connected at the DC bus. This is illustrated in Figure 6, for example, where a photovoltaic unit G2 (with regulated DC output voltage) and a wind power unit G1 are connected to the grid by the DC bus.
The connection of wind and photovoltaic units to the distribution network is extensively discussed in the literature. With the advances in power electronics, full-power switched converters or full-bridge AC/DC/AC converters are widely used to control the current and voltage at the connection point. The strategy of PWM is used in most applications, which use the full-power converters. The PWM is used to synthesize the control actions needed to ensure that the reference tracking of the output quantities (current, voltages, frequency or power) are achieved. Several PWM strategies are found in the literature. The more common techniques are the following: three-level sinusoidal modulation, two-level sinusoidal modulation, space vector modulation and multilevel modulation. Each modulation strategy is associated with a different frequency spectrum obtained by the Fourier series of the output voltage of the inverter.
The voltage that arises from the switching of the PWM logic is a discontinuous function and has high total harmonic distortion (THD). To ensure minimum levels of power quality, lowpass filters are used at the output of the inverters used in wind and photovoltaic generations.  The units of wind and photovoltaic generation, among the primary sources cited, are the most applicable forms for micro-and mini-generation residential units. However, the generation of hydroelectric units have high power density, high efficiency and dominant technology resulting in a reduced cost per watt installed.

Mathematical Models for DG Primary Sources
As this chapter deals with the connection of small-scale DG to the single-phase mains, we chose to implement the most appropriate generation technologies for residential applications.
The frequency response of a single-phase generation system from the common connection point aspect is dependent on the following two excitation functions: the inverter output voltage and the voltage of the single-phase grid. The connection system analysis can be made considering the grid voltage as a disturbance in the control diagram. The frequency response of a quantity in a system with two excitation sources is given by superposition of responses from each excitation source individually, considering the other null. Consider that a source of zero voltage is the same as replacing the source to be annulled by a short circuit.
Consider a generic system with five complex impedances represented by Z n , depending on the complex frequency s. Figure 7 shows the general diagram of impedance considering two ideally sinusoidal sources, V 1 and V 5 . The generic model presented can be applied to model the connection point of a single-phase inverter to the power grid, considering the inverter output voltage V inv (s) = V 1 (s), V 4 (s) = V PCC (s) and V grid (s) = V 5 (s). The other definitions taken to the generic diagram are the following:  Cogeneration  Biomass generation ogeneration plants use heat energy remaining in industrial processes, sometimes calle ocess heat, to generate steam for moving pressure turbine electric generators. The heatin d water vapour generation can also be performed through combustion of biomas omass is composed of plant remains, such as sugarcane bagasse.
e units of wind and photovoltaic generation, among the primary sources cited, are th ost applicable forms for micro-and mini-generation residential units. However, th neration of hydroelectric units have high power density, high efficiency and dominan chnology resulting in a reduced cost per watt installed.
s this chapter deals with the connection of small-scale DG to the single-phase mains, w ose to implement the most appropriate generation technologies for residenti plications.
e frequency response of a single-phase generation system from the common connectio int aspect is dependent on the following two excitation functions: the inverter outpu ltage and the voltage of the single-phase grid. The connection system analysis can b ade considering the grid voltage as a disturbance in the control diagram. The frequenc sponse of a quantity in a system with two excitation sources is given by superposition o sponses from each excitation source individually, considering the other null. Consider th source of zero voltage is the same as replacing the source to be annulled by a short circuit onsider a generic system with five complex impedances represented by n Z , depending o e complex frequency s. Figure 7 shows the general diagram of impedance considering tw eally sinusoidal sources, 1 V and 5 V . The generic model presented can be applied to mod e connection point of a single-phase inverter to the power grid, considering the inverte tput voltage inv

Renewable Energy -Utilisation and System Integration 206
The complex impedances of Figure 7 are defined in function of the filter parameters and the grid parameter. According to Figure 7,Z 1 = s L 1 , The single-line diagram that represents the connection of a distributed generating unit to the grid and the local load through a full bridge converter is shown in Figure 8. The diagram in Figure 8 is based on the generic circuit of Figure 7. The single-line diagram that represents the connection of a distributed generating unit to the grid and the local load through a full bridge converter is shown in Figure 8. The diagram in Figure 8 is based on the generic circuit of Figure 7.
and  Figure 7. The transfer functions, this way, are obtained as follows: wherein the transfer functions In the expressions (3)-(6), the constants that multiplies the frequency 's' are as follows:

Weak grids
The grid can be represented by an alternating current voltage source having an internal impedance Z grid . The impedance seen from the DG system connection point may vary depending on local characteristics and the voltage level (distribution or transmission). For a system connected to the distribution network, for example, the impedance seen from the DG connection point has contributions of the internal impedance of the input, the line impedances of the transformers from the distribution bus to the transmission, the impedances of the voltage regulators in the passage and the loads connected across the line. The block diagram in Figure  9 shows the power flow from the connection point to the distribution substation bus to the DG system connected to the distribution grid. . The impedance seen from the DG system connection point may va ending on local characteristics and the voltage level (distribution or transmission). For tem connected to the distribution network, for example, the impedance seen from the D nection point has contributions of the internal impedance of the input, the li edances of the transformers from the distribution bus to the transmission, t edances of the voltage regulators in the passage and the loads connected across the lin block diagram in Figure 9 shows the power flow from the connection point to t tribution substation bus to the DG system connected to the distribution grid.   Figure 9 shows the equivalent series impedances for each element from the connection point to the distribution substation bus. The connection point is represented by B PCC . The electrical low-voltage network from the connection point to the secondary voltage terminals of the distribution transformer has a series of equivalent impedance represented in Figure 9 by Z LV = R LV + j X LV . The secondary voltage terminals of the distribution transformer are represented by B LV . The equivalent series impedance of the distribution transformer, referred to the low-voltage side, is represented in Figure 9 by Z Trans = R Trans + j X Trans . The primary distribution voltage terminals, HV transformer, are represented in Figure 9 by B HV . The distribution line primary impedance, from the HV terminals of the transformer to the distribution substation, referred to the low-voltage side is represented by Z HV = R HV + j X HV . Finally, the substation is represented by the bus B SUBS . The total impedance Z total is given by the expression: and, as can be seen in Figure 9, R total = R LV + R Trans + R HV eX total = X LV + X Trans + X HV .
Define the fundamental component of the PCC voltage by V PCC = | V PCC | e jδ and the infinite bus voltage fundamental component by V GRID = | V GRID | e j0 . The active power transferred from the PCC to the grid is given by the expression: | Z total | 2 and δ is the load angle [3].
It can be noted in expression (8) that the transferred power is inversely proportional with the amplitude of the impedance between the PCC and the grid, if the total resistance is considered zero. Moreover, it is noted in the first term of expression (8) that the power P 12 varies with the sine of the load angle minus the angle α z . The second term of the expression (8) represents the active power dissipated in the equivalent resistance between the PCC and the grid. As greater is the power transfer capability between the PCC and the grid, the stiffer is the grid. There are two main indicators that measure the strength of a network: The short circuit ratio at the connection point, defined by the SCR or by inductive-resistive ratio IRR. As shown in [4] and [5], SCR is defined by the expression: where S nominal is the rated apparent power of the DG unit, Z total is the equivalent Thevenin impedance, seen from the connection point, and V PCCnom is the generated rated voltage for the DG connection point. Weak grids are characterized for SCR < 10.
Another way of measuring the grid strength is by the IRR ratio, defined by the ratio between the equivalent reactance view of the connection point and the equivalent resistance R seen from PCC, namely total total IRR . = X R (10) The grid is considered weak if IRR < 0.5 [4].
The grid is considered weak if the SCR indicator or the indicator IRR reaches values below 10 and below 0.5, respectively. In this chapter, simulation analysis and experimental results are given disregarding the resistive portion of the grid impedance, that is, considering R total = 0.
This choice leads to an IRR indicator that tends to infinity, and thus the network is classified as poor only by the SCR indicator. Another direct consequence from the equation (8) is that if R total = 0, then α z = 0, and the second term of equation (8) is zero too. If this assumption is made, the power transferred by the DG power unit is inversely proportional to the total reactance and equation (8) becomes The choice for ignoring the resistive portion is made to simplify the numerical and experimental analyses. Since R total is equal to zero, the impedance of the grid is simple X total . Note that if X total = L total ω, with L total being the total inductance from the PCC to the HV bus and ω is the angular frequency of the distribution network, then it is possible to derive the total inductance threshold between a strong network and a weak network. From equation (9) results, Knowing the rated characteristics of the generation system, from the equation (12), by replacing SCR = 10, we can determine the inductance threshold between a weak network and a strong network. The impedance grown from PCC to the HV bus limits the active power supplied by the DG unit. Beyond this problem, the switched AC/DC/AC converters face another problem when connected to weak grids: The harmonic distortion at PCC. The DG system inverter is seen from the PCC as a harmonic generator. The low-pass filter parameterization in the inverter output is very important to the performance and stability of the DG system. The main filters used in the literature, considering the weak grid problems, are explained in the next section.

Analysis of L and LCL filters connected in weak grids
The most used low-pass filters in renewable DG systems (RDGS) are generally passive and can be implemented with L, LC, LCL or LLCL topologies. The L filter topology is indicated [6] for low-power generation connected to the grid and without local load. The problem of using L filters becomes apparent when the generation unit is located at a point in the network where there is a high grid series equivalent impedance. For these cases, the effect of the voltage drop across the line impedance results in a higher THD for both current and voltage at the connection point [7]. When a local load is considered, the problem becomes even more evident. The voltage and current THD at local load connected at the PCC depend on the grid parameters, the characteristics of the passive filter, the harmonic spectrum of the output current of the inverter and the characteristics of the local load current. The problem of high current THD at the PCC can be mitigated by using a capacitive filter. Therefore, LC and LCL filter topologies are most applicable to systems with local load and high-impedance network. LCL filters are preferable to the LC filter by presence of the inductive element in line with the series grid impedance.
In this section, several passive filters' mathematical models will be shown, in both time domain and complex domain. Simulation results are presented to exemplify the model analysis. Figure  10 shows grid voltage and current waveforms that were obtained using computational simulations, considering a 2.2-kW generation setup, an inductive filter with L=2 mH, and a strong grid where the equivalent line impedance is L grid = 2μH. The THD of the voltage waveform shown in Figure 10 is 0.069%, while the current waveform THD is 3.427%. In this case, both waveforms are considered of good quality, since they present low THD, below 5%. In weak grids, the THD of PCC voltage grows considerably when the same inductor of previous case is used. This effect is shown in Figure 11. In this case, the line inductance is set to L grid = 1.5mH to evaluate the response of same RDGS connected to a weak grid.
In Figure 11, the current THD for a weak grid is 2.116%, lower than the THD for the same system connected to a strong grid. However, the voltage THD in same figure is 27.34%. It can be noted that voltage THD grows significantly in PCC for a weak grid. Moreover, when local loads are connected in PCC, HV THD is unacceptable. In most cases where weak grids are connected to RDGS with inductive (L) filters, a significant raise of physical size of connection inductor in order to reduce the voltage THD is necessary.
In most situations, this rising makes the implementation unviable. On the other hand, from the controller viewpoint, the utilization of pure inductive filters only inserts a first-order dynamic in connection point such that the current control is generally easier than in other filter topologies.
The LCL filter is usually a good option to weak grids applications. The LCL filter inductances are generally lower than equivalent one in the L filter for the same grid impedance and the same voltage THD. Since now the LCL filter has three dynamical elements, the controller must be able to operate with an insertion of a third-order dynamic in PCC. This condition requires more analysis and careful designing of the current controller. When an LCL filter is considered the choice of filter, resonance frequency must take into account the switching frequency and fundamental frequency. A reasonable choice discussed in the literature is the resonance frequency to be ten times the fundamental frequency and half the switching frequency. This choice allows high frequencies of PWM modulation to be sufficiently attenuated, while the resonance frequency does not affect the control variables in fundamental frequency.
A design approach for LCL filter to be used in weak grids are presented and discussed in a sequence.

Design of an LCL passive filter for weak grid connection
As in [8] and [9], the system base impedance can be defined by the following expression: Figure 11. PCC current and voltage of single-phase RDGS connected to weak grid using L filter.

Renewable Energy -Utilisation and System Integration
where Z b is the base impedance, E n is the nominal RMS line voltage and P n is the nominal active power. As a numerical example, if E n = 127V RMS and P n = 2.2kW are given in a low power RGDS, then Z b = 7.331Ω. The system base capacitance is given by the expression: whereω g is the fundamental angular frequency of the system. Thus, considering a grid with 127 V RMS nominal voltage and 60 Hz nominal frequency, the base capacitance C b = 361.8 μF. Moreover, the base capacitance relates to filter capacitance (C f ) through γ cap as follows: As practical design recommendation [8], the maximum capacitance of the LCL filter (C fmax ) is recommended not to exceed 5% of base capacitance C b such that γ capmax = 0.05. In this way, C f = 10μFcan be a good choice, and it will be considered in the next analysis.
The filter output equivalent inductance is denoted by L 0 and is given by the sum of grid inductance L grid and filter output inductance L 3 , where local load is not considered. The parameter L 0 relates to input inductance L 1 by a factor γ i such that In [9], it is shown that the voltage amplitude in the switching frequency for three-level PWM modulation, which corresponds to 200th harmonic, is 0.473 pu of nominal peak voltage. In [8], an important relationship for the inductor current amplitude in the inverter side and the inverter output voltage is given, which is valid for the switching frequency f sw = h sw 60, such that 1 sw g sw g sw g 1 From equation (17), it is possible to compute L 1 if the current amplitude in the switching frequency and voltage harmonic order are known. The procedure for determining L 1 using expression (17) starts from the specification of maximum per unit amplitude for the desired current in L 1 . In [9], the maximum amplitude is set to 0.3% for harmonic currents above 35th order. The second stage to obtain L 1 is to determine the per unit amplitude of the inverter output voltage in the switching frequency. For the given values and using a spectral analysis, When considering practical applications, an approximation L 1 = 1 mH can be used for the inductor given in (18).
The relationship between the currents of grid side inductor i L 1 and the inverter side inductor i L 2 at the switching frequency (h sw harmonic) is given by In (19), γ 1 is the proportionality factor between L 0 and L 1 . Considering design parameters, Figure 12 shows i L 1 (h sw ) / i L 2 (h sw ) for a range of γ 1 from 0.5 to 4.5.  Figure 12 shows that 0.3% attenuation in current is obtained for γ 1 > 2.34. Thus, from (19), the filter output equivalent inductance is determined as L 0 = L 2 + L g = 1.92mH. For practical implementation, the value L 0 = 2mH is considered.
The resonance frequency must be verified from the design parameters obtained in the previous procedure (L 1 = 1mH, C f = 10μF,L 0 = 2mH). As in [8], it is considered that the resonance frequency definition is given by 1949Hz. w Taking into account the required interval for the resonance frequency 10 f s < f res < 0.5 f sw , where f sw = 12kHz, it can be seen that the designed parameters can be used for practical implementation. From these LCL-designed parameters, a numerical simulation is performed considering a weak grid and the obtained PCC voltage and current are shown in Figure 13. The current THD for the waveform shown in Figure 13 is 1.31%. It can be seen that the use of LCL filter in the connection of RDGS to a weak grid resulted in a lower current THD compared to the case of an L filter being connected to a strong grid. The voltage THD obtained for the waveform of Figure 13 is 1.22%, much lower (THD V LCL = 0.04 THD V L ) than voltage THD for a pure L filter in same conditions in Figure 11.

Controlled converters connected to weak grids
Many control topologies applied to DG are available in the literature, in static and synchronous reference frame (d-q axis). The proportional-integral (PI) controllers can be utilized in static reference frame, but the zero steady-state error is not achieved for this case. The static reference frame PI has the advantage of being easily parameterized. There are others topologies that achieve zero steady-state error. The proportional-resonant (PR) controller reaches zero steadystate error with good dynamic performance, considering a fixed fundamental frequency [10] [11]. Otherwise, as is presented in [12], the application of PR controllers in single-phase grids with LCL filter has limited stability margins. Other researches, like in [13] and [14], utilize discrete deadbeat controllers, which have a strong dependency on the electric parameters variations.
An interesting solution to control a voltage source inverter (VSI) connected to a single-phase grid with zero steady-state error is to utilize synchronous reference frame controllers. The alternate quantities are synchronized with the PCC frequency and become continuous because of the Park transformation [15], [16], [17].
In the synchronous reference frame, the reference voltage and current quantities are constants. This way is possible to guarantee good dynamic response and zero steady-state error, utilizing simple synchronous reference frame PI controllers. Considering the LCL filter connection, some studies show that the gain in the resonance frequency can be damped by inserting a damping resistor in series with the capacitor called the damping resistor [18]. The damping can be passive (fixed) and active (switched).
Particularly for the case of single-phase connection of DG unit, the general diagram that represents all the elements involved in the conversion and power conditioning process is shown in Figure 14. The capacitive reactance is given by X c = 1 / ωC, inversely proportional to the fundamental frequency of the power grid. Therefore, an approach to low frequencies in the vicinity of 60 Hz is to disregard from the control analysis the dynamics of the capacitive element from LCL filter calculated above. This consideration, as will be shown in sequence, not only significantly changes the characteristic low-frequency system but also simplifies the fourth-order system, shown above, resulting in a first-order system.
If the LCL filter capacitor is dismissive of the methodology of parameterization of the controller, then the equivalent circuit of inverter output voltage connection to the connection point is simplified, as shown in Figure 15. From Figure 15, disregarding the L 1 and L 3 inductors internal resistances, results in Considering an additional β axis shifted 90º from the natural axis α, the currents derivative in the filter is Consider the original system of the Figure 8. Disregard the capacitor branch, and then i inv dq = i 3 dq . With that, the line inductance from inverter to PCC becomes The simplified dynamic system is represented by the ratio In this example, it is desired to control the current loop using a PI type controller. Thus, the control output for this type of controller is defined by the expressions For the first-order region of Figure 16, the current controller design for the system of fourthorder plant can be simplified by the project with the first-order plant, modelled by the transfer function of equation (37).
Gains for a classic PI controller are given by the expressions: ( ) The grid current control parameterization in d-q axis, considering the first-order region in Figure 16, follows the equations (38) and (39). Thereby, it was considered a damper factor ξ = 1, L total = 1.5mHand a cut frequency of ω = 1200 π rad/s and the gains were calculated. Therefore, K p i3d = K p i3q = 4.55and K i i3d = K i i3q = 3459 was obtained. The discrete gains calculated, considering the Euler discretization method, are Kpd i3d = Kpd i3q = 4.55 and Kid i3d = Kid i3q = 0.288.
Renewable Energy -Utilisation and System Integration 220

Practical application example
One way to apply the models and control techniques discussed above is to implement a microcontroller system as shown in Figure 17. The implemented system has a mechanical interface powered by a 'wind turbine emulator', which regulates the torque and the speed of a three-phase PM generator. The three-phase generator used, a W-Quattro WEG 2.2 kW, has a nominal line voltage of 220 V at no load. Both the three-phase rectifier and the inverter used are composed of SKM50GB063D Semikron IGBT modules. The DC bus is composed of an equivalent capacitance 32 mF and supports up to 500 VDC. The IGBT modules drive are accomplished through Semikron SKHI-22BR drivers, which have current and voltage surge protection circuit and automatic blocking on error. The control system shown in Figure 17 applies a TMS320F28069 microcontroller, from the Piccolo family, which has 90 MHz operating frequency, co-math coprocessor, real-time debugging and additional six PWM modules for drivers. The voltage and current measurements necessary for the control algorithm are performed by means of transducers. The transducers used for current were the LEM-LA55P and for voltage the LEM-LV25P. An instrumentation circuit, specially developed for the application described in this section, conditions the transducer output signals. Basically, the instrumentation circuitry comprises an attenuation of the common mode noise step, a filtration step and a protection step, which is implemented with instrumentation amplifiers INA128P, AD706 and rail-to-rail modules for protection.
The assembly of the elements of Figure 17 results in the laboratory arrangement shown in Figure 18.
The experimental validation of the current controllers parameters, calculated in Section 4, was made by adjusting the filter output current. The isolated load considered in the experiments is purely resistive, with 12.5Ω of effective resistance.
The LCL filter used for this current loop test has the parameters calculated in Section 4. It was considered steps in the i d ref reference, while maintaining constant i qref = 0. The current reference steps were 1A, 2A, 3A and 4A. Figure 19 shows the voltage and current responses to changes in the reference current. Figure 20 shows the waveforms in detail considering the current transition from 3A to 2A in Figure 19.
It should be noted in Figure 20 that there is a distortion in the voltage and current zero crossing at the connection point. This distortion is caused by the dead time of the Driver SKHI 22BR, by default equal to 2.3 ms. The results presented in Figure 20 show that voltage at the connection point has low harmonic distortion when using LCL filter.   Distributed Renewable Power Sources in Weak Grids -Analysis and Control http://dx.doi.org/10.5772/61613

Conclusions
It is clear that DG offers many advantages by including generation near to the consumption centres. The main advantages include fewer losses in power transmission, less environment impact and more reliability in power supply. However, the DG also offers new challenges, since, in several cases, it is close to low voltage loads. It is necessary to increase the voltage in connection point to achieve power flow that can lead to an overvoltage in distribution loads. In addition, this power generation needs to deal with resonances since, in most cases, high distribution line impedances are combined with the passive filters of the converters used in DG schemes. In this chapter, these effects were analyzed considering weak grids. Simulation analysis shows that it is possible to deal with these issues using well-designed control schemes and LCL converter filter. In addition, an experimental 2.2-kW prototype was used to show the feasibility of DG for low-power consumer structures.