Bidirectional EV Charger With V2G & G2V Control Model

Single phase bidirectional EV charger enabling V2G and G2V with PLL sync, DC link control, battery management and power control in Simulink.

You are now following this Submission

This model presents a single-phase bidirectional EV charger enabling both Vehicle-to-Grid (V2G) and Grid-to-Vehicle (G2V) operation in MATLAB/Simulink.
The system consists of a grid-connected full-bridge inverter with an L filter, synchronized to the grid using a PLL for accurate phase tracking. The control structure is implemented in closed loop.
An outer DC-link voltage controller maintains a stable DC bus under bidirectional power flow. Active power reference determines the direction of energy transfer:
  • G2V mode: grid supplies power to charge the EV battery.
  • V2G mode: battery delivers power back to the grid.
An inner current control loop ensures precise grid current tracking with proper synchronization. Active and reactive power can be regulated independently.
The battery subsystem includes voltage, current, and SOC measurement. A bidirectional DC-DC stage controls battery charge and discharge through PI-based regulation.
Key features:
  • Single-phase grid-connected architecture
  • Bidirectional power flow (V2G and G2V)
  • DC-link voltage regulation
  • Inner current control loop
  • Battery energy management
  • PWM switching strategy

Cite As

Praveen (2026). Bidirectional EV Charger With V2G & G2V Control Model (https://www.mathworks.com/matlabcentral/fileexchange/182226-bidirectional-ev-charger-with-v2g-g2v-control-model), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Communities
Version Published Release Notes Action
1.0.1

.

1.0.0