Main Content

Single-Phase Grid-Connected Solar Photovoltaic System

This example shows how to model a rooftop single-phase grid-connected solar photovoltaic (PV) system. This example supports design decisions about the number of panels and the connection topology required to deliver the target power. The model represents a grid-connected rooftop solar PV system without an intermediate DC-DC converter. To parameterize the model, the example uses data from a solar panel manufacturer datasheet. Solar power is injected into the grid with unity power factor (UPF).

To track the maximum power point (MPP), the example uses these maximum power point tracking (MPPT) techniques:

  • Incremental conductance

  • Perturbation and observation

Three inverter options are available:

  • Average

  • Continuous

  • Discrete

This example linearizes the system to generate an open-loop Bode plot from which you can determine the phase and gain margin.

To open a script that provides information on the parameterization, features, and options in this example, at the MATLAB® Command Window, enter: edit 'SinglePhaseGridSolarPVData'

PV System Model

***********************************************************************************************
****          For the given solar panel, estimated boostless PV plant parameters           ****
***********************************************************************************************
*** Power rating input from the user = 4.70 kW 
*** Minimum number of panel required per string = 17 
*** Maximum number of panel connected per string without reaching maximum system voltage = 27 
*** Minimum power rating of the boost-less solar PV plant = 3.83 kW 
*** Maximum power possible per string without reaching maximum DC voltage = 6.08 kW 
*** Actual number of panel per string = 21 
*** Number of strings connected in parallel = 1 
*** Actual solar PV plant power = 4.73 kW
***********************************************************************************************

Solar Plant Subsystem

The solar plant subsystem models a solar plant that contains parallel-connected strings of solar panels. The solar panel is modeled using the Solar Cell block from the Simscape™ Electrical™ library. This example estimates the number of series-connected solar panels in a string based on the supply voltage, voltage drop across the line inductor, supply voltage fluctuation, and open-circuit voltage dependence on temperature and irradiance. This example estimates the number of parallel-connected solar panel strings based on the plant power rating. Connecting multiple panels slows down the simulation because it increases the number of elements in a model. By assuming uniform irradiance and temperature across all the solar panels, the Solar Panel subsystem reduces the number of solar elements by using the controlled current and voltage sources.

Maximum Power Point Tracking

This example implements two MPPT techniques. By using the variant variable 'MPPT', you can choose incremental conductance MPPT or perturbation and observation MPPT. For perturbation and observation, set the variable MPPT to zero and MPPT to one for incremental conductance. The maximum power point tracking block influences the current supplied to the grid. To increase the voltage across the PV panel string, this example reduces the current to the grid to inject more current into the DC bus capacitor.

Open Loop Bode Plot

Before linearizing the system, to disconnect the MPPT outer loop and break the current inner current loop, set the workspace variable 'closeLoop' to zero and use the average inverter model.

To use an average mode inverter, set the variant workspace variable 'powerCircuit' to zero.