## 1. 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}
_{.} 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 *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 three-phase 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 stand-alone 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.

## 2. Renewable energy sources in DG

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.

### 2.1. 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.

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 DG_{3} and DG_{4} 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, DG_{1} and DG_{2} units are engaged on the bus **B**_{CC} by means of suitable converters. The rectifier of DG_{1} controls the **B**_{CC} voltage. Likewise, the DC/DC converter for DG_{2} regulates the DC output voltage in order to deliver power to the **B**_{CC} bus.

### 2.2. 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.

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.

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 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, low-pass filters are used at the output of the inverters used in wind and photovoltaic generations.

### 2.3. 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:

Cogeneration plants use heat energy remaining in industrial processes, sometimes called process heat, to generate steam for moving pressure turbine electric generators. The heating and water vapour generation can also be performed through combustion of biomass. Biomass is composed of plant remains, such as sugarcane bagasse.

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.

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 *s*. Figure 7 shows the general diagram of impedance considering two ideally sinusoidal sources,

The complex impedances of Figure 7 are defined in function of the filter parameters and the grid parameter. According to 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.

The Laplace transform of the filter output current and of the point of common coupling (PCC) voltage can be written, respectively, by the expressions:

and

wherein the transfer functions

In the expressions (3)–(6), the constants that multiplies the frequency ‘s’ are as follows:

## 3. Weak grids

The grid can be represented by an alternating current voltage source having an internal impedance

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

and, as can be seen in Figure 9,

Define the fundamental component of the PCC voltage by

where *δ* 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

where

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

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

The choice for ignoring the resistive portion is made to simplify the numerical and experimental analyses. Since

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.

## 4. 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

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

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.

### 4.1. 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:

where

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 (

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

The filter output equivalent inductance is denoted by

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

From equation (17), it is possible to compute *L*_{1} that results in the equation:

When considering practical applications, an approximation

The relationship between the currents of grid side inductor

In (19),

Figure 12 shows that 0.3% attenuation in current is obtained for

The resonance frequency must be verified from the design parameters obtained in the previous procedure (

Taking into account the required interval for the resonance frequency

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.

## 5. 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 steady-state 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

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

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

The simplified dynamic system is represented by the ratio

Note that there is a coupling term

and

The two decoupled expressions for de grid current in rotating frame, depending on the control actions are

and

Note that the equations (27) and (28) are similar. Applying the Laplace transform in equations (27) and (28) can be obtained:

and

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

and

in which the current error

and

Applying the Laplace transform in equations the following can be obtained:

and

Define the transfer function

Figure 16 shows the Bode diagram of the complete transfer function

For the first-order region of Figure 16, the current controller design for the system of fourth-order 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:

and

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

## 6. 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

The LCL filter used for this current loop test has the parameters calculated in Section 4. It was considered steps in the

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.

## 7. 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.