The problem
Solar carports and PV-assisted charging are a common proposal for Indian campuses and fleet depots, but PV output swings with irradiance and temperature while an EV draws steady power. Without maximum power point tracking and an energy buffer, much of the available solar energy is lost. This project builds the full chain from PV module to charger output and measures tracking efficiency and energy share.
Objectives
- Model a PV array with irradiance and temperature inputs and plot its I–V and P–V curves.
- Design a boost converter with an MPPT controller.
- Implement and compare perturb-and-observe and incremental-conductance MPPT.
- Add a DC link with a buffer battery and an EV charging load.
- Calculate tracking efficiency and the solar share of a day's charging energy.
What you need
Tools and toolboxes
- Simulink — System model, MPPT logic in MATLAB Function blocks and logging.
- Simscape Electrical — PV Array block, boost converter (IGBT/diode or average-value), DC link capacitor, battery and the charger load.
- Control System Toolbox — Optional: tuning the DC-link voltage loop from a linearised model. Hand tuning works on a base licence.
Software
- MATLAB R2023b or later
- Simulink
- A PV module datasheet (Voc, Isc, Vmp, Imp)
- Hourly irradiance and temperature profile in CSV
Extra parts and data
None beyond the software above.
Key concepts
- Maximum power point
- A PV array's power peaks at one voltage on its P–V curve, and that voltage shifts with irradiance and temperature. The converter must keep the array at that point to extract the most energy.
- Perturb and observe
- The controller nudges the array voltage and checks whether power rose or fell, then keeps moving in the direction that raised it. It is simple but oscillates around the peak and can be fooled by fast irradiance changes.
- Incremental conductance
- At the maximum power point dP/dV = 0, which means dI/dV = −I/V. Comparing the two tells the controller which side of the peak it is on, giving less oscillation at steady state.
- Tracking efficiency
- Energy actually extracted divided by the energy available at the true maximum power point over the same period. It is the standard figure of merit for an MPPT algorithm.
Step-by-step guide
- 1
Define the station
Take an example: a 3 kWp array of eight 375 W modules in series, a 400 V DC link, a 5 kWh buffer battery at about 200 V nominal and a 3.3 kW AC-equivalent charging load modelled on the DC side. Record module Voc, Isc, Vmp and Imp from a datasheet. Write a parameter script with array, converter and battery values and a 24-hour irradiance and temperature profile compressed in time for simulation.
Checkpoint: A parameter script and a plotted daily irradiance curve with a midday peak near 1000 W/m².
- 2
Model and verify the PV array
Place the PV Array block from Simscape Electrical and set modules per string and strings in parallel. Either pick a module from its library list or enter user-defined datasheet values. Drive it with a Controlled Voltage Source sweeping 0 to Voc and plot I–V and P–V curves at 1000, 600 and 200 W/m² and at 25 and 50 degC. Compare Pmax with the datasheet.
Checkpoint: P–V curves with a single peak whose height matches 3 kWp within a few per cent at standard test conditions, and whose voltage falls as temperature rises.
- 3
Build the boost converter
Model a boost converter between the array and the DC link: input capacitor, inductor, switch and diode, switching at 20 kHz. Size the inductor for current ripple around 20 per cent at Pmax using L = Vin·D/(ΔI·fs). Start with a switched model and a discrete solver at 0.5 µs, then make an average-value version (duty cycle driving controlled sources) for long runs. Check that both give the same averaged waveforms.
Checkpoint: At a fixed duty cycle the switched and average models agree on input voltage and DC-link current within about 2 per cent.
- 4
Implement perturb and observe
In a MATLAB Function block sampled at 10 ms, read array voltage and current, compute power and compare with the previous sample. If power rose, keep the voltage step direction; otherwise reverse it. Output a voltage reference to an inner PI loop that adjusts duty cycle to hold array voltage. Use a step of about 1 V and limit the reference between 0.5·Voc and 0.95·Voc of the array.
Checkpoint: At constant irradiance the array voltage settles near Vmp with a small steady oscillation and power within about 1 per cent of Pmax.
- 5
Implement incremental conductance
Write a second MATLAB Function block that computes dI and dV between samples and compares dI/dV with −I/V, with a small dead band to avoid chattering. Use a Variant Subsystem or a manual switch so the same model can run either algorithm. Keep the inner voltage loop identical so the comparison is fair. Handle the case dV = 0 separately, using dI alone to decide direction.
Checkpoint: Under constant irradiance incremental conductance shows smaller steady oscillation than perturb and observe at the same step size.
- 6
Add the DC link, battery and charger
Connect the boost output to a DC-link capacitor, a bidirectional converter (average model is fine) to the buffer battery, and a constant-power load representing the charger. A PI loop on the battery converter holds the DC link at 400 V by charging the battery when solar exceeds load and discharging it when load exceeds solar. Add an SOC limit so the battery stops discharging at 20 per cent and grid import (an ideal source) supplies the rest.
Checkpoint: With a load step from 0 to 3.3 kW the DC link dips briefly and returns to 400 V within a few hundred milliseconds.
- 7
Run irradiance transients
Apply irradiance ramps and steps, such as a cloud dropping irradiance from 1000 to 300 W/m² in one second and recovering. Log array power, available maximum power (from a lookup of the P–V curves), DC-link voltage and battery current in the Simulation Data Inspector. Compute instantaneous tracking efficiency for both algorithms. Note where perturb and observe moves the wrong way during a fast ramp.
Checkpoint: Plots of extracted power against available power for both algorithms through the cloud event, with tracking efficiency above 95 per cent outside the transient.
- 8
Daily energy analysis
Run the compressed 24-hour profile with an example charging schedule, such as two 2-hour sessions at midday and one in the evening. Integrate solar energy, battery throughput, grid import and charger energy. Compute the solar share of charging energy and the daily tracking efficiency. Repeat with a smaller and larger buffer battery using a sim() loop, and plot solar share against battery size.
Checkpoint: An energy balance that closes within 1 per cent (solar plus grid equals load plus battery change plus losses) and a solar-share curve that flattens as battery size grows.
- 9
Report
Document array sizing, converter design, both MPPT algorithms and the DC-link control. Present the P–V verification, tracking comparison, energy balance and battery-size sweep. State the simplifications: average converter models, ideal grid, no AC-side charger dynamics, a single irradiance profile. Discuss how the results would change with monsoon-season irradiance and higher charging power. Add a short section on how the model could be extended to a real site survey, listing which inputs would come from measured data.
Checkpoint: A report whose figures are regenerated by one script, with an energy balance table and a clear MPPT comparison.
Testing & validation
- PV array Pmax at standard test conditions matches the datasheet rating.
- Steady-state MPPT tracking efficiency above 98 per cent at constant irradiance.
- DC-link voltage regulated within a few per cent through load and irradiance steps.
- Daily energy balance closes within 1 per cent.
Expected results
A complete PV-to-charger Simulink model with two MPPT algorithms compared on transient and daily tracking efficiency, and a sizing curve for the buffer battery against solar share of charging energy.
Take it further
- Add partial shading with bypass diodes and test a global MPPT search.
- Model the AC grid-tie inverter so excess solar can be exported.
- Add a time-of-use tariff and schedule charging to minimise grid cost.
- Use measured irradiance data from a local weather station.
Viva and review questions
Why does the maximum power point voltage fall as temperature rises?
Open-circuit voltage of silicon cells drops with temperature, roughly a few millivolts per degree per cell, which shifts the whole P–V curve to lower voltages.
Why can perturb and observe move the wrong way during a fast irradiance rise?
It attributes the power increase to its own voltage step, even though the increase came from irradiance, so it may keep stepping away from the true peak.
Why use an average-value converter model for the daily run?
A switched model at 20 kHz needs sub-microsecond steps, which makes a day-long run impractical. The average model keeps the low-frequency behaviour that matters for energy while running thousands of times faster.
Learn it at DIYguru
These DIYguru courses and programmes teach what this project needs.
