Solar PV Powered EV Charging Station in MATLAB | Neural Network Energy Management
- lms editor
- 2 days ago
- 8 min read
Solar PV Powered EV Charging Station in MATLAB | Neural Network Energy Management
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
The Solar PV Powered EV Charging Station in MATLAB demonstrates an intelligent charging architecture that combines solar photovoltaic generation, stationary battery storage, EV battery charging, grid integration, ANFIS-based MPPT, and neural-network energy management.
Solar PV Powered EV Charging Station in MATLAB | Neural Network Energy Management

The main objective is to utilize available solar energy efficiently for EV charging while maintaining reliable operation under varying solar irradiance and battery state-of-charge conditions.
The system automatically decides whether power should:
Flow from the solar PV system to the EV battery
Charge or discharge the stationary battery
Be exported to the utility grid
Be imported from the grid
Be shared among PV, battery, EV, and grid according to operating conditions
This MATLAB/Simulink model is useful for students, researchers, and engineers studying renewable-energy-based EV charging, intelligent energy management, grid-connected converters, and smart charging systems.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The proposed charging station contains four major power sections.
System Component | Main Function | Control/Converter |
Solar PV Array | Generates renewable DC power | Boost DC-DC converter |
Stationary Battery | Stores excess energy and supports EV charging | Bidirectional DC-DC converter |
EV Battery | Receives charging power | Bidirectional DC-DC converter |
Utility Grid | Imports or absorbs power depending on system condition | Single-phase inverter |
PV Controller | Extracts maximum available PV power | ANFIS MPPT |
Grid EMS | Determines grid power direction and current reference | Neural Network |
Grid Interface | Connects DC bus to utility supply | Inverter + LCL filter |
DC Bus | Common power-sharing link | Regulated around 500 V |
The DC bus acts as the central energy link connecting the PV array, stationary battery, EV battery, and grid.
𝐌𝐚𝐢𝐧 𝐒𝐲𝐬𝐭𝐞𝐦 𝐏𝐚𝐫𝐚𝐦𝐞𝐭𝐞𝐫𝐬
Important operating values demonstrated in the simulation are summarized below.
Parameter | Value / Condition |
DC Bus Reference Voltage | 500 V |
Initial Stationary Battery SOC – Case 1 | 90% |
Initial Stationary Battery SOC – Case 2 | 40% |
Initial Stationary Battery SOC – Case 3 | 10% |
Initial EV Battery SOC | Approximately 9% |
Maximum Observed PV Power | Approximately 2000 W |
Reduced PV Power Levels | Approximately 1000 W, 500 W and below 200 W |
Example EV Charging Current | Approximately −30 A |
Grid Connection | Single phase |
Grid Filter | LCL filter |
MPPT Method | ANFIS-based MPPT |
Energy Management | Neural Network based |
These operating conditions help demonstrate how the charging station responds to changing solar generation and battery SOC.
𝐒𝐨𝐥𝐚𝐫 𝐏𝐕 𝐒𝐲𝐬𝐭𝐞𝐦
The solar PV array is the primary renewable-energy source in the charging station.
Its main sections are:
PV array
Boost converter
PV voltage and current measurement
ANFIS MPPT controller
PI voltage controller
PWM generator
IGBT switching device
The PV array provides DC power whose output varies according to environmental conditions.
As solar irradiance decreases, the PV power also decreases. The simulation demonstrates PV output changing from approximately:
2000 W → 1000 W → 500 W → below 200 W
This variation is important because the energy management system must continuously compensate for changes in renewable generation.
𝐀𝐍𝐅𝐈𝐒 𝐁𝐚𝐬𝐞𝐝 𝐌𝐏𝐏𝐓 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
Instead of using only a conventional MPPT method, the model implements an Adaptive Neuro-Fuzzy Inference System (ANFIS).
ANFIS MPPT Inputs
Input | Purpose |
Solar Irradiance | Represents available solar energy |
Temperature | Represents PV operating temperature |
ANFIS Output
The ANFIS controller generates the required voltage at the maximum power point.
The generated reference voltage is compared with the measured PV voltage. The resulting control signal passes through the PI controller and PWM generator.
The PWM pulses control the boost-converter IGBT so that the PV array operates close to its maximum available power point.
This makes the PV section adaptive to changing environmental conditions.
𝐒𝐭𝐚𝐭𝐢𝐨𝐧𝐚𝐫𝐲 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐒𝐭𝐨𝐫𝐚𝐠𝐞
The stationary battery serves as an energy buffer between the solar PV system, EV battery, and grid.
It is connected to the common DC bus through a bidirectional DC-DC converter.
The converter allows two-way energy flow:
Charging: DC bus → stationary battery
Discharging: stationary battery → DC bus
Battery measurements available in the model include:
Battery voltage
Battery current
Battery SOC
The stationary battery also contributes to maintaining reliable EV charging when solar generation decreases.
𝐃𝐂 𝐁𝐮𝐬 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The common DC bus is regulated at approximately 500 V.
The actual DC-link voltage is measured continuously and compared with the 500 V reference.
The controller then generates the appropriate switching pulses for the bidirectional converter.
Maintaining a stable DC bus is essential because the PV converter, stationary storage, EV charging converter, and grid inverter all exchange energy through this common DC link.
𝐄𝐕 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐂𝐡𝐚𝐫𝐠𝐢𝐧𝐠
The EV battery is connected through another bidirectional DC-DC converter.
The simulation monitors:
EV battery voltage
EV battery current
EV battery SOC
In the demonstrated charging condition, the EV battery current reaches approximately −30 A.
Under the sign convention used in this model, a negative EV battery current represents charging.
As a result, the EV battery SOC gradually increases during the simulation.
𝐆𝐫𝐢𝐝 𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐢𝐨𝐧
The charging station is connected to a single-phase utility grid through a controlled inverter.
The grid interface contains:
Single-phase inverter
LCL filter
Grid-voltage measurement
Inverter-current measurement
PLL
Current controller
PWM generation system
The LCL filter helps reduce switching-frequency harmonics before current is exchanged with the grid.
The grid connection provides additional flexibility because the charging station can either receive power from the utility grid or send surplus energy to it.
𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤 𝐄𝐧𝐞𝐫𝐠𝐲 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭
One of the key features of the model is its Neural Network Energy Management System.
The neural network determines the grid-current reference according to the operating condition of the charging station.
Neural Network Inputs and Output
Type | Signal |
Input 1 | PV Power |
Input 2 | Stationary Battery SOC |
Output | Grid Reference Current |
The reference current determines how the inverter exchanges power with the utility grid.
Therefore, the neural network acts as the high-level decision-making element for grid power management.
𝐆𝐫𝐢𝐝 𝐂𝐮𝐫𝐫𝐞𝐧𝐭 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The neural-network reference current is processed by the grid-current controller.
The control structure includes:
Grid synchronization using a PLL
Reference-current generation from the neural network
Transformation of reference and measured currents
Comparison between reference and actual inverter current
PID-based current regulation
Conversion back to the required stationary reference frame
PWM pulse generation
Inverter switching control
This enables controlled bidirectional power transfer between the EV charging station and the utility grid.
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The charging station changes its power flow according to PV availability and battery condition.
Condition 1 – Solar Power Available
When sufficient PV power is available:
Solar PV → EV Battery
and depending on the battery condition:
Solar PV → Stationary Battery
or
Solar PV + Stationary Battery → Grid + EV Battery
This increases renewable-energy utilization.
Condition 2 – PV Power Decreases
As irradiance decreases, PV generation falls.
The stationary battery contributes additional energy so that EV charging can continue.
Grid exchange is then adjusted automatically by the neural-network controller.
Condition 3 – PV Power Very Low
When the PV output becomes very low, the grid starts supplying additional power.
Power flow becomes approximately:
Grid + Available PV + Battery Support → EV Charging
This prevents interruption of EV charging.
Condition 4 – Stationary Battery SOC Low
When the stationary battery SOC becomes very low, the battery should be protected from excessive discharge.
The system therefore increases grid support.
Power can then flow as:
Grid + Solar PV → Stationary Battery + EV Battery
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
Three important stationary-battery SOC conditions are demonstrated.
Case 1: Stationary Battery SOC = 90%
The EV battery SOC is approximately 9%, while the stationary battery begins at approximately 90%.
Initially:
PV power is around 2000 W
Stationary battery operates in discharge mode
EV battery operates in charging mode
EV battery SOC increases
Stationary battery SOC decreases
Excess power can be transferred toward the grid
An example grid power of approximately −200 W is observed.
Under the simulation's sign convention, negative grid power represents export from the DC system toward the grid.
As PV generation falls, grid power changes accordingly.
At approximately 500 W PV generation, grid exchange approaches zero.
When PV output falls below approximately 200 W, the grid begins supplying power to the DC system.
Case 2: Stationary Battery SOC = 40%
For the second condition:
Parameter | Behaviour |
Stationary Battery SOC | Starts near 40% |
EV Battery SOC | Below approximately 10% |
Initial PV Power | Around 2000 W |
Stationary Battery | Discharging |
EV Battery | Charging |
Example Initial Grid Power | Around −900 W |
PV decreases | Grid support increases |
Initially, solar PV and the stationary battery can provide sufficient energy for EV charging and grid interaction.
As irradiance decreases, PV generation decreases and the utility grid gradually supplies more power.
The stationary battery contribution also reduces as grid support increases.
Case 3: Stationary Battery SOC = 10%
This represents a low-storage-energy condition.
Both the stationary battery and EV battery require charging.
The simulation shows:
Solar PV + Utility Grid → Stationary Battery + EV Battery
As PV generation decreases, the grid automatically provides more power.
Both battery currents remain in the charging direction, and both SOC values gradually increase.
This condition demonstrates the ability of the neural-network energy management system to protect the stationary battery while maintaining EV charging.
𝐏𝐨𝐰𝐞𝐫 𝐅𝐥𝐨𝐰 𝐒𝐮𝐦𝐦𝐚𝐫𝐲
Operating Condition | Stationary Battery | EV Battery | Grid |
High PV + High Battery SOC | Can discharge/support | Charging | May receive excess power |
Moderate PV | Supports DC bus | Charging | Power exchange adjusted |
Low PV | Reduced support | Charging | Supplies additional power |
Very Low PV | May support depending on SOC | Charging | Import increases |
Low Stationary Battery SOC | Charging | Charging | Supplies required deficit |
Excess PV + Sufficient Stored Energy | May support/export | Charging | Receives surplus energy |
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
Solar-powered EV charging architecture
ANFIS-based maximum power point tracking
Neural-network-based intelligent energy management
Grid-connected bidirectional power operation
Stationary battery energy storage
EV battery charging control
Approximately 500 V regulated DC bus
Automatic response to changing solar irradiance
Battery SOC-based power-sharing strategy
Single-phase grid inverter
LCL grid filter
PLL-based grid synchronization
Bidirectional DC-DC converters
Grid import and export capability
Continuous PV, battery, grid, and EV monitoring
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This MATLAB/Simulink model can be useful for studying:
Solar EV charging stations
Smart charging infrastructure
Renewable-energy-integrated charging systems
Battery energy storage management
Intelligent microgrids
Grid-interactive EV charging
Neural-network-based power management
ANFIS-based renewable-energy control
Bidirectional converter control
Smart grid energy management
Renewable-energy power sharing
EV charging station research and development
𝐖𝐡𝐲 𝐔𝐬𝐞 𝐀𝐍𝐅𝐈𝐒 𝐚𝐧𝐝 𝐍𝐞𝐮𝐫𝐚𝐥 𝐍𝐞𝐭𝐰𝐨𝐫𝐤 𝐂𝐨𝐧𝐭𝐫𝐨𝐥?
The model combines two intelligent-control techniques for different purposes.
Technique | Application |
ANFIS | Determines the PV maximum-power-point voltage |
Neural Network | Determines the grid reference current |
PI/PID Controllers | Regulate converter and inverter operation |
PLL | Synchronizes inverter control with the grid |
PWM | Produces converter switching pulses |
ANFIS focuses on extracting available solar energy, while the neural network focuses on energy-sharing decisions.
Together, they create a more intelligent renewable-energy-based EV charging architecture.
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The Solar PV Powered EV Charging Station in MATLAB with Neural Network Energy Management demonstrates an integrated approach for renewable EV charging.
The system combines a solar PV array, ANFIS MPPT, stationary battery storage, EV battery, bidirectional DC-DC converters, a regulated 500 V DC bus, and a single-phase grid-connected inverter.
The simulation demonstrates successful operation for stationary battery SOC levels of approximately 90%, 40%, and 10%. As PV generation changes from around 2000 W to below 200 W, the energy management controller adjusts the grid power automatically.
When sufficient renewable and stored energy are available, the system can charge the EV and export surplus power. When PV generation becomes insufficient, the utility grid provides the required power. At low stationary battery SOC, grid and PV power are used to charge both storage and EV batteries.
The combination of ANFIS MPPT and neural-network energy management makes the model a useful platform for understanding intelligent solar-powered EV charging and bidirectional grid energy exchange.



Comments