A Method for Energy Consumption Allocation and Prediction of Electric Vehicles on Road Sections
By constructing an electric vehicle travel information data set, performing trajectory fitting and similarity classification, dividing road segments, and using machine learning algorithms to build an energy consumption prediction model, the problem of inaccurate electric vehicle energy consumption prediction in the existing technology is solved, and high-precision energy consumption allocation and route planning are achieved.
Patent Information
- Application Number
- CN202411325704.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2044-09-23
AI Technical Summary
It is difficult for the prior art to establish efficient and accurate energy consumption prediction models in electric vehicle travel routes, especially when considering multiple influencing factors and road segment differences.
By constructing a vehicle travel information data set, trajectory fitting and similarity classification, segments are divided, elevation information is extracted, energy consumption prediction models are constructed using machine learning algorithms, energy consumption allocation is allocated in consideration of the slope differences of the road section, and the model with the highest accuracy is selected for prediction.
It realizes high-precision energy consumption prediction under real road sections, can accurately allocate energy consumption and conduct route planning, and improves the accuracy and efficiency of energy consumption prediction.
Smart Images

Figure CN119314324B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of machine learning, data mining, and intelligent transportation, and particularly relates to a method for allocating and predicting the energy consumption of an electric vehicle on a road section. Background Art
[0002] Nowadays, the environmental problems caused by the energy crisis are becoming increasingly prominent. With the increasing shortage of energy resources and the improvement of environmental protection awareness, higher requirements are put forward for the energy management and utilization efficiency in various industries.
[0003] In the automotive industry, the sales volume of new energy vehicles is increasing day by day. With the popularization of electric vehicles, energy consumption prediction plays a crucial role in this process. Accurate driving energy consumption prediction can solve the problem of "range anxiety" for drivers, and is also the basis for reasonably arranging the charging time of pure electric vehicles and achieving the optimal distribution of charging facilities. It is of great significance for promoting the development of intelligent transportation systems and further promoting the development and popularization of the electric vehicle industry. Therefore, how to accurately predict the energy consumption of electric vehicles with high precision is also a new challenge. In addition, how to accurately allocate the energy consumption in each actual sub-road section is also an important part of energy management.
[0004] In the prior art, the energy consumption of pure electric vehicles is mainly predicted by establishing an energy consumption prediction physical model and a data model. The research on the method based on the physical model mainly focuses on the calibration of each parameter in the energy consumption model and the generation of the speed model. The physical model can be roughly divided into a longitudinal dynamic model and a specific power model. A random speed curve is used to offset the differences in energy consumption caused by different driving behaviors, and then a multiple linear regression model is used for energy consumption prediction. However, since there are many and relatively complex factors affecting the energy consumption of pure electric vehicles, and there are many uncertain factors among various influencing factors, it is difficult for the physical model to describe the relationship between various influencing factors. In recent years, with the rapid development of big data and machine learning algorithms, using data-driven methods to predict the energy consumption of electric vehicles not only avoids the shortcomings of the physical model, but also pushes the method of energy consumption prediction to a new height. Among them, relatively classic machine learning algorithms for predicting the energy consumption of pure electric vehicles include gradient boosting trees, neural networks, random forests, and support vector machines, etc. The main process is to extract energy consumption impact feature factors from aspects such as traffic environment, vehicle state, and driving behavior, and then use machine learning algorithms to establish a prediction model to predict the energy consumption of electric vehicles.
[0005] Although remarkable results have been achieved in the research on energy consumption prediction models, in the actual application process, there is no efficient and accurate energy consumption prediction model established for specific travel route road sections. Summary of the Invention
[0006] To solve the above technical problems, the present invention proposes a method for energy consumption allocation and prediction of electric vehicles on sections, which accurately allocates the energy consumption of sections, establishes models for each section and makes predictions.
[0007] To achieve the above object, the present invention provides a method for energy consumption allocation and prediction of electric vehicles on sections, including:
[0008] Obtain the target driving data of several electric vehicles, and construct a vehicle travel information data set, where the target driving data conforms to the GB / T 32960.3 data standard;
[0009] Based on the vehicle travel information data set, perform vehicle trajectory fitting, classify the similarity of vehicle trajectories, obtain the vehicle trajectory similarity classification result, and select the prediction path through the vehicle trajectory similarity classification result, and obtain all the data on the prediction path;
[0010] Divide the prediction path into several sub-sections, extract the elevation information of each sub-section, determine the energy consumption allocation value of each sub-section and analyze it;
[0011] Based on the energy consumption allocation value, explore the key influencing factors of section energy consumption, construct a quantifiable feature data set, construct an energy consumption prediction model based on a machine learning algorithm according to the quantifiable feature data set, and evaluate the accuracy of the energy consumption prediction model;
[0012] Select the energy consumption prediction model with the highest accuracy for energy consumption allocation and prediction of electric vehicles on sections.
[0013] Preferably, constructing the vehicle travel information data set includes grouping and preprocessing the driving data;
[0014] Among them, the process of grouping is:
[0015] Group the data according to the vehicle number, that is, separate the travel trajectory data of all vehicles into units of each vehicle, analyze the "timestamp daq_time" in all vehicle data, check the time feedback interval of the data information of each vehicle, and use the preset interval as the judgment basis for the single travel trajectory of the vehicle to group the data;
[0016] The process of the preprocessing includes:
[0017] Analyze the abnormal data in the grouped data, eliminate the abnormal data or fill it using a data filling method, and construct the vehicle travel information data set that can be used for research.
[0018] Preferably, performing the vehicle trajectory fitting includes:
[0019] Extract the vehicle trajectory data from the vehicle travel information dataset, and perform vehicle trajectory fitting based on the vehicle GPS trajectory point data in the vehicle trajectory data, that is, fit the vehicle trajectory on the map, and mine the travel patterns of the vehicle, the distribution characteristics of the vehicle origin and destination, the departure time, and the driving route characteristics through visualizing the vehicle trajectory.
[0020] Preferably, obtaining the vehicle trajectory similarity classification result includes:
[0021] Use the DTW algorithm to perform similarity classification on vehicle trajectories. Specifically:
[0022] Construct a distance matrix: First, calculate the distances between all pairs of points in two time series to form a matrix;
[0023] Find the optimal path: Starting from the upper left corner of the matrix and ending at the lower right corner, find the path through dynamic programming so that the sum of the distances of the pairs of points on the path is the smallest, and the path represents the best alignment between the two sequences;
[0024] Calculate the total distance: The sum of the distances of the pairs of points on the path is the DTW distance between the two sequences, and the DTW distance is the similarity;
[0025] Classify the vehicle trajectory similarity through the similarity.
[0026] Preferably, extracting the elevation information of each sub-section includes:
[0027] Based on the longitude and latitude range of the predicted path, divide the predicted path into several sub-sections according to the longitude and latitude, record the longitude and latitude range of each sub-section, and find the corresponding section according to the longitude and latitude range of each section to extract the section elevation information, where the section elevation information includes the slope of the section and the planar length of the section.
[0028] Preferably, the method for determining the energy consumption allocation value of each sub-section includes:
[0029] Use sumo simulation to obtain the influence of slope on vehicle energy consumption. Use the vehicle energy consumption value under the real section slope, and simulate the distance traveled on the slope of each sub-section equivalent to the distance traveled on the planar section at the same energy consumption to obtain the conversion relationship, record the conversion relationships of each section, convert the driving distance in the actual driving data according to the conversion relationship to obtain the planarized distance considering the slope, and reasonably allocate the energy consumption value to the specific sub-sections passed.
[0030] Alternatively, based on the influence of the vehicle's driving speed, vehicle gravity, frictional resistance, and air resistance on vehicle energy consumption, calculate the energy value consumed by the vehicle trajectory in each sub-section of the road. Then, according to the proportion of the energy values consumed in each sub-section, allocate the total energy consumption of the trajectory to obtain the energy consumption allocation value for each sub-section.
[0031] Preferably, analyzing the energy consumption allocation values of the respective sub-sections includes:
[0032] Determine the sub-section of the road passed by this section of the trajectory according to the distribution interval of the data longitude and latitude points, and calculate the distances of each sub-section passed. According to the conversion relationship of each section, convert the driving distances of the vehicle in each sub-section to obtain the planarized distances of each sub-section considering the slope. Divide the total energy consumption by the total planarized distance of the passed sub-sections to obtain the average energy consumption rate, and then allocate the energy consumption according to the planarized distances traveled in each sub-section, that is, multiply the average energy consumption rate by the planarized distances of each sub-section to obtain the energy consumption allocation value for each sub-section passed.
[0033] Preferably, analyzing the energy consumption allocation values of the respective sub-sections further includes:
[0034] Given a preset average speed value, obtain the relationship between the slope and power. Without considering acceleration, estimate the proportion of power between each sub-section, and combine the time intervals of the vehicle passing through the straight sections to obtain the proportion of energy values between each sub-section, and allocate the total energy consumption to obtain the energy consumption allocation value for each sub-section;
[0035] If the vehicle has obvious acceleration and deceleration phases during the driving section, set the road length as L. The vehicle accelerates from the initial speed V0 to the average speed V1 with an average acceleration a, and travels the remaining distance at the average speed V1. At this time, considering the influence of the road section slope, calculate the power W1 during the acceleration phase and the power W2 during the driving phase at the average speed respectively. Add the power W1 and the power W2 to obtain the total energy W consumed by the vehicle. According to the W values calculated in different situations of different road sections, calculate the proportion to allocate the total energy consumption and determine the energy consumption allocation value for each sub-section. Among them, the power W1 during the acceleration phase is obtained by calculating the integral of the power within a given time.
[0036] Preferably, constructing the quantifiable feature data set includes:
[0037] Calculate the average energy consumption rate per kilometer during the entire journey, allocate the energy consumption according to the planarized distances of each sub-section passed, determine the specific energy consumption value of each trajectory segment of each vehicle in each sub-section, divide the specific energy consumption value of each trajectory in each sub-section by the planarized driving distance of this section to obtain the energy consumption rate per kilometer and record it as the target variable, and complete the construction of the quantifiable feature energy consumption data set;
[0038] Alternatively, divide the calculated energy consumption allocation value of each sub-section by the distance traveled by the vehicle trajectory in each sub-section to obtain the energy consumption rate per kilometer and record it as the target variable, thus completing the construction of the quantifiable feature energy consumption dataset.
[0039] Preferably, constructing the energy consumption prediction model based on the machine learning algorithm includes:
[0040] Select feature variables and target variables from the quantifiable feature dataset, establish energy consumption prediction models using the KNN algorithm, neural network, support vector machine, and random forest algorithm respectively, evaluate the accuracy of the energy consumption prediction models under different algorithms through the cross-validation method, calculate the mean absolute percentage error value MAPE, and select the algorithm model with the lowest MAPE value, that is, the energy consumption prediction model based on the machine learning algorithm;
[0041] Among them, the calculation formula of the MAPE is:
[0042] MAPE = (1 / n) * Σ(|(predicted_value - actual_value)| / actual_value) * 100%
[0043] In the formula, n is the number of samples, predicted_value is the predicted value of the model, and actual_value is the actual value of the model.
[0044] Compared with the prior art, the present invention has the following advantages and technical effects:
[0045] In the existing prediction methods, only the energy consumption influencing factors such as traffic environment, vehicle state, and driving behavior are considered to establish models. The present invention is a sub-section energy consumption prediction model established based on actual driving data on real roads. While considering the existing influencing factors, it also considers the differences in different sections of real roads (mainly the influence of section slope differences), and determines the vehicle energy consumption allocation under the influence of different section slopes by providing two different schemes, so as to establish an accurate energy consumption prediction model for energy consumption prediction. Accurately allocate the energy consumption of the actual road according to the driving data. When planning various travel route schemes, the energy consumption prediction model of the real road in any travel route can be built and high-precision energy consumption prediction can be carried out according to this method. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application. In the drawings:
[0047] Figure 1 is a flow chart of a method for electric vehicle section energy consumption allocation and prediction according to an embodiment of the present invention;
[0048] Figure 2 This is the flowchart for judging the trajectory similarity in the embodiments of the present invention;
[0049] Figure 3 This is the flowchart for obtaining the conversion relationship α of each road section by using sumo simulation in the embodiments of the present invention;
[0050] Figure 4 This is the schematic diagram of the energy consumption allocation of road sections in the embodiments of the present invention;
[0051] Figure 5 This is the flowchart for predicting the energy consumption of each road section in the embodiments of the present invention. Detailed implementation manners
[0052] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will describe this application in detail with reference to the drawings and in combination with the embodiments.
[0053] It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that here.
[0054] The present invention proposes a method for allocating and predicting the energy consumption of electric vehicles for each road section, as Figure 1 , including:
[0055] Obtain the target driving data of a number of electric vehicles, construct a vehicle travel information data set, and the target driving data conforms to the GB / T 32960.3 data standard;
[0056] Based on the vehicle travel information data set, perform vehicle trajectory fitting, classify the similarity of vehicle trajectories, obtain the vehicle trajectory similarity classification result, and select the prediction path through the vehicle trajectory similarity classification result, and obtain all the data on the prediction path;
[0057] Divide the prediction path into several sub-road sections, extract the elevation information of each sub-road section, determine the energy consumption allocation value of each sub-road section and perform analysis;
[0058] Based on the energy consumption allocation value, explore the key influencing factors of road section energy consumption, construct a quantifiable feature data set, construct an energy consumption prediction model based on a machine learning algorithm according to the quantifiable feature data set, and evaluate the accuracy of the energy consumption prediction model;
[0059] Select the energy consumption prediction model with the highest accuracy for allocating and predicting the energy consumption of electric vehicles for each road section.
[0060] This embodiment provides a method for energy allocation according to each section of a specific travel route, and then an energy consumption prediction model can be established for energy consumption prediction, which can better carry out travel planning and energy management work. The DTW algorithm is used to classify similar trajectories for the actual driving data trajectory, and the section trajectory for which energy consumption prediction is to be carried out is selected. For the travel trajectory of this section, the entire travel is divided into several sub-sections, and the slope of each sub-section is extracted. Two methods, namely traffic simulation or energy calculation, are proposed to determine the influence relationship between the section slope and energy consumption, so as to accurately allocate the electric vehicle driving energy consumption to each sub-section. Then, a high-precision energy consumption prediction model based on machine learning algorithm can be established and evaluated for the actual section, and accurate energy consumption prediction can be carried out for any travel route according to this method.
[0061] In order to enable electric vehicle energy managers and travelers to obtain accurate energy consumption predictions based on travel routes, this embodiment screens out the route trajectory data required for energy consumption prediction from the actual driving data of multiple pure electric vehicles, and through research work such as data grouping, data preprocessing, trajectory fitting, trajectory classification, energy consumption allocation, construction of a quantifiable feature data set, building an energy consumption prediction model, and model verification and evaluation, a model is established and predicted for each sub-section after accurately allocating the section energy consumption.
[0062] Further, a vehicle travel information data set is constructed, including grouping and preprocessing the driving data;
[0063] Among them, the process of grouping is as follows:
[0064] Data grouping is carried out according to the vehicle number, that is, the travel trajectory data of all vehicles is separated into units of each vehicle, and the "timestamp daq_time" in all vehicle data is analyzed to check the time feedback interval of the data information of each vehicle, and the preset interval is used as the judgment basis for the single travel trajectory of the vehicle for data grouping;
[0065] The process of preprocessing includes:
[0066] Analyze the abnormal data in the grouped data, eliminate the abnormal data or fill it by using a data filling method, and construct the vehicle travel information data set that can be used for research.
[0067] Specifically, the data used in this embodiment conforms to the GB / T 32960.3 data standard, specifically including "id, daq_time, soc, lng, lat, max_temp, min_temp" in the GB / T 32960.3 data standard.
[0068] A large amount of pure electric vehicle driving data information is sorted out, the data structure and the information content are analyzed, and the information feedback interval of each vehicle is determined according to the timestamp information. Generally, the vehicle information feedback time interval is between 5 and 30 seconds. If there is a large time interval, it is considered to be a segmentation of the vehicle's running journey. Therefore, all vehicle travel data is segmented at a time interval of 5 minutes to study the vehicle's single trip. After segmentation, check the data to verify the segmentation effect (whether the vehicle's single trip is separated according to the set time interval). Filter segmentation can automatically process data in Excel by executing a python program (this method can also be used for subsequent data processing).
[0069] The segmented vehicle trajectory data is preprocessed as follows:
[0070] The segmented data is fitted with trajectory visualization. The main operation is to use Amap, Baidu Map, Google Map, etc. as the base map, and then mark the GPS latitude and longitude points of the vehicle trajectory data on the base map and mark the starting and ending points, and then connect all the points with lines to obtain the vehicle trajectory. After visualizing the trajectory, it will be found that there are abnormal situations, such as the loss of the starting and ending points of some trajectories, and the presence of abnormal points in the vehicle trajectory. This is because the data has not been cleaned, so the data must be preprocessed, and the vehicle data must be analyzed to find out the possible reasons for the abnormal situation. In this embodiment, several possible reasons for the abnormality are given: the speed of some vehicle data is 0 or the speed is too high, and there are abnormal points with latitude and longitude of 0. Therefore, it is necessary to remove these abnormal point data. Here, speed, latitude and longitude can be used as limiting conditions to remove abnormal points according to the abnormal situation of the data. After preprocessing all vehicle travel data, refit to check the fitting effect. After the abnormal situation is eliminated, the trajectory file after data preprocessing is used as the vehicle travel information data set for research.
[0071] Furthermore, vehicle trajectory fitting is performed, including:
[0072] The vehicle trajectory data in the vehicle travel information dataset is extracted, and the vehicle trajectory is fitted according to the vehicle GPS trajectory point data in the vehicle trajectory data, that is, the vehicle trajectory is fitted in the map, and the vehicle travel rules and the distribution characteristics of the vehicle's starting and ending points, departure time and driving route characteristics are mined through the visualization of the vehicle trajectory.
[0073] Specifically, based on the constructed vehicle travel information dataset, vehicle trajectory fitting is performed according to the vehicle GPS trajectory point data (lng, lat) in each segment of vehicle trajectory data, that is, the vehicle trajectory is fitted in the map (generally Amap, Baidu Map, OSM Map can be used), and the travel patterns of vehicles, the distribution characteristics of vehicle starting and ending points, departure time and driving route characteristics are mined through the visualization of vehicle trajectories.
[0074] In this embodiment, the OSM map is used as the base map. On the base map, the trajectory points of all vehicles are connected by the method of folium.PolyLine to obtain the single-trip trajectory map of each vehicle; and the OD points of the trajectory are marked on the base map by the method of folium.Marker. All vehicle trajectories are fitted and an html file is generated for viewing (which can be done by executing a py program). By visualizing the vehicle trajectories, the travel patterns of the vehicles, the distribution characteristics of the vehicle origin and destination points, and the driving route characteristics are mined.
[0075] Furthermore, obtaining the vehicle trajectory similarity classification result includes:
[0076] The DTW algorithm is used to classify the similarity of vehicle trajectories. Specifically:
[0077] Construct a distance matrix: First, calculate the distances between all pairs of points in two time series to form a matrix;
[0078] Find the optimal path: Starting from the upper left corner of the matrix and ending at the lower right corner, find the path through dynamic programming such that the sum of the distances of the point pairs on the path is the smallest. Then the path represents the optimal alignment between the two sequences;
[0079] Calculate the total distance: The sum of the distances of the point pairs on the path is the DTW distance between the two sequences, and the DTW distance is the similarity;
[0080] Classify the vehicle trajectory similarity through the similarity.
[0081] Specifically, the travel trajectories of all vehicles are classified by similarity to find the main prediction path trajectories to be predicted. In this embodiment, the DTW algorithm is used to classify the similarity of vehicle trajectories. The classification process of the DTW algorithm is shown in the appendix Figure 2 , and the main idea of trajectory classification is to find several trajectories with higher fitting accuracy as standard trajectories in all generated vehicle visualization trajectory files, and then classify all other trajectories according to the DTW algorithm. (The classification can be executed by a python program) After classification, all data on the main path to be predicted is found in the trajectories.
[0082] Furthermore, extracting the elevation information of each sub-section of the road includes:
[0083] Based on the longitude and latitude range of the predicted path, the predicted path is divided into several sub-sections according to the longitude and latitude. Record the longitude and latitude range of each sub-section, and find the corresponding section according to the longitude and latitude range of each section to extract the elevation information of the section. The elevation information of the section includes the slope of the section and the planar length of the section.
[0084] Specifically, the main prediction path is divided into several sub-sections according to longitude and latitude. The main path can be arbitrarily divided into several sub-sections according to the need of travel route energy consumption prediction. Baidu Map, Gaode Map, and OSM Map can be used to divide the road sections and determine the longitude and latitude ranges. Record the longitude and latitude ranges of each sub-section. In Google Earth, find the corresponding road section according to the longitude and latitude range of each section and extract the elevation information of the road section (each point on the road has a corresponding elevation, and the slope of the road is obtained by using the elevation difference). Extract the slope θ of the road section and the planar length of the road section and record them. Since the actual energy consumption data is collected during driving on real road sections and is affected by the slope, the slope of different road sections affects the energy consumption allocation value of the vehicle in each sub-section, and this value generally cannot be directly obtained from the data (the minimum unit of the energy consumption value in the data is 1). Therefore, two solutions are provided in this embodiment to determine the energy consumption allocation value of each sub-section, so as to establish an accurate energy consumption prediction model for each sub-section subsequently.
[0085] Further, the method for determining the energy consumption allocation value of each sub-section includes:
[0086] Use sumo simulation to obtain the influence of slope on vehicle energy consumption. Use the vehicle energy consumption value under the real road section slope to simulate and obtain the distance traveled on the slope of each sub-section equivalent to the distance traveled on the planar road section when the energy consumption is the same to obtain the conversion relationship. Record the conversion relationships of each road section. Convert the travel distance in the actual travel data according to the conversion relationship to obtain the planarized distance considering the slope, and reasonably allocate the energy consumption value among the sub-sections passed through specifically.
[0087] Or, based on the influence of vehicle driving speed, vehicle gravity, frictional resistance, and air resistance on vehicle energy consumption, calculate the energy value consumed by the vehicle trajectory in each sub-section, and then allocate the total energy consumption of the trajectory according to the proportion of the energy value consumed by each sub-section to obtain the energy consumption allocation value of each sub-section.
[0088] Specifically, Solution 1: Use sumo simulation to obtain the influence of slope on vehicle energy consumption, and obtain the conversion coefficient α of the energy consumption of each sub-section considering the slope equivalent to the distance traveled on the planar road section. Refer to the appendix Figure 3Using the netedit software in sumo simulation, select one of the sub - sections, draw a simple straight - line section, and then determine the OD points according to the elevation and length information L0, and save the road network file. Then write the vehicle flow rou file (only one electric vehicle needs to be set) and the sumocfg file for simulation, and determine the vehicle energy consumption through the simulation result Battery.out.xml file. Then adjust the road network file, change the section to a flat section (i.e., the elevations of the OD points are the same), and adjust the section length L1 to make the energy consumption reach the same energy consumption as the previous simulation. At this time, the driving distance equivalent to the flat section considering the road slope is obtained, and the distance conversion coefficient α = L1 / L0 of each section is calculated. Perform this operation on all sub - sections to be predicted and record the conversion coefficient α of each section so that the energy consumption value can be reasonably distributed among the specific sub - sections of the route later.
[0089] Solution 2: Considering the influence of vehicle driving speed, vehicle gravity, frictional resistance, and air resistance on vehicle energy consumption under different road slopes, the invention provides a method to calculate the energy consumption value consumed by the vehicle trajectory in each sub - section. By calculating the power P of the vehicle trajectory on each sub - section, and then using the formula W = Pt (W is energy, t is the travel time interval of this sub - section) to calculate the energy consumption value of each sub - section. According to the proportion of the energy consumption value of each sub - section, the total energy consumption of the trajectory is allocated to obtain the energy consumption allocation value of each sub - section.
[0090] Furthermore, analyze the energy consumption allocation values of each sub - section, including:
[0091] Determine the sub - sections passed by this section of the trajectory according to the distribution interval of the data longitude and latitude points, calculate the distances passed by each sub - section, convert the driving distances of the vehicle in each sub - section according to the conversion relationship of each section to obtain the flat - surface distances considering the slope of each sub - section. Divide the total energy consumption by the total flat - surface distance of the passed sub - sections to obtain the average energy consumption rate, and then allocate the energy consumption according to the flat - surface distances traveled in each sub - section, that is, multiply the average energy consumption rate by the flat - surface distance of each sub - section to obtain the energy consumption allocation value of each passed sub - section.
[0092] Specifically, since the electric vehicle power consumption in the data is in units of 1, and the energy consumption of 1 may pass through more than one sub - section divided, obviously it does not meet the requirement of finding the specific energy consumption of any section in the path. Therefore, it is necessary to separate the trajectory with a complete energy consumption of 1 in each vehicle trajectory. Separate the data segments with a complete energy consumption value of 1 from the travel information dataset again to obtain a new data file (the subsequent prediction work is carried out based on the separated data file). For the above - mentioned two solutions, this embodiment provides two solutions to determine the energy consumption allocation value of the sub - section:
[0093] Scheme 3: Determine which sub - sections the trajectory passes through according to the distribution interval of the data longitude and latitude points, and calculate the distances passed through each sub - section (the distance can be calculated as the great - circle distance based on the longitude and latitude of the OD points of the trajectory). According to the conversion coefficient α of each sub - section in the above Scheme 1, convert the driving distances of the vehicle in each sub - section to obtain the planarized distances considering the slope of the vehicle in each sub - section. Divide the total energy consumption by the total planarized distance of the passed sub - sections to obtain the average energy consumption rate, and then allocate the energy consumption according to the planarized distances traveled in each sub - section, that is, multiply the average energy consumption rate by the planarized distance of each sub - section to obtain the specific energy consumption value of each passed sub - section and record it, referring to the appendix Figure 4 , for subsequent establishment of a quantifiable feature data set.
[0094] Scheme 4: Determine which sub - sections the trajectory passes through according to the distribution interval of the data longitude and latitude points, calculate the distances passed through each sub - section (the distance can be calculated as the great - circle distance based on the longitude and latitude of the OD points of the trajectory), and record them. Considering the influence of the vehicle's driving speed, vehicle gravity, frictional resistance, and air resistance on vehicle energy consumption under different road slopes, as well as some energy losses, the power of the vehicle on each sub - section can be calculated according to the following formula:
[0095]
[0096] In the formula, θ is positive for uphill and negative for downhill, r is the conductor resistance, R t is the effective radius of the electric vehicle tire, K is the product of the armature constant and the magnetic flux, m is the vehicle mass, a is the acceleration, k is the aerodynamic drag coefficient, v is the vehicle speed, f r is the rolling resistance coefficient, g is the acceleration due to gravity, θ is the road slope; the first half of the formula represents fixed energy losses. For the same vehicle, r, R t , K are all constant (general values: r = 0.11Ω, R t = 0.5m, K = 10.08Vs); the second half considers the influence of the force F.
[0097] Among them, the vehicle mass m is given according to the vehicle data, the variable road slope θ has been extracted in the above steps, the speed v can be extracted from the trajectory data to calculate the average speed, and the acceleration a can be calculated according to the formula V2 = V1 + a 12 *t 12 (t 12 is the time interval between two adjacent data points of the trajectory, V1 and V2 are the speed values of two adjacent data points of the trajectory) to calculate the acceleration between every two adjacent data points, and the sum of them is averaged to obtain the average acceleration a; other parameters are generally taken as: k = 1.3kg / m 3 、f r= 0.006, g = 9.81 m / s 2 。
[0098] After obtaining the vehicle power P value of each sub - section, extract the time interval t between the OD points of each sub - section. Assume that the power values of sub - section L1 and sub - section L2 are P1 and P2 respectively. Use the formula W = Pt (where W is energy and t is the time interval between the OD points of this sub - section) to obtain the ratio of the energy values of each sub - section, that is, W1 / W2 = P1*t1 / P2*t2. Based on this, allocate the total energy consumption 1 according to the ratio to obtain the energy consumption allocation value of each sub - section.
[0099] Furthermore, analyzing the energy consumption allocation values of each sub - section also includes:
[0100] Given a preset average speed value, obtain the relationship between slope and power. Without considering acceleration, estimate the ratio of powers between each sub - section, and combine the time interval when the vehicle passes through the straight - line section to obtain the ratio of energy values between each sub - section, and allocate the total energy consumption to obtain the energy consumption allocation value of each sub - section;
[0101] If there are obvious acceleration and deceleration stages during the driving section of the vehicle, set the road length as L. The vehicle accelerates from the initial speed V0 to the average speed V1 with an average acceleration a, and travels the remaining distance at the average speed V1. At this time, considering the influence of the road slope, calculate the power W1 during the acceleration stage and the power W2 during the stage of traveling at the average speed respectively. Add the powers W1 and W2 to obtain the total energy W consumed by the vehicle. According to the W values calculated under different conditions in different sections, calculate the ratio to allocate the total energy consumption and determine the energy consumption allocation value of each sub - section. Among them, the power W1 during the acceleration stage is obtained by calculating the integral of power within a given time.
[0102] Specifically, in order to simplify the frequent power calculation process, this embodiment gives two cases according to the above - mentioned solution 4:
[0103] Case 1: Given a preset average speed value, obtain the relationship between the slope θ and power. (Without considering acceleration), approximately estimate the ratio of powers between each sub - section, and combine the time interval t between the OD points of the sub - section to obtain the ratio of the energy value W between each sub - section, so as to allocate the total energy consumption 1 to obtain the energy consumption allocation value of each sub - section.
[0104] Case 2: If there is an obvious acceleration or deceleration stage on the road section, that is, the acceleration a≠0, set the road length L. The vehicle accelerates from the initial speed V0 to an average speed value V1 with an average acceleration a, and then travels the remaining distance at this average speed value V1. In this process, considering the influence of the road section slope θ, calculate the work W1 in the acceleration stage (the calculation method is the same if there is an obvious deceleration stage) and the work W2 in the stage of traveling at the average speed respectively. The sum of the two is the total energy W consumed by the vehicle. According to the W values calculated under different road sections and different situations, calculate the ratio to allocate the total energy consumption 1, and determine the energy consumption allocation value of each sub-road section.
[0105] The work W1 in the acceleration stage can be obtained by calculating the integral of power over a given time, and the steps are as follows:
[0106] 1. Calculate the acceleration time: First, according to the given acceleration a and the speed change (from the initial speed V0 to the final average speed V1), calculate the time required for the vehicle to accelerate. This is calculated by the following formula:
[0107]
[0108] t0 is the time used in the acceleration stage.
[0109] 2. The speed as a function of time, the formula is: V1(t) = V0 + a * t0
[0110] 3. Calculate the power: Calculate according to the formula for calculating power P given in Scheme 4. The power P is calculated based on the current instantaneous speed V(t) and the angle θ.
[0111] 4. Calculate the work: Use the numerical integration method, the formula is:
[0112] The work W2 in the stage of traveling at the average speed (which can be regarded as uniform motion) is calculated as follows:
[0113] 1. Calculate the uniform motion time:
[0114]
[0115] In the formula, L is the total length of the road section, and t1 is the uniform motion time.
[0116] 2. Calculate the power in the uniform motion stage: Substitute the speed V1 into the power P calculation formula (at this time a = 0), and the power P calculation formula is:
[0117]
[0118] 3. Calculate the work W2, the formula is:
[0119] Finally, calculate the total work W = W1 + W2. According to different road section lengths L and slopes θ, calculate the W values in different cases, and calculate the W value ratio to allocate the total energy consumption of 1 to obtain the energy consumption allocation value of each sub-road section.
[0120] So far, the method for allocating the energy consumption of an electric vehicle based on the GB / T 32960.3 data standard in this embodiment has been completed, and the subsequent energy consumption prediction steps can be carried out according to the energy consumption allocation result.
[0121] Furthermore, construct a quantifiable feature data set, including:
[0122] In this embodiment, various factors such as vehicle speed, driving distance, temperature, and travel time are optionally used as feature variables to calculate the energy consumption rate per kilometer on average during the entire journey. According to the planarized distance of each sub-road section passed, the energy consumption is allocated to determine the specific energy consumption value of each vehicle's each trajectory segment in each sub-road section. Divide the specific energy consumption value of each trajectory in each sub-road section by the planarized driving distance in this section to obtain the energy consumption rate per kilometer and record it as the target variable, thus completing the construction of the quantifiable feature energy consumption data set;
[0123] Or, divide the energy consumption allocation value of each sub-road section calculated by the distance traveled by the vehicle trajectory in each sub-road section to obtain the energy consumption rate per kilometer and record it as the target variable, thus completing the construction of the quantifiable feature energy consumption data set.
[0124] Specifically, in this embodiment, there are influencing factors such as vehicle service life, vehicle battery type, travel time, temperature, vehicle speed, and road section characteristics. By studying several trajectory data segments with a complete energy consumption of 1, find out the specific road sections passed by each sub-trajectory, determine the route of each sub-trajectory, and then extract features such as temperature (calculate the average temperature of the sub-trajectory journey), travel time (time difference between OD points), calculate the total driving distance (calculate the great circle distance according to the longitude and latitude of the trajectory OD points), average vehicle speed, etc. from the trajectory segment data and record them in excel to establish a quantifiable feature data set, which will be used as model feature variables for input later. The quantifiable feature data set should also include the energy consumption rate per kilometer of each vehicle trajectory on each sub-road section, as the goal for subsequent model establishment, referring to the appendix Figure 5 。
[0125] For the calculation of the energy consumption rate per kilometer, two methods are provided respectively according to the two schemes proposed in the above technical solutions:
[0126] Method 1: Calculate the energy consumption rate per kilometer on average for the entire journey (1 / total flattened distance of the section) (where the total flattened distance of the section is the sum of the distances after flattening all sub-sections after the simulation of Scheme 1). Allocate energy consumption according to the flattened distance of each sub-section passed, determine the specific energy consumption value of each trajectory segment of each vehicle in each sub-section (mentioned in Scheme 3), divide the specific energy consumption value of each trajectory in each sub-section by the flattened driving distance in that section to obtain the energy consumption rate per kilometer and record it. As the target variable for subsequent model building, the construction of the quantifiable feature energy consumption dataset is completed (including trajectory vehicle information, selected feature variables, target variables).
[0127] Method 2: Divide the energy consumption allocation value calculated for each sub-section in Scheme 4 by the distance traveled by the vehicle trajectory in each sub-section to obtain the energy consumption rate per kilometer and record it. As the target variable for subsequent model building, the construction of the quantifiable feature energy consumption dataset is completed (including trajectory vehicle information, selected feature variables, target variables).
[0128] According to the actual situation, two different sets of quantifiable feature datasets can be constructed using the two schemes, and the optimal one can be selected by comparing the effects of the two datasets when building the model subsequently.
[0129] Furthermore, construct an energy consumption prediction model based on machine learning algorithms, including:
[0130] Select feature variables and target variables from the quantifiable feature dataset, establish energy consumption prediction models using the KNN algorithm, neural network, support vector machine, and random forest algorithm respectively, evaluate the accuracy of the energy consumption prediction models under different algorithms through the cross-validation method, calculate the mean absolute percentage error value MAPE, and select the algorithm model with the lowest MAPE value, that is, the energy consumption prediction model based on machine learning algorithms;
[0131] Among them, the feature variables include travel time, temperature, and average vehicle speed, and the target variable is the energy consumption rate per kilometer of the vehicle.
[0132] The calculation formula of MAPE is:
[0133] MAPE = (1 / n) * Σ(|(predicted_value - actual_value)| / actual_value) * 100%
[0134] In the formula, n is the number of samples, predicted_value is the predicted value of the model, and actual_value is the actual value of the model.
[0135] Specifically, based on the established quantifiable feature energy consumption dataset, with travel time, temperature, and average vehicle speed as feature variables for input, and the vehicle energy consumption rate per kilometer (energy consumption per sub-section / planarized distance of the sub-section) as the target variable, algorithms such as the KNN algorithm, neural network, support vector machine, and random forest are used to establish energy consumption prediction models respectively (in this embodiment, 80% of the dataset is used as the training set for model training, and 20% is used as the test set to verify the model accuracy). The accuracy of the energy consumption prediction models under different algorithms can be evaluated under 5-fold to 10-fold cross-validation.
[0136] Finally, select the algorithm model with the lowest MAPE value (highest accuracy) for energy consumption prediction work. The model establishment method in the present invention can be used to build models and perform energy consumption prediction for each real road section, so as to better select and plan travel routes.
[0137] The present invention is a sub-section energy consumption prediction model established based on actual driving data on real road sections. While considering existing influencing factors, it also takes into account the differences between different road sections in real road sections (mainly the influence of road section slope differences). Two different schemes are provided in the invention to determine the vehicle energy consumption distribution under the influence of different road section slopes, so as to establish an accurate energy consumption prediction model for energy consumption prediction. According to the driving data, accurate energy consumption distribution for the actual road section is carried out. When planning multiple travel route schemes, the method can be used to build an energy consumption prediction model and perform high-precision energy consumption prediction for the real road sections in any travel route.
[0138] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An energy consumption allocation and prediction method for an electric vehicle on a road section, characterized in that, Including: Obtain the target driving data of a number of electric vehicles, and construct a vehicle travel information data set, where the target driving data conforms to the GB / T 32960.3 data standard; Based on the vehicle travel information data set, perform vehicle trajectory fitting, classify the similarity of vehicle trajectories, obtain the vehicle trajectory similarity classification result, and select a prediction path through the vehicle trajectory similarity classification result, and obtain all the data on the prediction path; Divide the prediction path into several sub-sections, extract the elevation information of each sub-section, determine the energy consumption allocation value of each sub-section and conduct an analysis; among them, the elevation information of the section includes the slope of the section and the planar length of the section; The method for determining the energy consumption allocation value of each sub-section includes: Use sumo simulation to obtain the influence of slope on vehicle energy consumption, use the vehicle energy consumption value under the real section slope, simulate the distance traveled on the slope of each sub-section at the same energy consumption equivalent to the distance traveled on the planar section to obtain the conversion relationship, record the conversion relationship of each section, convert the travel distance in the actual travel data according to the conversion relationship, obtain the planarized distance considering the slope, and reasonably allocate the energy consumption value in the specific sub-section passed; Based on the energy consumption allocation value, explore the key influencing factors of section energy consumption, construct a quantifiable feature data set, construct an energy consumption prediction model based on machine learning algorithms according to the quantifiable feature data set, and evaluate the accuracy of the energy consumption prediction model; Select the energy consumption prediction model with the highest accuracy for electric vehicle section energy consumption allocation and prediction.
2. The method for allocating and predicting the energy consumption of an electric vehicle section according to claim 1, wherein Constructing the vehicle travel information data set includes grouping and preprocessing the travel data; Among them, the process of grouping is: Group the data according to the vehicle number, that is, separate the travel trajectory data of all vehicles into units of each vehicle, analyze the "timestamp daq_time” in all vehicle data, check the time feedback interval of the data information of each vehicle, and use the preset interval as the judgment basis for the single travel trajectory of the vehicle to group the data; The process of the preprocessing includes: Analyze the abnormal data in the grouped data, eliminate the abnormal data or fill it by using the data filling method, and construct the vehicle travel information data set that can be used for research.
3. The electric vehicle section energy consumption allocation and prediction method according to claim 1, characterized in that Performing the vehicle trajectory fitting includes: Extract the vehicle trajectory data in the vehicle travel information data set, and perform vehicle trajectory fitting according to the vehicle GPS trajectory point data in the vehicle trajectory data, that is, fit the vehicle trajectory on the map, and mine the travel rules of the vehicle and the distribution characteristics of the vehicle origin and destination, departure time and driving route characteristics through visualizing the vehicle trajectory.
4. The method for allocating and predicting energy consumption of an electric vehicle on a road section according to claim 3, wherein Obtaining the vehicle trajectory similarity classification result includes: Use the DTW algorithm to classify the similarity of vehicle trajectories, specifically: Construct a distance matrix: First calculate the distance between all pairs of points in two time series to form a matrix; Finding the optimal path: Starting from the upper left corner of the matrix and ending at the lower right corner, find the path through dynamic programming such that the sum of the pairwise distances on the path is minimized, and the path represents the optimal alignment between the two sequences; Calculating the total distance: The sum of the pairwise distances on the path is the DTW distance between the two sequences, and the DTW distance is the similarity; Classifying the similarity of the vehicle trajectories according to the similarity.
5. The method for allocating and predicting the energy consumption of an electric vehicle section according to claim 1, wherein Extracting the elevation information of each sub-section of the road, including: Based on the longitude and latitude range of the predicted path, divide the predicted path into several sub-sections according to longitude and latitude, record the longitude and latitude range of each sub-section, and find the corresponding section according to the longitude and latitude range of each section to extract the elevation information of the section.
6. The method for allocating and predicting the energy consumption of an electric vehicle section according to claim 5, wherein The method for determining the energy consumption allocation value of each sub-section further includes: Based on the influence of the vehicle's driving speed, vehicle gravity, frictional resistance, and air resistance on vehicle energy consumption, calculate the energy value consumed by the vehicle trajectory in each sub-section, and then allocate the total energy consumption of the trajectory according to the ratio of the energy values consumed in each sub-section to obtain the energy consumption allocation value for each sub-section.
7. The method for allocating and predicting the energy consumption of an electric vehicle section according to claim 6, characterized in that, Analyzing the energy consumption allocation values of each sub-section, including: Determine the sub-sections passed by the trajectory segment according to the distribution interval of the data longitude and latitude points and calculate the distances passed through each sub-section. Convert the driving distances of the vehicle in each sub-section according to the conversion relationship of each section to obtain the planarized distance considering the slope of each sub-section. Divide the total energy consumption by the total planarized distance of the passed sub-sections to obtain the average energy consumption rate, and then allocate the energy consumption according to the planarized distance traveled in each sub-section, that is, multiply the average energy consumption rate by the planarized distance of each sub-section to obtain the energy consumption allocation value for each passed sub-section.
8. The method for allocating and predicting the energy consumption of an electric vehicle section according to claim 6, characterized in that, Analyzing the energy consumption allocation values of each sub-section further includes: Given a preset average speed value, obtain the relationship between the slope and power. Without considering acceleration, estimate the ratio of power between each sub-section, and combine the time intervals of the vehicle passing through the straight sections to obtain the ratio of energy values between each sub-section, and allocate the total energy consumption to obtain the energy consumption allocation value for each sub-section; If the vehicle has obvious acceleration and deceleration stages during the driving section, set the road length as L. The vehicle accelerates from the initial speed V0 to the average speed V1 with an average acceleration a, and travels the remaining distance at the average speed V1. At this time, considering the influence of the road slope, calculate the energy W1 in the acceleration stage and the energy W2 in the stage of traveling at the average speed respectively. Add the energy W1 and the energy W2 to obtain the total energy W consumed by the vehicle. Calculate the ratio based on the W values calculated in different sections and different situations to allocate the total energy consumption and determine the energy consumption allocation value for each sub-section. Among them, the energy W1 in the acceleration stage is obtained by calculating the integral of the power within a given time.
9. The method for allocating and predicting energy consumption of an electric vehicle section according to claim 1, characterized in that Constructing the quantifiable feature data set, including: Calculate the average energy consumption rate per kilometer during the entire journey, allocate the energy consumption according to the flattened distance of each sub-section passed, determine the specific energy consumption value of each trajectory segment of each vehicle in each sub-section, divide the specific energy consumption value of each trajectory in each sub-section by the flattened driving distance in that section to obtain the energy consumption rate per kilometer and record it as the target variable, and complete the construction of the quantifiable feature energy consumption dataset; Alternatively, divide the energy consumption allocation value calculated for each sub-section by the distance traveled by the vehicle trajectory in each sub-section to obtain the energy consumption rate per kilometer and record it as the target variable, and complete the construction of the quantifiable feature energy consumption dataset.
10. The method for allocating and predicting the energy consumption of an electric vehicle section according to claim 9, wherein, Construct the energy consumption prediction model based on the machine learning algorithm, including: Select feature variables and target variables from the quantifiable feature dataset, establish energy consumption prediction models using the KNN algorithm, neural network, support vector machine, and random forest algorithm respectively, evaluate the accuracy of the energy consumption prediction models under different algorithms through the cross-validation method, calculate the mean absolute percentage error value MAPE, and select the algorithm model with the lowest MAPE value, that is, the energy consumption prediction model based on the machine learning algorithm; Among them, the calculation formula of the MAPE is: MAPE=(1 / n)*Σ(|(predicted_value-actual_value)| / actual_value)*100% In the formula, n is the number of samples, predicted_value is the predicted value of the model, and actual_value is the actual value of the model.
Citation Information
Patent Citations
Method, system and product for predicting energy consumption related characteristics in navigation travel
CN116109000A
Method and system for predicting range of an electric vehicle
EP3992023A1