Home▸Energy & Thermodynamics▸V2G Frequency Regulation: Grid Swing-Equation Response (2D)

V2G Frequency Regulation: Grid Swing-Equation Response (2D)

2D grid-dynamics companion to the V2G Fleet Simulator: a swing-equation ODE with a first-order droop-controlled EV fleet response shows how vehicle-to-grid discharge arrests grid frequency decline after a sudden generation loss.

Energy & Thermodynamics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-vehicle-to-grid-v2g-fleet-simulator ↗ Open standalone

This 2D companion trades the 3D version's per-car battery bookkeeping for the grid-wide dynamics V2G fleets are actually dispatched for: a linearized swing-equation ODE for grid frequency, coupled to a first-order-lag droop controller representing the aggregated EV fleet's discharge response, integrated live with RK4 so you can watch a sudden generation loss pull frequency down — and see how fleet droop gain, power capacity and response delay determine whether the nadir stays shallow or the grid dips dangerously low before recovering.

⚙ Under the hood

2D power-systems lab integrating M·dΔf/dt = ΔP(t) + P_v2g − D·Δf and τ·dP_v2g/dt = clamp(−k·Δf, 0, P_max) − P_v2g with RK4, tracking frequency nadir, RoCoF and V2G power after a step generation loss.

vehicle-to-gridswing equationgrid frequencydroop controlrunge-kuttapower systems

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)