EV Charging Scheduling
MILP · V2G-Capable
Smart Charging · Deadline SOC · Grid Flexibility
A parking lot with 50 electric vehicles plugged in overnight. Each driver specifies departure time and target state-of-charge. The charging station operator sees the wholesale electricity price profile, the transformer capacity limit, optional vehicle-to-grid (V2G) incentives. What charging schedule minimizes cost while meeting every departure requirement? A MILP with per-EV SOC dynamics, aggregated power constraints, and optional V2G discharge. Ever-more-relevant as EV penetration rises.
The problem
Coordinated EV charging under grid and user constraints
Unscheduled “dumb” charging (every EV plugs in and charges at full rate until done) concentrates load on evening peak hours, worsens distribution-transformer loading, and raises wholesale prices. Smart charging shifts charging to hours of low price and low grid stress while still meeting every driver's morning SOC requirement.
Each EV has: arrival time $t^{\mathrm{arr}}$, departure time $t^{\mathrm{dep}}$, initial SOC, target SOC at departure, battery capacity, max charge rate. The operator controls each charger's hourly charge rate $c_{n,t}$ (and optionally discharge rate $d_{n,t}$ for V2G). Constraints: SOC dynamics, deadline SOC, charger power limit, aggregate transformer / feeder limit.
Mathematical formulation
MILP with per-EV SOC + aggregate power
Notation
| Symbol | Meaning | Units |
|---|---|---|
| $\mathcal{N}$ | Set of EVs | — |
| $\mathcal{T}_n$ | Periods EV $n$ is plugged in | — |
| $e_n^{\mathrm{arr}}, e_n^{\mathrm{dep}}$ | Arrival SOC, target departure SOC | kWh |
| $E_n^{\max}$ | Battery capacity | kWh |
| $P_n^{\max}$ | Charger power limit | kW |
| $P^{\mathrm{lot}}$ | Lot transformer limit | kW |
| $\pi_t$ | Electricity price | $/kWh |
| $c_{n,t}, d_{n,t}$ | Charge, V2G discharge | kW |
| $e_{n,t}$ | SOC over time | kWh |
Objective
Energy cost minus V2G revenue, plus a degradation penalty $\gamma$ per kWh discharged.
Constraints
SOC dynamics: $e_{n,t} = e_{n,t-1} + \eta c_{n,t} - d_{n,t}/\eta$, with $e_{n,0} = e_n^{\mathrm{arr}}$ and $e_{n, t^{\mathrm{dep}}_n} \ge e_n^{\mathrm{dep}}$ (deadline SOC constraint — the key hard constraint).
Per-charger limits: $0 \le c_{n,t} \le P_n^{\max}$, $0 \le d_{n,t} \le P_n^{\max}$, only when plugged in.
Aggregate limit:
SOC bounds: $0 \le e_{n,t} \le E_n^{\max}$.
Complexity
Pure LP if no binary charge-mode decisions (simultaneous charge-discharge impossible with efficiency losses). 50 EVs × 96 15-min periods = 4,800 variables + constraints. Solves instantly. Real deployments: 500+ EVs with dynamic pricing, solved every 15 minutes in rolling-horizon mode.
Real-world data
NHTS + INL charging-session datasets
NHTS and Idaho National Lab EV datasets provide realistic driver-arrival and departure-time distributions used in research.
NREL EV-Grid Integration platform
NREL provides open tools and reference data for fleet-scale smart-charging studies.
Illustrative 20-EV lot (this page)
20 EVs with staggered arrival (5-8pm) and departure (6-8am). 11 kW chargers, 100 kW transformer. 24 hours of CAISO-style prices. Optional V2G.
Interactive solver
20-EV fleet smart-charging LP
Fleet parameters
Fleet charging profile & aggregate load
Solution interpretation
Without smart charging, all 20 EVs hit max power simultaneously at arrival, blow past the transformer limit, and trigger curtailment. With smart charging: the solver shifts charging to low-price overnight hours (1-5am in most markets), smoothly fills every EV to its target by departure, and respects the transformer limit throughout. Cost savings vs naive charging: typically 30-50%.
V2G adds another degree of freedom: EVs discharge during evening peak hours, earning arbitrage revenue, then recharge overnight. Net effect: the fleet looks like a distributed battery from the grid's perspective. Trade-off: increased battery cycling shortens lifetime (captured by the degradation penalty $\gamma$).
The deadline-SOC constraint is the hardest part of the problem. Each EV needs enough energy by its departure — the solver can shift when but not how much. If the transformer limit is tight, some EVs finish below target; the solver prioritizes by plug-in time and original SOC.
Extensions & variants
Stochastic arrivals
Uncertain arrival times and initial SOC handled via scenario-based stochastic LP or online decision-making with Lyapunov optimization.
V2G in ancillary services
EV fleet as aggregated resource bidding into frequency regulation market. Pays best $/kWh of any service.
Station placement + siting
Upstream question: where to put fast-charging stations along highways. Facility-location MILP with travel-demand matrices.
Distribution-network coupled
EV charging impact on distribution feeder voltage and thermal limits. Couples with DNEP and AC-power-flow.
Vehicle-to-building (V2B)
Behind-the-meter: EV discharges into building during peak, charges overnight. Optimizes building TOU + demand-charge savings.
Mobility-as-a-Service fleet
Dynamic charging schedules coupled with ride-hailing dispatch. Combines EV charging with vehicle routing and passenger matching.