Modeling and Simulation of a Double-Stage Single-Phase Grid-Connected PV System

This paper presents the design model and simulation of a double-stage single-phase grid-connected PV system. This system includes an MPPT DC-DC boost power converter and a transformer-less single-phase DC-AC power inverter, which is connected to the power grid with an LCL filter. In the DC-DC boost converter, the Perturb and Observe algorithms are combined. The output voltage of the DC-DC converter is regulated by a proportional controller, and the DC/AC output voltage is synchronized with the grid. The grid current is controlled by a harmonic compensator and used to maintain its quality. The MATLAB-Simulink environment is used for the closed-loop simulation of the proposed setup. The simulation results are presented for various solar irradiance conditions and show that photovoltaic current is generated and matches the phase of grid voltage.


Introduction
Long-term policymakers believe fossil fuel-based traditional electricity generation is unsustainable. This has been one of the primary motivators for the extensive incorporation of renewable energy sources such as wind, solar photovoltaic (PV), hydropower, biomass power, geothermal power, and ocean power into public networks during the previous decade. Solar PV power output has continued to grow at a high rate among the major renewables in recent years, and it now plays a significant role in energy generation. Recently, most of the PV systems have been for residential applications. Therefore, single-phase grid-connected PV systems have been highlighted as a common configuration for residential PV applications in order to demonstrate the technology that will enable PV integration into the future hybrid energy grid [1].
Power electronics technology, particularly solar PV systems, has long been regarded as a critical facilitator for integrating additional renewable energy sources into the grid. The power electronics component of whole PV systems (i.e., power conversions) is responsible for converting clean and limitless solar PV energy into a dependable and efficient form. As a result, a wide range of grid-connected PV power converters has been developed and marketed. The size and power of grid-connected PV systems, on the other hand, range from small-scale to large-scale PV power plants.
Residential applications typically employ single-phase systems with module and string converters [2]. One of the main drawbacks of single-stage PV topologies is that they are less efficient overall since the output voltage range of the PV panels/strings is constrained, especially in lowpower applications (such as AC-module inverters). Due to a DC-DC converter that raises the PV module's voltage to a suitable level for the inverter stage, the double-stage PV system can get around this issue [3]. The main block diagram of a double-stage single-phase PV architecture is shown in Fig. 1.
The control mechanism suggested in [4] for single phase without a DC-DC converter. The internal current control loop and the external voltage control loop are the identical ones [5]. In this paper a double-stage PV system, the DC-DC converter also controls the MPPT of the PV panels, allowing for longer operation. A DC-DC converter and a full-bridge inverter are used in this double-stage PV technology. Figure 2 illustrates a traditional double-stage singlephase PV system in which the leakage current must also be kept to a minimum. Including a boost converter will reduce total conversion efficiency. A single-phase gridconnected PV system's control goals may be classified into two categories: (1) PV-side control, which aims to optimize the power generated by PV panels; and (2) gridside control, which is done on PV inverters and aims to meet power grid requirements.

PV Array Model
Solar irradiance G, measured in W/m 2 , and temperature T, measured in degrees Celsius (°C), are the two most important elements. Mathematically, the relationship between these two parameters and PV operational characteristics may be predicted. First, we look at the ideal model, which is depicted in Fig. 3 and includes the photocurrent source Iph and a diode.
According to, the photocurrent Iph in Eq. (1) is affected by both irradiance and temperature.   The relationship between the PV current Ipv and PV voltage Vpv for the ideal PV model is calculated using Kirchhoff's circuit rules. (5) where equation (1) defines the photocurrent Iph and Eq.
(2) defines the diode current Id. The PV output current is clearly connected to the solar irradiance G and temperature T, as shown by the PV current Ipv in Eq. (5).

MPPT algorithm
The maximum power point tracking (MPPT) technique enables PV systems to maximize their energy production under varying sun irradiation and ambient temperature conditions. The overall efficiency of the PV energy producing system therefore rises. The power-voltage characteristic of the PV module has a derivative, which serves as the foundation for the perturbation and observation (P&O) MPPT technique. Throughout the P&O MPPT process, the output voltage and current of the PV module or array are frequently sampled at subsequent sampling stages in order to calculate the corresponding output power and the power derivative with voltage [6]. The MPPT technique was carried out by altering the power converter PWM controller's reference signal.
A control unit microcontroller or DSP device may be used to execute the P&O MPPT algorithm [7], [8], as shown in Fig. 4's flowchart, which is based on the procedure described in [9]. Until the gradient value reaches a specified threshold, which signifies that convergence close to the MPP with the required accuracy has been accomplished, this step is repeated. To simplify the MPPT control, a perturb and observe (P&O) approach has been used, as shown in Fig. 5. The P&O MPPT algorithm calculates the reference voltage for the PV panels (i.e., the voltage at the maximum power point), which is then regulated by a proportional controller or PI adaptive controller to prevent the overshoot [10], [11].

DC-DC Boost converter
In a double-stage PV system, the DC-DC converter is responsible for boosting the voltage of the PV module to a desired voltage level for the inverter stage. The DC-DC converter additionally plays the MPPT control of the PV panels, and thus, prolonged running hours can be carried out in a double-stage PV system. MATLAB-Simulink tools were used to create a boost converter. The converter is rated at 3kW and has the following specifications: These design parameters are specified in the m-file.

DC-AC Inverter
In the inverter stage, the single-phase inverter is used to convert the DC voltage of PV generator into the AC voltage for connection to the grid. The IGBT is used for switching devices because it can handle large power, which is suitable for PV systems.

LCL filter
In order to filter the harmonics produced by the inverter, an LCL filter is usually employed to connect an inverter to the utility grid. An L filter or LCL filter is typically placed between the inverter and the grid in order to minimize the switching frequency harmonics produced by grid-connected inverters. The LCL filter offers better dynamic characteristics and a higher capacity for attenuating high-order harmonics than the L filter. An LCL filter, however, might have stability problems due to the undesirable resonance that zero impedance causes at specific frequencies. The system may be shielded from this resonance using a number of dampening strategies. One approach is to connect a physical passive component, such as a resistor, in series with the filter capacitor [12]. The LCL filter design parameters are specified in the mfile.

Control Structure
Two primary control goals exist for a single-phase grid-connected PV system: (1) PV-side control to maximize electricity from PV panels, and (2) grid-side control to satisfy power grid demands. In order to meet these requirements, a typical control structure for a gridconnected PV system consists of two cascading loops [13]. The outside power/voltage control loop establishes current references, while the inner control loop is in charge of modifying the current to maintain power quality and may also carry out other tasks [14]. Figure 6 shows the general control structure of a single-phase double-stage grid-connected PV system. The MPPT control is executed on the DC-DC converter, while the other functions are handled by the PV inverter control. Figure 7 shows the inverter control diagram in the αβreference frame.
Begin the kth iteration Determine V pv (k), I pv (k) Compute the PV power

P pv (k)=V pv (k).I pv (k)
Compute the deviations The current control with a harmonic compensator for a double-stage single-phase PV System is shown in Fig. 8. The PR controller and harmonic compensator (RHC) are used to maintain a high-quality grid current.

Grid Synchronization
Grid synchronization is a crucial grid monitoring activity that considerably improves the dynamic performance and stability of the entire control system. Figure 9 illustrates the PLL-based synchronization system's architecture. The PLL system consists of a phase detector (PD) for detecting phase differences, a PI-based loop filter (PI-LF) for smoothing the frequency output, and finally a voltage-controlled oscillator (VCO) [15]. Figure 10, the SOGI-PLL is used to produce the inquadrature voltage system [16]. Figure 10, the SOGI-PLL is used to produce the inquadrature voltage system [16].  The system and control parameters are provided in Table 1. The parameters such as boost inductor, switching frequency of boost converter, dc-link capacitor, grid voltage, and frequency, and LCL filter are used in the simulation.

Simulation Result
The simulation results are displayed in Fig. 11, Fig.  12, and Fig. 13, where the solar irradiation changed in steps at a fixed ambient temperature of 25 °C, and the system was run at a unity power factor based on needs. Figure 11 shows the output power from PV arrays, which is from 0s to 0.1s irradiance 600 W/m2, from 0.1s to 0.2s irradiance 1000 W/m2, and 0.2s to 0.3s the irradiance 800 W/m2. The step variations in solar irradiance really mirror PV intermittency, resulting in a continual input of fluctuating PV power.  Figure 12 shows the voltage of the DC link, which is regulated by using a proportional controller. This voltage remains around 400 V DC, while the irradiance fluctuates between 600 W/m2, 800 W/m2, and 1000 W/m2. Figure 13 shows the grid current and voltage. The voltage is displayed on a scale of 200 V/div, while the current is displayed on a scale of 20 A/div. The value of the current depends on irradiance, which means that at high irradiance, the most current is transferred into the grid.

Conclusion
This paper presents the modeling and simulation of a grid-connected PV system with a P&O MPPT algorithm to inject the power extracted from the PV array. The current is controlled by a harmonic compensator. As in the simulation the current is provided by the results of the solar PV system and delivered to the utility grid. The grid voltage has a total harmonic distortion (THD) of 3.4% and the total harmonic distortion (THD) of the grid current is around 3.5% at the nominal operating condition. Future work will involve creating an ECU hardware module with a microcontroller or field programmable gate array (FPGA).