top of page

MATLAB Simulation of Solar PV–EV Charging Station with Grid

MATLAB Simulation of Solar PV–EV Charging Station with Grid


𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧


The MATLAB Simulation of Solar PV–EV Charging Station with Grid demonstrates an intelligent charging architecture that combines a solar photovoltaic source, EV battery, stationary battery, DC load, bidirectional DC–DC converter, and single-phase utility grid.


MATLAB Simulation of Solar PV–EV Charging Station with Grid

MATLAB simulation of Solar PV EV Charging Station with Grid
₹12,000.00₹6,000.00
Buy Now


The main objective is to maximize the utilization of solar energy while reducing unnecessary power drawn from the grid. The system automatically changes its power-flow strategy depending on:

  • Solar PV generation

  • EV connection status

  • DC load demand

  • Battery operating condition

  • Availability of grid support

The complete system is implemented in MATLAB/Simulink, making it suitable for studying renewable-energy-based EV charging, converter control, MPPT operation, battery power management, and grid interaction.


𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰


The simulated charging station contains the following major sections:

  • 4 kW solar PV array

  • Interleaved buck converter

  • Incremental Conductance MPPT

  • 400 V common DC bus

  • DC load

  • EV battery

  • Stationary battery

  • Bidirectional DC–DC converter

  • Single-phase grid

  • Grid-connected inverter

  • Current-control system

  • Battery-selection logic

  • Voltage regulation

  • Power and SOC measurement

The solar PV system acts as the primary energy source. The battery and grid provide energy support depending on PV generation and EV availability.


𝐒𝐲𝐬𝐭𝐞𝐦 𝐒𝐩𝐞𝐜𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬

Parameter

Value

Single PV module power

250 W

PV modules connected in series

16

Total PV rated power

4 kW

PV module voltage at MPP

30.7 V

PV module current at MPP

8.15 A

PV string voltage at MPP

491.2 V

Regulated DC-bus voltage

400 V

Utility grid voltage

230 V AC

Typical DC load power

1 kW

Battery operating voltage observed

Around 250 V

EV initial SOC in the demonstrated case

Around 9%

Storage battery SOC in the demonstrated case

Around 50%

Simulation duration shown

3 s

At rated solar irradiation, the 16-series-module PV string produces approximately 491.2 V at its maximum power point. Therefore, a step-down power converter is required to interface the PV source with the 400 V DC bus.


𝐒𝐨𝐥𝐚𝐫 𝐏𝐕 𝐀𝐫𝐫𝐚𝐲


The PV array is designed using 16 series-connected 250 W modules.

At approximately 1000 W/m² solar irradiation:

  • PV output power reaches nearly 4000 W

  • PV operating voltage is close to 500 V

  • Maximum-power-point current is approximately 8.15 A

  • The PV voltage must be reduced before supplying the 400 V DC link

Solar irradiation is intentionally varied during simulation to test the dynamic response of the charging station.

Irradiation Test Conditions

Irradiation

Approximate PV Power

1000 W/m²

4000 W

500 W/m²

2000 W

0 W/m²

Approximately 0 W

These changing conditions demonstrate how the charging system manages energy when solar generation increases, decreases, or becomes unavailable.


𝐈𝐧𝐭𝐞𝐫𝐥𝐞𝐚𝐯𝐞𝐝 𝐁𝐮𝐜𝐤 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫


An interleaved buck converter interfaces the PV array with the common DC bus.

Its main purposes are:

  • Step down the PV voltage from approximately 491 V to 400 V

  • Transfer solar energy to the DC link

  • Reduce input-current ripple

  • Reduce output-current ripple

  • Improve current sharing

  • Provide smoother power transfer compared with a conventional single-phase buck converter

  • Operate according to the MPPT-generated duty cycle

Using interleaved converter stages is particularly useful when handling relatively high current because the current is distributed between converter branches.


𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓


The PV converter is controlled through an Incremental Conductance Maximum Power Point Tracking algorithm.

The MPPT receives:

  • PV voltage

  • PV current

It continuously evaluates variations in these quantities and adjusts the converter duty cycle.

The controller includes parameters such as:

  • Initial duty cycle

  • Maximum duty-cycle limit

  • Minimum duty-cycle limit

  • PV voltage variation

  • PV current variation

Based on changing solar conditions, the MPPT increases or decreases the duty cycle until the PV array operates close to its maximum available power point.

Benefits of MPPT

  • Maximum utilization of available solar energy

  • Improved performance under changing irradiation

  • Automatic converter duty-cycle adjustment

  • Better renewable-energy utilization

  • Reduced dependence on grid power


𝐂𝐨𝐦𝐦𝐨𝐧 𝐃𝐂 𝐁𝐮𝐬


A 400 V DC bus acts as the central energy-transfer point of the complete system.

It connects:

  • Solar PV converter

  • DC load

  • Battery converter

  • Grid-connected inverter

  • EV battery or stationary battery

Maintaining this DC-link voltage close to 400 V is important for stable operation of all connected converter stages.


𝐁𝐢𝐝𝐢𝐫𝐞𝐜𝐭𝐢𝐨𝐧𝐚𝐥 𝐃𝐂–𝐃𝐂 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫


The battery is connected to the common DC bus using a bidirectional DC–DC converter.

Unlike a conventional unidirectional converter, this converter can transfer energy in both directions.

Charging Operation

Power flows:

DC bus → converter → battery

This mode is used when excess PV or grid power is available for battery charging.

Discharging Operation

Power flows:

Battery → converter → DC bus

This mode is mainly used by the stationary battery when PV generation becomes insufficient.


𝐃𝐂-𝐁𝐮𝐬 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐂𝐨𝐧𝐭𝐫𝐨𝐥


The bidirectional converter uses a voltage-control loop to regulate the DC bus.

The controller:

  • Measures actual DC-bus voltage

  • Compares it with the 400 V reference

  • Processes the voltage error using a PI controller

  • Generates the required duty-cycle command

  • Sends switching pulses through the PWM generator

This allows the converter to compensate for changes in:

  • PV generation

  • Battery power

  • EV charging demand

  • DC load power

As observed in the simulation, the DC-link voltage remains close to its reference during operating-condition changes.


𝐄𝐕 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐚𝐧𝐝 𝐒𝐭𝐚𝐭𝐢𝐨𝐧𝐚𝐫𝐲 𝐁𝐚𝐭𝐭𝐞𝐫𝐲


An important feature of this charging architecture is the automatic selection between the EV battery and the stationary battery.

Battery Selection Logic

Control Input

EV Battery

Stationary Battery

1

Connected

Disconnected

0

Disconnected

Connected

This arrangement prevents both batteries from operating through the same branch simultaneously in the demonstrated configuration.


𝐌𝐨𝐝𝐞 𝟏 – 𝐄𝐕 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐞𝐝


When the control input is set to 1:

  • EV battery is connected

  • Stationary battery is disconnected

  • Solar PV becomes the preferred charging source

  • Grid power is used only when required

  • EV battery SOC increases during charging

When sufficient PV power is available:

  • PV supplies the DC load

  • Remaining PV power charges the EV battery

  • Grid power is maintained close to zero

When PV generation falls to almost zero:

  • Grid becomes active

  • Grid supplies the required DC-side demand

  • EV charging can continue

  • Stationary battery remains disconnected


𝐌𝐨𝐝𝐞 𝟐 – 𝐄𝐕 𝐍𝐨𝐭 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐞𝐝


When the control input is set to 0:

  • EV battery is disconnected

  • Stationary battery is connected

  • PV supplies the DC load first

  • Excess PV charges the stationary battery

  • Stationary battery supports the load during low PV generation

  • Grid contribution remains approximately zero in the demonstrated operating case

This allows locally stored renewable energy to support the DC load without unnecessarily importing power from the grid.


𝐆𝐫𝐢𝐝 𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐢𝐨𝐧


The system uses a 230 V single-phase utility grid connected to the common DC link through a controlled inverter.

The grid is not continuously used as the primary power source.

Instead, it acts mainly as a support source when:

  • EV is connected

  • Solar generation becomes insufficient

  • Charging demand cannot be satisfied by available PV power

This strategy helps minimize purchased grid energy.


𝐆𝐫𝐢𝐝 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥


The inverter is operated using a current-control strategy.

The control system includes:

  • Reference-current generation

  • Measured inverter current

  • Coordinate transformations

  • PI current controllers

  • Voltage reference generation

  • PWM pulse generation

  • Converter switching control

The current reference depends mainly on:

  • PV availability

  • EV connection status

  • Required charging operation

When adequate PV generation is available, the grid-current reference can be reduced to approximately zero.

When solar power is unavailable and the EV requires charging, a grid-current reference is generated to obtain the required power from the utility.


𝐏𝐕 𝐀𝐯𝐚𝐢𝐥𝐚𝐛𝐢𝐥𝐢𝐭𝐲 𝐋𝐨𝐠𝐢𝐜


The demonstrated control checks the PV current to determine whether meaningful solar generation is available.

A PV-current threshold of approximately 0.5 A is used in the described control logic.

Typical Decision Process

PV Condition

EV Status

Grid Action

PV available

EV connected

Grid power minimized

PV unavailable

EV connected

Grid supplies required power

PV available

EV disconnected

PV supplies load/storage battery

PV unavailable

EV disconnected

Storage battery supplies local load

This operating strategy reduces unnecessary grid usage.


𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬


The complete operating sequence can be understood in a few simple steps:

  1. Solar irradiation is applied to the PV array.

  2. PV voltage and current are measured.

  3. Incremental Conductance MPPT determines the converter operating duty cycle.

  4. The interleaved buck converter transfers maximum available PV power to the 400 V DC bus.

  5. The DC load receives the required power.

  6. The control system checks whether an EV is connected.

  7. If the EV is connected, the EV battery becomes active.

  8. If the EV is absent, the stationary battery becomes active.

  9. Excess solar power charges the active battery.

  10. If PV generation is inadequate, either the grid or stationary battery supports the system according to the operating mode.

  11. The bidirectional converter maintains DC-bus stability.

  12. Voltage, current, power, grid response, and battery SOC are monitored continuously.


𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬


The simulation evaluates the system under changing solar irradiation and different battery-selection conditions.

PV Response

The solar PV system successfully follows changes in irradiation.

Operating Condition

PV Power

DC Load

Remaining Power

1000 W/m²

4000 W

1000 W

3000 W

500 W/m²

2000 W

1000 W

1000 W

0 W/m²

0 W

1000 W

Backup source required

At high irradiation, substantial excess PV energy is available for battery charging.


𝐄𝐕-𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐞𝐝 𝐑𝐞𝐬𝐮𝐥𝐭𝐬


With the EV connected:

  • EV battery voltage remains approximately 250 V

  • EV charging current becomes positive

  • EV SOC gradually increases

  • Stationary battery current remains approximately zero

  • At high PV generation, solar energy supplies both load and EV charging

  • At approximately 4 kW PV generation, around 1 kW supplies the load and the remaining power is available for charging

  • At approximately 2 kW PV generation, around 1 kW supplies the load and approximately 1 kW remains available for EV charging

  • When PV generation reaches zero, the grid supplies the required charging and load power

  • When PV generation returns, grid power reduces toward zero

This demonstrates effective source coordination.


𝐒𝐭𝐚𝐭𝐢𝐨𝐧𝐚𝐫𝐲-𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐑𝐞𝐬𝐮𝐥𝐭𝐬


When the EV is disconnected:

  • EV battery current becomes zero

  • Stationary battery becomes active

  • High PV generation charges the stationary battery

  • At approximately 4 kW PV power, the load consumes about 1 kW and nearly 3 kW is available for battery charging

  • At approximately 2 kW PV power, around 1 kW supplies the load and the remaining 1 kW charges the battery

  • When PV output falls to zero, stationary-battery power reverses direction

  • Negative battery power indicates that the battery is supplying energy to the DC bus

  • Grid power remains close to zero during this demonstrated mode

The result confirms the bidirectional nature of the battery converter.

𝐒𝐎𝐂 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞

Battery SOC provides another indication of system power flow.

EV Connected

  • EV SOC starts at approximately 9%

  • SOC gradually increases during charging

  • Stationary-battery SOC remains almost unchanged because it is disconnected

EV Disconnected

  • EV SOC remains nearly unchanged

  • Stationary-battery SOC changes according to charging and discharging operation

Because the simulation duration is only a few seconds, SOC variation is naturally small.


𝐏𝐨𝐰𝐞𝐫 𝐅𝐥𝐨𝐰 𝐒𝐮𝐦𝐚𝐫𝐲


Operating Situation

Main Power Flow

High PV + EV connected

PV → DC Load + EV

Medium PV + EV connected

PV → DC Load + EV

No PV + EV connected

Grid → DC Load + EV

High PV + EV absent

PV → DC Load + Storage Battery

Medium PV + EV absent

PV → DC Load + Storage Battery

No PV + EV absent

Storage Battery → DC Load

This simple operating table summarizes the complete energy-management strategy.


𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬


  • 4 kW solar PV generation

  • Incremental Conductance MPPT

  • Interleaved buck converter

  • 400 V regulated DC bus

  • EV charging capability

  • Stationary energy-storage support

  • Bidirectional battery power flow

  • Automatic EV/storage-battery selection

  • Single-phase grid integration

  • Grid current control

  • PI-based converter regulation

  • PWM switching control

  • Variable irradiation testing

  • Dynamic source selection

  • Battery SOC monitoring

  • Real-time voltage and current measurement

  • PV, battery, load, and grid power monitoring

  • Reduced dependency on grid energy


𝐀𝐝𝐯𝐚𝐧𝐭𝐚𝐠𝐞𝐬 𝐨𝐟 𝐭𝐡𝐞 𝐏𝐫𝐨𝐩𝐨𝐬𝐞𝐝 𝐒𝐲𝐬𝐭𝐞𝐦


Higher Solar-Energy Utilization

MPPT operation helps extract the maximum available power from the PV array.

Reduced Grid Dependency

The grid is mainly used when solar energy cannot meet EV charging demand.

Better Power Quality at the DC Side

The interleaved converter helps reduce current ripple compared with a conventional single-channel buck converter.

Energy Storage Support

The stationary battery supplies the local load when PV generation becomes insufficient.

Flexible EV Charging

EV charging automatically adapts according to solar-power availability.

Stable DC-Link Operation

The bidirectional converter control keeps the common DC bus near 400 V.


𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬


This MATLAB/Simulink model can be useful for studying:

  • Solar-powered EV charging stations

  • Smart charging infrastructure

  • Grid-assisted EV chargers

  • Renewable-energy integration

  • Battery energy-storage systems

  • Residential EV charging

  • Commercial charging stations

  • Smart-grid energy management

  • DC microgrids

  • Bidirectional power converters

  • MPPT control techniques

  • Power-electronic converter control

  • Renewable-energy-based transportation systems

  • Grid power minimization strategies

It is suitable for students, researchers, engineers, educators, and professionals working in renewable energy, electric mobility, power electronics, and smart-grid control.


𝐖𝐡𝐚𝐭 𝐂𝐚𝐧 𝐁𝐞 𝐎𝐛𝐬𝐞𝐫𝐯𝐞𝐝 𝐢𝐧 𝐭𝐡𝐞 𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧?


The model provides several useful measurements for understanding system behavior:

  • PV voltage

  • PV current

  • PV power

  • DC-bus voltage

  • DC-load current

  • DC-load power

  • EV battery voltage

  • EV battery current

  • EV battery power

  • Stationary-battery voltage

  • Stationary-battery current

  • Stationary-battery power

  • EV SOC

  • Stationary-battery SOC

  • Inverter voltage

  • Inverter current

  • Grid current

  • Grid power

These waveforms make it easier to analyze how the complete charging station responds to changing PV generation and battery operating modes.


𝐖𝐡𝐲 𝐓𝐡𝐢𝐬 𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐢𝐬 𝐔𝐬𝐞𝐟𝐮𝐥


The model combines several important concepts within a single MATLAB/Simulink environment:

  • Solar PV modeling

  • MPPT

  • DC–DC conversion

  • Interleaved converter topology

  • Battery charging

  • Battery discharging

  • EV integration

  • Grid-connected inverter control

  • Current control

  • DC-bus voltage regulation

  • Automatic energy management

Instead of studying these elements individually, users can observe how they interact within a complete renewable-energy EV charging station.


𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧


The MATLAB Simulation of Solar PV–EV Charging Station with Grid presents an effective renewable-energy-based charging architecture integrating a 4 kW solar PV array, interleaved buck converter, Incremental Conductance MPPT, 400 V DC bus, EV battery, stationary battery, bidirectional converter, DC load, and 230 V utility grid.

Simulation results demonstrate that the system intelligently manages power according to solar availability and EV connection status. During high PV generation, solar energy supplies the local load while excess energy charges the connected battery. When solar power decreases, charging power is automatically reduced according to available generation.

When the EV is connected and solar power becomes unavailable, the grid provides the required charging and load power. When the EV is disconnected, the stationary battery supports the DC load during insufficient solar generation.

Overall, the model demonstrates solar-energy maximization, controlled battery charging, bidirectional energy transfer, DC-bus regulation, automatic source selection, and reduced grid dependence in a single MATLAB/Simulink platform.


Comments


bottom of page