PV single stage

The simulation results confirm the correct operation of: MPPT dq-regulation PLL synchronization LCL harmonic filtering

You are now following this Submission

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. 1. PV array model
  2. 2. MPPT controller
  3. 3. Two-level inverter
  4. 4. Output LCL filter
  5. 5. Phase-locked loop (PLL)
  6. 6. Grid-side voltage, current, and injected power measurement
  7. 2 Simulink Model System Components
  8. 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:
  1. PLL block extracts grid phase angle 𝜔𝑡
  2. abc dq0 transforms convert grid and inverter measurements into synchronous frame
  3. PI controllers regulate:
  4. 𝑖𝑑 for active power (linked to MPPT)
  5. 𝑖𝑞=0 for unity power factor
  6. The voltage control loop produces reference modulation signals
Your screenshot clearly shows the implementation of:
  1. DC voltage control loop
  2. Current control loops
  3. dqabc inverse transform
  4. PWM generator
  5. 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:
  1. The PLL system successfully synchronizes the inverter with the grid
  2. The MPPT correctly regulates power depending on illumination
  3. The dq control loops regulate the injected current and ensure a unity power factor
  4. The LCL filter effectively eliminates switching harmonics
  5. 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:
  1. MPPT
  2. dq-regulation
  3. PLL synchronization
  4. LCL harmonic filtering
  5. 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 .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0