Memuat
Memuat
A bidirectional DC-DC converter charges an EV battery with CC-CV, then sends power back to the grid at peak load.
0 views
An 88-series 60 Ah EV battery connects to a 400 V DC bus through an averaged DC-DC converter: buck mode to charge and boost mode for V2G. A PI current loop with feed-forward, CC-CV charging, a 30 percent minimum-SOC guard for V2G, and a grid inverter that holds the bus at 400 V.

SOC from an Integrator, voltage from an OCV table and the internal resistance; time scaled so 1 s equals 1 real minute for the SOC.
The inductor and bus capacitor become Integrators; the duty cycle sets the direction and size of the current.
Duty = battery voltage / bus voltage (feed-forward) plus a PI current correction.
Current is limited to 50 A (CC); once the voltage limit is reached a voltage PI reduces the current (CV).
In the peak-load window the reference current turns negative (boost) at 15 kW, guarded by a 30 percent minimum SOC.
A grid inverter with a PI holds Vbus at 400 V; grid power is integrated into the kWh returned to the grid.
System
An 88S 60 Ah battery (about 368 V full), a 400 V DC bus, a 1 mH inductor and a 3 mF bus capacitor.
Scenario
A 150 s simulation (0.2 ms step); initial SOC 20 percent, with the V2G window at 90 to 120 s.
Note: The SOC and energy time scale is accelerated 60 times (1 s = 1 minute) so a charging session fits in 150 s; the converter is an averaged model with no switching ripple.
Simulink model charger_ev_v2g.slx (standard block diagram); Builder script buat_model.m and runner jalankan.m; Result plots grafik_v2g (PNG) and metrik.json; Step-by-step PDF guide (coming soon, sent once finished); Video tutorial on building the model (coming soon); Requires MATLAB and Simulink (built in R2025b); the slh.m builder helper is included.
Yes. The .slx model opens in MATLAB with Simulink (built in R2025b; use the same or a newer release). Project 09 also needs the Communications Toolbox. The package includes the builder script and the runner, so you can also rebuild the model and rerun the plots yourself.
Yes. Parameters are kept in the Model Workspace, so you can change values such as gains, capacities and profiles and rerun the simulation. If you would like us to adapt or extend the model for you, message us on WhatsApp.
The project costs US$24. Use the "Buy via WhatsApp" button on this page; the project files are delivered after payment is confirmed.
Found a problem or have a suggestion for this project? Tell us on WhatsApp
Back to MATLAB Simulink portfolio