National Grid Connected 3-Phase Inverter based on Photovoltaic Solar System

In this paper, a national grid-connected photovoltaic (PV) system is proposed. It extracts the maximum power point (MPP) using three-incremental-steps perturb and observe (TISP&O) maximum power point tracking (MPPT) method. It improves the classic P&O by using three incremental duty ratio (ΔD) instead of a single one in the conventional P and O MPPT method. Therefore, the system's performance is improved to a higher speed and less power fluctuation around the MPP. The Boost converter controls the MPPT and then is connected to a three-phase voltage source inverter (VSI). This type of inverter needs a high and constant input voltage. A second-order low pass (LC) filter is connected to the output of VSI to reduce the total harmonic distortion (THD) of the output current. The LC filter is then connected to a step-up transformer to push up the low VSI output voltage to the high grid voltage level. The control strategy is based on the rotating reference frame (dq reference frame) and the grid phase shift angle extracted using a phase-locked loop (PLL) technique. The designed PV system supplies only active power with zero reactive power to the utility grid. The system is simulated using MATLAB / Simulink software.


INTRODUCTION
Energy has become a fundamental need for the sustainability of the civilizations of nations and their continued development. Its demand has been increased in the past years and expected to increase furthermore in the future. In 2007, the energy was 18.8 trillion kWh, but it will be expected to increase extremely in 2035 to 35.2 trillion kWh (Khalifa, 2010). There are two ways to cover this increase in energy; the first way is found by using the old traditional methods depending on various fuels. For example, the cheapest and worst fuel is coal, which causes large emissions of carbon into the atmosphere. Consequently, it is one of the main causes of global warming and is not a friend of the environment.
Whereas in the second way, the energy can be found from renewable sources. They have several advantages over the conventional methods, they do not deplete the wealth of earth from metals, and they are always renewable. Also, they do not cause any heat emission or pollution problems. Solar energy is the main use among all other renewable energy sources. Especially for sunny countries like Iraq, where the sun shines most of the year (Al-Najjar, 2015).
PV is considered a solar energy collector. Since the PV is a nonlinear source, which depends on the sun's irradiances, temperature, and load. Therefore, the researchers looked after the maximum power point tracking (MPPT) methods and the power quality that interfaces to the grid. (Prodanović and Green, 2003) designed a filter with an isolating transformer of grid-connected VSI. Then, they designed a controller that abandons grid disturbance, with a highly active and reactive power quality interfaced to the grid.
While (Li et al., 2004) focused on the control unit. They designed and analyzed a multibus (two distribution generator, DG) micro-grid connected system. They proposed a controller for each distribution generator in the micro-grid with the outer voltage and inner current ones. While they used external power loops to control active and reactive power flow. At present, of any utility fault, the utility-grid has been isolated, and then the power is shared between the parallel DG systems only. However, after clearing the fault, DG is returned to be connected to the utility grid, whereas the critical loads are connected.
But, (Li et al., 2006) proposed a grid-interfacing power compensator for three-phase micro-grid applications. It consisted of two VSI inverters. The first one is connected in shunt, while the second inverter is connected in series. Positive and negative sequence components are controlled in each inverter to compensate for the produced effects by the unbalanced grid voltages.
However, (Pouresmaeil et al., 2010) offered a control technique to grid-connected DG. The control strategy is based on the transformation from the natural reference frame (ABC) to the (Rezk and Eltamaly, 2015) presented a comparative study of different MPPT techniques. These techniques used the perturb and observe (P&O), hill climbing (HC), a fuzzy logic controller (FLC), and incremental conductance (INC). The DC/DC boost converter is used with all the previous MPPT techniques. The simulation module was done by PSIM and MATLAB /Simulink software. They concluded the order of the best to worst MPPT methods as following: FLC, then P&O, INC, and hill-climbing (HC). They also explained that if the incremental of the duty cycle ΔD is high, the rise time to the maximum power is short, but oscillation around the maximum power is high. While, if ΔD is low, the rise time will be long, and the power fluctuation is low. However, the FLC was the slowest, and the INC was the fastest among all the MPPT methods that were prepared in this paper. Whereas the FLC has minimum steady-state error followed by P&O.
(Li et al., 2017) resolved the problems of fluctuating the weather conditions and the varying loads and producing reactive power at night. These things happened with four control modes. The first mode is called the normal operation mode, while the second mode is a reverse power mode, and the third is the cloudy mode. Finally, the fourth mode is a night control mode.
It is clear from the literature review that there are important things that must be taken care of them in designing the PV system, such as the MPPT technique, the power quality interfaced with the utility grid, the control strategy, and the synchronization type. Therefore, the proposed PV system improved the conventional P&O MPPT algorithm by using three incremental of duty ratio instead of one of the wide automatic adjustment as in reference (Al-Diab and Sourkounis, 2010). Consequently, the new three incremental steps (TISP&O) will speed up the system and improve the steady-state error.
The power transfer to the grid is either active, reactive, or both. However, all the PV modules generate real power only because its output power is DC. On the other hand, reactive power depends on the passive element available in the circuit. The reactive power control method, like a static VAR system, offers a better performance in controlling the voltage drop or rise in the grid voltage, and then it can be placed at different locations in the transmission line. While the reactive power controlled by the PV system needs to isolate the panels to protect them from working as a load. Also, it needs a complex control unit or more than one control mode (Li et al., 2017). Consequently, the proposed system is supplied with real power only by the VSI in a simple and efficient control method. It filtered the power by using a second-order LC filer and steps up to grid level voltage. The general structure of the proposed system is shown in Fig. 1.  Fig. 1 shows the general structure of the grid-connected PV system. The current at the point of common coupling (PCC) transforms to dq frame converts to DC component instead of the AC component to use the PI controller, which has the best performance when regulating dc variables. In addition, a smaller number of controllers is required. This means two controllers in the DC variable, but three controllers are required in the AC variable. Also, the PI controller is easier than the hysteresis band technique and proportional resonant controller in the implementation and controlling process. However, the details of the working mechanism of the proposed system will be explained intensely in section (8).

PHOTOVOLTAIC (PV) CELL
The photovoltaic cell converts sun irradiance to electrical real power. The equivalent circuit is shown in Fig. 2. It consist of current source represented the photo current Ip, which Proportional directly to incident solar power, it also has a shunt diode (D), shunt resistor (Rsh) and series resistor (Rs) (Bawa and Patil, 2013).

Ip = Id + Ish + I
(1) Where Ip is the photocurrent, Ish is the shunt resistor current, I is the output current.
Where IO is the reverse saturation current, q is the elementary charge (1.60217646 × 10 -19 c), n is the diode ideality factor, k is the Boltzmann's constant (1.3806503 × 10 -23 J/k), T is the absolute temperature (K).
Therefore, the output current is equal to Eq. (4) shows the nonlinearity relationships between the terminal voltage and current of the PV cells.
I-V curve and P-V curve are shown in Fig. 3. There are two essential parameters in the I-V curve; they are the short circuit current (Isc) and the open-circuit voltage (Voc). Isc can be found by setting (V = 0), then substitute it in Eq. (4), so the result will be Where Rs << Rsh .
Therefore, a photocurrent is directly proportional to the sun's irradiances. While Voc can be found by setting I = 0 in (4) Where Rsh >> Voc so the result will be = ln ( + ) As a result, Isc increases linearly with the irradiances, according to Eq. (5), but Voc increases logarithmically, Eq. (7), as demonstrated in Fig. 4.

LOAD LINE CONCEPT
The load line is represented as a slope, which is equal to the reciprocal of the resistive load (R), as shown in Fig. 5 and Fig. 6. The load line intersects the I-V curve in an operating point (Mansur et al., 2011). If the resistive load is equal to zero (R=0), the load line will lay along the current axis (vertical axis). Still, if a resistive load is opened (R = ), the load line will lay along the voltage axis (horizontal axis). Therefore, when the resistive load was varying between zero and infinity, the operating point will be varying along the P-V curve between the two axes depending on the load.

MAXIMUM POWER POINT TRACKING CONCEPT (MPPT)
It is clear, from sections two and three, the nonlinearity behavior of the PV cell. Consequently, the PV output power depends on three variables: the sun irradiances, the temperature, and the load in the nonlinear behavior (Azad et al., 2019)(Hashim and Hussien, 2016). Therefore, the MPPT must be used in the PV system to extract the maximum power.   The DC/ DC converter between PV cells and the load is necessary for implementation the MPPT technique since the output voltage of the converter is controlled by the pulse width modulation (PWM) techniques.
In this project, the P&O algorithm was chosen, but it was improved to a new technique called three incremental steps (TISP&O). The classic P&O is easy in implementation, where it needs only to sense PV voltage and current as of the inputs to the algorithm. At the same time, the incremental conductance (INC) method wants differentiation equipment. While the fuzzy logic control (FLC) and INC have better power oscillation around MPP than P&O (Li et al., 2017; Madrigal et al., 2019). But, the proposed system improves the power oscillation by eliminating its large steadystate error.
The main idea of improving P&O is based on the optimization technique that used a numerical method in solving nonlinear functions (Rao, 2009).
Eq. (8) shows the new variable Xi+1 depends on the old variable Xi, the step length (λ), and the direction (S).
If λ is low, it may need iterations to reach the optimum point at the maximum function (X * ). On the other hand, if λ is high, it may not arrive at the proper maximum function (X * ). Therefore, it is better to use the variable λ instead of fixed λ to reach the maximum function with high speed and less error (Rao, 2009).
In P&O MPPT the Eq. (8) can be expressed as: Where Di+1 is the duty ratio at the next iteration, Di is the duty ratio at the current iteration, the incremental of the duty ratio (ΔD), which is the step length, and the direction S is equal to +1 or -1 depending on the algorithm as shown in Fig. 7.
Therefore, the new TISP&O uses three ΔD to improve performance. Consequently, if the first ΔD is high at the start of the P&O, it will have a short rise time. And if the third ΔD is low at a steady state, it will eliminate the steady-state error. In other words, it has less fluctuation near MPP. The second ΔD has the value between the first and the third ΔD to ensure the smooth transition and prevent the longtime of transient condition.
As a result, the three-incremental-steps (TISP&O) has the advantage of conventional P&O with better performance around MPP. Therefore, it will eliminate the classic P&O's high fluctuation and then speed up the system (Moayad et al., 2020).

BOOST CONVERTER
The structure of the DC/DC boost converter is shown in Fig. 8. It consists of inductor Lb, switching device Sw, diode D, and capacitor Cb.
The step-up DC/ DC converter increases the input voltage to higher output voltage at less output current. This is advantageous for using a boost converter to be connected to the voltage source inverter (VSI) since a high and constant input voltage is required for getting the best performance (Dash, 2013).
The working mechanism starts when a switch is closed. Thus, the inductor is in parallel with the source, which stores a lot of magnetic energy. While the diode is in reverse biased, and it isolates the parallel capacitor with the load, as shown in Fig. 9 (a). This process needs a time called switching ON time denote as ton. Next, when the switch is opened, the inductor boasts high energy into the load. This results in a higher output voltage. However, this requires a time equal to switching OFF time (toff) as shown in the OFF-state circuit Fig. 9 (b).
As a result, there are three main Equations derived from the boost converter (Rashid, 2004): D is a duty ratio, T is the converter's time period; Vo, Io, Vin and Iin are output voltage, output current, input voltage, and input current of the boost converter, respectively.
The division of voltage Eq. (10) to the current Eq. (11), expressed as in the following: Where Ro is a resistive load, Rin is the input resistor to the DC/DC converter. As explained in section three, the load line is reciprocal of the resistive load. So DC/DC converter is improved by changing the load line from an uncontrollable state (1/Ro) to the controllable state 1 /( Ro(1-D) 2 ).
Therefore, the load line can be controlled by changing the duty ratio D; hence, using a DC/DC converter is essential in MPPT.

THREE-PHASE DC/AC CONVERTER
The inverters are essential in the PV system to convert the DC power to AC power, then transferred to the main grid. There are mainly two types of inverters voltage source inverter (VSI) and current source inverters (CSI).
VSI needs a constant high voltage in the input side because it has buck behavior, while constant current is required to the input of CSI. However, the output current of CSI is constant with variable output voltage depending on the load. This means the inverter voltage at the point of common coupling (PPC) can be less than the grid voltage. Therefore, the inverter absorbs reactive power from the grid instead of compensating it. Also, the CSI needs a large input reactor to perform a current source. In other words, more losses of power will occur. However, the dynamic response of VSI is higher than the CSI with an easier control circuit (Dash, 2013; Rashid, 2004; Albuquerque et al., 2010). Moreover, VSI produces a good performance in active and reactive power control, whereas CSI can only supply active power. For these reasons, the VSI is used in this paper.
Three-phase three-wire VSI is used to avoid the zero current harmonics. Its structure is shown in Fig. 10, a device of six switches, where the output voltage connects to the middle of its legs.

THE DESIGN PARAMETER OF THE PROPOSED SYSTEM
The proposed system has a PV module (SRP-305E-WHT-D). The PV array consisted of 5 series modules and 32 parallel strings with total maximum power, terminal voltage, and output current at standard condition (irradiance = 1000 W/m 2 and temperature = 25 o C ) approximately equal to 48836.16 W, 273.5V, and 178.56A, respectively at MPP. The I-V and P-V curve characteristics of the entire PV array is shown in Fig. 11. So the parameters of the boost converter for continuous conduction mode (CCM) will be calculated as below: The converter circuit at ON state period is shown in Fig. 9(a). So the resulting equations are:

= × (16)
VL is the inductor voltage, Lb is the boost inductor, Δi is the ripple of the input voltage, and fSC is the switching frequency. fSC = 50,000 Hz. Therefore, T = 0.00002 s. while D is calculated by: Where Vin is 273.5 V and the desired Vo is 500 V, then substituted in Eq. (17). So the resulting duty ratio is: Assume Δi = 1 A , while D=0.453 and T = 0.00002 s , then substituted them in Eq. (16), the resulting inductance will be: According to ON-state circuit the capacitor current (ICC) is: Tac is the time period of the inverter ac side, which is the reciprocal of the fundamental frequency, and it is equal to 0.02s at 50Hz. While ΔP is the difference between the output power of the inverter and its input power. This is approximately 977W if the efficiency is assumed as 98%. Vdc,high is the upper limit of the DC capacitor voltage, whereas Vdc,low is the lower limit of the DC capacitor voltage. They are assumed 510V and 490V, respectively. But max is maximum hold on cycle number, and it is evaluated by the equation below ( Where Vdc(n) is the dc voltage over Vdc,high for n cycles, and it is assumed 515V. By substituting the values of Vdc,high, Vdc,low, and Vdc(n) in Eq. (22), the result will be: Also, by using the values of max, Tac However, the sinusoidal pulse width modulation (SPWM) is used, which has two important modulation indexes, the first is the amplitude modulation index (ma), and the second is frequency modulation index (mf). They are expressed in equations below: Where vr and vc are the magnitudes of the reference signal and the carrier signal, respectively. While fc and fm is the carrier and reference frequency, respectively.
Determining the magnitude of mf is important in eliminating some harmonics. If mf is odd multiple by three, it will eliminate the even harmonics and harmonics with order (mf -2) and the ninth harmonics (Khalifa, 2010;Rashid, 2004), so mf assumed to be equal to 105.
While ma is essential in evaluating the magnitude of the output voltage, where the rms value of the line voltage can be calculated as in the equation below (Rashid, 2004): It is less than 1 and is 0.95 in this thesis by adjusting the controller's constants that are important in generating the reference modulation signal (vr). Therefore, the final rms line voltage is: VLrms is among the typical output (220 V to 380 V at 50 Hz) for three-phase VSI (Rashid, 2004).

THE CONTROL STRATEGY
The control strategy is based on a synchronous reference frame (dq control), whereas the phaselocked loop (PLL) is used to ensure the synchronization between the grid side and the inverter side and extract the phase angle.
PLL circuit is shown in Fig. 12. In the beginning, it transforms the three-phase grid voltage from the natural reference frame (abc frame) to a stationary reference frame ( β frame ), then transformed to dq reference frame. Next, the Vq was compared with reference Vq, which is equal to zero. The resulting error signal the entire proportional-integral controller (PI), which results in the phase angle that returns feedback to the β/dq transformation (Khalifa, 2010). Because of the Vq reference equal to zero, the grid voltage (Vg) will lie along the d-axis, as shown in Fig. 13. The resulting angle ϴ and will be the phase angle of the grid voltage between the rotating and stationary reference frame.
The outer voltage loop estimates the reference direct current Id ref. as shown in Fig. 1. It controls the active power flow to the grid, and it regulates the voltage at the DC-link capacitor to a high constant value by comparing it with a reference constant DC voltage equal to 500V. Later the error signal was regulated through the PI controller to produce the Id ref.. However, the grid direct current Id compares with the reference direct current Id ref. The grid quadrature current Iq compared with zero reference quadrature current ( Iq ref. = 0 ) to supply only active power. However, the two currents in the inner loops are regulated through two PI controllers to produce direct and quadrature voltage. The voltage is transformed to abc frame and considered a reference voltage to the sinusoidal pulse width modulation SPWM of the VSI.

LC FILTER
The filter is necessary to eliminate the output current harmonics caused by high switching frequency (Prodanović and Green, 2003) to ensure the THD of the output current is below the allowable limits, which is less than 5% according to IEEE standard (IEEE, 2003).
There are three most commonly used of filters; first-order low pass L filter, second-order low pass LC filter, and third-order low pass LCL filter. The second-order LC filters offer advantages over the first-order filters L because the parallel capacitor reduces the series's value and leads to less cost and higher efficiency than the L filter.
Moreover, the shunt capacitor offers a low impedance at a high switching frequency to produce a low path for switching frequency distortion. But it has a high impedance at control frequency to eliminate the harmonics of the grid voltage (Prodanović and Green, 2003). However, the large capacitance results in high inrush current problems, and then the high current will pass through the capacitor. Therefore, the third-order filters LCL produce better performance than the L filters; excellent attenuation but still there are some oscillation problems, and the system is unstable if the resonance happened (Nandurkar and Rajeev, 2012; Hojabri and Hojabri, 2015).
The proposed system uses an LC filter and step-up transformer because it is a grid-connected system to a higher voltage level (290 V / 11 kV). The LCL filter is used with a step-up transformer, which offers more passive components, hence more cost and less efficiency.
The Δ-Υ transformer is used to isolate the PV system side from the grid side and does not allow passing the dc current. However, the third triplet harmonic circulates in the transformer's delta windings and disappears at the secondary side (Rahman, 2012).
The LC design is according to the following equations (Nandurkar and Rajeev, 2012).

RESULTS AND DISCUSSION
The proposed system is simulated by MATLAB/Simulink software. The PV module is ( SRP-305E-WHT-D), while the PV array consisted of 5 series module and 32 parallel string with total maximum power at standard condition (irradiance = 1000 W/m 2 and temperature = 25 o C) approximately equal to 48800Watt.
The three incremental steps TISP&O MPPT uses three different incremental of duty ratio (ΔD).
The bigger ΔD at the start of working to reduce the PV system's rise time, whereas the smallest ΔD at the steady-state to eliminate the power oscillation around MPP. Therefore, this method improves the conventional P&O MPPT, as will be explained below.
Firstly, ΔD is a small value equal to (3 × 10 -8 ). So the resulting PV output power, PV terminal voltage, and the duty ratio are shown in Fig. 14. The rise time is long enough, about 1 second, and there is negative power. In other words, the PV array behaves as a load for a few milliseconds, but this is not a problem because it can be solved by connecting the series protection diode. However, the oscillation around the maximum power at a steady state is very small, as shown in the zoomin Fig. 15, and this is the desired case. The average PV power was equal to 48620Watt. The terminal voltage begins high, then reduced at a steady-state, while the duty ratio has smoothly increased.
Secondly, ΔD is a big value equal to (3 × 10 -4 ). Fig. 16 shows the PV power, PV terminal voltage, and the duty ratio. The rise time is short, but the duty ratio and the power fluctuation are large, as shown in zoom in Fig.17. The average PV power was equal to 48480Watt, which is less than the power at small ΔD in about 140Watt.
Thirdly, using three values of ΔD (3 × 10 -4 ) at the beginning, then (3 × 10 -6 ) and lastly (3 × 10 -8 ) at the steady-state. The results are shown in Fig. 18, where the resulting PV power combines the    The generating modulation reference signal of SPWM is shown in Fig. 19. At the same time, the resulting inverter line voltage of the inverter and the voltage after the LC filter is shown in Fig.  20. It is clear the LC filter's effect in smoothing inverter's voltage and forming a pure sinusoidal voltage.
The phase current and voltage at PCC is shown in Fig. 21. The THD of the voltage and current are 0.02% and 0.62%, respectively. Moreover, Fig. 22 shows the unity power factor at PCC, while the current is multiplied with a scale equal to 1000. Therefore, it supplies active power only.
Both controllers of the loops are tuned by the trial and error method. The outer voltage loops and the inner current loops have a proportional constant (kp) and integral constant (ki) equal to (kp = 10 and ki = 100) and ( kp = 0.1 and ki = 15), respectively.

CONCLUSIONS
In this paper, the three-phase grid-connected PV system is presented. Three-incremental steps TISP&O MPPT technique is presented, which combined the advantage of the classic P&O in easy implementation and enhanced the disadvantage by eliminating the steady-state error and short rise time. The boost converter is used to implement the MPPT because the VSI is used, requiring high and constant DC voltage. Three-phase three-wire VSI was presented in order to discard the problem of zero sequence current. The control unit consists of the outer voltage loop that extracts the direct reference current, while the quadrature reference current is zero. However, the inner current loop is used to regulate the output current fed to the grid. PI controller is used because it offered the best performance at DC variables, where all voltages and currents have DC values at dq reference frame. PLL is used to find the phase shift angle that is essential in the synchronization process between the inverter and main AC grid side. Also, LC filer is used to enhance the current THD to be lower than the permissible limit. The simulation system and results are done by MATLAB / Simulink software. Finally, it is important in the future to investigate the modern method of optimization in implementing an MPPT like, Genetic algorithms, Particle swarm optimization, and Ant colony optimization method. It is also important to search for the best protection method to protect the grid faults' PV system.