Optimizing Grid Integration of Battery EV Cars: A Hybrid DE-NSGA-II Approach for Coordinated Charging and Discharging

The global transition towards sustainable energy systems has positioned the battery electric vehicle (battery EV car) as a cornerstone technology. By reducing reliance on fossil fuels and cutting tailpipe emissions, the widespread adoption of battery EV cars is crucial for meeting climate goals. However, the uncoordinated integration of a large fleet of battery EV cars into the existing power grid presents significant operational challenges. The random and concentrated charging behavior of battery EV car users, typically aligning with evening peak hours, can exacerbate load fluctuations, increase peak demand, strain distribution infrastructure, and degrade power quality. This phenomenon, often described as “peak-on-peak,” threatens grid stability and efficiency. Consequently, developing intelligent strategies to coordinate the charging and, where possible, discharging (Vehicle-to-Grid, V2G) of battery EV cars is imperative for realizing a sustainable and resilient energy ecosystem.

This article presents a comprehensive framework for the optimal coordinated charging and discharging of battery EV cars. The core of our approach lies in formulating a multi-objective optimization model that balances grid stability and user economics, followed by solving it with an enhanced evolutionary algorithm. We begin by constructing a stochastic load model for a battery EV car fleet based on real-world travel patterns. Subsequently, we define a dual-objective optimization problem: minimizing grid load variance to achieve “peak shaving and valley filling,” and minimizing total charging costs for the battery EV car users. To solve this complex problem effectively, we propose a novel hybrid algorithm that synergistically combines the Non-dominated Sorting Genetic Algorithm II (NSGA-II) with the Differential Evolution (DE) algorithm. A case study simulation of a residential community demonstrates the superiority of our coordinated strategy over uncontrolled charging and highlights the improved performance of the hybrid algorithm compared to the standard NSGA-II.

1. Stochastic Modeling of Battery EV Car Charging Load

The charging demand of a battery EV car is intrinsically linked to the user’s daily mobility pattern, which is highly stochastic. To accurately simulate the aggregate load of a fleet, we model key behavioral parameters as random variables following specific probability distributions, derived from large-scale travel surveys such as the National Household Travel Survey (NHTS).

The time a battery EV car user plugs in their vehicle after the last trip of the day, defined as the start charging time \( t_s \), is modeled using a normal distribution. Its probability density function (PDF) is given by:

$$ f(t_s) = \begin{cases}
\frac{1}{\sigma_s \sqrt{2\pi}} \exp\left(-\frac{(t_s – \mu_s)^2}{2\sigma_s^2}\right), & \mu_s – 12 \le t_s \le 24 \\
\frac{1}{\sigma_s \sqrt{2\pi}} \exp\left(-\frac{(t_s + 24 – \mu_s)^2}{2\sigma_s^2}\right), & 0 \le t_s \le \mu_s – 12
\end{cases} $$

where \( \mu_s = 17.6 \) (5:36 PM) and \( \sigma_s = 3.4 \) hours.

The daily departure time \( t_d \) for the first trip is also normally distributed:

$$ f(t_d) = \begin{cases}
\frac{1}{\sigma_d \sqrt{2\pi}} \exp\left(-\frac{(t_d – \mu_d)^2}{2\sigma_d^2}\right), & 0 \le t_d \le \mu_d + 12 \\
\frac{1}{\sigma_d \sqrt{2\pi}} \exp\left(-\frac{(t_d – 24 – \mu_d)^2}{2\sigma_d^2}\right), & \mu_d + 12 \le t_d \le 24
\end{cases} $$

with \( \mu_d = 9.2 \) (9:12 AM) and \( \sigma_d = 3.4 \) hours. The daily driving distance \( d \) for a battery EV car is modeled using a lognormal distribution:

$$ f(d) = \frac{1}{d \sigma_l \sqrt{2\pi}} \exp\left(-\frac{(\ln d – \mu_l)^2}{2\sigma_l^2}\right) $$

where \( \mu_l = 3.2 \) and \( \sigma_l = 0.88 \).

From the daily distance \( d \), the initial State of Charge (SOC) upon plug-in can be estimated:

$$ SOC_{initial} = \left(1 – \frac{d}{d_{max}}\right) \times 100\% $$

Here, \( d_{max} \) is the maximum all-electric range of the battery EV car. The required charging duration \( T_{ch} \) (in hours) to replenish the consumed energy is then:

$$ T_{ch} = \frac{d \cdot E_{km}}{\eta \cdot P_{rate}} $$

where \( E_{km} \) is the energy consumption per kilometer (kWh/km), \( \eta \) is the charging efficiency, and \( P_{rate} \) is the rated charging power (kW).

To aggregate the load of \( N \) battery EV cars, we employ the Monte Carlo simulation method, which randomly samples from the above distributions for each virtual vehicle to build a probabilistic charging profile. The total battery EV car load at time interval \( t \) is:

$$ P_{EV}^{uncontrolled}(t) = \sum_{i=1}^{N} P_i(t) $$

where \( P_i(t) \) is the load of the \( i \)-th battery EV car at time \( t \), which is \( P_{rate} \) if the vehicle is charging and 0 otherwise. The simulation flowchart is summarized in the table below.

Table 1: Monte Carlo Simulation Flow for Uncontrolled Battery EV Car Load
Step Action Description
1 Initialize Set number of simulations \( M \) and fleet size \( N \).
2 Sample Behavior For each battery EV car \( i \), sample \( t_s^i \), \( t_d^i \), and \( d^i \) from their respective distributions.
3 Calculate Parameters Compute \( SOC_{initial}^i \) and \( T_{ch}^i \) for each battery EV car.
4 Determine Charging Window The vehicle can charge between \( t_s^i \) and \( t_d^i \). If \( T_{ch}^i \) is less than this window, assign the load.
5 Aggregate Load Sum the load of all \( N \) battery EV cars for each time interval \( t \) to get \( P_{EV}^{uncontrolled}(t) \).
6 Repeat & Average Repeat steps 2-5 for \( M \) simulations to obtain an expected load profile.

2. Multi-Objective Optimization Model for Coordinated Charging/Discharging

To mitigate the adverse effects of uncontrolled charging, we formulate a coordinated scheduling strategy. This strategy leverages time-of-use (TOU) electricity prices to incentivize battery EV car users to shift their charging to off-peak periods and, potentially, to discharge stored energy back to the grid during peak periods (V2G). The problem is formalized as a multi-objective optimization model.

2.1 Objective Functions

Objective 1: Minimize Grid Load Variance. This aims to flatten the total load curve, improving grid stability and asset utilization.

$$ f_1 = \min \left( \frac{1}{T} \sum_{t=1}^{T} \left[ P_{base}(t) + P_{EV}^{coord}(t) – P_{avg} \right]^2 \right) $$

where:

  • \( T \) is the total number of time intervals (e.g., 24).
  • \( P_{base}(t) \) is the non-EV base load at time \( t \).
  • \( P_{EV}^{coord}(t) \) is the net coordinated load from all battery EV cars at time \( t \).
  • \( P_{avg} \) is the average total load over the scheduling horizon: \( P_{avg} = \frac{1}{T} \sum_{t=1}^{T} \left[ P_{base}(t) + P_{EV}^{coord}(t) \right] \).

The net coordinated battery EV car load is defined as:

$$ P_{EV}^{coord}(t) = \sum_{i=1}^{N} \left[ P_{ch}(i, t) \cdot u_{ch}(i, t) – P_{dis}(i, t) \cdot u_{dis}(i, t) \right] $$

Here, \( P_{ch}(i,t) \) and \( P_{dis}(i,t) \) are the charging and discharging power of the \( i \)-th battery EV car, while \( u_{ch}(i,t) \) and \( u_{dis}(i,t) \) are binary decision variables indicating the charging or discharging state (1 for active, 0 for idle).

Objective 2: Minimize Total Charging Cost for Battery EV Car Users. This ensures the economic attractiveness of the coordinated strategy for adopters.

$$ f_2 = \min \left( \sum_{t=1}^{T} \sum_{i=1}^{N} \left[ C_{ch}(t) \cdot P_{ch}(i, t) \cdot u_{ch}(i, t) – C_{dis}(t) \cdot P_{dis}(i, t) \cdot u_{dis}(i, t) \right] \cdot \Delta t \right) $$

where \( C_{ch}(t) \) and \( C_{dis}(t) \) are the TOU electricity prices for charging and discharging at time \( t \), and \( \Delta t \) is the duration of each time interval.

2.2 Constraints

The optimization is subject to the following physical and operational constraints for each battery EV car \( i \):

1. Battery Dynamics and Capacity:
The SOC must remain within safe limits and update based on charging/discharging actions.

$$ SOC(i, t+1) = SOC(i, t) + \frac{\eta_{ch} \cdot P_{ch}(i,t) \cdot \Delta t}{E_{bat}} – \frac{P_{dis}(i,t) \cdot \Delta t}{\eta_{dis} \cdot E_{bat}} $$

$$ SOC_{min} \le SOC(i, t) \le SOC_{max} \quad \forall t $$

where \( E_{bat} \) is the battery capacity (kWh), and \( \eta_{ch}, \eta_{dis} \) are charging/discharging efficiencies.

2. Power Limits:

$$ 0 \le P_{ch}(i, t) \le P_{ch}^{max} \cdot u_{ch}(i,t) $$

$$ 0 \le P_{dis}(i, t) \le P_{dis}^{max} \cdot u_{dis}(i,t) $$

3. Charging Requirement:
Each battery EV car must be charged to its desired final SOC \( SOC_{des}(i) \) by its departure time \( t_d^i \).

$$ SOC(i, t_d^i) \ge SOC_{des}(i) $$

4. Mutual Exclusivity: A battery EV car cannot charge and discharge simultaneously.

$$ u_{ch}(i,t) + u_{dis}(i,t) \le 1 \quad \forall i, t $$

5. Grid Connection Availability: The vehicle can only be scheduled when it is parked and plugged in.

$$ u_{ch}(i,t) = 0 \text{ and } u_{dis}(i,t) = 0 \quad \text{for } t \notin [t_s^i, t_d^i] $$

2.3 Time-of-Use (TOU) Price Scheme

A TOU price signal is the primary mechanism for guiding user behavior. The following price structure is used to incentivize valley charging and peak discharging for the battery EV car fleet.

Table 2: Time-of-Use Electricity Price Schedule
Time Period Hours Period Type Price (Currency/kWh)
Off-Peak 00:00 – 07:00 Valley 0.365
Mid-Peak 07:00 – 10:00 Shoulder 0.687
On-Peak 10:00 – 14:00 Peak 1.070
Mid-Peak 14:00 – 18:00 Shoulder 0.687
On-Peak 18:00 – 22:00 Peak 1.070
Mid-Peak 22:00 – 24:00 Shoulder 0.687

Typically, \( C_{dis}(t) \) is set slightly lower than \( C_{ch}(t) \) during peak periods to create a financial incentive for V2G service while ensuring the aggregator’s economic viability.

3. Solution Methodology: A Hybrid DE-NSGA-II Algorithm

Solving the above multi-objective optimization problem is challenging due to its high dimensionality (scheduling many battery EV cars across 24 hours), non-linearity, and the presence of both continuous \( (P_{ch}, P_{dis}) \) and binary \( (u_{ch}, u_{dis}) \) variables. While the standard NSGA-II algorithm is a powerful tool for multi-objective optimization, it can suffer from slow convergence and a tendency to get trapped in local Pareto fronts in later generations due to reduced population diversity.

3.1 Standard NSGA-II and DE Algorithms

NSGA-II operates through genetic operations: selection, crossover, and mutation. It employs a fast non-dominated sorting procedure to rank solutions and a crowding distance metric to preserve diversity along the Pareto front. Its main strength is its ability to find a well-distributed set of non-dominated solutions. However, its genetic operators may not be efficient in finely tuning solutions near the optimal front, leading to the aforementioned convergence issues.

Differential Evolution (DE) is another evolutionary algorithm known for its strong global search capability. It relies on vector-based mutation and crossover operations. A classic mutation strategy is “DE/rand/1”:

$$ V_i = X_{r1} + F \cdot (X_{r2} – X_{r3}) $$

where \( X_{r1}, X_{r2}, X_{r3} \) are three distinct randomly selected population vectors, \( V_i \) is the mutant vector, and \( F \) is the scaling factor. This strategy introduces a directed perturbation based on vector differences, allowing effective exploration of the search space. However, the randomness in selecting base vectors can slow down convergence, and its greedy selection process might discard potentially good non-dominated solutions prematurely.

3.2 Proposed Hybrid DE-NSGA-II Algorithm

To overcome the limitations of both algorithms, we propose a synergistic hybrid. The core idea is to leverage the robust non-dominated sorting and diversity-preserving mechanisms of NSGA-II while injecting the powerful exploratory drive of DE’s mutation strategy. An elite preservation strategy is also integrated to ensure the best solutions are never lost.

The workflow of the hybrid algorithm is as follows and detailed in the table below:

  1. Initialization: Generate an initial random population of scheduling solutions for the battery EV car fleet.
  2. Main Loop (for each generation):
    • Step A – NSGA-II Operations: Perform selection, crossover, and mutation (as per standard NSGA-II) on the current population to produce an offspring population \( O1 \).
    • Step B – DE Operations: Apply DE’s “rand/1” mutation and binomial crossover to the current population to produce a second offspring population \( O2 \).
    • Step C – Combination and Elite Preservation: Combine the parent population \( P \), offspring \( O1 \), and offspring \( O2 \). Perform fast non-dominated sorting and crowding distance calculation on the combined population. Select the top individuals to form the new parent population for the next generation. The absolute best non-dominated solutions found so far are explicitly carried forward (elite preservation).
  3. Termination: Repeat the main loop until the maximum number of generations is reached. The final output is the set of non-dominated solutions (Pareto front).
Table 3: Hybrid DE-NSGA-II Algorithm Pseudocode
Phase Action Purpose
1. Initialization Generate random population \( P_0 \) of size \( N_{pop} \). Set generation \( g=0 \). Initialize elite archive \( E = \emptyset \). Create starting point for evolution.
2. Generation Loop (while \( g < G_{max} \)) A. NSGA-II Phase: Create offspring \( O1_g \) from \( P_g \) via tournament selection, simulated binary crossover (SBX), and polynomial mutation. Exploit current solutions using GA operators.
B. DE Phase: Create offspring \( O2_g \) from \( P_g \) using DE/rand/1 mutation and binomial crossover. Explore search space using vector differentials.
C. Selection & Elite Update:
1. Combine: \( R_g = P_g \cup O1_g \cup O2_g \).
2. Perform fast non-dominated sort on \( R_g \).
3. Calculate crowding distance within each front.
4. Fill new population \( P_{g+1} \) with best fronts from \( R_g \).
5. Update elite archive \( E \) with non-dominated solutions from \( R_g \).
Merge results, preserve diversity, and keep best solutions.
3. Finalization Output the final elite archive \( E \) as the Pareto-optimal set of battery EV car schedules. Provide the set of optimal trade-off solutions.

This hybrid approach ensures that in every generation, the population is enriched by both the local refinement capabilities of genetic operators and the global exploration driven by differential evolution. The elite archive guarantees convergence quality. The final Pareto front represents the optimal trade-off between grid load variance and user cost. To select a single compromise solution, we employ a fuzzy membership method that normalizes each objective and chooses the solution with the maximum minimum membership value.

4. Case Study and Simulation Results

To validate the proposed model and algorithm, we conduct a simulation based on a typical residential community.

4.1 Parameter Settings

We consider a community with a base daily load profile. A fleet of \( N = 300 \) identical battery EV cars is simulated. Each battery EV car has a battery capacity \( E_{bat} = 50 \) kWh, a maximum charging/discharging power \( P_{ch}^{max} = P_{dis}^{max} = 5 \) kW, and charging/discharging efficiencies \( \eta_{ch} = \eta_{dis} = 0.9 \). The desired final SOC \( SOC_{des} \) is 90% for all vehicles, with \( SOC_{min} = 20\% \). The algorithm parameters are: population size \( N_{pop} = 100 \), maximum generations \( G_{max} = 200 \), crossover probability \( p_c = 0.9 \), mutation probability \( p_m = 1/n \) (where \( n \) is the number of decision variables), DE scaling factor \( F = 0.5 \), and crossover rate \( CR = 0.9 \).

Table 4: Simulation and Algorithm Parameters
Category Parameter Value
Battery EV Car Fleet Size (\( N \)) 300
Battery Capacity (\( E_{bat} \)) 50 kWh
Max Charge/Discharge Power 5 kW
Charging/Discharging Efficiency (\( \eta \)) 0.9
SOC Limits (\( SOC_{min}, SOC_{max}, SOC_{des} \)) 20%, 90%, 90%
Algorithm Population Size (\( N_{pop} \)) 100
Maximum Generations (\( G_{max} \)) 200
NSGA-II Crossover Probability (\( p_c \)) 0.9
DE Scaling Factor (\( F \)) 0.5
DE Crossover Rate (\( CR \)) 0.9

4.2 Uncontrolled Charging Scenario

Using the Monte Carlo simulation, the aggregate load profile for the uncontrolled charging of the 300 battery EV cars is obtained and superimposed on the base load. The result clearly shows the “peak-on-peak” effect, where a significant surge in battery EV car load coincides with the evening peak in the base load (around 18:00-22:00). This uncoordinated behavior drastically increases the net peak load and the load variance, highlighting the necessity for coordination.

4.3 Optimized Coordinated Charging/Discharging Scenarios

We apply both the standard NSGA-II and the proposed Hybrid DE-NSGA-II algorithm to solve the optimization model. First, the Pareto fronts obtained by both algorithms are compared. The Hybrid DE-NSGA-II algorithm consistently produces a front that is more spread out and converges closer to the true optimum (lower left corner of the objective space), indicating superior exploration and convergence capabilities.

From each Pareto front, we select the best compromise solution using the fuzzy method. The resulting total load profiles (base load + optimized net battery EV car load) are plotted against the uncontrolled profile. The coordinated strategies successfully shift load from peak to off-peak hours (valley filling around 01:00-07:00) and even create slight valleys during peaks through strategic discharging, effectively flattening the load curve.

The quantitative results are summarized in the table below:

Table 5: Performance Comparison of Charging Strategies
Performance Metric Uncontrolled Charging Standard NSGA-II Strategy Hybrid DE-NSGA-II Strategy
Grid Load Variance (kW²) 118,396.47 103,789.52 101,337.91
Improvement vs. Uncontrolled 12.34% 14.41%
Total User Cost (Monetary Units) 2680.26 2473.66 2485.17
Improvement vs. Uncontrolled 7.70% 7.27%

The analysis reveals that both optimization strategies significantly outperform uncontrolled charging. They reduce grid load variance by over 12% and user costs by over 7%. The key finding is the comparison between the two algorithms: the Hybrid DE-NSGA-II strategy achieves a further 1.67% reduction in load variance compared to the standard NSGA-II strategy, while maintaining an essentially equivalent user cost (a difference of only 0.43%). This demonstrates that our proposed hybrid algorithm can find solutions that offer a better balance, specifically providing greater grid stability benefits for a nearly identical economic outlay for the battery EV car users. The enhanced global search mechanism of the DE component effectively guides the population towards a superior region of the Pareto front.

5. Conclusion

This article addresses the critical challenge of integrating a large-scale battery EV car fleet into the power grid. We propose a coordinated charging and discharging strategy framed as a multi-objective optimization problem, aiming to minimize both grid load variance and user charging costs under realistic TOU pricing and physical constraints of the battery EV car. The core contribution is the development of a Hybrid DE-NSGA-II algorithm designed to overcome the convergence and local optima pitfalls of conventional multi-objective solvers.

Simulation results from a residential community case study confirm the detrimental “peak-on-peak” effect of uncontrolled battery EV car charging. More importantly, they validate the effectiveness of our coordinated strategy in achieving substantial “peak shaving and valley filling” and cost savings. The superior performance of the Hybrid DE-NSGA-II algorithm is evidenced by its ability to find scheduling solutions that offer greater grid load flattening (lower variance) for comparable user costs than those found by the standard NSGA-II. This work provides a practical and efficient computational framework for stakeholders, such as grid operators and aggregators, to design incentive schemes and manage the charging of the growing battery EV car population, thereby facilitating a smoother and more sustainable energy transition. Future work will focus on incorporating renewable energy uncertainty, more detailed battery degradation models for the battery EV car, and real-time pricing dynamics into the optimization framework.

Scroll to Top