Multi-time Scale Prediction of Charging Load for Large-scale Battery EV Cars Based on Firefly Algorithm

With the rapid adoption of battery EV cars globally, the integration of large-scale electric vehicles into power grids has become a critical challenge. The charging load from battery EV cars introduces significant variability and uncertainty, potentially straining grid infrastructure during peak periods. Accurate prediction of charging loads across multiple time scales is essential for grid planning, load balancing, and ensuring reliable energy supply. This paper proposes a novel method for multi-time scale prediction of charging load for large-scale battery EV cars, leveraging the firefly algorithm to enhance accuracy and adaptability. The approach addresses limitations in conventional methods by incorporating load decomposition, feature clustering, and dynamic modeling of charging behaviors.

The increasing penetration of battery EV cars has led to a surge in electricity demand, particularly during specific hours when charging activities peak. Unlike traditional loads, the charging load of battery EV cars exhibits non-stationary patterns due to factors such as user behavior, environmental conditions, and battery characteristics. Multi-time scale prediction—covering short-term (e.g., hourly), medium-term (e.g., daily), and long-term (e.g., weekly) horizons—enables utilities to anticipate fluctuations and optimize resource allocation. Existing methods often fall short in capturing the spatial-temporal dynamics of battery EV car charging, leading to inaccuracies in load forecasts. This work aims to overcome these issues by integrating advanced computational techniques, including the firefly algorithm, to provide robust predictions for large-scale battery EV car fleets.

To set the foundation, the daily charging load curves of battery EV cars are analyzed for similarities and differences. These curves represent the aggregated energy consumption patterns of multiple battery EV cars over a 24-hour period. By extracting key features, such as peak load times and variability, we can cluster curves to identify common behaviors. The silhouette coefficient serves as a metric for evaluating cluster quality, defined as:

$$S_0 = \frac{1}{N_0} \sum_{i=1}^{N_0} \frac{a(i) – b(i)}{\max(a(i), b(i))}$$

Here, \(N_0\) denotes the number of charging load curves, \(a(i)\) represents the number of curves in the same cluster as curve \(i\), and \(b(i)\) indicates the number of features in curve \(i\). A higher \(S_0\) value signifies better separation between clusters, which is crucial for distinguishing patterns in battery EV car charging. After clustering, each load curve is normalized to account for magnitude differences, using the formula:

$$p’_i(t) = S_0 \times \frac{p_i(t) – p_{i,\min}}{p_{i,\max} – p_{i,\min}}$$

In this equation, \(p’_i(t)\) is the normalized load value at time \(t\) for curve \(i\), while \(p_i(t)\) is the original load, and \(p_{i,\min}\) and \(p_{i,\max}\) are the minimum and maximum loads, respectively. This normalization ensures that all curves are on a comparable scale, facilitating further analysis. The normalized matrix \(p_0\) is then constructed as:

$$p_0 = \begin{bmatrix}
p’_1(1) & p’_1(2) & \ldots & p’_1(T) \\
p’_2(1) & p’_2(2) & \ldots & p’_2(T) \\
\vdots & \vdots & \ddots & \vdots \\
p’_i(1) & p’_i(2) & \ldots & p’_i(T)
\end{bmatrix}$$

where \(T = 24\) hours for daily analysis. The distance between daily and monthly load curves is computed to capture temporal relationships, expressed as:

$$D_{ij} = p_0 \times d_{ij}(t_1, t_2) \times N_1$$

Here, \(N_1\) is the number of daily charging load curves, and \(d_{ij}(t_1, t_2)\) measures the distance between curves \(i\) and \(j\) at times \(t_1\) and \(t_2\), calculated by:

$$d_{ij}(t_1, t_2) = \sqrt{(t_1 – t_2)^2 + D_{ij} \times \Omega_i}$$

where \(\Omega_i\) denotes the cluster assignment for curve \(i\). Using grid-based principles, dynamic time warping paths are formed to align curves across multiple time scales, enabling the decomposition of load sequences into low-frequency and high-frequency components. The low-frequency subsequence \(a_1\) and high-frequency subsequence \(a_2\) are derived as:

$$a_1 = \sum_{f=1}^{K} d_w \times l_f, \quad a_2 = \sum_{f=1}^{K} d_w \times h_f$$

In these formulas, \(K\) is the total number of decomposition coefficients, \(l_f\) and \(h_f\) represent weights for low and high frequencies, and \(d_w\) is the similarity between adjacent curves, given by:

$$d_w = \min_{P_A} \sum d_{ij}(t_1, t_2) \times D’$$

where \(P_A\) is a dynamic time path, and \(D’\) is the path distance. The travel time weights are adjusted to reflect real-world conditions:

$$t’ = (a_1 + a_2) \times \frac{|q_i – q_j|}{v_{ij}}$$

Here, \(q_i\) and \(q_j\) are network nodes, and \(v_{ij}\) is the velocity matrix. Through down-sampling and transformations, the load decomposition sequence \(X(i)\) is obtained:

$$X(i) = t’ \times [x_h(i) + x_l(i)]$$

where \(x_h(i)\) and \(x_l(i)\) are the high-frequency and low-frequency load sequences, respectively. This decomposition allows for detailed analysis of charging patterns for battery EV cars across different time resolutions.

Next, a comprehensive charging load model for battery EV cars is developed, incorporating various influencing factors. The battery capacity of a battery EV car is affected by ambient temperature, modeled using a polynomial function:

$$C_r = X(i) (\eta_3 T_1^3 + \eta_2 T_1^2 + \eta_1 T_1)$$

where \(\eta_3\), \(\eta_2\), and \(\eta_1\) are fitting coefficients, \(T_1\) is the battery temperature, and \(C_r\) is the battery capacity percentage. The activation of air conditioning in battery EV cars, which impacts load, is described by a normal distribution function with cold and hot thresholds:

$$K_o = \begin{cases}
1, & T_h > T_c \\
\frac{1}{\sqrt{2\pi} \delta_c T_c} \exp\left(-\frac{(T_h – \mu_c)}{C_r}\right), & T_h < T_c \\
0, & T_h = T_c
\end{cases}$$

In this equation, \(K_o\) is the probability of air conditioning startup, \(\delta_c\) and \(\mu_c\) are mean and variance parameters for cooling, and \(T_c\) and \(T_h\) are temperature thresholds. Table 1 summarizes the fitting parameters for air conditioning startup in battery EV cars, based on empirical data.

Table 1: Fitting Parameters for Air Conditioning Startup Probability in Battery EV Cars
Parameter Mean \(\delta_c\) Variance \(\mu_c\) Threshold (°C) Comfort Range (°C)
Heat Startup 25.31 6.12 35 15–24
Cold Startup 4.20 7.21 5

The initial state of charge (SOC) for a battery EV car before charging is calculated as:

$$S_1 = K_o \left( S’ – \frac{d_1}{d_n} \right) \times 100\%$$

where \(S_1\) is the pre-charging SOC, \(S’\) is the post-charging SOC, \(d_1\) is the current travel distance, and \(d_n\) is the maximum distance. The required charging time \(\tau\) for a battery EV car is then:

$$\tau = \frac{S_1 E}{\psi b}$$

Here, \(E\) is the energy consumption coefficient, \(\psi\) is the charging imitation coefficient, and \(b\) is a technical indicator. The charging load change rate \(U_t\) at node \(t\) is derived from historical load features \(Y_t = [y_1, y_2, \ldots, y_O]\):

$$U_t = \sum_{t=1}^{O} \Delta A \times Y_t \times \frac{\tau}{2}$$

where \(\Delta A\) is the dependency weight between source and target nodes. A degree matrix \(Q\) combines historical and current loads:

$$Q = \sum_{t=1}^{O} (U_t + d_{tw}) L \times M$$

with \(d_{tw}\) as the maximum time cluster number, \(L\) as the Laplacian matrix, and \(M\) as the order. Finally, the charging load model \(F\) for battery EV cars is established:

$$F = \frac{(W_t – W_{t-1})}{Q}$$

where \(W_t\) and \(W_{t-1}\) are charging powers at consecutive time steps. This model encapsulates the dynamic behavior of battery EV car charging, accounting for temporal and spatial variations.

The firefly algorithm is employed to optimize the prediction of charging loads for large-scale battery EV cars. This metaheuristic algorithm mimics the flashing behavior of fireflies, where brightness corresponds to solution quality. The relative brightness \(I\) of a firefly is defined as:

$$I = I_0 \times e^{-\gamma r_0}$$

where \(I_0\) is the initial brightness, \(e\) is the base of natural logarithms, \(\gamma\) is the light absorption coefficient, and \(r_0\) is a random factor. This brightness is used to determine the charging time interval \(\vartheta\) for battery EV cars:

$$\vartheta = I (F + t_e)$$

with \(t_e\) as the charging end time. The attractiveness \(\alpha\) between fireflies is computed as:

$$\alpha = \alpha_0 \times \vartheta \times N’$$

where \(\alpha_0\) is the base attractiveness, and \(N’\) is the number of fireflies. The total charging power \(R_{J,k}\) at substation \(k\) for battery EV car \(J\) is summed over all substations:

$$R_{J,k} = \sum_{k=1}^{M’} \alpha$$

Here, \(M’\) represents the total number of substations. The movement of firefly \(c_1\) towards a brighter firefly \(c_2\) is governed by:

$$x = x_{c_1} + R_{J,k} x_{c_2} \times (\text{rand} – 0.5)$$

where \(x_{c_1}\) and \(x_{c_2}\) are positions, and rand is a random number between 0 and 1. To avoid local optima, a random disturbance is added to the best solution \(z_{\text{best}}\):

$$z_{\text{best}} = z’_{\text{best}} + x \otimes V(0,1)$$

with \(\otimes\) as element-wise multiplication and \(V(0,1)\) as a scaling factor. The predicted charging load \(\xi_g\) at time \(g\) for battery EV cars is then:

$$\xi_g = \frac{z_{\text{best}} – \text{mean}(X_g)}{\text{std}(X_g)}$$

where \(\text{mean}(X_g)\) and \(\text{std}(X_g)\) are the mean and standard deviation of training data \(X_g\). This formulation enables multi-time scale predictions, from hourly to daily loads, for large-scale battery EV car fleets.

To validate the proposed method, experimental analysis was conducted using real-world data from over 3000 battery EV cars in a regional network. The dataset included daily charging load curves sampled every 30 minutes, resulting in 2315 data points per vehicle. Input matrices of dimension 2315 × 4 were created, incorporating factors like temperature and time. Training data spanned January to June 2022, while testing data covered July to December 2022, split into an 80:20 ratio. The load time series was converted into supervised sequences to facilitate prediction. Results demonstrated the method’s effectiveness in forecasting charging loads across multiple time scales. For instance, predictions for a typical day showed close alignment with actual loads, as illustrated in Table 2, which compares relative errors across different sampling points.

Table 2: Comparison of Prediction Accuracy for Battery EV Car Charging Load Across Methods
Number of Load Sampling Points Relative Error for Method 1 (%) Relative Error for Method 2 (%) Relative Error for Proposed Method (%)
5 45.30 33.74 8.23
10 42.06 21.57 9.10
15 33.90 19.83 7.67
20 22.05 11.96 7.20
25 36.43 20.72 5.32

The relative error \(\lambda\) is calculated as:

$$\lambda = \frac{1}{O} \sum_{t=1}^{O} \left| \frac{P_{t1} – P_{t2}}{P_{t2}} \right| \times 100\%$$

where \(O\) is the number of load nodes, \(P_{t1}\) is the predicted load, and \(P_{t2}\) is the actual load. As shown, the proposed method maintains errors below 10% across all sampling points, outperforming conventional approaches. This highlights its robustness in handling the variability of battery EV car charging. Further analysis of daily load curves revealed discontinuous and unstable patterns, emphasizing the need for advanced prediction techniques. The integration of the firefly algorithm allowed for adaptive optimization, capturing non-linear relationships in charging behavior for battery EV cars.

In summary, this paper presents a comprehensive framework for multi-time scale prediction of charging load for large-scale battery EV cars. By combining load decomposition, feature clustering, and the firefly algorithm, the method achieves high accuracy and adaptability. The charging load model incorporates critical factors like temperature and battery SOC, while the algorithm optimizes predictions through iterative refinement. Experimental results confirm the method’s superiority over existing techniques, with relative errors consistently low. Future work could explore the impact of dynamic pricing on charging patterns for battery EV cars, as well as integration with renewable energy sources. Overall, this approach provides a valuable tool for grid operators managing the growing influx of battery EV cars, ensuring stable and efficient power system operations.

Scroll to Top