Optimizing Grid Integration of Battery Electric Vehicles: A Hierarchical Control Strategy with Improved Metaheuristic Algorithm

The global transition towards sustainable energy systems has positioned the battery electric vehicle as a cornerstone technology. As a mobile energy storage unit, the battery electric vehicle presents a dual-nature load for the power grid—it can be a significant consumer during charging periods but also a potential distributed energy resource when discharging power back to the grid. This bidirectional capability, known as Vehicle-to-Grid (V2G) technology, offers unprecedented flexibility. However, the uncoordinated charging of a large-scale battery electric vehicle fleet, particularly concentrated after typical commuting hours, poses serious challenges to grid stability, leading to increased peak demand, elevated peak-valley load differences, and heightened operational risks. While Time-of-Use (ToU) pricing strategies can guide charging behavior to some extent, they often unintentionally create secondary load peaks as users shift their charging to low-price periods en masse. Therefore, developing an intelligent, hierarchical, and orderly charging and discharging control strategy that balances grid security, user economic benefit, and battery health is critical for the sustainable integration of the battery electric vehicle ecosystem. In this work, we propose a comprehensive control framework and demonstrate its efficacy through detailed simulation.

The core of our strategy relies on accurately modeling the aggregate behavior and constraints of the battery electric vehicle fleet. The daily movement and energy state of each battery electric vehicle are inherently stochastic. We model the state-of-charge (SOC) evolution of a battery electric vehicle using a Markov chain, where the future SOC state depends probabilistically only on the current state. The SOC at time step \(j\), denoted as \(SOC_{j}\), is derived from the SOC at time step \(i\), \(SOC_{i}\), through a state transition probability matrix \(E_{ij}\):

$$E(SOC_{i} \rightarrow SOC_{j}) = E(SOC_{j} | SOC_{i}) = E_{ij}$$

The change in SOC is governed by the vehicle’s activity:

  • Charging: $$SOC_{j} = SOC_{i} + \frac{P^{c}_{t} T^{c}}{Q}$$
  • Driving/Discharging: $$SOC_{j} = SOC_{i} – \frac{W_{km} L}{Q}$$
  • Idling: $$SOC_{i} = SOC_{j}$$

Where \(P^{c}_{t}\) is the charging power at time \(t\), \(T^{c}\) is the charging duration, \(Q\) is the battery capacity, \(W_{km}\) is the energy consumption per 100 km, and \(L\) is the travel distance.

A major concern for battery electric vehicle owners participating in V2G is accelerated battery degradation. We incorporate a battery aging model that accounts for the primary stress factors. The retained capacity \(C(t)\) at time \(t\) is modeled as:

$$C(t) = C_{0} e^{-\alpha T} e^{-\beta S_{SOC}} e^{-\gamma I}$$

Here, \(C_{0}\) is the initial capacity, \(T\) is temperature, \(S_{SOC}\) is the SOC stress factor, \(I\) is the charge/discharge current rate, and \(\alpha, \beta, \gamma\) are degradation coefficients related to temperature, SOC, and current, respectively.

We formulate the orderly charging and discharging problem as a bi-level optimization model, reflecting the hierarchical decision-making between the grid operator (or an aggregator) and the battery electric vehicle owners.

Upper-Level Model (Grid Operator Objective):
The upper level aims to minimize grid operational risks, focusing on flattening the load profile and reducing losses. The objective function is:

$$\min \{ C_{At} + C_{ploss} \}$$

Where \(C_{At}\) is the penalty cost for peak-valley difference and \(C_{ploss}\) is the penalty cost for network power losses. They are defined as:

$$
C_{At} = \left[ \frac{L_{load,max} – L_{load,min}}{L_{load,max}} \right] g_{c} – C_{e} P_{e}(t) \\
C_{ploss} = P_{loss} C^{c}_{t}
$$

\(L_{load,max/min}\) are the grid’s peak and valley loads, \(g_c\) is a penalty coefficient, \(C_e\) is the unit power supply revenue, \(P_e(t)\) is the supplied power, \(P_{loss}\) is total system power loss, and \(C^{c}_{t}\) is the dynamic charging price.

Lower-Level Model (Battery Electric Vehicle Owner Objective):
The lower level seeks to minimize the total cost for the battery electric vehicle owner, which includes energy costs, battery degradation, and other ancillary costs. The objective is:

$$\min \{ C_{Chg} + C_{Park} + C_{Dis} + C_{Bloss} + C_{Time} + C_{dre} + C_{Ln} \}$$

The key components are:

  • Charging Cost: \(C_{Chg} = C^{c}_{t} P^{c}_{t} X^{c}_{t} T^{c}\)
  • Discharging Reward (negative cost): \(C_{Dis} = C^{d}_{t} P^{d}_{t} X^{d}_{t} T^{d}\)
  • Battery Aging Cost: \(C_{Bloss} = \frac{C_B}{2 C_{ev} D_d L_c}\)

Here, \(X^{c}_{t}/X^{d}_{t}\) are binary state indicators for charging/discharging, \(C^{d}_{t}\) is the discharge reward price, \(P^{d}_{t}\) is discharge power, \(C_B\) is the battery investment cost, \(C_{ev}\) is the battery capacity, \(D_d\) is the depth of discharge, and \(L_c\) is the battery’s cycle life.

The optimization is subject to a set of constraints for both the grid and the battery electric vehicle, including SOC limits, charge/discharge power limits, node voltage limits, and load balance. A critical constraint ensures the final SOC meets the owner’s travel needs:

$$SOC_{l} = SOC_{s} + \frac{\Delta T \sum_{t=T_c}^{T_{jl}} (P^{c}_{t} X^{c}_{t} \eta^{c}_{ev} – P^{d}_{t} X^{d}_{t} \eta^{d}_{ev})}{C^{bat}_{ev}}$$
$$SOC_{min} \le SOC_{l} \le SOC_{max}$$

Where \(SOC_{l}\) is the suggested departure SOC, \(SOC_{s}\) is the initial grid-connected SOC, and \(\eta^{c}_{ev}/\eta^{d}_{ev}\) are charging/discharging efficiencies.

To solve this complex, non-linear, bi-level optimization problem, we employ an Improved Dung Beetle Optimization (IDBO) algorithm. The standard DBO algorithm mimics the rolling, breeding, foraging, and stealing behaviors of dung beetles but can suffer from premature convergence or being trapped in local optima. We enhance it with two strategies:

  1. Levy Flight Strategy: In later iterations, we apply Levy flight to perturb the positions of “thief beetles” that cluster near the current best solution. This long-tailed step distribution helps the algorithm escape local optima. The position update is: \(X(t+1) = X(t) + \alpha \oplus Levy(\lambda)\).
  2. T-Distribution Perturbation Strategy: To refine the search and improve precision in later stages, we use T-distribution mutation with the iteration count as the degree of freedom: \(x^{t}_{i} = x_{i} + x_{i} t(iter)\).

These improvements give the IDBO algorithm superior global exploration and local exploitation capabilities compared to the original DBO, making it highly effective for our scheduling problem with numerous variables and constraints related to the battery electric vehicle fleet.

We validate our proposed strategy using an IEEE 33-node distribution test system integrated with a residential community of 1,000 private battery electric vehicles. The key parameters for the battery electric vehicle model and the ToU tariffs are summarized in the following tables.

Table 1: Battery Electric Vehicle Parameters
Parameter Value Parameter Value
Charging Efficiency (\(\eta^{c}_{ev}\)) 94% Max Charging Power (\(P^{c}_{t}\)) 3 kW
Discharging Efficiency (\(\eta^{d}_{ev}\)) 92% Max Discharging Power (\(P^{d}_{t}\)) 3 kW
Battery Capacity (\(C_{ev}\)) 15 kWh Target Departure SOC (\(SOC_{l}\)) 13.5 kWh
Minimum SOC (\(SOC_{min}\)) 1.5 kWh Maximum SOC (\(SOC_{max}\)) 13.5 kWh
Table 2: Grid Time-of-Use Tariffs & V2G Compensation
Period Time Retail Price (¥/kWh) V2G Buyback Price (¥/kWh)
Peak 10:00-15:00, 18:00-21:00 1.03 0.40
Off-Peak 07:00-10:00, 15:00-18:00, 21:00-24:00 0.65 0.26
Valley 00:00-07:00 0.35 0.16

Using the Markov chain model, we first predict the uncontrolled charging demand of the battery electric vehicle fleet, which shows significant peaks coinciding with evening return times, exacerbating the existing grid peak. The proposed IDBO-based strategy actively schedules charging during low-load/low-price valley periods and strategically discharges a portion of the battery electric vehicle fleet during grid peak hours when buyback prices are attractive.

We compare three scenarios: (1) Uncontrolled Charging, (2) ToU-based Ordered Charging (only charging is shifted), and (3) our proposed IDBO-based V2G Ordered Charging/Discharging. The aggregated load profiles clearly show that our strategy achieves the flattest net load curve. The uncontrolled scenario creates a large evening peak. The ToU strategy reduces the original peak but creates a new, significant load peak during the early off-peak period. Our V2G strategy successfully fills the valley and shaves the peak without creating secondary peaks.

The quantitative benefits are summarized in the table below:

Table 3: Performance Comparison of Different Scenarios
Metric Proposed V2G Strategy Uncontrolled Charging ToU-Based Strategy
Owner Comprehensive Cost (¥) 6,574 9,960 7,460
Grid Peak-Valley Difference (kW) 860 1,185 927
Total Network Loss (kW) 169 403 230
Max Node Voltage (p.u.) 1.02 1.06 1.04
Min Node Voltage (p.u.) 0.93 0.91 0.93

Our strategy reduces the owner’s comprehensive cost by 34% compared to uncontrolled charging and by 12% compared to simple ToU-based charging. Crucially, it also delivers the best grid performance, minimizing peak-valley difference, network losses, and voltage deviations.

A vital finding addresses a key user barrier: battery degradation. We project battery capacity fade over 500 equivalent cycles. Under normal use (uncontrolled charging), capacity decays to ~98%. The ToU strategy, due to more structured but still uni-directional cycles, leads to faster fade to ~96.4%. Remarkably, our V2G strategy, which optimizes charge/discharge patterns considering battery stress, results in a capacity of ~97.7%, significantly mitigating the additional degradation from grid service and increasing the economic viability for the battery electric vehicle owner.

The superiority of the IDBO algorithm is evident in its convergence characteristics. The standard DBO converges quickly for the upper-level objective but gets trapped in a sub-optimal solution for the complex lower-level owner cost function. Our IDBO, enhanced with Levy flight and T-distribution, converges faster and to a significantly better global optimum for both objectives, demonstrating its robustness in solving this coupled optimization problem for the battery electric vehicle fleet.

Finally, we analyze the impact of increasing battery electric vehicle penetration. The results confirm that as penetration grows from 20% to 50%, the proposed V2G strategy becomes even more effective at peak shaving and valley filling, leading to progressively smoother grid load profiles. This scalability highlights the strategy’s importance for future high-penetration scenarios of the battery electric vehicle.

In conclusion, this work presents a holistic and practical hierarchical control strategy for the orderly charging and discharging of a battery electric vehicle fleet. By constructing a bi-level optimization model that explicitly considers grid safety risks, user economics, and battery electric vehicle battery health, and by solving it with an enhanced metaheuristic algorithm (IDBO), we demonstrate a pathway for harmonious grid-vehicle integration. The strategy effectively prevents the load shifting issues inherent in plain ToU pricing, significantly reduces the grid’s peak-valley difference and operational costs, lowers the comprehensive charging cost for the battery electric vehicle owner, and critically, minimizes the additional battery degradation associated with V2G participation. This multi-benefit outcome addresses the core concerns of both grid operators and battery electric vehicle owners, paving the way for higher adoption of V2G services and more resilient, sustainable power systems.

Scroll to Top