The rapid proliferation of battery electric vehicles (EVs) is a cornerstone of the global transition to sustainable transportation. However, the uncoordinated charging of large-scale EV fleets poses significant challenges to power grid stability, potentially leading to peak load surges, increased operational costs, and accelerated infrastructure wear. Concurrently, the charging infrastructure itself faces inefficiencies, with some charging piles experiencing overuse while others remain underutilized, leading to uneven asset degradation and suboptimal resource allocation. To address these interconnected issues, this article proposes a comprehensive, two-stage optimization framework for scheduling battery EV car charging and discharging. The framework uniquely integrates the strategic allocation of vehicles to charging piles with the detailed optimization of power flows, leveraging Vehicle-to-Grid (V2G) technology to create benefits for the grid, the users, and the charging station operators.
The core philosophy of our approach is sequential optimization. First, we tackle the physical resource allocation problem to ensure balanced utilization of the charging infrastructure. Second, given a fixed allocation, we optimize the temporal power profile of each connected battery EV car to achieve multiple economic and technical objectives. This decoupled strategy allows for a more manageable and effective solution to a complex, multi-faceted problem.
Modeling Battery EV Car Behavior and Infrastructure
Accurate modeling of user behavior and battery dynamics is fundamental to any realistic scheduling algorithm. We model the charging session of a battery EV car n by four key parameters: its arrival time \(t_n^a\), departure time \(t_n^d\), initial battery State of Charge (SOC) \(SOC_n^0\), and desired SOC at departure \(SOC_n^{end}\).
The stochastic nature of user travel is captured using probability density functions for arrival and departure times, typically modeled as normal distributions truncated or wrapped to fit a 24-hour cycle. For a given mean \(\mu\) and standard deviation \(\sigma\), the probability density \(f(t)\) can be expressed piecewise to handle the circular nature of daily time. The arrival time distribution for patterns where \(0 \leq \mu < 12\) is given by:
$$
f_1(t) = \begin{cases}
\frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(t-\mu)^2}{2\sigma^2}\right), & 0 < t \leq \mu+12 \\
\frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(t-24-\mu)^2}{2\sigma^2}\right), & \mu+12 < t < 24
\end{cases}
$$
For scheduling, continuous time is discretized into \(T\) time slots of length \(\Delta t\) (e.g., 15 minutes). The effective arrival and departure time slots for a battery EV car are determined as:
$$
T_n^a = \lceil \frac{t_n^a}{\Delta t} \rceil, \quad T_n^d = \lfloor \frac{t_n^d}{\Delta t} \rfloor
$$
This discretization defines the window during which a vehicle is available for scheduling. A critical component often overlooked is the cost of battery degradation due to frequent charging and discharging cycles in V2G operations. We employ an Equivalent Full Cycle (EFC) model to translate arbitrary charge/discharge profiles into an equivalent number of standard cycles at a reference Depth of Discharge (DOD), typically 80%. The battery degradation cost \(C_{loss}\) is calculated as:
$$
C_{loss} = \frac{C_{battery}}{N_{cycle}} (N_{charge} + N_{discharge})
$$
where \(C_{battery}\) is the battery pack cost, \(N_{cycle}\) is the manufacturer-rated cycle life at the reference DOD, and the equivalent cycle counts are:
$$
N_{charge} = \frac{\sum_t P_{ch}(t) \eta \Delta t}{E_{cap} \cdot D}, \quad N_{discharge} = \frac{\sum_t P_{dis}(t) \Delta t}{E_{cap} \cdot D \cdot \eta}
$$
Here, \(P_{ch}(t)\) and \(P_{dis}(t)\) are the charging and discharging powers at time \(t\), \(\eta\) is the charge/discharge efficiency, \(E_{cap}\) is the battery capacity, and \(D\) is the reference DOD.

The Two-Stage Optimization Framework
Our proposed solution decomposes the problem into two sequential optimization stages: Charging Pile Allocation and Charge/Discharge Power Scheduling.
Stage 1: Charging Pile Allocation Model
The objective of the first stage is to assign each incoming battery EV car to a specific charging pile in a way that balances the load across all available piles. This prevents the scenario where some piles are overloaded (accelerating wear) while others are idle. We define a binary allocation matrix \(\alpha\) of size \(M \times N\), where \(M\) is the number of piles and \(N\) is the number of vehicles. An element \(\alpha(m, n) = 1\) indicates that vehicle \(n\) is assigned to pile \(m\).
Objective Function: Minimize the variance of charging pile utilization rates.
$$
\min F_1 = \frac{1}{M} \sum_{m=1}^{M} (\gamma(m) – \bar{\gamma})^2
$$
where \(\gamma(m)\) is the daily utilization rate of pile \(m\), calculated as the total energy delivered or received divided by its maximum possible energy throughput over 24 hours, and \(\bar{\gamma}\) is the average utilization across all piles.
Constraints:
- EV Allocation Constraint: Each vehicle must be assigned to exactly one pile.
$$
\sum_{m=1}^{M} \alpha(m, n) = 1, \quad \forall n = 1, 2, …, N
$$ - Sequential Charging Feasibility Constraint: For vehicles sharing the same pile, their charging time windows may overlap. The schedule must ensure that within any overlapping period, the aggregate power demand does not exceed the pile’s capacity, and the total energy requested by all vehicles assigned to that pile can be delivered before the last vehicle departs. If \(l\) vehicles are assigned to one pile with overlapping windows from \(T^a_{l,1}\) to \(T^d_{l,l}\), the following must hold:
$$
(T^d_{l,l} – T^a_{l,1}) P_{max} \Delta t \geq \sum_{n=1}^{l} E^{req}_{ev,n}
$$
where \(E^{req}_{ev,n} = (SOC_n^{end} – SOC_n^0) E_{cap}\).
Stage 2: Coordinated Charge/Discharge Scheduling Model
Given the allocation matrix \(\alpha\) from Stage 1, the second stage determines the optimal charging and discharging power \(P_{ev}(n,t)\) for each battery EV car in each time slot within its available window. This stage explicitly considers V2G capabilities and aims for a tripartite optimization.
Decision Variable: The charge/discharge power matrix \(P_{ev}\), which can be decomposed into non-negative charge and discharge components:
$$
P_{ev} = P_{ev,ch} – P_{ev,dis}, \quad \text{where } P_{ev,ch}, P_{ev,dis} \geq 0
$$
Multi-Objective Function: We formulate three objectives related to the grid, the user, and the charging station operator.
- Grid Side (Minimize Load Variance): To promote grid stability and flatten the load profile.
$$
\min F_{2,1} = \frac{1}{T} \sum_{t=1}^{T} (P_{grid}(t) – \bar{P}_{grid})^2
$$
where \(P_{grid}(t) = P_{base}(t) + \sum_{n=1}^{N} P_{ev}(n,t)\). - User Side (Minimize Net Cost): To reduce the total expense for the battery EV car owner, accounting for electricity cost, V2G revenue, and battery degradation.
$$
\min F_{2,2} = C_{ch} – C_{dis} + C_{loss}
$$
with \(C_{ch} = \sum_{n,t} P_{ev,ch}(n,t) \Delta t \cdot c_{ch}(t)\) and \(C_{dis} = \sum_{n,t} P_{ev,dis}(n,t) \Delta t \cdot c_{dis}(t)\). - Charging Station Side (Maximize Profit): To increase the operator’s revenue from the price arbitrage between retail tariffs and wholesale prices.
$$
\max F_{2,3} = \sum_{n,t} P_{ev,ch}(n,t) \Delta t (c_{ch}(t)-c_{buy}(t)) + \sum_{n,t} P_{ev,dis}(n,t) \Delta t (c_{sell}(t)-c_{dis}(t))
$$
These objectives are combined into a single, normalized aggregate objective using a weighted sum approach:
$$
\min F_2 = \omega_1 \frac{F_{2,1}}{F_{2,1}^{max}} + \omega_2 \frac{F_{2,2}}{F_{2,2}^{max}} – \omega_3 \frac{F_{2,3}}{F_{2,3}^{max}}, \quad \text{s.t. } \omega_1 + \omega_2 + \omega_3 = 1
$$
where the superscript \(max\) denotes the maximum value of each objective found independently, and the weights \(\omega\) can be adjusted based on stakeholder priorities. A balanced approach often sets \(\omega_1 = \omega_2 = \omega_3 = 1/3\).
Key Constraints:
- Power Limits: \(|P_{ev}(n,t)| \leq P_{max}\) (per pile), and \(\sum_n P_{ev}(n,t) \leq P_{g-N}\) (station grid connection limit).
- Energy Requirement: \(\sum_t (P_{ev,ch}(n,t)\eta – P_{ev,dis}(n,t)/\eta) \Delta t \geq (SOC_n^{end} – SOC_n^0) E_{cap}\).
- SOC Boundaries: \(0.2 \leq SOC_n(t) \leq 0.9\) for all \(t\), to protect battery health.
- Availability: \(P_{ev}(n,t) = 0\) for \(t \notin [T_n^a, T_n^d]\).
Solution Methodology and Case Study Analysis
The two-stage model presents a mixed-integer nonlinear programming problem. We employ an Adaptive Genetic Algorithm (AGA) for its robustness in handling such complexity. The AGA improves upon the standard GA by dynamically adjusting the crossover (\(P_c\)) and mutation (\(P_m\)) probabilities based on population fitness:
$$
P_c = \begin{cases}
k_1 (f_{max} – f’) / (f_{max} – \bar{f}), & f’ \geq \bar{f} \\
k_2, & f’ < \bar{f}
\end{cases}, \quad
P_m = \begin{cases}
k_3 (f_{max} – f’) / (f_{max} – \bar{f}), & f’ \geq \bar{f} \\
k_4, & f’ < \bar{f}
\end{cases}
$$
where \(f’\) is the fitness of an individual, \(\bar{f}\) is the average population fitness, and \(k_1, k_2, k_3, k_4\) are constants \(\leq 1\). This adaptivity helps maintain diversity early on and protects high-fitness solutions later, enhancing convergence.
To validate the framework, we conduct a case study simulating a charging station with 10 piles (\(P_{max}=50\ \text{kW}\)) and 30 battery EV cars over a 24-hour period. Vehicles are generated with different travel purposes (home, work, leisure) using Monte Carlo simulation based on the distributions in Table 1. A time-of-use (TOU) price scheme is applied, with different rates for user charging/discharging and station buying/selling, as detailed in Table 2.
| Purpose | Arrival Time (Mean, Std) | Departure Time (Mean, Std) | Initial SOC (Mean, Std) |
|---|---|---|---|
| Home | 19:00, 1.5 h | 07:30, 1.0 h | 0.4, 0.1 |
| Work | 08:30, 1.0 h | 17:00, 1.0 h | 0.5, 0.1 |
| Leisure | 12:00, 1.0 h | 20:00, 1.5 h | 0.6, 0.1 |
| Time Period | User Charge \(c_{ch}(t)\) | User Discharge \(c_{dis}(t)\) | Station Buy \(c_{buy}(t)\) | Station Sell \(c_{sell}(t)\) |
|---|---|---|---|---|
| Peak (08:00-12:00, 17:00-21:00) | 1.28 | 0.50 | 1.10 | 1.00 |
| Shoulder (12:00-17:00, 21:00-24:00) | 0.76 | 0.30 | 0.70 | 0.60 |
| Off-Peak (00:00-08:00) | 0.32 | 0.15 | 0.26 | 0.30 |
We compare three strategies:
Scheme 1: V2G is enabled, but charging pile allocation is not optimized (first-come, first-served style).
Scheme 2: Charging pile allocation is optimized for balance, but V2G is disabled (unidirectional charging only).
Scheme 3: The proposed full two-stage method (optimized allocation + V2G scheduling).
The results demonstrate the clear advantages of the integrated approach. Stage 1 optimization successfully balances the load across charging piles. As shown in Table 3, Scheme 3 reduces the variance of pile utilization by 93.6% compared to Scheme 1 and by 32.4% compared to Scheme 2, while also achieving a higher average utilization rate, indicating more efficient use of infrastructure.
| Scheduling Scheme | Utilization Variance (%) | Mean Utilization (%) |
|---|---|---|
| Scheme 1 (V2G only, no allocation opt.) | 71.5 | 18.2 |
| Scheme 2 (Allocation opt., no V2G) | 6.8 | 15.5 |
| Scheme 3 (Proposed two-stage method) | 4.6 | 18.5 |
The benefits of Stage 2 optimization with V2G are multifold. By allowing battery EV cars to discharge during peak hours and charge during off-peak hours, Scheme 3 effectively flattens the transformer district load profile. It reduces the load variance by 16.5% compared to the unidirectional charging in Scheme 2. Economically, it creates a win-win-win scenario, as summarized in Table 4.
| Scheme | Load Variance (kW²) | User Gross Cost | User V2G Revenue | User Degradation Cost | User Net Cost | Station Daily Profit |
|---|---|---|---|---|---|---|
| Scheme 1 | 34,045.6 | 1,771 | 269 | 167.4 | 1,669.4 | 209.2 |
| Scheme 2 | 39,683.7 | 1,755 | 0 | 139.5 | 1,894.5 | 182.8 |
| Scheme 3 | 33,120.7 | 1,773 | 271 | 165.2 | 1,667.2 | 209.2 |
Specifically, for the user of a battery EV car, the net cost (electricity bill minus V2G revenue plus degradation cost) is reduced by 12.0% under Scheme 3 compared to Scheme 2. This proves that the V2G revenue significantly outweighs the added battery wear cost. For the charging station operator, the daily profit increases by 14.4% in Scheme 3 compared to Scheme 2, thanks to strategic energy arbitrage.
Conclusion
This article presents a novel two-stage optimization framework for the coordinated scheduling of battery electric vehicles. By first ensuring a balanced allocation of vehicles to charging piles and then optimizing charge/discharge power flows with V2G, the method addresses critical gaps in existing research. The case study validates that the framework simultaneously achieves multiple objectives: it dramatically improves the balance of charging infrastructure utilization (reducing variance by over 93%), enhances grid stability by flattening the load curve (reducing variance by 16.5%), lowers the net cost for the battery EV car owner (by 12.0%), and increases the operating profit for the charging station (by 14.4%). This tripartite benefit makes a compelling case for the adoption of such intelligent, integrated scheduling systems in future smart charging networks, ensuring the sustainable integration of large-scale electric mobility into the power grid.
