Method, System, Medium, Device and Terminal for Modeling Electric Vehicle Charging Demand
Through the method of generating adversarial imitation learning, combined with the XGboost algorithm and Baidu Map real-time road conditions, an electric vehicle user charging and discharging strategy model and a 24-hour SOC prediction model were established, which solved the accuracy and user behavior grasp of electric vehicle charging demand prediction in the existing technology, and achieved more efficient grid scheduling and charging guidance.
Patent Information
- Application Number
- CN202210824655.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-07-14
AI Technical Summary
The existing electric vehicle charging demand forecasting method cannot effectively meet the needs of power grid scheduling and charging guidance after the increase in the penetration rate of electric vehicles, and lacks the grasp of user behavior and the analysis of mathematical model of user charging and discharging strategies.
A method based on generative and adversarial imitation learning is adopted, combining user differences and electric vehicle performance differences, user driving strategies and travel strategies are learned, and an electric vehicle performance model is established through the XGboost algorithm, combined with real-time road conditions of Baidu maps, user driving characteristics and charging characteristics are extracted, charging and discharging strategies are generated, and a 24-hour SOC prediction model and charging demand space-time model are established.
It improves the accuracy and robustness of electric vehicle charging demand prediction, can more accurately capture user behavior characteristics and charging strategies, and provides more effective grid scheduling and charging guidance support.
Smart Images

Figure CN115063184B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric vehicle charging demand modeling, and particularly relates to a method, a system, a medium, a device and a terminal for electric vehicle charging demand modeling. Background Art
[0002] In recent years, in order to reduce the dependence on oil and fossil fuels, many countries and regions have formulated policies to promote the development and market penetration of electric vehicles (EVs). In 2021, the global sales volume of electric vehicles reached 6.75 million, a 108% increase compared with 2020. At the same time, the global share of electric vehicles in global light vehicle sales was 8.3%, while it was 4.2% in 2020. The continuous growth of the large-scale electric vehicle charging demand connected to the power grid will surely bring challenges to the urban road traffic and the stable operation of the power grid. At present, the research on electric vehicles mainly focuses on charging demand prediction, energy management and charging guidance. These researches help to reduce the negative impact of electric vehicles on the power grid. Among them, the electric vehicle charging demand prediction is the basis for analyzing the impact of electric vehicle access on the power grid, distribution network planning and control operation, two-way interaction between electric vehicles and the power grid, and charging guidance. However, with the continuous increase in the penetration rate of EVs and the continuous increase in charging demand, the rationality and accuracy of the existing charging prediction methods can no longer meet the needs of power grid dispatching and charging guidance well. Therefore, a series of researches on electric vehicle charging demand prediction are urgently needed.
[0003] The current research on electric vehicle charging demand prediction mainly focuses on user behavior analysis. The generation of charging demand is due to the insufficient energy of electric vehicles, and the energy change of electric vehicles is the result of the influence of user behavior. User behavior includes charging time, travel mileage, driving strategy, etc. Therefore, user behavior analysis is the difficulty and key of charging demand prediction. In recent years, research has obtained real-time travel information (such as "Didi" travel data) and used data mining and fusion technologies to obtain regenerative feature data, so as to analyze the distribution law of residents' travel and charging behavior characteristics. This method can establish a single electric vehicle model and is more effective in establishing a large-scale electric vehicle demand model. The latest research methods show that researchers focus on mining the charging SOC characteristics of individual users and simulating group behavior and its impact on charging demand prediction based on the distribution of user charging strategies. Secondly, a training method based on the Marquardt (LM) of the Rough structure is developed using the feedforward and recursive artificial neural network (ANN) of levenbergu. This method considers the correlation between arrival time, departure time, and trip length. Linking the charging demand with the urgency coefficient of user charging behavior, a mathematical model describing the charging demand behavior is given, but there is a lack of a method for determining the charging demand behavior. Predicting the SOC change curve of a single electric vehicle in the next 24 hours based on the user's historical SOC data, but this is only limited to predicting user data with strong SOC change regularity. This method lacks the grasp of user behavior. User behavior is a deterministic strategy made by users based on factors such as the current time and the remaining SOC. Due to many influencing factors, the current technical solutions lack the analysis of the mathematical model of the user's charge and discharge strategy.
[0004] Through the above analysis, the problems and defects existing in the prior art are as follows:
[0005] (1) With the continuous increase in the penetration rate of EVs, the charging demand is increasing, and the rationality and accuracy of the existing charging prediction methods can no longer meet the needs of grid dispatching and charging guidance well.
[0006] (2) The prior art lacks a method for determining the charging demand behavior and lacks the grasp of user behavior; the current technical solutions also lack the analysis of the mathematical model of the user's charge and discharge strategy. Summary of the Invention
[0007] In view of the problems existing in the prior art, the present invention provides a method, system, medium, device, and terminal for modeling electric vehicle charging demand, and in particular, relates to a method, system, medium, device, and terminal for modeling electric vehicle charging demand based on generative adversarial imitation learning.
[0008] The present invention is implemented as follows. A method for modeling electric vehicle charging demand, the method for modeling electric vehicle charging demand includes:
[0009] Analyze the impacts of differences among electric vehicle users and electric vehicle performance, and learn user driving strategies and user travel strategies based on a generative adversarial model; build an electric vehicle performance model based on XGboost machine learning; prove that this algorithm can extract user driving features and charging features based on the real-time road conditions of Baidu Map.
[0010] Further, the method for modeling the charging demand of electric vehicles includes the following steps:
[0011] Step 1: Collect the user operation trajectory dataset, clean the abnormal points in the dataset, and divide the user operation trajectories; construct the training input dataset of the user strategy model based on MIC, and construct the 24-hour SOC prediction data set of electric vehicle users as the input dataset;
[0012] Step 2: Establish a generator, a value network, and a discriminator neural network based on a linear fully connected network, and initialize the network using the Bayesian hyperparameter optimization method; input the training user trajectory data set, optimize the policy network parameters based on the PPO proximal policy optimization algorithm, and traverse all user trajectories to generate the charge and discharge strategies of all users;
[0013] Step 3: Use the cross-validation method to train the 24-hour SOC prediction model of electric vehicles based on XGboost. The model is divided into a discharge SOC prediction model and a charging SOC prediction model;
[0014] Step 4: Perform path planning on the historical driving trajectories, and obtain the real-time traffic flow velocity of the path based on Baidu Map to predict the 24-hour single-vehicle SOC change curve of all users; combine the user's charging urgency to predict the charging demand and energy demand of all users, and establish a spatio-temporal model for predicting the charging demand of electric vehicle clusters in the region.
[0015] Further, Step 1 also includes constructing the original dataset of electric vehicle charging demand, specifically including:
[0016] Use the isolation forest to screen abnormal points, use the multiple imputation method to repair the abnormal points in the dataset, and extract the user behavior factors strongly correlated with the SOC change of electric vehicles based on the MIC maximum mutual information coefficient matrix.
[0017] Constructing the original dataset of electric vehicle operation includes:
[0018] As the 24-hour real speed data of users;
[0019] As the influencing factor of the user's 24-hour speed change: real-time traffic flow velocity;
[0020] As the 24-hour real SOC data of users;
[0021] As factors affecting the 24-hour SOC change: vehicle speed, single-trip mileage, and acceleration.
[0022] Furthermore, step two further includes constructing a user charging and discharging strategy learning model based on generative adversarial imitation learning, specifically including:
[0023] (1) Trajectory sampling
[0024] The main program is a nested loop structure. The first layer of loop is an iterative loop that traverses all expert trajectory data in one generation. The second layer is an expert trajectory loop. First, a sampling trajectory is generated through the policy network, then the corresponding value function, advantage function, and the mixed log density of the sampling trajectory are calculated. Then, the expert policy trajectory and the sampling trajectory are sent to the discriminator to update the discriminator parameters. Finally, the value function, advantage function, and the mixed log density of the sampling trajectory are sent to the PPO algorithm to update the policy network until all expert trajectories are traversed and the second layer of loop ends.
[0025] (2) PPO policy optimization
[0026] The framework is a nested structure of two layers of loops. The first layer is an iterative loop. Each time an iteration is performed, the collected sample data (state set, return value set, advantage estimate set, value estimate set, feedback estimate set, state-action mixed log probability set) is shuffled, divided into certain batches, and then sent to the PPO algorithm together with the policy network and value network for parameter optimization and update. The second layer is the network parameter update layer; the loop is completed by traversing all sampling batches.
[0027] Furthermore, the construction of the 24-hour SOC prediction model for electric vehicles based on XGboost in step three includes:
[0028] Based on the correlation analysis between SOC and user strategies, the single-trip mileage curve and charging time curve are calculated based on the 24-hour user speed curve generated by policy learning, where the speed curve and mileage curve predict the discharging SOC, and the charging time curve predicts the charging SOC. Therefore, a driving SOC regression prediction model and a charging SOC regression prediction model are established respectively.
[0029] The prediction algorithm selects XGboost, and the loop therein is a cross-validation process; the training data set is divided into n_splits subsets, and the training set is standardized by removing the mean and scaling to unit variance. Let x be the original data, then the standardization formula for the original data x is as follows:
[0030]
[0031] where u is the mean of x, s is the standard deviation of x, and z is the value after standardization. In each loop, one of the subsets is used as the validation set, and the remaining subsets are used as the training set until all subsets are traversed. This can ensure reliable generalization ability.
[0032] Among them, the construction of the search strategy network and the SOC prediction model hyperparameters based on the Bayesian algorithm includes:
[0033] In order to make the policy model and the SOC prediction model converge in a short time to achieve better performance, the Bayesian hyperparameter optimization algorithm is used here for hyperparameter search. In the policy model, the KL divergence between the true value and the predicted value is used as the objective function of Bayesian optimization. Among them, the policy network and the discriminator network are composed of multi-layer fully connected neural networks, and the number of expert trajectories is set to 10. In the SOC prediction model, the mean square error between the true value and the predicted value is used as the objective function of Bayesian optimization, and the number of search generations is 50 times for both. All hyperparameters of the XGboost algorithm are accurate to 4 decimal places.
[0034] Furthermore, the step four also includes large-scale electric vehicle path planning within the region and obtaining the real-time traffic flow velocity of the path, including:
[0035] The path planning uses the set of real path longitude and latitude coordinates in the dataset. After all path longitude and latitude coordinates are processed, the OSMnx library in python is used to visualize the path and extract the road node coordinates, the road nodes, and the distance information from the starting node (the path node is the intersection of this path and other roads). Let the set of each trajectory node data be:
[0036]
[0037] Among them, Ω j represents the data set of the j-th trajectory, j = 1, 2, 3,... and are the longitude and latitude coordinates of the path node and the distance from the starting node respectively.
[0038] Considering that the user's driving strategy is affected by the real-time traffic flow velocity, it is necessary to obtain the real-time average speed of each road section. Based on the real-time information platform of Baidu Map, the driving time T of the road section where the current vehicle coordinate belongs is obtained. Let the distances from the adjacent nodes to the starting node be l 1 and l 2 , then the length of the current road section is L = l 1 -l 2 , and the time required for the current road section is T t , and the real-time traffic average flow velocity of this road section is v t , and its real-time traffic average flow velocity can be calculated according to the following expression.
[0039]
[0040] Further, in the fourth step, a prediction model for the charging demand of the regional electric vehicle cluster is also constructed, specifically including:
[0041] (1) Establish a user charging urgency model
[0042] The fundamental reason for the generation of user charging demand is the reduction of battery energy (SOC), that is, the urgency of user charging. The user charging urgency is closely related to user habits, battery SOC, driving purpose, etc. The higher the charging urgency, the greater the probability that the user sends a charging demand signal. Here, only the charging urgency determined by battery SOC is considered. The charging probability is represented by a dotted line, and the charging urgency is represented by a solid line. When the depth of discharge (power consumption) is deeper and the remaining power is less, the user charging probability is higher, and at the same time, the user charging urgency is higher, and the user is more eager to charge.
[0043] Here, considering the general expression of the charging urgency function, let the charging probability function be D(x), D(x) is a function of the depth of discharge DOD, where DOD = 1 - SOC, and D(x) is composed of the function h 1 (x) and h 2 (x), where x 1 , x 2 and x 3 are determined by the battery capacity. The larger the battery capacity, the larger x 1 , x 2 and x 3 .
[0044]
[0045] The charging urgency function C u (x) is the integral of D(x) from 0 to x, obtaining the following formula:
[0046]
[0047] Here At the same time, the expression of the charging urgency function:
[0048]
[0049] (2) Charging demand determination
[0050] The starting SOC distribution of user charging reflects the dependence of user charging actions on SOC. There will be differences in the starting SOC distribution among different users. It is considered to use a normal distribution to fit the starting SOC distribution of different users. When the SOC approaches the historical starting SOC of a certain user, that is, when the SOC drops to the charging demand interval of a certain user, the user will generate a charging demand. The charging demand interval is related to the user charging urgency coefficient and the distribution of the starting SOC of the user.
[0051] Here, consider the situation where the smaller the starting SOC of charging, the greater the charging probability of the user. Assume that the starting SOC distribution of a certain user follows a normal distribution N(μ,σ 2 ), draw the starting SOC value X from N(μ,σ 2 ), and assume that the user charging urgency coefficient at the current SOC is C u (X). Then the charging demand interval of this user is [X, X + 20C u (X)]. It can be seen that the smaller X is and the larger C u (X) is, the wider the charging demand interval is, and the greater the possibility that the user generates a charging demand.
[0052] (3) Prediction of large-scale electric vehicle energy demand in the region
[0053] Based on the SOC prediction results of individual electric vehicles, establish a prediction of the charging energy demand of large-scale electric vehicles in the region. Here, use the user charging urgency and the starting SOC to predict the charging energy demand of different users. According to the definition of the charging demand interval, when the user's SOC enters the charging demand interval, it is considered that the user has a charging demand, and calculate the charging energy demand of the user. Here, it is stipulated that when the user generates a charging demand, the difference between the current battery energy and 90% of the battery energy is used as the charging energy demand. Assume that the charging energy demand is E pc , assume that the current battery SOC is SOC t , assume that the user battery capacity is C p . At this time, the calculation formula for the charging energy demand of a single user is as follows:
[0054] E pc =(1 - SOC t )×C p
[0055] After the above steps, the serial integration of the basic regressor group is completed.
[0056] Another object of the present invention is to provide an electric vehicle charging demand modeling system for implementing the electric vehicle charging demand modeling method described above. The electric vehicle charging demand modeling system includes:
[0057] An input data set construction module, which is used to construct an original data set for the operation of electric vehicles, and divide the original data set into different weights as the input data set;
[0058] A discriminator neural network, a policy neural network, and a value neural network construction module. The above three parts together constitute a policy learning system; a reinforcement learning environment construction module, which sets a state-action output function and sets the environmental state and the action range of the policy network; a PPO algorithm construction module, which optimizes and updates the parameters of the policy network.
[0059] A 24-hour SOC prediction module for bicycles, which divides the training set based on the cross-validation process, trains an SOC prediction model for 2 charging and discharging processes using the XGboost algorithm, and simultaneously uses Bayesian optimization for hyperparameter search.
[0060] A regional electric vehicle cluster charging demand prediction construction module, which defines the charging demand interval using the charging urgency coefficient, determines the charging demand of bicycles based on the prediction results of the 24-hour bicycle prediction module, and then integrates the spatio-temporal model of the large-scale electric vehicle charging demand.
[0061] Another object of the present invention is to provide a computer device, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor executes the above-mentioned electric vehicle charging demand modeling method.
[0062] Another object of the present invention is to provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the above-mentioned electric vehicle charging demand modeling method.
[0063] Another object of the present invention is to provide an information data processing terminal, which is used to implement the above-mentioned electric vehicle charging demand modeling system.
[0064] Combined with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0065] First, in view of the technical problems existing in the above-mentioned prior art and the difficulty of solving this problem, closely combined with the technical solutions to be protected by the present invention and the results and data in the R & D process, etc., analyze in detail and deeply how the technical solutions of the present invention solve the technical problems and the creative technical effects brought after solving the problems. The specific description is as follows:
[0066] Based on the policy learning ability of generative adversarial imitation learning, the present invention proposes a charging demand prediction model based on real-time data of Baidu Maps, which can interpret the driving strategies and charging strategies of electric vehicle users. First, the correlation between the policy factors and SOC in the user's charge and discharge data is analyzed, then a 24-hour SOC prediction model for a single vehicle is established, and finally a spatio-temporal model of the charging energy demand within the region is established on this basis.
[0067] The electric vehicle charging demand modeling method provided by the present invention takes into account the influence of the differences among electric vehicle users and the differences in electric vehicle performance, and learns the user's driving strategy and user travel strategy based on generative adversarial imitation learning (GAIL); a prediction model for the SOC of a single electric vehicle based on the XGboost algorithm; and the real-time road conditions of Baidu Maps prove that this algorithm can generate the real-time user speed.
[0068] The electric vehicle cluster charging demand prediction method, system, terminal and medium provided by the present invention establish a user charge and discharge strategy model. Based on the MIC maximum mutual information coefficient, the correlation between the SOC change of electric vehicles and the driving strategy and charging strategy is proved; combined with the real-time traffic flow rate of Baidu Maps, a strategy learning model based on generative adversarial imitation learning (GAIL) and proximal policy optimization algorithm (PPO) is proposed. Compared with the traditional extraction of user behavior characteristics, this method establishes an accurate mathematical model of the user's strategy.
[0069] The electric vehicle cluster charging demand prediction method, system, terminal and medium provided by the present invention establish a 24-hour SOC prediction curve for a single vehicle. Based on the strategy learning model, a prediction method for the SOC of a single electric vehicle based on the XGboost algorithm is proposed, and it is proved that this prediction method has good robustness and accuracy.
[0070] The electric vehicle cluster charging demand prediction method, system, terminal and medium provided by the present invention establish a spatio-temporal model of the charging demand of the electric vehicle cluster within the region. Based on the SOC change curve of a single electric vehicle and combined with the user charging demand perception model, a spatio-temporal model of the charging demand of the electric vehicle cluster within the region in the next 24 hours is established, which can prove that this model can explain the spatio-temporal characteristics of the charging demand and at the same time provide strong data support for the charging guidance and charging station planning problems.
[0071] The regional electric vehicle cluster charging demand prediction method, system, terminal and medium provided in the above embodiments of the present invention. Based on the policy learning ability of generative adversarial imitation learning, the present invention proposes a charging demand prediction model based on real-time data of Baidu Maps, which can interpret the driving strategies and charging strategies of electric vehicle users. The present invention first analyzes the correlation between policy factors and SOC in the user charge and discharge data, then establishes a 24-hour SOC prediction model for a single vehicle, and finally establishes a spatio-temporal model of charging energy demand in the region, so as to obtain a spatio-temporal distribution map of large-scale electric vehicle charging demand in the future region.
[0072] Second, regarding the technical solution as a whole or from the perspective of the product, the technical effects and advantages of the technical solution to be protected by the present invention are specifically described as follows:
[0073] The electric vehicle cluster charging demand prediction method, system, terminal and medium provided by the present invention. By combining the real-time traffic flow rate of Baidu Maps and the real user driving trajectory data, the obtained regional electric vehicle cluster charging demand model has a broader application prospect, and at the same time the prediction result has good generalization ability.
[0074] The results prove that compared with the current mainstream prediction methods, the electric vehicle charging demand modeling method provided by the present invention has better prediction accuracy and robustness, and at the same time can combine real-time traffic data, which can provide strong model support for urban area charging station planning and charging guidance.
[0075] Third, as the creative auxiliary evidence of the claims of the present invention, it is also reflected in the following important aspects:
[0076] (1) The expected benefits and commercial values after the transformation of the technical solution of the present invention are:
[0077] Provide accurate charging demand data support for urban charging station planning.
[0078] (2) The technical solution of the present invention fills the technical gaps in the domestic and international industries:
[0079] Establish an accurate mathematical model of charge and discharge strategies; establish a 24-hour SOC prediction model for a single vehicle based on real-time traffic flow rate; give a charging demand determination method based on the charging urgency coefficient.
[0080] (3) The technical solution of the present invention solves the technical problems that people have always been eager to solve but have never succeeded in: establishing a mathematical model of user charging behavior based on big data. Description of the Drawings
[0081] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the attached drawings required for use in the embodiments of the present invention. Obviously, the attached drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other attached drawings can be obtained based on these attached drawings without creative efforts.
[0082] Figure 1 It is a flowchart of the electric vehicle charging demand modeling method provided by the embodiment of the present invention;
[0083] Figure 2 It is a heat map of the MIC matrix of the electric vehicle charging characteristics provided by the embodiment of the present invention;
[0084] Figure 3 It is a heat map of the MIC matrix of the electric vehicle discharging characteristics provided by the embodiment of the present invention;
[0085] Figure 4 It is a flowchart of the electric vehicle user strategy learning provided by the embodiment of the present invention;
[0086] Figure 5 It is a flowchart of the 24-hour SOC prediction of a single electric vehicle provided by the embodiment of the present invention;
[0087] Figure 6 It is a flowchart of the XGboost algorithm provided by the embodiment of the present invention;
[0088] Figure 7 It is a curve graph of the electric vehicle user charging urgency function provided by the embodiment of the present invention;
[0089] Figure 8 It is the prediction result of the 24-hour speed and mileage curve of a single vehicle provided by the embodiment of the present invention;
[0090] Figure 9 It is the prediction result of the 24-hour SOC of a single vehicle provided by the embodiment of the present invention;
[0091] Figure 10 It is the prediction result of the 24-hour charging demand in the main urban area of a certain city provided by the embodiment of the present invention;
[0092] Figure 11 It is the statistical result of the total charging demand in each time period provided by the embodiment of the present invention. Detailed implementation manners
[0093] In order to make the purpose, technical solutions and advantages of the present invention clearer, the following further details the present invention in combination with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0094] Aiming at the problems existing in the prior art, the present invention provides a method, system, medium, device and terminal for modeling the charging demand of electric vehicles. The present invention will be described in detail below with reference to the accompanying drawings.
[0095] I. Explanation of the embodiments. In order to enable those skilled in the art to fully understand how the present invention is specifically implemented, this part is an explanatory embodiment that expands and explains the technical solutions of the claims.
[0096] As Figure 1 shown, the method for modeling the charging demand of electric vehicles provided by the embodiments of the present invention includes the following steps:
[0097] S101, collect the user running trajectory data set, clean the abnormal points in the data set, and divide the user running trajectory; construct the training input data set of the user policy model based on MIC, and construct the 24-hour SOC prediction data set of electric vehicle users as the input data set;
[0098] S102, establish a generator, a value network and a discriminator neural network based on a linear fully connected network, and initialize the network using the Bayesian hyperparameter optimization method; input the training user trajectory data set, optimize the policy network parameters based on the PPO proximal policy optimization algorithm, and traverse all user trajectories to generate the charging and discharging strategies of all users;
[0099] S103, train the 24-hour SOC prediction model of electric vehicles based on XGboost using the cross-validation method. This model is divided into a discharging SOC prediction model and a charging SOC prediction model;
[0100] S104, perform path planning on the historical driving trajectories, obtain the real-time traffic flow rate of the paths based on Baidu Maps, and predict the 24-hour single-vehicle SOC change curves of all users; combine the charging urgency of users to predict the charging demand and energy demand of all users, and establish a spatio-temporal model for predicting the charging demand of electric vehicle clusters in the region.
[0101] As a preferred embodiment, the steps for constructing the original data set of the charging demand of electric vehicles in step S101 provided by the embodiments of the present invention include the following steps:
[0102] (1) Analysis of the MIC matrix of charging characteristics
[0103] There is no subjective human factor involved in the charging stage, and each variable changes with the interaction process between the electric vehicle and the charging pile. The whole process is more regular than the discharging process. The charging process is divided into fast charging and slow charging, and the feature correlations of these two processes are basically unified. The MIC matrix is as Figure 2 shown. The results prove that the charging SOC is strongly correlated with the user charging duration and charging voltage. Here, only the discharging SOC prediction model considering the user charging duration is considered.
[0104] (2) Discharge characteristic MIC matrix analysis
[0105] The discharge process is the driving process, which is a process involving human factors, and its SOC is subject to many constraints, not limited to Figure 3 the factors shown, but also including road conditions (gradient, unevenness). The present invention mainly considers the subjective factor, that is, the influence of the user's driving strategy on the SOC curve. The discharge characteristic MIC matrix is as Figure 3 shown. The results prove that the correlation between the discharge SOC and the driving distance and speed is the strongest; at the same time, the correlation between the secondary relevant factors of the discharge SOC, the total voltage and the battery voltage, and the distance and speed is relatively strong; therefore, the user's driving strategy is the main inducement for the change of the SOC during the discharge process.
[0106] Example 1
[0107] Based on Figure 1 the electric vehicle charging demand modeling method provided by the embodiment of the present invention, further, step S101 provided by the embodiment of the present invention further includes constructing a policy network input feature data set, specifically including:
[0108] Using the isolation forest to screen out outliers, and using the multiple imputation method to repair the outliers in the data set, and extracting user behavior factors strongly correlated with the change of the electric vehicle SOC based on the MIC maximum mutual information coefficient matrix;
[0109] The original data set includes:
[0110] As the user's 24-hour real speed data;
[0111] As the influencing factor of the user's 24-hour speed change: real-time traffic flow rate;
[0112] As the user's 24-hour real SOC data;
[0113] As the influencing factors of the 24-hour SOC change: vehicle speed, single driving mileage, acceleration.
[0114] Example 2
[0115] Based on Figure 1 the electric vehicle charging demand modeling method provided by the embodiment of the present invention, further, step S102 provided by the embodiment of the present invention further includes a user strategy learning method based on generative adversarial imitation learning, specifically including:
[0116] Construct a GAIL algorithm framework; GAIL uses expert data to train the discriminator to train the generator and confuse the discriminator's judgment, and uses the discriminator to distinguish the data distribution generated by the generator from the real data distribution;
[0117] Initialize the policy function π 0 , sample trajectories
[0118] According to the principle of the generative adversarial model, the policy function is updated with ascending gradient, and the discriminator is updated with descending gradient to distinguish the probability distributions of real data and generated data;
[0119]
[0120] Among them, D(x (i) ) is the probability determination of the discriminator for real data; D(G(z (i) )) is the probability determination of the generated data;
[0121] Generator: Construct the loss function of the generative adversarial network, and use the discriminator to construct the reward function:
[0122]
[0123] When the discriminator cannot distinguish the data generated by the generator from the real data, the generator and the discriminator reach the Nash equilibrium, and the generator successfully matches the expert strategy;
[0124] Based on the PPO algorithm, the parameters of the generator network are optimized. The objectives of the PPO algorithm are as follows:
[0125]
[0126] 1) Generalized Advantage Estimation
[0127] Compare the reward obtained by performing action a in state s with the reward obtained by performing the current policy π(s|a) to evaluate the quality of action a, and update the probability p(a|s) of action a in the direction where the advantage estimation is greater than zero; The generalized advantage estimation is as follows:
[0128]
[0129] Among them, r t+l is the reward function at the current moment, V(s t+l ) is the state value function at the current moment, and γ is the discount rate of the previous moment value function;
[0130] 2) State-Action Probability Ratio r t (θ):
[0131]
[0132] Among them, π θ (a t |s t ) represents the logarithmic probability of the new policy executing a certain batch of action sets, and π old (at |s t ) represents the average action log probability of executing the old policy; ε is a hyperparameter, the truncation threshold; the second term Modify the surrogate objective by clipping the probability ratio to eliminate the motivation to move outside the interval (1 - ε, 1 + ε); take the minimum of the clipped and unclipped objectives, so the final objective is a lower bound of the unclipped objective; θ old Take the first order nearby;
[0133]
[0134] wherein,
[0135] Embodiment 3
[0136] Based on Figure 1 The electric vehicle charging demand modeling method provided by the embodiments of the present invention, further, the construction of the user behavior strategy learning model based on generative adversarial imitation learning in step S102 provided by the embodiments of the present invention includes the following steps:
[0137] Figure 4 The dashed part is the GAIL policy learning part, which consists of two upper-level policies, a lower-level policy, and a discriminator; the discriminator and the three policies constitute the GAIL policy learning framework; these three policy networks use the user historical data as learning samples and fit the user historical policy distribution through the discriminator. Among them, the charge and discharge policy makes action outputs based on the current time and the current SOC; the charging policy output actions are the single charging duration and the charging start time; the travel policy output actions are the single travel target distance and the travel start time; the lower-level driving policy executes the action targets output by the upper-level policies and outputs the 24-hour acceleration, single mileage, and time. The three policy networks adopt the same GAIL structure, and the policy learning flow chart is as Figure 5 shown, and the specific process is as follows:
[0138] (1) Trajectory sampling
[0139] The main program is a nested loop structure. The first layer loop is an iterative loop that traverses all expert trajectory data as one generation; the second layer is an expert trajectory loop. First, the sampling trajectory is generated through the policy network, then the corresponding value function, advantage function, and the mixed log density of the sampling trajectory are calculated, and then the expert policy trajectory and the sampling trajectory are sent to the discriminator to update the discriminator parameters. Finally, the value function, advantage function, and the mixed log density of the sampling trajectory are sent to the PPO algorithm to update the policy network until all expert trajectories are traversed, and the second layer loop ends.
[0140] (2) PPO policy optimization
[0141] The framework is a nested two-layer loop. The first layer is an iterative loop. In each iteration, the collected sample data (state set, return value set, advantage estimation set, value estimation set, feedback estimation set, state-action mixed log probability set) is shuffled, divided into certain batches, and then sent into the PPO algorithm together with the policy network and value network for parameter optimization and update. The second layer is the network parameter update layer; traversing all sampling batches means the loop is completed.
[0142] As a preferred embodiment, the steps in step S103 of the embodiment of the present invention for constructing an XGboost electric vehicle SOC prediction model combined with a policy model include the following steps:
[0143] According to the correlation analysis between SOC and user policies, calculate the single-trip mileage curve and charging time curve based on the 24-hour user speed curve generated by policy learning, where the speed curve and mileage curve predict the discharging SOC, and the charging time curve predicts the charging SOC. Therefore, a driving SOC regression prediction model and a charging SOC regression prediction model are respectively established.
[0144] Here, the prediction algorithm selects XGboost, and the flowchart of the prediction model is as Figure 6 shown, where the loop is a cross-validation process; the training dataset is divided into n subsets. In each loop, one subset is used as the validation set, and the remaining subsets are used as the training set until all subsets are traversed. This can ensure reliable generalization ability.
[0145] As Figure 4 shown, the electric vehicle cluster charging demand prediction method provided by this preferred embodiment includes the following steps:
[0146] I. Dataset construction
[0147] Construct an original dataset for electric vehicle charging demand. Perform data imputation, variable transformation, and adding perturbations on the actual demand data, demand impact condition data, and random noise data to construct the original dataset, and divide the original dataset into different weights as the input for the next layer.
[0148] II. Construct a policy learning module
[0149] Build a generator, value network, and discriminator neural network based on a linear fully connected network, and initialize the above networks using the Bayesian hyperparameter optimization method. Input the training user trajectory data set, optimize the policy network parameters based on the PPO proximal policy optimization algorithm, and traverse all user trajectories. Generate the charging and discharging policies for all users.
[0150] III. Construct an XGboost prediction module
[0151] An XGBoost-based 24-hour State of Charge (SOC) prediction model for electric vehicles, which is divided into a discharge SOC prediction model and a charging SOC prediction model.
[0152] IV. Output the charging demands of all electric vehicles within 24 hours
[0153] Based on the historical driving trajectories, path planning is carried out, and the real-time traffic flow speed of the path is obtained based on Baidu Map. The 24-hour SOC change curves of all users' single vehicles are predicted. Combining the charging urgency of users, the charging demands and energy demands of all users are predicted. Finally, the charging demands of cluster electric vehicles in the area are predicted.
[0154] In this preferred embodiment, in step one, the original data set includes:
[0155] As the real speed data of users within 24 hours;
[0156] As the influencing factors of the speed change of users within 24 hours: real-time traffic flow speed;
[0157] As the real SOC data of users within 24 hours;
[0158] As the influencing factors of the SOC change within 24 hours: vehicle speed, single driving mileage, acceleration.
[0159] In this preferred embodiment, in step S102, the optimal hyperparameters of the GAIL model are found based on the Bayesian hyperparameter optimization algorithm as follows:
[0160] In order to make the policy model and the SOC prediction model converge in a shorter time to achieve better performance, hyperparameter search is carried out here using the Bayesian hyperparameter optimization algorithm. In the policy model, the KL divergence between the real value and the predicted value is used as the objective function of Bayesian optimization, where the policy network and the discriminator network are composed of multi-layer fully connected neural networks, and the network hyperparameters are shown in Tables 1 to 4.
[0161] Table 1 Parameter settings of the PPO algorithm
[0162]
[0163] Table 2 Parameter settings of the discriminator network
[0164]
[0165] Table 3 Parameter settings of the policy network
[0166]
[0167]
[0168] Table 4 Parameter settings of the main program
[0169]
[0170] Example 4
[0171] Based on Figure 1 the electric vehicle charging demand modeling method provided by the embodiments of the present invention, further, the XGboost-based 24-hour SOC prediction method for electric vehicle users in step S103 provided by the embodiments of the present invention includes:
[0172] According to the input feature analysis, calculate the single-trip mileage curve and the charging time curve based on the 24-hour user speed curve generated by policy learning, where the speed curve and the mileage curve predict the discharging SOC, and the charging time curve predicts the charging SOC; respectively establish a driving SOC regression prediction model and a charging SOC regression prediction model based on XGboost, and search for the policy model and the SOC prediction model based on the Bayesian hyperparameter optimization algorithm.
[0173] In this preferred embodiment, in step S103, the optimal hyperparameters of the XGboost model are found based on the Bayesian hyperparameter optimization algorithm as follows:
[0174] The number of expert trajectories is set to 10. In the SOC prediction model, the mean square error between the true value and the predicted value is used as the objective function of Bayesian optimization, and the number of search generations is 50 times. The XGboost hyperparameters are shown in Table 5, and all hyperparameters are accurate to 4 decimal places.
[0175] Table 5 XGboost Parameter Settings
[0176]
[0177]
[0178] Example 5
[0179] Based on Figure 1 the electric vehicle charging demand modeling method provided by the embodiments of the present invention, further, step S104 provided by the embodiments of the present invention further includes obtaining real-time traffic flow velocity and vehicle path planning based on Baidu Map, specifically including:
[0180] (1) Path planning
[0181] The path planning uses the real path longitude and latitude coordinate set in the dataset. After all path longitude and latitude coordinates are processed, the OSMnx library in python is used to visualize the path and extract the road node coordinates, road nodes and the distance information from the starting node. The path node is the intersection of the path and other roads;
[0182] Let the data set of each trajectory node be:
[0183]
[0184] Among them, Ω j represents the j-th trajectory data set, where j = 1, 2, 3,... and are the longitude and latitude coordinates of the path node and the distance from the starting node respectively;
[0185] (2) Large-scale electric vehicle path planning within the area
[0186] Analyze the influence of the user's driving strategy on the real-time traffic flow velocity, and obtain the real-time average speed of each road section; based on the real-time information platform of Baidu Map, obtain the driving time T of the road section where the current vehicle coordinates are located. Let the distances of adjacent nodes from the starting node be l 1 and l 2 , then the length of the current road section is L = l 1 -l 2 , the time required to pass through the current road section is T t , and the real-time traffic average flow velocity of the road section is v t , calculate the real-time traffic average flow velocity according to the following formula:
[0187]
[0188] The spatio-temporal prediction of the charging demand of the regional electric vehicle cluster considering the user's charging urgency includes:
[0189] (1) User's charging urgency
[0190] The higher the charging urgency, the greater the probability that the user sends a charging demand signal;
[0191] (2) Charging demand determination
[0192] Use the normal distribution to fit the charging start SOC distribution of different users; when the SOC is close to the historical charging start SOC of a certain user and the SOC drops to the charging demand interval of a certain user, the user generates a charging demand, and the charging demand interval is related to the user's charging urgency coefficient and the charging start SOC distribution;
[0193] (3) Prediction of the energy demand of large-scale electric vehicles in the area
[0194] Based on the SOC prediction results of individual electric vehicles, establish a prediction of the charging energy demand of large-scale electric vehicles in the area; use the user's charging urgency and charging start SOC to predict the charging energy demand of different users. According to the definition of the charging demand interval, when the user's SOC enters the charging demand interval, it is considered that the user has a charging demand, and calculate the user's charging energy demand to complete the serial integration of the basic regressor group.
[0195] In this preferred embodiment, in step S104, the charging demand prediction method based on the user's charging urgency and real path data is as follows:
[0196] 1) Route planning
[0197] For route planning, the longitude and latitude coordinate set of the real path in the dataset is used. After all the longitude and latitude coordinates of the paths are processed, the OSMnx library in Python is used to visualize the paths and extract the road node coordinates, road nodes, and the distance information from the starting node (the path node is the intersection of this path and other roads). Let the data set of each trajectory node be:
[0198]
[0199] Where: Ω j represents the j-th trajectory data set, j = 1, 2, 3,... and are the longitude and latitude coordinates of the path node and the distance from the starting node respectively.
[0200] 2) Large-scale electric vehicle route planning within the region
[0201] Considering that the user's driving strategy is affected by the real-time traffic flow rate, it is necessary to obtain the real-time average speed of each road section. Based on the real-time information platform of Baidu Map, the driving time T of the road section where the current vehicle coordinate belongs is obtained. Let the distances from the adjacent nodes to the starting node be l 1 and l 2 , then the length of the current road section is L = l 1 -l 2 , and the time required for the current road section is T t , and the real-time traffic average flow rate of this road section is v t , and its real-time traffic average flow rate can be calculated according to the following expression.
[0202]
[0203] 3) Selection of user charging urgency and battery capacity parameters
[0204] According to the expression of charging urgency, there are three parameters to choose from. These three parameters depend on the size of the electric vehicle battery capacity. The larger the battery capacity, the larger these three parameters. In the present invention, the charging and discharging processes of four types of electric vehicle users are simulated, namely logistics vehicles, buses, taxis, and private cars. Among them, the battery capacity of the bus is set to 135 kWh, and the charging urgency parameters are set to 0, 0.7, 0.9, while the battery capacities of the other three types of vehicles are set to 45 kWh, and the charging urgency parameters are set to 0, 0.4, 0.85. Charging urgency models are established according to the above parameters respectively.
[0205] The curve graph of the charging urgency function for electric vehicle users provided by the embodiments of the present invention is as shown in Figure 7 the following figure.
[0206] 4) Charging demand determination method
[0207] Here, consider the situation where the smaller the starting SOC for charging, the greater the charging probability of the user. Assume that the starting SOC distribution of a certain user follows a normal distribution N(μ, σ 2 ), draw the starting SOC value X from N(μ, σ 2 ), and assume that the charging urgency coefficient of the user under the current SOC is C u (X). Then the charging demand interval of this user is [X, X + 20 C u (X)]. It can be seen that the smaller X is, the greater C u (X) is, the wider the charging demand interval range is, and the greater the possibility that this user generates a charging demand.
[0208] 5) Regional large-scale electric vehicle energy demand prediction
[0209] Here, consider using a large amount of electric vehicle operation data to establish a prediction of the charging demand of the regional electric vehicle cluster. First, select the prediction area, then extract the data of 1000 electric vehicles for one month to predict the SOC changes of 1000 vehicles in 24 hours, and finally combine the definition of the charging demand interval to predict the charging demand and energy demand of all users. And on this basis, establish a spatio-temporal distribution map of the charging demand within the region. Here, it is stipulated that when the user generates a charging demand, the difference between the current battery energy and 90% of the battery energy is used as the charging energy demand. Assume that the charging energy demand is, assume that the current battery SOC is SOC t , assume that the user battery capacity is C p . At this time, the calculation formula for the charging energy demand of a single user is as follows:
[0210] E pc =(1 - SOC t )C p
[0211] The battery capacities of these four types of vehicles are selected as shown in Table 6.
[0212] Table 6 Battery capacity selection
[0213]
[0214] It should be noted that the steps in the method provided by the present invention can be implemented by corresponding modules, devices, units, etc. in the system. Those skilled in the art can refer to the technical solution of the method to implement the composition of the system. That is, the embodiments in the method can be understood as the preferred examples for constructing the system, and will not be elaborated here.
[0215] II. Application Examples. To prove the creativity and technical value of the technical solution of the present invention, this part provides application examples of the technical solution of the claims in specific products or related technologies.
[0216] The experimental data of the present invention are the operation data of 1000 electric vehicles within one month obtained from the Shanghai New Energy Electric Vehicle Monitoring Center, which include a total of 20 electric vehicle operation parameters such as real-time speed, SOC, driving distance, etc. The data points are sampled every ten seconds. Among them, the data of private cars, logistics vehicles, buses and taxis account for 10%, 12%, 35% and 43% respectively, and the number of data points for a single trip trajectory is about 2000. The data attributes are shown in Table 7.
[0217] The model simulation analysis is divided into multiple parts: First, the robustness and learning ability of the policy network are evaluated. Secondly, the speed prediction model based on the policy model is used to illustrate the differences in user strategies, and the speed prediction results of four types of users are compared here. Then, the SOC prediction effect of a single vehicle for 24 hours is shown and compared with the prediction method based on historical SOC. Finally, the spatio-temporal diagram of the charging demand at critical moments throughout the day in the main urban area of Shanghai is shown. The algorithm program is all implemented by Python 3.7.
[0218] Table 7 Data Attributes
[0219]
[0220]
[0221] The embodiment of the present invention provides a terminal, including a memory, a processor and a computer program stored on the memory and executable on the processor. When the processor executes the program, it can be used to execute the method of any one of the above embodiments of the present invention, or, run the system of any one of the above embodiments of the present invention.
[0222] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by the processor, it can be used to execute the method of any one of the above embodiments of the present invention, or, run the system of any one of the above embodiments of the present invention.
[0223] In the above two embodiments, optionally, a memory for storing programs; the memory may include volatile memory (English: volatile memory), such as random access memory (English: random-access memory, abbreviation: RAM), such as static random access memory (English: static random-access memory, abbreviation: SRAM), double data rate synchronous dynamic random access memory (English: Double Data Rate Synchronous Dynamic Random Access Memory, abbreviation: DDR SDRAM), etc.; the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory). The memory is used to store computer programs (such as application programs and functional modules for implementing the above methods), computer instructions, etc. The above computer programs, computer instructions, etc. can be stored in one or more memories in partitions. And the above computer programs, computer instructions, data, etc. can be called by the processor.
[0224] A processor for executing the computer programs stored in the memory to implement the respective steps in the methods involved in the above embodiments. For specific details, reference can be made to the relevant descriptions in the foregoing method embodiments.
[0225] The processor and the memory can be of an independent structure or an integrated structure integrated together. When the processor and the memory are of an independent structure, the memory and the processor can be coupled and connected through a bus.
[0226] The method, system, terminal and medium for predicting the charging demand of a regional electric vehicle cluster provided in the above embodiments of the present invention. Based on the policy learning ability of generative adversarial imitation learning, the present invention proposes a charging demand prediction model based on real-time data of Baidu Maps, which can interpret the driving strategies and charging strategies of electric vehicle users. The present invention first analyzes the correlation between the policy factors and the SOC in the user's charge and discharge data, then establishes a 24-hour SOC prediction model for a single vehicle, and finally establishes a spatio-temporal model of the charging energy demand in the region on this basis, so as to obtain the spatio-temporal distribution map of the charging demand of a large number of electric vehicles in the future region.
[0227] III. Evidence of the related effects of the embodiments. The embodiments of the present invention have achieved some positive effects during the research and development or use process, and have great advantages compared with the prior art. The following content is described in combination with the data, charts, etc. in the test process.
[0228] 1. Real-time speed prediction based on the policy model
[0229] To illustrate the impact of different user charging and discharging strategies on the time distribution of charging demand, and at the same time provide data for subsequent prediction of the 24-hour SOC of a single vehicle. Here, the prediction results of the 24-hour speed of a single vehicle are shown. Considering the composition of real urban electric vehicle user types, four types of users are considered respectively: private cars, logistics vehicles, buses, and taxis. Their charging and discharging strategies are learned, and then based on the real-time traffic flow velocity, the 24-hour speed change curve of a single vehicle is predicted, as Figure 8 shown by the broken line in the light gray area in the figure. Finally, the single-trip mileage is calculated based on the speed curve. Here, the starting mileage is obtained by averaging the user's historical data. As Figure 8 shown by the dark broken line in the figure. The differences in the charging and discharging strategies of users are analyzed below.
[0230] It can be seen from Figure 8 the figure that taxis and buses have the longest single-trip mileage. Due to the functionality of logistics vehicles and buses, the charging demands of both are distributed between 9:00 PM and 8:00 AM the next day. At the same time, they basically stop running after 10:00 PM, so both adopt slow charging at night. The discharging time intervals of taxis and private cars are relatively irregular. At the same time, taxis will have obvious charging behaviors around 1:00 PM. Since taxis need to obtain more travel orders during the day, they mostly adopt fast charging. Therefore, the charging duration of taxis is about 1 hour, while the charging demand of private cars is basically concentrated between 12:00 AM and 8:00 AM. Therefore, private car users mostly adopt slow charging at night. Secondly, the driving speeds of the four types of vehicles are basically positively correlated with the real-time traffic flow velocity, and the learning results of user driving strategies are quite satisfactory. In summary, due to different charging and discharging strategies, the differences in the time distribution of charging demands of different users are relatively obvious.
[0231] 2. Prediction of the 24-hour SOC change of a single vehicle
[0232] Here, the prediction results of the user driving speed and mileage are used as the input features of the XGboost algorithm to predict the 24-hour SOC curve of a single vehicle, so as to prove the superiority of the method of the present invention. As Figure 9As shown, four types of electric vehicles are selected according to vehicle usage and compared with the prediction method based on historical SOC. The red line represents the real SOC, the blue line represents the prediction result based on historical SOC, and the sky-blue line represents the prediction result based on real-time traffic flow velocity. The prediction results of both methods for the charging SOC are good, the prediction curves are relatively smooth, and the prediction results are stable. However, there are slight differences in the SOC prediction results during the discharging process. From the comparison of the prediction results for private car users, the stability of the prediction result curves of both methods is poor, with obvious jitters, which may be related to the characteristic distribution of the data itself. However, both methods have grasped the overall change trend of the SOC discharging process well. In the prediction results for taxi users, the method of the present invention shows good stability in the prediction results during the discharging process, but the prediction results of the method based on historical SOC show obvious jitters and outliers in the second half of the discharging process, which is due to the unclear characteristics of historical data. In the SOC prediction results for logistics vehicle users, both methods show good robustness and fitting degree.
[0233] At the same time, it proves the good prediction accuracy of the method of the present invention. As shown in Table 8, four evaluation indicators of regression prediction are selected here. According to these four indicators, the prediction accuracy of the SOC prediction method of the present invention and the prediction method based on historical SOC is compared. Both methods use the same-sized training set to train the network, and the size of the training set is 5000 pieces of data. From the prediction results of the SOC of four types of vehicles, each indicator obtained by the prediction method of the present invention is better than that of the method based on historical SOC. Among them, the average mean square error is reduced by 13%, and the average determination coefficient is increased by 4%. The results prove that the two methods perform basically the same in the prediction of the SOC of logistics vehicles, while in the prediction of the SOC of the other three types of electric vehicles, the prediction accuracy of the method of the present invention is significantly higher than that of the traditional prediction method.
[0234] Table 8 Prediction indicators
[0235]
[0236]
[0237] 3. Prediction of charging demand for regional electric vehicle clusters
[0238] Figure 10 The selected area is the main urban area of a certain city, showing the spatial distribution characteristic map of the charging demand of 1000 electric vehicles within a day. Here, 4 key time points (9:00, 12:00, 18:00, and 24:00) in a day are intercepted, and the unit is kilowatt-hour. Figure 10Only users with charging needs are shown, where each dot represents a vehicle with a charging need, and the size and color depth of the dot represent the amount of energy demand of the user. The total charging demand within each hour of a day is counted. Below, the spatio-temporal distribution characteristics of the charging demand are analyzed based on the above spatio-temporal diagram of the charging demand to prove the effectiveness of the model of the present invention.
[0239] 3.1 Analysis of the temporal distribution of charging demand
[0240] As Figure 11 can be seen, charging peaks occur around 12:00 noon and 6:00 pm, reaching around 150. The charging demand distribution has charging peaks around 12:00 noon and 6:00 pm, and the total charging energy demand reaches around 4500 kW (analyzed in combination with the bar chart). The charging demand enters a trough around 3:00 am. Overall, the temporal distribution of the charging demand is relatively smooth, and the peak period lasts for a relatively long time.
[0241] 3.2 Analysis of the spatial distribution of charging demand
[0242] As Figure 10 shown, from the perspective of the spatial distribution of the charging demand, the charging demand is in the trough period from 12:00 pm to 9:00 am, and there is no obvious aggregated demand. After 9:00 am, the charging demand gradually increases, showing a radial distribution centered on the main urban area. At the same time, dense areas of charging demand appear in the main urban area and the new area, while the charging demand in the suburbs shows a uniform distribution.
[0243] From the perspective of the distribution of the charging energy demand throughout the day, most of the charging energy demand near the city center is distributed below 30 kWh, so the charging users are mainly taxis and private cars, while the charging energy demand in the suburbs is distributed above 60 kWh, which indicates that the charging users are mainly buses. Of course, this is related to the ratio of the number of different vehicle types. In the case of the present invention, taxis account for the majority.
[0244] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention shall be covered by the protection scope of the present invention.
Claims
1. A method for modeling the charging demand of electric vehicles, characterized in that, the method for modeling the charging demand of electric vehicles includes: Analyze the impacts of the differences among electric vehicle users and the performance differences of electric vehicles, and learn the user driving strategies and user travel strategies based on the generative adversarial model; based on XGboost, machine-learn the electric vehicle performance model; prove that the model can extract user driving characteristics and charging characteristics based on the real-time road conditions of Baidu Map; the method for modeling the charging demand of electric vehicles includes the following steps: Step 1, collect the user operation trajectory data set, clean the abnormal points in the data set, and divide the user operation trajectory; construct the input data set for training the user strategy model based on MIC, and construct the 24-hour SOC prediction data set of electric vehicle users as the input data set; Step 2, establish a generator, a value network, and a discriminator neural network based on a linear fully connected network, and initialize the network using the Bayesian hyperparameter optimization method; input the training user trajectory data set, optimize the policy network parameters based on the PPO proximal policy optimization algorithm, and traverse all user trajectories to generate the charge and discharge strategies of all users; Step 3, use the cross-validation method to train the 24-hour SOC prediction model of electric vehicles based on XGboost. The model is divided into a discharge SOC prediction model and a charging SOC prediction model; Step 4, perform path planning on the historical driving trajectories, obtain the real-time traffic flow velocity of the path based on Baidu Map, and predict the 24-hour single-vehicle SOC change curve of all users; combine the user charging urgency to predict the charging demand and energy demand of all users, and establish a spatio-temporal model for predicting the charging demand of the electric vehicle cluster in the area.
2. The method for modeling the charging demand of electric vehicles according to claim 1, characterized in that, Step 1 further includes constructing an input feature data set for the policy network, specifically including: Use the isolation forest to screen abnormal points, and use the multiple imputation method to repair the abnormal points in the data set. Extract the user behavior factors strongly correlated with the change of electric vehicle SOC based on the MIC maximum mutual information coefficient matrix; The original data set includes: As the real-time speed data of the user for 24 hours; As the influencing factor of the user's 24-hour speed change: real-time traffic flow velocity; As the real SOC data of the user for 24 hours; As the influencing factors of the 24-hour SOC change: vehicle speed, single driving mileage, and acceleration.
3. The method for modeling the charging demand of electric vehicles according to claim 1, characterized in that, Step 2 further includes a user strategy learning method based on generative adversarial imitation learning, specifically including: Construct the GAIL algorithm framework; GAIL uses expert data to train the discriminator to train the generator and confuse the judgment of the discriminator, and uses the discriminator to distinguish the data distribution generated by the generator from the real data distribution; Initialize the policy function π 0 , sample trajectories According to the principle of the generative adversarial model, the policy function is updated by ascending the gradient, and the discriminator is updated by descending the gradient, so as to distinguish the probability distributions of real data and generated data; Among them, D(x (i) ) is the probability determination of the discriminator for real data; D(G(z (i) )) is the probability determination of the discriminator for generated data; Generator: Construct the loss function of the generative adversarial network, and use the discriminator to construct the reward function: When the discriminator cannot distinguish the data generated by the generator from the real data, the generator and the discriminator reach the Nash equilibrium, and the generator successfully matches the expert strategy; Based on the PPO algorithm, the parameters of the generator network are optimized. The objectives of the PPO algorithm are as follows: 1) Generalized Advantage Estimation Compare the rewards obtained by performing action a in state s with the rewards obtained by performing the current policy π(s|a) to evaluate the quality of action a, and update the probability p(a|s) of action a in the direction where the advantage estimate is greater than zero; The generalized advantage estimate is as follows: Among them, r t+l is the reward function at the current moment, V(s t+l ) is the state value function at the current moment, and γ is the discount rate of the value function at the previous moment; 2) State-action probability ratio r t (θ): Among them, π θ (a t |s t ) represents the logarithmic probability of a batch of action sets executed by the new policy, and π old (a t |s t ) represents the average action logarithmic probability of executing the old policy; ε is a hyperparameter and is the truncation threshold; the second term modifies the surrogate objective by clipping the probability ratio to eliminate the motivation to move outside the interval (1 - ε, 1 + ε); take the minimum of the clipped and unclipped objectives, so the final objective is a lower bound of the unclipped objective; Among them, 4. The electric vehicle charging demand modeling method according to claim 1, characterized in that the XGboost-based 24-hour SOC prediction method for electric vehicle users in step three includes: According to the input feature analysis, calculate the single-trip mileage curve and the charging time curve based on the 24-hour user speed curve generated by policy learning. Among them, the speed curve and the mileage curve predict the discharge SOC, and the charging time curve predicts the charging SOC; respectively establish a discharge SOC regression prediction model and a charging SOC regression prediction model based on XGboost, and search for the optimal SOC prediction model based on the Bayesian hyperparameter optimization algorithm.
5. The electric vehicle charging demand modeling method according to claim 1, characterized in that step four further includes obtaining real-time traffic flow velocity and vehicle path planning based on Baidu Maps, specifically including: (1) Path planning For path planning, use the real path longitude and latitude coordinate set in the dataset. After processing all the path longitude and latitude coordinates, use the OSMnx library in python to visualize the path and extract the road node coordinates, road nodes and the distance information from the starting node. The path node is the intersection of the path and other roads; Let the data set of each trajectory node be: Among them, Ω j represents the j-th trajectory data set, where j = 1, 2, 3,... and are the longitude and latitude coordinates of the path node and the distance from the starting node, respectively; (2) Large-scale electric vehicle path planning within the region Analyze the influence of the user's driving strategy on the real-time traffic flow velocity, and obtain the real-time average speed of each road section; obtain the driving time T of the road section where the current vehicle coordinates are located based on the real-time information platform of Baidu Map. Let the distances from the adjacent nodes to the starting node be l 1 and l 2 , then the length of the current road section is L = l 1 -l 2 , the time required for the current road section is T t , and the real-time traffic average flow velocity is v t . Calculate the real-time traffic average flow velocity according to the following formula: The spatio-temporal prediction of the charging demand of the regional electric vehicle cluster combined with the charging urgency of users includes: (1) User charging urgency The higher the charging urgency, the greater the probability that the user sends a charging demand signal; (2) Charging demand determination Use the normal distribution to fit the charging start SOC distribution of different users; when the SOC is close to the historical charging start SOC of a certain user and the SOC drops to the charging demand interval of a certain user, the user generates a charging demand, and the charging demand interval is related to the user charging urgency coefficient and the charging start SOC distribution; (3) Prediction of the energy demand of large-scale electric vehicles in the region Based on the SOC prediction results of individual electric vehicles, establish a prediction of the charging energy demand of large-scale electric vehicles within the region; use the charging urgency and charging start SOC of users to predict the charging energy demand of different users. According to the definition of the charging demand interval, when the user's SOC enters the charging demand interval, it is considered that the user has a charging demand, and calculate the charging energy demand of the user, and predict the charging demand of the cluster electric vehicles within the region.
6. An electric vehicle charging demand modeling system for implementing the electric vehicle charging demand modeling method according to any one of claims 1 to 5, characterized in that the electric vehicle charging demand modeling system includes: An input data set construction module, which is used to construct an original data set for the operation of electric vehicles, and divide the original data set into different weights as the input data set; A discriminator neural network, a policy neural network, and a value neural network construction module. The above three parts together constitute a policy learning system; a reinforcement learning environment construction module, which sets a state-action output function and sets the environment state and the action range of the policy network; a PPO algorithm construction module, which optimizes and updates the parameters of the policy network; A single-vehicle 24-hour SOC prediction module, an electric vehicle 24-hour SOC prediction model based on XGboost, which is divided into a discharge SOC prediction model and a charging SOC prediction model; A regional electric vehicle cluster charging demand prediction construction module, which performs path planning based on historical driving trajectories, obtains real-time traffic flow rates of the paths based on Baidu Maps, predicts the 24-hour single-vehicle SOC change curves of all users, combines the charging urgency of users to predict the charging demands and energy demands of all users, and finally predicts the charging demands of the cluster electric vehicles in the region.
7. A computer device, characterized in that, the computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the electric vehicle charging demand modeling method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor executes the electric vehicle charging demand modeling method according to any one of claims 1 to 5.
9. An information data processing terminal, characterized in that, the information data processing terminal is used to implement the electric vehicle charging demand modeling system according to claim 6.