PV Grid Based EV Charging Station in MATLAB
PV Grid Based EV Charging Station in MATLAB
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐭𝐢𝐨𝐧
The PV Grid Based EV Charging Station in MATLAB demonstrates how a solar photovoltaic system and utility grid can work together to provide continuous charging power to an electric vehicle battery.
PV Grid Based EV Charging Station

The complete system is developed in MATLAB/Simulink and includes:
Solar PV array
Boost converter
Incremental Conductance MPPT
EV battery
Bidirectional DC–DC converter
400 V DC bus
Single-phase grid
Grid-connected full-bridge inverter
Filter
DC-bus voltage controller
Grid current controller
PWM generation
Voltage, current, power, and SOC measurements
The main objective is simple: use maximum available solar power for EV charging and automatically obtain the remaining required charging power from the grid.
𝐒𝐲𝐬𝐭𝐞𝐦 𝐎𝐯𝐞𝐫𝐯𝐢𝐞𝐰
The Simulink model can be divided into three major sections.
Section | Main Components | Purpose |
Power Section | PV array, EV battery, converters, inverter, grid | Handles electrical power conversion and transfer |
Control Section | MPPT, voltage controller, grid current controller, PWM | Controls PV, battery converter, and grid inverter |
Measurement Section | PV, battery, DC bus, grid, combined power measurements | Monitors complete system performance |
This structure makes the model easy to understand and suitable for studying renewable-energy-based EV charging.
𝐏𝐕 𝐒𝐲𝐬𝐭𝐞𝐦
The solar PV array is the primary renewable energy source of the charging station.
PV Array Parameters
Parameter | Value |
Single PV panel rated power | 250 W |
Modules connected in series | 8 |
Parallel strings | 1 |
Maximum PV array power | 2000 W |
Voltage at maximum power point per module | 30.7 V |
Current at maximum power point per module | ≈8.1 A |
Approximate array MPP voltage | ≈245 V |
Standard irradiance | 1000 W/m² |
Standard temperature | 25°C |
Eight PV modules connected in series provide an operating voltage of approximately 245 V around the maximum power point.
The PV voltage changes slightly when:
Solar irradiance changes
PV temperature changes
Operating conditions vary
For this model, the PV-side converter is therefore designed around an input voltage of approximately 245 V and a DC-bus voltage of 400 V.
𝐏𝐕 𝐏𝐨𝐰𝐞𝐫 𝐂𝐨𝐧𝐯𝐞𝐫𝐬𝐢𝐨𝐧
The PV array is connected to the common DC bus through a boost converter.
Boost Converter Operating Requirement
Parameter | Approximate Value |
PV-side input voltage | 245 V |
DC-bus voltage | 400 V |
Maximum PV power | 2000 W |
Converter type | Boost converter |
The boost converter performs two important functions:
Increases the PV voltage from approximately 245 V to 400 V
Allows the MPPT controller to adjust the PV operating point
𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥 𝐂𝐨𝐧𝐝𝐮𝐜𝐭𝐚𝐧𝐜𝐞 𝐌𝐏𝐏𝐓
An Incremental Conductance MPPT algorithm is used to extract the maximum available power from the PV array.
MPPT Inputs and Output
Signal | Description |
PV Voltage | Measured PV terminal voltage |
PV Current | Measured PV output current |
Duty Cycle | Output of the MPPT controller |
The MPPT algorithm continuously observes changes in:
PV voltage
PV current
PV power
Based on these changes, the controller decides whether the operating voltage should be increased or decreased.
The calculated duty cycle is supplied to a PWM generator, which produces the switching pulse for the boost converter.
Main MPPT Process
Measure the PV voltage and current.
Calculate the present operating condition.
Compare it with the previous operating condition.
Determine whether the PV operating point is below, above, or near the maximum power point.
Increase or decrease the duty cycle accordingly.
Generate the PWM pulse.
Control the boost converter.
Continue the process for every control sampling interval.
This enables the PV system to track the available maximum power even when irradiance changes.
𝐄𝐕 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐒𝐲𝐬𝐭𝐞𝐦
The EV battery is connected to the 400 V DC bus through a bidirectional DC–DC converter.
EV Battery Parameters
Parameter | Value |
Battery nominal voltage | 240 V |
Battery capacity | 40 Ah |
Initial SOC | 50% |
Maximum charging power considered | ≈2000 W |
DC-bus voltage | 400 V |
Converter type | Bidirectional DC–DC converter |
The battery-side converter is designed to interface the 240 V battery with the 400 V DC bus.
𝐁𝐢𝐝𝐢𝐫𝐞𝐜𝐭𝐢𝐨𝐧𝐚𝐥 𝐃𝐂–𝐃𝐂 𝐂𝐨𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The bidirectional converter is controlled using a DC-bus voltage control strategy.
The reference DC-bus voltage is set to:
400 V
The actual DC-bus voltage is continuously measured and compared with this reference.
The resulting error is processed through a controller to generate the required duty cycle.
Control Sequence
Measure DC-bus voltage
Compare it with 400 V
Process the voltage error through the controller
Generate duty cycle
Send duty cycle to the PWM generator
Generate converter switching pulse
Regulate the energy transfer between the DC bus and EV battery
The main purpose is to keep the common DC bus close to its desired value during changing PV generation conditions.
𝐆𝐫𝐢𝐝 𝐈𝐧𝐭𝐞𝐠𝐫𝐚𝐭𝐢𝐨𝐧
The charging system also includes a single-phase utility grid.
Grid Parameters
Parameter | Value |
Grid voltage | 230 V RMS |
Grid frequency | 50 Hz |
Interface | Full-bridge inverter |
DC-side voltage | 400 V |
Control method | Current control |
Application | Supplementary EV charging power |
The grid is connected through:
Grid-side filter
Full-bridge converter
Current measurement
Grid voltage measurement
Synchronization and current control
𝐆𝐫𝐢𝐝 𝐏𝐨𝐰𝐞𝐫 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭
The grid supplies the power that cannot be provided by the PV system.
The EV charging demand is approximately 2 kW.
Typical Power-Sharing Conditions
PV Power | Approximate Grid Contribution | Charging Condition |
2000 W | Very small / near zero | PV supplies almost all charging power |
1000 W | Approximately 1000 W | PV and grid share charging demand |
0 W | Approximately 2000 W | Grid supplies almost all charging power |
This creates an automatic PV-priority charging strategy.
When more solar energy is available, grid dependence decreases.
When solar energy decreases, the grid compensates for the power shortage.
𝐈𝐧𝐯𝐞𝐫𝐭𝐞𝐫 𝐂𝐨𝐧𝐭𝐫𝐨𝐥
The grid-connected inverter is controlled using a current control strategy.
The controller determines how much grid current is required based on:
Desired EV charging power
Available PV power
Grid voltage
Measured inverter current
The required charging power is compared with the available PV power.
The resulting power requirement determines the necessary grid current reference.
𝐆𝐫𝐢𝐝 𝐒𝐲𝐧𝐜𝐡𝐫𝐨𝐧𝐢𝐳𝐚𝐭𝐢𝐨𝐧
The measured grid voltage is used to obtain synchronization information.
The control system generates:
Grid phase information
Sine signal
Cosine signal
These signals are used by the current controller to synchronize the inverter current with the utility grid.
Proper synchronization is necessary for controlled power transfer between the grid and DC charging system.
𝐂𝐮𝐫𝐫𝐞𝐧𝐭 𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
The inverter controller processes the current reference in a transformed reference frame.
The main control flow is:
Charging Power Reference → PV Power Measurement → Required Grid Power → Current Reference → Current Controller → Inverter Voltage Command → PWM Generator → Inverter
The measured inverter current is compared with the generated reference current.
The controller then produces the required voltage-control signal.
This signal is finally processed by the PWM generator to operate the inverter switches.
𝐖𝐨𝐫𝐤𝐢𝐧𝐠 𝐏𝐫𝐨𝐜𝐞𝐬𝐬
The complete EV charging operation can be summarized as follows:
The PV array generates DC power according to solar irradiance.
The Incremental Conductance MPPT tracks the maximum available PV power.
The boost converter increases the PV voltage to the common 400 V DC bus.
The EV battery is connected through a bidirectional DC–DC converter.
The battery-side controller regulates the DC-bus voltage.
The required EV charging power is determined.
Available PV power is measured.
If PV power is sufficient, most of the charging power comes from solar energy.
If PV power decreases, the grid automatically supplies the deficit.
The inverter current controller regulates the required grid power.
The EV battery therefore receives relatively continuous charging power despite changes in solar irradiance.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐂𝐨𝐧𝐝𝐢𝐭𝐢𝐨𝐧𝐬
To verify system operation, the PV irradiance is varied during simulation.
Irradiance Profile
Operating Stage | Solar Irradiance |
Stage 1 | 1000 W/m² |
Stage 2 | 500 W/m² |
Stage 3 | Very low / near zero generation condition |
Stage 4 | 500 W/m² |
Stage 5 | 1000 W/m² |
This allows the system response to be studied under both high and low solar-energy availability.
𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐢𝐨𝐧 𝐑𝐞𝐬𝐮𝐥𝐭𝐬
The results clearly demonstrate coordinated operation between the PV system, EV battery, and utility grid.
PV Power Response
At high irradiance:
PV output approaches 2 kW
Maximum available solar energy is extracted
Grid power requirement becomes very small
At reduced irradiance:
PV power decreases to approximately 1 kW
The grid supplies the remaining charging requirement
At very low PV generation:
PV power approaches zero
The grid provides approximately the full EV charging requirement
When irradiance increases again:
PV generation recovers
Grid contribution automatically decreases
𝐏𝐕 𝐕𝐨𝐥𝐭𝐚𝐠𝐞 𝐚𝐧𝐝 𝐂𝐮𝐫𝐫𝐞𝐧𝐭
The simulation displays:
PV voltage
PV current
PV power
The current changes significantly with irradiance, while the MPPT controller continuously adjusts the PV operating condition to extract the available maximum power.
𝐄𝐕 𝐁𝐚𝐭𝐭𝐞𝐫𝐲 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐞
The EV battery results include:
Battery voltage
Battery charging current
Battery power
Battery SOC
The simulation shows continuous charging operation even when PV generation varies because the utility grid compensates for insufficient solar power.
The SOC gradually increases from its initial value of approximately 50%, confirming battery charging.
𝐏𝐨𝐰𝐞𝐫 𝐒𝐡𝐚𝐫𝐢𝐧𝐠 𝐑𝐞𝐬𝐮𝐥𝐭
One of the most important results is the coordinated change between PV power and grid power.
Solar Condition | PV Contribution | Grid Contribution | EV Charging |
High irradiance | High | Low | Continuous |
Medium irradiance | Medium | Medium | Continuous |
Very low irradiance | Very low | High | Continuous |
Irradiance recovery | Increasing | Decreasing | Continuous |
This confirms that the control system automatically adjusts the grid contribution according to solar power availability.
𝐌𝐞𝐚𝐬𝐮𝐫𝐞𝐦𝐞𝐧𝐭 𝐒𝐞𝐜𝐭𝐢𝐨𝐧
The Simulink model contains dedicated scopes for observing important system variables.
PV Measurement
PV voltage
PV current
PV power
DC-Bus Measurement
DC-bus voltage
EV Battery Measurement
Battery voltage
Battery current
Battery power
Battery SOC
Grid Measurement
Grid voltage
Grid current
Grid power
Combined Power Measurement
PV power
EV battery power
Grid power
This combined power display is particularly useful for understanding real-time energy sharing between the solar PV system and grid.
𝐂𝐨𝐧𝐭𝐫𝐨𝐥 𝐒𝐭𝐫𝐚𝐭𝐞𝐠𝐲
Subsystem | Control Technique | Main Objective |
PV system | Incremental Conductance MPPT | Extract maximum PV power |
PV boost converter | PWM switching | Boost PV voltage to DC bus |
EV bidirectional converter | DC-bus voltage control | Maintain approximately 400 V |
Grid inverter | Current control | Regulate grid power contribution |
Grid synchronization | Phase/sine-cosine generation | Synchronize inverter with grid |
Inverter switching | PWM generation | Generate semiconductor gate pulses |
The coordinated control of these subsystems enables stable and continuous charging operation.
𝐊𝐞𝐲 𝐅𝐞𝐚𝐭𝐮𝐫𝐞𝐬
2 kW solar PV generation system
240 V, 40 Ah EV battery
400 V common DC bus
230 V, 50 Hz single-phase grid
Incremental Conductance MPPT
Solar-priority EV charging
Grid-assisted charging during low irradiance
Bidirectional DC–DC converter
Grid-connected full-bridge inverter
DC-link voltage regulation
Current-controlled grid interface
PWM-based converter switching
Variable irradiance simulation
PV, battery, grid, and DC-bus measurements
Combined power-flow visualization
SOC monitoring
Automatic adjustment of grid contribution
𝐀𝐝𝐯𝐚𝐧𝐭𝐚𝐠𝐞𝐬
The proposed MATLAB/Simulink model provides several advantages:
Improves utilization of available solar power
Reduces dependence on utility-grid energy during high solar generation
Maintains EV charging during low PV generation
Demonstrates coordinated PV-grid energy management
Provides simple visualization of system power flow
Helps understand converter and inverter control
Allows testing under different irradiance conditions
Can be extended with advanced energy-management techniques
𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬
This simulation concept can be useful for studying:
Solar-powered EV charging stations
Grid-assisted EV chargers
Renewable-energy charging infrastructure
Smart charging systems
PV-grid energy management
DC microgrids
Bidirectional converter control
Grid-connected inverter control
EV battery charging analysis
Renewable-energy integration
Intelligent charging station development
It is particularly useful for students, researchers, engineers, and MATLAB/Simulink learners who want to understand the complete operation of a solar PV and grid-based EV charging system.
𝐅𝐮𝐭𝐮𝐫𝐞 𝐄𝐱𝐭𝐞𝐧𝐬𝐢𝐨𝐧𝐬
The model can be further expanded by adding:
Battery charging and discharging modes
Vehicle-to-Grid operation
Grid-to-Vehicle operation
Battery SOC-based energy management
Electricity tariff-based charging
ANN-based MPPT
Fuzzy Logic MPPT
ANFIS MPPT
Optimization-based MPPT
Stationary battery energy storage
Wind energy integration
Multiple EV charging ports
Smart charging scheduling
Load forecasting
PV power forecasting
Grid power quality analysis
𝐂𝐨𝐧𝐜𝐥𝐮𝐬𝐢𝐨𝐧
The PV Grid Based EV Charging Station in MATLAB successfully demonstrates coordinated EV charging using solar PV energy and the utility grid.
The 2 kW PV array operates through an Incremental Conductance MPPT-controlled boost converter and supplies power to a 400 V DC bus. A 240 V, 40 Ah EV battery is connected through a bidirectional DC–DC converter.
When sufficient solar power is available, most of the charging requirement is supplied by the PV system. When irradiance decreases, the 230 V, 50 Hz utility grid automatically provides the required additional power through the controlled inverter.
The simulation clearly demonstrates how PV generation, grid support, DC-bus regulation, converter control, and EV battery charging can be integrated into a single MATLAB/Simulink model.



Comments