Electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization
Through the classification method of charging behavior of electric vehicles based on Monte Carlo and artificial bee colony optimization, the problem of ignoring individual differences and dynamic behavior changes in electric vehicle users in the prior art is solved, and accurate identification of the behavior characteristics of electric vehicle user groups and scientific decision-making support for power grid scheduling is achieved.
Patent Information
- Application Number
- CN202510176504.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-16
AI Technical Summary
The existing electric vehicle scheduling strategies are mostly based on preset charging behavior models, ignoring individual differences and dynamic behavior changes among electric vehicle users, making it difficult to accurately identify user group characteristics and formulate flexible scheduling strategies.
A method for charging behavior classification of electric vehicles based on Monte Carlo and artificial bee colony optimization is proposed. The charging behavior of electric vehicles is simulated through the Monte Carlo model, and the probability density function of off-grid time is generated. The artificial bee colony algorithm is introduced to optimize the k-means clustering algorithm to improve the stability and accuracy of clustering results.
By accurately identifying the charging and off-grid behavior characteristics of the electric vehicle user group, more scientific and reasonable grid scheduling and operation management decision support are provided, and the dispatch efficiency and management effect of large-scale electric vehicles being connected to the power grid is improved.
Smart Images

Figure CN120011846A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicles, and in particular to a method for classifying charging behaviors of electric vehicles based on Monte Carlo and artificial bee colony optimization. Background Art
[0002] With the rapid development of the electric vehicle industry, as a new energy means of transportation, it has shown great potential in reducing carbon emissions and improving air quality. However, the large-scale access of electric vehicles to the power grid has brought new challenges to the dispatching and operation management of the power grid. Existing electric vehicle dispatching strategies are mostly based on preset charging behavior models, ignoring the individual differences and dynamic behavior changes among electric vehicle users. Therefore, it is particularly important to develop a technology that can accurately identify the characteristics of electric vehicle user groups and formulate flexible dispatching strategies based on them. K-means algorithm, as a classic clustering algorithm, has been used in the analysis of electric vehicle user behavior, but it has shortcomings such as sensitivity to the initial cluster center and low efficiency when processing large-scale data sets. Summary of the invention
[0003] In order to solve the problem of distribution network planners identifying uncertainty information about electric vehicles and accurately extracting electric vehicle behavior information, the present invention proposes an electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization, which relates to the technical field of electric vehicles.
[0004] To achieve the above technical objectives, the technical solution of the present invention is implemented as follows:
[0005] A method for classifying electric vehicle charging behavior based on Monte Carlo and artificial bee colony optimization, comprising:
[0006] Data collection and preprocessing;
[0007] Use Monte Carlo model to simulate the charging behavior of electric vehicles;
[0008] Based on the output of the Monte Carlo model, the probability density function of the time of electric vehicles leaving the grid is further generated;
[0009] Analyze the problems existing in the traditional k-means clustering algorithm when processing large-scale electric vehicle charging behavior datasets;
[0010] The artificial bee colony algorithm is introduced to optimize the clustering process;
[0011] Construct a new fitness function and optimize the cluster center.
[0012] Furthermore, the Monte Carlo model is used to simulate the charging behavior of electric vehicles, which specifically includes: using the Monte Carlo method to simulate, which is based on two basic probability statistics theorems: the central limit theorem and the law of large numbers, and specifically includes the following steps:
[0013] The central limit theorem is used to describe the probability density function curve of the predetermined input electric vehicle data to simulate the charging behavior of electric vehicles;
[0014] Extracting the off-grid and on-grid time rules of electric vehicles from the probability density function curve, and simultaneously extracting the probability characteristics of the charging and discharging behavior of a single vehicle;
[0015] Based on these two theorems, the mathematical model of MCM is described as equations (1)-(3). Assuming that the function is Y=f(X1,X2,···,Xn), the expectation E(Xi) and variance D(Xi) of each variable are the same, and LNT is shown in equation (1). Then, assuming that the probability of the event is P(F), then equation (2) is satisfied. Then the mathematical model of MCM simulating EVUs charging behavior is shown in equation (3):
[0016]
[0017] y i =f(x 1i ,x 2i ) (3)
[0018] Where i represents the number of sampling times. With a sufficient number of individuals, the precise probability distribution and numerical characteristics of the off-grid time distribution are obtained.
[0019] Furthermore, the probability density function of the off-grid time of EVUs is specifically expressed as follows: based on the obtained off-grid time rule, a PDF is obtained by using a fitting function on the MATLAB platform, and its mathematical expression is as follows:
[0020]
[0021] f ET (x) = a4 exp(-((x-b4) / c4) 2 )+a5·exp(-((x-b5) / c5) 2 ) (5)
[0022] Equations (4) and (5) represent the PDFs of the online and offline time of electric vehicles, respectively.
[0023] Furthermore, the mathematical model of the k-means algorithm is as follows: according to the Euclidean distance criterion of clustering, all samples are subdivided into k clusters, and each cluster is replaced by a central sample; then, the current clustering result is evaluated. If the initial clustering is unreasonable, the clustering target sample is modified through an iterative process, that is, the sample is reallocated to the cluster center with a closer Euclidean distance, and at the same time, the position of the cluster center is iteratively updated; this process is repeatedly performed until the preset convergence criterion is reached or the optimal state of the clustering result is reached, wherein the optimal state is defined as the highest sample similarity within the cluster and the lowest sample similarity between clusters. The mathematical model is as follows:
[0024]
[0025]
[0026] Where P represents the number of data in the cluster, H represents the number of iterations, and d(C i ,x j ) represents the Euclidean distance from point xj to cluster center Ci, and S represents the sum of internal distances.
[0027] Furthermore, the improved k-means algorithm is specifically as follows: the method introduces an artificial bee colony algorithm to improve the K-means algorithm in view of the increased time complexity and sensitivity to the initial clustering center when processing large-scale data sets; the global search capability and calculation accuracy of the K-means clustering are improved through the global search capability and robustness of the ABC algorithm; wherein the fitness function is designed as a key indicator for evaluating the quality of clustering results, and is used to guide the evolution process of the bee colony in the ABC algorithm, thereby optimizing the selection of clustering centers, and further improving the accuracy and stability of the clustering results. The new fitness function of the improved K-means based on ABC is:
[0028] fitness i =CN i / J i ; i=1,2,…,N (9)
[0029]
[0030] V ij =x ij +rand[-1,1]·(x mj -x kj )+rand[-1,1]·(x best,j -x ij ) (12)
[0031] Where CN irepresents the amount of data in cluster i, Ji is the sum of the distances in cluster i, Pi represents the probability of the bee making a choice, and Vij represents the new location of the updated nectar source.
[0032] Furthermore, the principle of the artificial bee colony algorithm is as follows: an optimization method based on the artificial bee colony algorithm, which simulates the foraging behavior of bees in nature, searches for the optimal solution of the problem through the collaborative work of employed bees, observer bees and scout bees, and includes the following steps: initialize a group of bees as candidate solutions, each bee represents a potential solution; use employed bees to search for better solutions in their neighborhood, and evaluate the quality of the solutions based on the fitness function; observer bees select high-quality solutions for further search based on the information provided by employed bees; when the fitness of a solution has not improved for a long time, the corresponding employed bees are transformed into scout bees, and new solutions are randomly generated to explore new search spaces; repeat the above process until the preset stop condition is met, and the optimal solution obtained at this time is the solution to the problem. The algorithm is suitable for solving a variety of optimization problems due to its simplicity, powerful global search capability and robustness.
[0033] Principle of the present invention:
[0034] The first aspect: Extraction and modeling of charging behavior features of electric vehicles. In order to accurately capture the uncertainty of charging behavior of electric vehicle users, the present invention proposes a method for extracting electric vehicle behavior features based on Monte Carlo simulation (MCM). The method first constructs an MCM mathematical model, and relies on the central limit theorem (CLT) and the law of large numbers (LNT) to accurately simulate the charging behavior of electric vehicles through equations (1) to (3), especially the probability distribution of their off-grid time. Subsequently, based on the MCM simulation results, the probability density function (PDF) of the online time and off-grid time of electric vehicles is generated by fitting functions using the MATLAB platform, which lays a solid data foundation for the subsequent cluster analysis of charging behavior.
[0035] The second aspect: Based on the improved k-means electric vehicle charging behavior clustering method, in view of the high computational complexity and sensitive initial cluster center selection of the traditional k-means algorithm when processing large-scale data sets, the present invention introduces the artificial bee colony algorithm (ABC) to make innovative improvements to the k-means algorithm. By constructing a new fitness function, the improved algorithm can make full use of the global search capability of ABC and effectively optimize the clustering center and clustering results. The specific implementation steps include: defining a fitness function to balance cluster compactness and dispersion; implementing an improved k-means clustering process, covering key links such as initialization, distance calculation, sample allocation, center update and fitness evaluation, until the convergence conditions are met or the preset number of iterations is reached.
[0036] The present application discloses a method for optimizing the robustness of an integrated energy system based on electricity price fluctuation prediction, which specifically has the following beneficial effects: the present invention captures the probability characteristics of electric vehicle charging behavior through a Monte Carlo model, and generates a probability density function of the time of disconnection from the grid. Subsequently, in view of the shortcomings of traditional k-means on large data sets, an artificial bee colony algorithm is introduced to optimize the clustering process, and the optimization of the clustering center is guided by constructing a new fitness function. Its specific advantages are: optimizing the initial clustering center of the K-means algorithm through the artificial bee colony algorithm, reducing the algorithm's dependence on initial conditions, and improving the stability and accuracy of the clustering results; introducing the fast global search capability of the artificial bee colony algorithm, accelerating the convergence speed in the clustering process, and significantly improving the processing efficiency of large-scale data sets; by accurately identifying the charging and off-grid behavior characteristics of electric vehicle user groups, providing more scientific and reasonable decision support for power grid dispatching and operation management. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Method flow chart of steps S100 to S103 in this application;
[0038] Figure 2 Flow chart of the method of steps S1 to S4 in this application;
[0039] Figure 3 Indicator graphs for different numbers of clusters;
[0040] Figure 4 Probability density curve of on-grid and off-grid;
[0041] Figure 5 Daily charging load cluster centerline diagram;
[0042] Figure 6 Diagram of different iterative processes based on the traditional K-means algorithm and the ABC-Kmeans algorithm. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present invention are described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0044] Embodiment 1
[0045] Embodiment 1 provides an electric vehicle user charging behavior clustering method based on improved k-means, aiming to accurately extract the off-grid behavior characteristics of electric vehicles and obtain accurate daily charging demand representing the main charging rules of electric vehicles. A method for clustering electric vehicle user charging behavior is proposed, which has good accuracy and generalization, and can provide technical support for the future development of electric vehicle technology.
[0046] A method for classifying electric vehicle charging behavior based on Monte Carlo and artificial bee colony optimization includes the following steps:
[0047] S1. The setting of parameters is based on the public data of electric vehicles collected in specific areas and an example analysis is conducted.
[0048] S1 Specifically, the electric vehicle data collected by Shanghai's new energy vehicle public data, among which the on-board information monitoring and communication module equipped in the pure electric vehicle, uses GPRS wireless communication technology to efficiently transmit the vehicle's key operating parameters about charging, discharging, driving dynamics and parking status in real time (set time interval such as 30 seconds) to the data center for processing and analysis. The present invention selects its electric vehicle data for the year 2019-2020, specifically including off-grid time, grid-connected time and driving distance.
[0049] S2. Data analysis: by simulating different numbers of cluster centers, corresponding result indicators are obtained and processed and analyzed.
[0050] S2 Specifically, in order to accurately classify the categories of electric vehicles within the network cycle, a cluster analysis method was used, and scenarios with different numbers of cluster centers ranging from 2 to 7 were simulated. The silhouette coefficient, CH index, and Davison-Bouldin index (DBI) of the clustering results were normalized and plotted Figure 5 ,The comprehensive evaluation shows that: when the number of clusters is 3 and 5, the silhouette coefficient reaches a peak, the DBI value is relatively low, and the CH index remains at a high level, indicating that these two types of cluster numbers can provide better clustering effects. Considering that the three types of clusters are too rough and difficult to fully reveal the detailed differences of electric vehicles in the network cycle, this study finally selected k = 5 as the optimal cluster number to ensure that the classification results can not only accurately reflect the characteristics of electric vehicles, but also carefully distinguish their behavior patterns in different network periods.
[0051] S3. Analyze the time pattern of electric vehicles on and off the grid. Analyze the cluster centers of different clustering results based on the probability density curve of on and off the grid, and analyze their charging needs to obtain the results.
[0052] S3 specifically, conducted an in-depth study of the on-grid and off-grid behavior characteristics of electric vehicles (EVUs). Figure 6 a shows the distribution of the probability of EVUs accessing the network on time. The peak value appears around 17:30, with a charging probability of about 21%, and then gradually decreases over time. Figure 6 b, reveals the probability distribution of EVUs' off-grid time, with the peak off-grid time being around 7:30 a.m., with a probability of 32%. Both are closely aligned with the statistical laws in the "China Small Pure Electric Passenger Vehicle Big Data Report", verifying the accuracy of the data.
[0053] Table 1 Cluster centers of different clustering results
[0054]
[0055]
[0056] Furthermore, through cluster analysis (as shown in Table 1), it is found that the Internet access time of each cluster is significantly concentrated at the highest point of its PDF, reflecting the concentration of electric vehicle off-get off work and charging behavior; at the same time, the off-grid time is also highly concentrated at the peak of each PDF, reflecting the regularity of commuting to work. To verify the reliability of the clustering results, we conducted a detailed analysis of the charging demand of the main clusters. Figure 5 The central line of the daily charging load clustering is displayed, showing that the peak of charging demand lasts from 20:00 to 7:00 the next day, which is consistent with the rules summarized in Table 1, proving the reliability and effectiveness of the clustering method and results proposed in this invention.
[0057] S4. Clustering algorithm solution efficiency analysis, by comparing the iterative process of the two algorithms and their solution time, the results are obtained.
[0058] S4 Specifically, in the data processing stage of the example analysis, the iteration process and performance of the traditional K-means algorithm and the ABC-Kmeans algorithm proposed in the present invention are compared. Figure 6 As shown in a), the fitness value of the traditional K-means algorithm fluctuates violently in the early stage of clustering due to the rapid adjustment of the cluster center, and due to improper selection of the initial center, it changes frequently during the iteration process until it stabilizes at the 92nd iteration, indicating that it is easy to fall into the limitation of local optimality. In contrast, Figure 6 The iterative process of the ABC-Kmeans algorithm in b) shows faster convergence speed and smaller oscillation, especially when it successfully jumps out of the local optimum and quickly reaches a stable state at the 31st iteration, which significantly demonstrates its powerful global search capability.
[0059] Table 2 Solution efficiency of different methods
[0060] Clustering methods Iterations Clustering time / s Traditional K-means algorithm 92 4361.2 The improved Kmeans algorithm proposed in this paper 31 1343.7
[0061] Table 2 further quantifies the difference in solution efficiency between the two. The ABC-Kmeans algorithm reduces the solution time by 69.2% compared with the traditional K-means algorithm, which fully verifies the efficiency and effectiveness of the clustering method and the improved K-means algorithm in this paper.
[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for classifying electric vehicle charging behavior based on Monte Carlo and artificial bee colony optimization, characterized in that: include: Data collection and preprocessing; Use Monte Carlo model to simulate the charging behavior of electric vehicles; Based on the output of the Monte Carlo model, the probability density function of the time of electric vehicles leaving the grid is further generated; Analyze the problems existing in the traditional k-means clustering algorithm when processing large-scale electric vehicle charging behavior datasets; The artificial bee colony algorithm is introduced to optimize the clustering process; Construct a new fitness function and optimize the cluster center.
2. The electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization according to claim 1 is characterized in that: The Monte Carlo model is used to simulate the charging behavior of electric vehicles. Specifically, the Monte Carlo method is used for simulation. The method is based on two basic probability statistics theorems: the central limit theorem and the law of large numbers. Specifically, the following steps are included: The central limit theorem is used to describe the probability density function curve of the predetermined input electric vehicle data to simulate the charging behavior of electric vehicles; Extracting the off-grid and on-grid time rules of electric vehicles from the probability density function curve, and simultaneously extracting the probability characteristics of the charging and discharging behavior of a single vehicle; Based on these two theorems, the mathematical model of MCM is described as equations (1)-(3). Assuming that the function is Y=f(X1,X2,···,Xn), the expectation E(Xi) and variance D(Xi) of each variable are the same, and LNT is shown in equation (1). Then, assuming that the probability of the event is P(F), then equation (2) is satisfied. Then the mathematical model of MCM simulating EVUs charging behavior is shown in equation (3): y i =f(x 1i ,x 2i ) (3) Where i represents the number of sampling times. With a sufficient number of individuals, the precise probability distribution and numerical characteristics of the off-grid time distribution are obtained.
3. The electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization according to claim 1 is characterized by: The probability density function of the off-grid time of EVUs is specifically expressed as follows: Based on the obtained off-grid time rule, the PDF is obtained by using the fitting function on the MATLAB platform, and its mathematical expression is as follows: f ET (x)=a4·exp(-((x-b4) / c4) 2 )+a5·exp(-((x-b5) / c5) 2 ) (5) Equations (4) and (5) represent the PDFs of the online and offline time of electric vehicles, respectively.
4. The electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization as claimed in claim 3, characterized in that: The mathematical model of the k-means algorithm is as follows: according to the Euclidean distance criterion of clustering, all samples are subdivided into k clusters, and each cluster is replaced by a central sample; then, the current clustering result is evaluated, and if the initial clustering is unreasonable, the clustering target sample is modified through an iterative process, that is, the sample is reallocated to the cluster center with a closer Euclidean distance, and at the same time, the position of the cluster center is iteratively updated; This process is repeated until the preset convergence criterion is reached or the optimal state of the clustering result is reached. The optimal state is defined as the highest similarity of samples within the cluster and the lowest similarity of samples between clusters. Its mathematical model is as follows: Where P represents the number of data in the cluster, H represents the number of iterations, and d(C i ,x j ) represents the Euclidean distance from point xj to cluster center Ci, and S represents the sum of internal distances.
5. The electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization as claimed in claim 4, characterized in that: The improved k-means algorithm is specifically as follows: the method introduces an artificial bee colony algorithm to improve the problem that the time complexity of the K-means algorithm increases when processing large-scale data sets and is sensitive to the initial clustering center; the global search ability and calculation accuracy of the K-means clustering are improved through the global search ability and robustness of the ABC algorithm; wherein the fitness function is designed as a key indicator for evaluating the quality of clustering results, which is used to guide the evolution process of the bee colony in the ABC algorithm, thereby optimizing the selection of clustering centers, and further improving the accuracy and stability of the clustering results. The new fitness function of the improved K-means based on ABC is: fitness i =CN i / J i ;i=1,2,…,N (9) V ij =x ij +rand[-1,1]·(x mj -x kj )+rand[-1,1]·(x best,j -x ij ) (12) Where CN i represents the amount of data in cluster i, Ji is the sum of the distances in cluster i, Pi represents the probability of the bee making a choice, and Vij represents the new location of the updated nectar source.
6. The electric vehicle charging behavior classification method based on Monte Carlo and artificial bee colony optimization as claimed in claim 5, characterized in that: The principle of the artificial bee colony algorithm is as follows: an optimization method based on the artificial bee colony algorithm, which simulates the foraging behavior of bees in nature and searches for the optimal solution to the problem through the collaborative work of employed bees, observer bees and scout bees. The method includes the following steps: initializing a group of bees as candidate solutions, each bee representing a potential solution; using employed bees to search for better solutions in their neighborhoods, and evaluating the quality of the solutions based on the fitness function; observer bees select high-quality solutions for further search based on the information provided by employed bees; when the fitness of a solution has not improved for a long time, the corresponding employed bees are transformed into scout bees, and new solutions are randomly generated to explore new search spaces; repeating the above process until the preset stop condition is met, and the optimal solution obtained at this time is the solution to the problem.