Three-phase photovoltaic grid inverter system design based on PIC24FJ256GB110 for distributed generation

Received Dec 21, 2018 Revised Jan 21, 2019 Accepted Mar 4, 2019 In recent years, the demand for energy generated by photovoltaics has increased because of the cheapness of this energy, especially in the Middle East. This study focuses on the design and implementation of a three-phase photovoltaic inverter system for distribution of generator applications. The three-phase inverter used in this study was designed using GWM 100-01X1 as a three-phase full bridge MOSFET package. The MOSFET full bridge of the three-phase inverter is driven using IR2104 gate driver IC, and the Hall sensors of the voltage and current are used to measure the AC and DC voltage and current. The SPWM signal is generated using a PIC24FJ256GB110 as a microcontroller and interfaced to the full bridge package. Simulation and experimental results are presented to validate the three-phase inverter design.


INTRODUCTION
The first solution to photovoltaic power generation is how to convert solar radiation energy to electrical energy. The principle of solar photovoltaic cell power generation is based on the photovoltaic effect, which is a conversion device that converts solar radiation energy into electrical energy. A plurality of such devices are assembled into a photovoltaic cell assembly, and a plurality of components are combined into a photovoltaic array as needed and matched with the devices for energy storage, measurement, control, and inverter, thereby forming a photovoltaic power generation system [1][2][3][4][5][6][7].
To meet the static and dynamic requirements of the load on the distributed generation system, the three-phase photovoltaic inverter is generally designed as a closed-loop feedback control system, and the starting point for the analysis and control of the closed-loop control system involves correctly reflecting the basic relationship between input and output [8][9][10][11][12].
As shown in Figure 1, the basic principle is that the three-phase photovoltaic array inverter is connected to grid, and the generated solar energy is transferred to a DC power source, and then passed through the DC filter to become an alternating current through the inverter. The fundamental wave is a sine wave, which is inductively filtered and merged into the grid, which incorporates the current. The frequency and phase are in phase with the grid voltage. Photovoltaic grid-connected inverters use voltage source input and current source output control. The output current is controlled using voltage control [13][14][15][16].
The main hardware of the full system in this study is a part of the control system that uses PIC24FJ256GB110 as a microcontrol core [17,18], three-phase full bridge MOSFET module (GWM 100-01X1) [19], and IR2104 gate driver IC as an isolation gate drive circuit [20,21]. The Hall sensors of the voltage and current are used to measure the AC and DC voltage and current [22][23][24][25][26]. This paper is organised as follows: in Section 2, a mathematical model of the three-phase photovoltaic inverter is provided. Section 3 discusses the hardware circuit structure. Section 4 presents the simulation and practical results of the full system, and finally, Section 5 discusses the conclusions.

MATHEMATICAL MODEL OF THREE PHASE PHOTOVOLTAIC INVERTER
For the distributed generation of the three-phase grid, the main topology of the three-phase photovoltaic grid-connected power circuit inverter is shown in Figure 1. In the figure, Vdc is the DC voltage across the DC link capacitor, C is the DC bus capacitance, and LC is a filter in the AC side before being connected to the grid. Additionally, Vpha, Vphb, and Vphc are the phase voltages of the three-phase grid. According to Figure 1, the three-phase grid is assumed to be symmetrical. According to Kirchhoff's law, the mathematical model of the inverter in the three-phase stationary coordinate system can be expressed in (1). (1)

Where,
, are the output voltage of the output Leg's A, B, and C of the three-phase photovoltaic inverter relative to the neutral point of the grid. , are the three-phase output current of the inverter.
In the two-phase stationary coordinate system, the grid voltage αβ component is changed. When predictive control is performed, if the change is not considered, the system performance will be affected, especially when the switching frequency is small. If the variation of the grid voltage αβ component is considered, the complexity of the control algorithm will increase. In the synchronous rotating coordinate system, the d-axis and q-axis components of the three-phase symmetric grid are approximately constant, so the control strategy of this study is synchronous. Implemented in a rotating coordinate system. After the dq coordinate transformation, the mathematical model of the inverter in the two-phase synchronous rotating coordinate system can be presented in (2).
( 2 ) Where, are grid-connected currents, are inverter bridge output voltages, and are grid voltages.
The angle between the synchronous rotating coordinate system and stationary coordinate system 2 , is the grid frequency, is the starting angle, and can be any value. Only the grid ( 3 ) If we ignore the influence of line resistance R, the final mathematical model can be obtained in (4).
According to the instantaneous power theory, instantaneous active power P and reactive power Q output from the three-phase grid-connected inverter are present in the synchronous rotating coordinate system, as shown in (5).

HARDWARE CIRCUIT STRUCTURE
The main hardware part of the control system uses PIC24FJ256GB110 as a microcontrol core, three-phase inverter back package, isolation gate drive circuit, and current and voltage sensors (AC and DC). The PIC24FJ256GB110 control unit mainly completes the A/D conversion function and the processing of the pulse width modulation control signals.

The PIC24FJ256GB110 control unit
The PIC24FJ256GB110 microcontroller is the main part used to control and implement the threephase inverter. The PIC24FJ256GB110 is programmed using a MPLAB X IDEV3.5 software compiler for programming, and using C language [6][9] [10] and Explorer 16 kit for the microchip. The SPWM control signals that are generated by the PIC24FJ128GA010 microcontroller are used as inputs to the three-phase full bridge driver circuit. The PIC24FJ256GB110 is selected because it is highly preferred, offers low power consumption, and is used in industries with high-voltage automotive applications. The properties of the microcontroller are shown in Table 1, and the Explorer 16 kit is presented in Figure 2.   Figure 3 presents the three-phase full bridge MOSFET module (GWM 100-01X1) obtained from the IXYS company for this study. The unit can withstand a maximum current of 90A and a maximum voltage of 100V. The SPWM signals generated using the PIC24FJ256GB110 are driven by the drive circuit to drive the MOSFET. The MOSFET is driven by the integrated circuit and IR2104 module, which is isolated by an optocoupler.

Voltage and current sensor circuit
The three-phase voltage sensor circuit shown in Figure 4a is used to measure a phase AC voltage that is less than 250 VAC. The current acquisition is performed using a Hall sensor. The three-phase Hall sensors of the inverter in Figure 4b are widely used in variable frequency speed control devices, inverter devices, UPS power supply devices, and power grid monitoring systems because of their high precision, good linearity, wide frequency bandwidth, fast response time, small size, and strong anti-interference ability.

Gate driver circuit design
The MOSFET full bridge of the three-phase inverter is driven by the hybrid integrated module IR2104 gate driver IC. This driver is used as a MOSFET driver with independent to another power supply because it is a high-voltage, high-speed output channel. The IR2104 drive has many applications -DC-DC, AC/DC, DC/AC -for high-power density and efficiency and motor drive applications such as home appliances and LED drivers. A half-bridge gate driver circuit based on IR2104 is shown in Figure 5 with two MOSFET transistors.

SIMULATION AND PRACTICAL RESULTS
This section is divided into two parts: the first part discusses the MATLAB/Simulink results for the three-phase photovoltaic inverter, and the second part discusses the practical system's hardware and results. Figure 6 presents the full system of the three-phase PV inverter with feedback and full control. This system was built using MATLAB/Simulink. The simulation parameters are V_dc=500V, L=0.3mH, 400 VAC with 50Hz and the three-phase power grid with a carrier frequency of 5 kHz. Figure 5 shows the simulated waveforms of the grid-connected current and voltage. The grid-connected current sinusoidality of the improved predictive control method is high and stable, and the inductance value fluctuation is small and stable, and the expected control target is achieved. Because the grid is symmetrical, the voltage and current waveforms of phase A are selected to present the current and voltage.

Three-phase simulation results
The simulation results of the three-phase photovoltaic inverter for DG distribution in Figure 6 are presented in Figure 7. Figure 7a shows the DC link voltage. The output voltage of the three-phase inverter is shown in Figure 7b, and Figure 7c presents the output current of the three-phase inverter. Finally, the voltage and current of phase A are shown in Figure 7d. Figure 7d presents the voltage and current of phase A in the same sequence.  Figure 9 present the demo hardware of the full system of the three-phase inverter built in the lab. It shows the isolated driver circuit, measuring voltage and current circuit, three-phase bridge inverter, and Explorer 16 kit with PIC24FJ256GB110 microcontroller.

CONCLUSION
This study involved the design and implementation of a three-phase photovoltaic grid-tied inverter controlled by PIC24FJ256GB110 based on the distributed generation system. The microcontrol (PIC24FJ256GB110 chip) core used an advanced and powerful microchip with high reliability and high efficiency. The Hall sensor of the voltage and current was used to measure the AC and DC voltage and current. This practical design was made in the lab mainly by using the basic structure of the three-phase photovoltaic inverter system, selecting the appropriate main control chip, designing the three-phase inverter power supply realised using the PWM modulation method, and using the current and voltage feedback loops mode in the instantaneous value method to ensure that the output of the inverter was stable and that the L filter was used to maintain the quality of the output power. The simulation and experimental results verified the rationality of the mathematical model and control strategy and provided a theoretical basis for engineers and technicians. This modelling and control method can also be extended to other types of PWM changes.