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.

Historical note
Kempton & Tomic (2005) wrote the seminal V2G paper. Sortomme & El-Sharkawi (2011) and Galus et al. (2012) are canonical formulations. Amini et al. (2017) scaled to fleets with network constraints. Industry reality: Tesla's Supercharger network, Electrify America, EVgo, and commercial charging aggregators like Voltus and Stem all run optimization engines descended from this literature.

Mathematical formulation

MILP with per-EV SOC + aggregate power

Notation

SymbolMeaningUnits
$\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 SOCkWh
$E_n^{\max}$Battery capacitykWh
$P_n^{\max}$Charger power limitkW
$P^{\mathrm{lot}}$Lot transformer limitkW
$\pi_t$Electricity price$/kWh
$c_{n,t}, d_{n,t}$Charge, V2G dischargekW
$e_{n,t}$SOC over timekWh

Objective

$$\min \; \sum_{t} \pi_t \Big( \sum_n c_{n,t} - \sum_n d_{n,t} \Big) + \gamma \sum_{n,t} d_{n,t} \qquad \text{(1)}$$

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:

$$\sum_n (c_{n,t} - d_{n,t}) \le P^{\mathrm{lot}} \qquad \forall t \qquad \text{(2)}$$

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

20
11
150
90
0
Adjust and press Schedule.

Fleet charging profile & aggregate load

Aggregate charge (blue) / V2G discharge (red) per hour · price signal (gold dashed) · transformer limit (white)
Per-EV SOC trajectories (one line per vehicle) with deadline targets marked

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.

Refs: Tang & Zhang (2016); Chen et al. (2014).

V2G in ancillary services

EV fleet as aggregated resource bidding into frequency regulation market. Pays best $/kWh of any service.

Refs: Kempton-Tomic (2005); Kirthi & Andersson (2015).

Station placement + siting

Upstream question: where to put fast-charging stations along highways. Facility-location MILP with travel-demand matrices.

Refs: He et al. (2015); Xie et al. (2018).

Distribution-network coupled

EV charging impact on distribution feeder voltage and thermal limits. Couples with DNEP and AC-power-flow.

Refs: Richardson, Flynn & Keane (2012); de Hoog et al. (2015).

Vehicle-to-building (V2B)

Behind-the-meter: EV discharges into building during peak, charges overnight. Optimizes building TOU + demand-charge savings.

Refs: Fang et al. (2020); Erdinc et al. (2015).

Mobility-as-a-Service fleet

Dynamic charging schedules coupled with ride-hailing dispatch. Combines EV charging with vehicle routing and passenger matching.

Refs: Zhang & Pavone (2016); Mao et al. (2020).

Key references

[1]
Kempton, W., & Tomić, J. (2005).
“Vehicle-to-grid power fundamentals: Calculating capacity and net revenue.”
Journal of Power Sources, 144(1), 268–279. doi:10.1016/j.jpowsour.2004.12.025
[2]
Sortomme, E., & El-Sharkawi, M. A. (2011).
“Optimal charging strategies for unidirectional vehicle-to-grid.”
IEEE Transactions on Smart Grid, 2(1), 131–138. doi:10.1109/TSG.2010.2090910
[3]
Galus, M. D., et al. (2012).
“The role of electric vehicles in smart grids.”
WIREs Energy and Environment, 2(4), 384–400. doi:10.1002/wene.56
[4]
Amini, M. H., et al. (2017).
“Simultaneous allocation of electric vehicles' parking lots and distributed renewable resources.”
IEEE Transactions on Smart Grid, 10(6), 6229–6238. doi:10.1109/TSG.2019.2899861
[5]
He, F., Yin, Y., & Lawphongpanich, S. (2015).
“Network equilibrium models with battery electric vehicles.”
Transportation Research Part B, 67, 306–319. doi:10.1016/j.trb.2014.05.010
[6]
Richardson, P., Flynn, D., & Keane, A. (2012).
“Optimal charging of electric vehicles in low-voltage distribution systems.”
IEEE Transactions on Power Systems, 27(1), 268–279. doi:10.1109/TPWRS.2011.2158247
[7]
Tang, W., & Zhang, Y. J. (2016).
“A model predictive control approach for low-complexity electric vehicle charging scheduling.”
IEEE Transactions on Control Systems Technology, 25(5), 1892–1899. doi:10.1109/TCST.2016.2614134
[8]
Zhang, R., & Pavone, M. (2016).
“Control of robotic mobility-on-demand systems: A queueing-theoretical perspective.”
International Journal of Robotics Research, 35(1–3), 186–203. doi:10.1177/0278364915581863
[9]
Erdinc, O., et al. (2015).
“Smart household operation considering bi-directional EV and ESS utilization.”
IEEE Transactions on Smart Grid, 6(3), 1281–1291. doi:10.1109/TSG.2014.2352650
[10]
IEA. (2023).
Global EV Outlook 2023.
International Energy Agency. iea.org/gevo-2023
In-browser solver uses a priority-based deadline-aware heuristic. Production smart-charging platforms use commercial LP solvers with rolling-horizon MPC.