Three-phase DC-AC converter with LCL filter for distributed microgeneration with null error in steady state

This article presents a digital control for a three-phase DC-AC converter with four wires with LCL filter that makes up the inverter module of a distributed microgeneration system, which guarantees a zero error in a permanent regime and can be connected to any generation and minimizes high-frequency current harmonics injected into the network. The inverter control system is based on a triangular carrier, which uses: an internal mesh to control the grid current. In the simulated tests, good functioning of this control technique was verified, even when faced with the variation of the impedance of the distribution network in the PCC, a satisfactory response of the dynamic behavior of the control system was obtained with the efficient control of the active and reactive power and the guarantee of a null error on a steady state. Keywords—Converter DC-AC,Vector control, Filter LCL, Inverter, Distributed microgeneration.


I. INTRODUCTION
Normative resolution No. 482, of April 17, 2012 [1], any consumer can adhere to the electric energy compensation system and that those who generate it have responsibility for damages caused to the electrical system, according to normative resolution No. 414, of 09 of September 2010 [2].Therefore, the quality of the energy generated must be in accordance with the procedures for the distribution of electricity in the national electricity system guided by the National Electric Energy Agency (NEEA) [3], [4].Disturbances such as harmonics, unbalanced loads, reactive power, voltage generated, power flow, grid peaks, among others, are frequent and are pointed out as causes of damage.
Static converters, with a frequency of the order of 2-15kHz, according to the IEEE-519-1992 recommendation, can be considered sources of harmonic generation when interconnected at the common coupling point.To mitigate this disorder, active or passive filters [5], [6], [7] and [8] can be used.
The use of an LCL resonant filter represents an approach that has some advantages, such as: inductors with lower inductance values when compared to an L filter, good attenuation of current ripples and decoupling between the filter and the mains. However, such a filter model has the disadvantage of resonance peaks that must be attenuated by active or passive damping techniques [9].This article presents a digital control for a three-phase DC-AC converter with four wires with LCL filter to guarantee zero error in steady state, minimizing high frequency current harmonics.

II. MODELINGOF THREE-PHASE CD-CA CONVERTERS
Static converters are used in various applications and operate in inductive or capacitive bands, according to the needs of the system. There are two types of inverters applied, the current source inverter (CSI) and the voltage source inverter (VSI -Voltage Source Inverter).The CSI keeps the current polarity of the DC side constant. The VSI keeps the polarity of the DC side voltage constant and the direction of the power flow is determined by the polarity of the DC side current. The voltage and frequency generated on the AC side depend on the control structure used. Figure  1 shows the blocks of the inverters with the respective voltage or current source [7], [8] and [10].

Fig.1: Types of converters: (a) CSI (b) VSI
n systems that are connected to the electrical distribution network or isolated networks, it is desirable to obtain a sinusoidal voltage with fixed amplitude and frequency, for that, careful control is necessary. The most suitable converter type is a voltage source inverter (VSI) or simply referred to in the literature as a voltage inverter [13], [10] and [11].
The development stages of the inverters are the characterization of the modulation type, the characterization of the type of filter used and the control strategies [12].
Inverters that use pulse width modulation (PWM) are also known as PWM inverters [8].
To develop digital control for a four-wire DC-AC converter with LCL filter, it is necessary to develop the equations.

Clarke, Park and dq0 Transforms
Being a transformation of an algebraic conversion for biphasic reference (α-β) of voltages and three-phase currents (a, b, c) of four-wire systems, the Clarke transform or α-β-0 transform decouples the zero sequence components, as shown in equation 1 [11]. (1) The Park transform is a mathematical method that acts on a dynamic rotating system of angular velocity (ω). Equation 2 displays the method. ( The dq0 transform or dq0 transform is the product of the Clarke and Park transforms, according to equation 3. Expression 4 represents the resulting matrix. It is known that to guarantee power is invariant, the transformation must be orthogonal (equation 5) [11].

Voltages, current, powers in the dq orthogonal plane
Stresses in the orthogonal plane dq are represented by equation 6.
Currents in the orthogonal plane dq are represented by equation 7.
In the orthogonal plane dq, the instantaneous powers are defined as: real power [p (t)], imaginary power [q (t)] and zero sequence power [p0 (t)] and are obtained according to equation 8 [11] . Therefore, the three-phase active power is the sum of the instantaneous powers and is given by expression 9. On the other hand, the reactive power or imaginary power in the orthogonal plane dq is shown by the expression 10 or 11. To facilitate understanding, the powers, real and zero sequence, p(t) and P0(t) respectively, flow between the system and the load while the imaginary power q (t) circulates between the phases [11]. Figure 2 shows the significance of the powers.

Power Control
The block diagram of the typical three-phase power controller using the dq orthogonal plane is shown in Figure  3. (modified from [14]).
Using the control of the orthogonal plane dq, the zero error value in steady state is achieved by including an integrator term in the compensator with the voltage control .
For the connection of PWM converters to the electricity distribution network, only two types of filters are considered, the first order L filter and the third order LCL filter. When compared, the L filter has low attenuation forcing a high switching frequency to guarantee the necessary attenuation and the LCL filter with greater attenuation of current harmonics. Such a comparison usually leads to the choice of the LCL filter, which provides greater performance with reduced reactive consumption [15]. Figure 4 shows the LCL filter inserted between the converter and the distribution network.

Resonant Filter Model
From Kirchhoff's laws, equations (12), (13), (14) and (15) represent the single-phase current and voltage laws in the S plane and from these equations the transfer function of the LCL filter can be obtained.
= ( 1 + ) Where, , are the inverter, capacitor and grid currents, respectively, , e are the inverter, capacitor and grid voltages, respectively, e , inductor resistance 1 e 2 , respectively, and , damping resistor, connected in series with the filter capacitor . The block diagram of the mathematical model is illustrated in figure  6.

LCL Filter Design
There are many criteria used to design the parameters of this filter, to obtain a good performance, some procedures must be considered, such as [5] and [17]: The value of the capacitor must be less than 5% of the base power; The total value of the inductance must be less than 10% of the base inductance; The resonance frequency must be greater than 10 times the network frequency and less than half the switching frequency.The project parameters are specified according to Table 1.

Calculation of the filter capacitor (Cf)
In distributed applications the recommended value is 5% of the base capacitance [5].

Calculation of the maximum ripple current of the filter output (Iripple, peak)
The recommended value is 10% of the ripple current [5].

2.5.6
Calculation of the total maximum inductance (L)

Calculation of the filter input inductor (inverter side) L1
When calculating the inductance value of the inductor on the inverter side, the recommendation IEEE-519-1992 [5] should be considered, which recommends that the maximum permissible ripple current be around 3.5%. According to [17] the inductor can be calculated by equation 23.

Calculation of the filter output inductor (grid side)L2
According to [17] and [5], the inductor on the grid side is typically 80% L1 and can be calculated by equation 25.
It can be seen that the limit criterion of the resonance frequency of the LCL filter (expression 28) was respected as shown in expression 29.
Not using the damping resistor ( ), the filter transfer function is shown in equation 31.
To better analyze the response of the LCL filter, an application was developed in LABVIEW, which is shown in figure 7. In this application, several functions are implemented, for example, the visualization of the equations in the poles and zeros gains format, the transfer function and the space state equations, output voltage, analysis of the gain and phase margins, diagrams of Bode, Nyquist, Nichols, Root Locus and the Map of poles and zeros.

Fig.7: LCL resonant filter analysis
Since the value reported is of the symbolic type (figure 8) and can be edited, the transfer function can be modified, dynamically varying (figure 9) its values and promoting analyzes of its behavior at run time.It is also possible to check the filter behavior with other types of input voltage and frequency waveforms. The values reported for the LCL filter components are the same as those previously calculated.  For the purpose of analysis, figure 11 shows the Bode diagram as a function of frequency and figure 12 shows the behavior of the filter in relation to the phase, while figure  13 shows the map of poles and zeros of the filter, while figure 14 shows the output voltage when the filter is in resonance, ultimately figure 15 shows the gain and phase margins of the filter.     This application allows a quick visualization, for any application with filters, especially when in the prototyping stage, since the values can be changed, and the filter behavior can be independently analyzed.
To control the flow of active and reactive power independently, consequently the zero error of the steady state, it is necessary to apply reference signals on the base axes dq0. The use of the PLL technique allows us to estimate the phase angle, synchronizing the converter with the electrical distribution network, avoiding the permanent error of the regime [18]. Figure 16 shows the block diagram of the PLL system.    [12]).
The pulse width modulation technique is proportional to the amplitude of the sine wave, generated from the comparison between the sine reference and a triangular carrier with frequency fc. Figure 19 shows the sinusoidal pulse width modulation and the output voltage generated by the switching of 1 e 4 , and for better understanding, figure 20 illustrates the switching network emphasizing the 1 and 4 switches.Commonly applied in industry, it has some advantages, such as: reduced distortion factor, very low order harmonics, the frequency of the reference signal determines the frequency of the inverter output, the amplitude of the reference signal controls the modulation index (figure 21), which consequently controls the effective output voltage [8], [17].   (modified [17]).
To obtain the modulation index, the maximum value of the triangular carrier signal must be divided with the reference sinusoidal signal. The modulation index less than one means that the current does not present harmonics of low order and the power factor of the signal is practically equal to one. Figure 21 shows the form of generation by unidirectional triangular carrier.

International Journal of Advanced Engineering Research and Science (IJAERS)
[  Fig.22: Diagram of the voltage-controlled VSC system for active and reactive power control [12].
The control by current mode, in this approach the active and reactive power is controlled by the phase angle and the amplitude of the line current of the VSI inverter and the voltage in the PCC.In this way the inverter is protected against overcurrent conditions, other advantages of current mode control are: Robustness against variations in parameters of the inverter and the distribution network.Superior dynamic performance and high control accuracy [12]. Figure 23 illustrates current mode control using the dq coordinate system and figure 24 shows the block diagram of the current controlled VSI system. Fig.23: Diagram of the current-controlled VSI system for active and reactive power control [12]. Fig.24: Block diagram of the current mode control of the VSI inverter (modified [12]).

III. SYSTEM SIMULATION
The control system for guaranteeing null error in steady state is based on [12], using the current mode control of the VSI inverter, for the advantages already presented, figure  25 shows the block diagram of the proposed control strategy.The controller consists of a DC voltage controller block, a current control block, a third harmonic injection block, a PLL block and the vector switch controller. The circuit simulated in software with the connection to the distribution network with parametric uncertainties is shown in figure 26. To facilitate understanding, the circuit in figure 26 will be broken down and studied part by part. Acting as a bidirectional controller, whose function is to control the active and reactive power exchanged with the distribution network [12].
The DC voltage controller block is shown in figure 27. Equation 33 shows the transfer function of the DC voltage controller. The DC voltage control block circuit applied to the simulation circuit is shown in figure 28.

International Journal of Advanced Engineering Research and Science (IJAERS)
[ Vol-7, Issue-6, Jun-2020]  https://dx.doi.org/10.22161/ijaers.76.52  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com Page | 425 For this work, the controller chosen was the controller in current mode, in addition to the advantages mentioned above, it keeps the current of the VSI inverter firmly regulated through the AC side [12], the controller in current mode has several stages, as illustrated in figure 24. The signaling required for this controller is shown in figure  29 in the block diagram of the digital current controller this stage consists of several blocks. The PLL block provides the angle so that the coordinate system transformations remain synchronized.The VSI inverter output current decomposition block for dq orthogonal coordinate system provides the current controller transfer function with the dynamic parameters of and , the output voltage decomposition block for the dq coordinate system provides the control signals e , voltage controller (figure 28) provides the reference for ( _ref) and making ( _ref) equal to zero, which guarantees the proportionality between the active and reactive powers in relation to and [12]. The block diagram of the current controller is illustrated in figure 30, where it can be seen that the output of the current controller is converted from the orthogonal coordinate system to the stationary coordinate system o and thereby providing the necessary signals for the sinusoidal PWM control of the inverter keys.
Assuming that the network inductance is an uncertain parameter and that it belongs to a defined interval between 7,9µH and 79µH [15], then for this work inductors and 2 were inserted to simulate this variation of the extremes controlled by a switch that is activated at = 1 figure 32 shows this circuit.

IV. RESULTS
A simulation of the micro generation system using a VSI inverter with control in the current mode for a null error in the permanent regime when connecting to a distribution network using an LCL filter, produced with the following information: Graph of phase currents on the AC side of the inverter ( figure 33); Graph of the current phase frequency spectrum on the AC side of the inverter (figures 34 and 35); THD table measured from the phase currents on the AC side of the inverter ( Table 2)        When analyzing figures 34, 35, 37 and 38, it can be seen that there are no low order harmonics and this is also reflected in tables 2 and 3, due to the low TDH index of the voltage and current output waveforms on the side Inverter AC. When analyzing figures 41, the sign of the active power is negative indicating the supply to the power grid, a little more than 11 KW, within the project specification, due to the approximations in the calculations.  When analyzing figure 42, at t = 0.1s the system response is already in steady state.In figure 43, it shows the activation of the parameter change circuit it did not generate any changes, indicating the robustness of the control system.When analyzing figures 44, the signal ( _ref) remains constant, due to the fact that the DC bus supply is a source of continuous voltage of the order of 550V.   When analyzing figures 45, the signals and enter a steady state att>0,1s. The e ssignals are transformed from the dq orthogonal coordinate system to the static coordinate system, where these voltages are the references for the sinusoidal PWM controller to activate the switches, distortions in the reference signal generate distortions in the currents. As in figure 45, figure 46 illustrates the accommodation of the circuit at t = 0.1s. When analyzing figures 47 and 48, it is noticed that there are no low order harmonics and this is also reflected in table 4, due to the low TDH index of the reference voltage waveform.

V. CONCLUSION
The premises for connection of systems interconnected with the distribution network for micro generation, as seen, were satisfactorily achieved, such premises, such as sinusoidal voltage with fixed amplitude, fixed frequency, steady state stability and immunity to variations in network parameters were achieved even with the variation of the distribution network's inductive parameter. The sets of factors that led to this performance start from the choice of the type of inverter and its control, passing through the LCL filter, to the control of the sinusoidal PWM switches. Starting from the literature indications that the most suitable converter is a voltage source inverter (VSI) and adopting the control strategy in current mode with the transformation of the static coordinate system to the dq orthogonal system, which transforms a problem of synthesis of three-phase quantities balanced in a regulation problem, it brings great ease when in its implementation in digital processors, with auto modulation index without distorting the converter voltages and currents producing a low harmonic content. A good dimensioning of the LCL filter and the standard use [5] and [6] produce a satisfactory performance. For this work, a LABVIEW tool was developed that allows a dynamic visualization of the LCL filter behavior that allowed to analyze whether the calculated values were within the criteria, in addition to being able to test the behavior with several input waveforms, frequency analysis and possibility produce the equation of the transfer function and the space-state equations, among others. An important fact is that the calculation of the resonance frequency of the filter in relation to that calculated by the tool produced an error of 0.02 Hz, which was due to the approximation errors. A good tuning of the PLL controller, therefore, a good estimation of the lag angle produced the synchronism with the electrical distribution network, consequently, a strong contribution to null error in steady state. The way to calculate this PLL actuator can be found in [14]. Finally, the transformation technique for orthogonal coordinates dq allows the control of the flow of active and reactive power, independently, contributing to the condition of null error in steady state.