You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
1 Introduction
Grid-connected photovoltaic systems can be implemented using either a single-stage or two-stage topology. A single-stage system directly connects the photovoltaic array to the grid via a DC-to-AC inverter and LCL filter. The inverter performs both maximum power point tracking (MPPT) and grid control, ensuring proper synchronization and power delivery.
Development and modeling of a single-stage grid-connected photovoltaic system in Simulink, including:
- 1. PV array model
- 2. MPPT controller
- 3. Two-level inverter
- 4. Output LCL filter
- 5. Phase-locked loop (PLL)
- 6. Grid-side voltage, current, and injected power measurement
- 2 Simulink Model System Components
- 2.1 Single-Stage PV System Architecture
Figure 1 Model
2.2 Solar Array and MPPT
The solar array generates voltage and current based on irradiance and temperature.
Your MPPT implementation uses the Perturb & Observe algorithm, generating a DC reference voltage 𝑉𝑑𝑐_𝑟𝑒𝑓
Figure 2 MPPT Implementation
2.3 Perturb & Observe algorithm MPPT
MAT Function:
function Vref = RefGen (V,I)
Vrefmax = 909;
Vrefmini =0;
Vrefinit = 750;
deltaVref = 1;
persistent Vold Pold Vrefold;
dataType = 'double';
if isempty(Vold)
Vold=0;
Pold=0;
Vrefold = Vrefinit;
end
P= V*I;
dV= V - Vold;
dP= P - Pold;
if dP ~= 0
if dP < 0
if dV < 0
Vref = Vrefold + deltaVref;
else
Vref = Vrefold - deltaVref;
end
else
if dV < 0
Vref = Vrefold - deltaVref;
else
Vref = Vrefold + deltaVref;
end
end
else Vref = Vrefold;
end
if Vref >= Vrefmax | Vref <= Vrefmini
Vref = Vrefold;
end
Vrefold = Vref;
Vold = V;
Pold = P;
2.4 Inverter Control (dq-reference frame)
The inverter control follows the dq-frame structure:
- PLL block extracts grid phase angle 𝜔𝑡
- abc → dq0 transforms convert grid and inverter measurements into synchronous frame
- PI controllers regulate:
- 𝑖𝑑 for active power (linked to MPPT)
- 𝑖𝑞=0 for unity power factor
- The voltage control loop produces reference modulation signals
Your screenshot clearly shows the implementation of:
- DC voltage control loop
- Current control loops
- dq→abc inverse transform
- PWM generator
- 2.5 LCL Filter
An LCL filter is installed between the inverter and the grid to suppress switching harmonics. The simulation corresponds to a standard LCL filter.
3 Simulation Results and Analysis
3.1 The solar array generates power
The PV array produces power according to the MPPT, as the maximum product of voltage and current
Figure 3 Scope Power
3.2 Voltage and Current at Inverter Side (Before LCL Filter)
A screenshot of the before LCL filter in Scope shows:
Three-phase voltages with high-frequency switching harmonics
Three-phase currents steadying out after a short transient
Currents decrease as luminosity decreases by approximately 0.24 s
Figure 4 Before LCL Filter
This behavior is consistent with expectations, since as irradiance decreases, the PV system power decreases → the MPPT decreases. 𝑉𝑑𝑐_𝑟𝑒𝑓→ the inverter supplies less current.
3.3 Voltage and Current at Grid Side (After LCL Filter)
Screenshot of the LCL filter at the oscilloscope output:
- Smooth sinusoidal voltage and current waveforms
- Very low harmonic levels
- The current amplitude drops within 0.24 seconds, confirming proper interaction between the MPPT and the grid control.
Figure 5 After LCL Filter
This matches the expected LCL characteristics.
4 Discussion
The results confirm that:
- The PLL system successfully synchronizes the inverter with the grid
- The MPPT correctly regulates power depending on illumination
- The dq control loops regulate the injected current and ensure a unity power factor
- The LCL filter effectively eliminates switching harmonics
- Power injection precisely matches illumination conditions
Overall, the designed single-stage PV system operates correctly.
5 Conclusion
This exercise demonstrated the modeling and operation of a single-stage grid-connected PV system in Simulink, including PV system modeling, MPPT, inverter control, and grid power delivery. The simulation results confirm the correct operation of:
- MPPT
- dq-regulation
- PLL synchronization
- LCL harmonic filtering
- illumination-dependent power regulation
The system is stable and delivers a clean sinusoidal current to the grid.
Cite As
Oleksandr (2026). PV single stage (https://au.mathworks.com/matlabcentral/fileexchange/183621-pv-single-stage), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0 (59.5 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |