An electric vehicle road energy consumption mapping method
Patent Information
- Application Number
- CN202311548039.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-11-20
AI Technical Summary
由于车用动力电池内部电化学反应机理复杂,目前通过传感器仍无法精确获取能耗,现有技术普遍采用基于数据驱动的能耗分析方式,例如专利公开号为CN111785012A、CN114925155A等的中国专利申请
[0041]上述本发明所提供的电动汽车道路能耗地图绘制方法,其基于现阶段已相当成熟的GB/T 32960格式车辆大数据,通过依次执行行驶片段切分、数据清洗、特征提取等多种手段,在车辆能耗与不同道路之间建立起了对应关系,从而能够动态反映多种车型电动汽车在实际道路上行驶时的真实能耗水平,有助于对海量电动汽车的能耗实现更高效准确的分析与管理,同时也可以降低系统的计算成本。
Smart Images

Figure CN117589470B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electric vehicle energy consumption analysis and management technology, specifically relating to a method for drawing road energy consumption maps of electric vehicles. Background Technology
[0002] Due to the influence of various factors such as usage environment and driving habits, the actual energy consumption of different types of electric vehicles varies greatly. Even for the same vehicle, its energy consumption level will not be completely consistent under different seasons, temperatures, and other operating conditions. Because the electrochemical reaction mechanism inside vehicle power batteries is complex, current sensors cannot accurately obtain energy consumption data. Existing technologies generally adopt data-driven energy consumption analysis methods, such as Chinese patent applications with publication numbers CN111785012A and CN114925155A. However, these existing technologies use their own proposed standards for big data extraction, statistics, and calculation, resulting in insufficient universality and high system computational costs. Therefore, how to provide an accurate and practical electric vehicle energy consumption analysis and management method that reflects differences in different road environments, and fully utilize the relatively mature and universally applicable national standard real-vehicle big data, is an urgent technical problem to be solved in this field. Summary of the Invention
[0003] In view of this, and to address the technical problems existing in this field, the present invention provides a method for drawing road energy consumption maps for electric vehicles, specifically including the following steps:
[0004] Step 1: Extract the original vehicle data in GB / T 32960 format for each electric vehicle in use. Each original data frame consists of VIN, vehicle type, vehicle status, charging status, longitude, latitude, time, cumulative mileage, SOC, vehicle speed, and total energy field of on-board energy storage device type.
[0005] Step 2: Extract a corresponding dataset from the original data of each electric vehicle.
[0006] Step 3: Extract the driving frame corresponding to the driving status from the vehicle driving, parking or charging status data frames in the dataset corresponding to each vehicle.
[0007] Step 4: Perform preliminary segmentation of driving frames, and add a number field corresponding to the segment to which each data frame belongs;
[0008] Step 5: Check the data after the initial driving segment segmentation to see if there are any segments that are too short, and remove the segments that are too short.
[0009] Step 6: Check the data remaining after removing excessively short driving segments for missing values and data anomalies that exceed reasonable range. Perform data cleaning processing, including null value filling and deletion of driving segments, for specific anomaly patterns. Then merge the datasets of each vehicle.
[0010] Step 7: Convert the latitude and longitude data of each initially segmented driving segment to the platform's coordinate format using the coordinate conversion service of the digital map open platform and store it in a newly added field. Then, iterate through all driving segments, input the converted coordinates, data acquisition time, and vehicle speed into the trajectory correction service interface provided by the platform for road correction, and store the corrected latitude and longitude coordinates in two newly added fields respectively. Input the corrected latitude and longitude coordinates, data acquisition time, and vehicle speed into the trajectory road attribute query service interface of the platform to query the road name and road level data corresponding to each data frame and store them in newly added fields with the same name respectively. Input the corrected latitude and longitude coordinates into the reverse geocoding service interface provided by the platform to obtain the road ID data corresponding to each frame and store it in a newly added field with the same name. This completes the identification of the roads traversed by each initially segmented driving segment.
[0011] Step 8: Traverse the road class field of each frame of the initially segmented driving segment, take consecutive data frames with the same road class in the segment as new secondary segments, then detect and remove excessively short secondary segments, thereby completing the secondary segmentation of all driving segments and obtaining secondary segments with the corresponding unique road class.
[0012] Step 9: For any vehicle traveling on the same level road in a single continuous journey, extract feature data from the corresponding sub-segments, including: vehicle type, VIN, start time, end time, road level, energy consumption per unit distance, and average speed, and establish a basic energy consumption database for the sub-segments; use the basic energy consumption database to statistically obtain a three-dimensional basic energy consumption lookup table of vehicle type, road level, and average speed.
[0013] Step 10: Traverse the road ID field of each frame in the initially segmented driving segment, and take consecutive data frames with the same road ID in the segment as new secondary segments. This completes the secondary segmentation of all driving segments, obtaining secondary segments with corresponding unique road IDs. Traverse all secondary segments with corresponding unique road IDs and extract features including: vehicle type, VIN, start time, end time, road ID, road name, road grade, SOC change, average speed, basic energy consumption, and energy consumption per unit mileage. Store these features in the same fields of the newly created segment feature data frames. Integrate all the obtained segment feature data frames to obtain the road energy consumption database.
[0014] Step 11: Based on the requirements for road energy consumption map drawing, set a series of constraints including vehicle type, number of vehicles, area range, and time range, and extract data frames that meet the requirements from the road energy consumption database based on these constraints; for different vehicle types, perform standardization processing on the energy consumption data per unit mileage of each vehicle type to make the distribution of energy consumption of each vehicle type approximately uniform.
[0015] Step 12: Statistically analyze the energy consumption of all secondary segments of each vehicle on the same road to obtain the corresponding energy consumption level of the road; generate a hierarchical statistical road network map based on the energy consumption level of each road, i.e., a road energy consumption map.
[0016] Further, in step two, the dataset corresponding to each electric vehicle is extracted, specifically based on the VIN field in the original data; in step three, the driving frames are extracted from the original data based on the values of the vehicle status and charging status fields; when performing the initial segmentation, 120s is selected as the segmentation time interval threshold. After arranging the driving frame data of a certain vehicle in chronological order, all data frames are traversed. If the time interval between the current and subsequent frames exceeds the above time interval threshold, the previous frame is identified as the end frame of the current segment, and the next frame is identified as the start frame of the new segment. All segments are numbered, and a new field recording the segment number is added to all data frames to complete the initial segmentation.
[0017] Furthermore, in step five, the system determines whether a driving segment is too short based on a preset threshold for the change in SOC within that segment, and deletes driving segments with a change in SOC less than that threshold.
[0018] Furthermore, in step six, the following cleaning processes are performed for different abnormality patterns: ① If there is no abnormality, no processing is performed on the driving segment data; ② If a single frame is abnormal, for continuous variables that are not the beginning or end frames of the segment, linear interpolation is used to fill the null values with the data from the preceding and following frames; otherwise, the data from the nearest frame is used to directly fill the null values; ③ If multiple consecutive frames are abnormal, the driving segment is deleted.
[0019] Furthermore, in step seven, the Gaode Map Open Platform is specifically selected. By sequentially performing latitude and longitude coordinate transformation, coordinate correction, road name and road level query, and road ID acquisition, the roads traversed by each initially segmented driving segment are identified.
[0020] Furthermore, the calculation process for the energy consumption per unit mileage and average speed characteristic data extracted in step ten specifically includes:
[0021] The initial segmentation of the driving segment F contains m secondary segments f1, f2, ..., f1 corresponding to unique road IDs. m For secondary segments f in which the SOC change is greater than or equal to a specified threshold n+1 ,f n+2 ,…,fm Based on the change in SOC and the total energy of the on-board energy storage device type, the corresponding energy consumption per unit mile of the secondary segment and the energy consumption EC(f) of the secondary segment are directly calculated. n+1 ),EC(f n+2 ),…,EC(f m ):
[0022] EC(f i )=(SOC0-SOC a (×Total energy of on-board energy storage device type: 0×0.01)
[0023] In the formula, the subscript on the right side of the equal sign indicates the time sequence number of the frame in which the data is located, 0 is the starting value of the number, and a is the ending value of the number.
[0024] For n secondary segments f1, f2, ..., f whose SOC change is less than a specified threshold n Then, based on the total energy consumption EC(F) of the initial segmented driving segment F and the energy consumption of the secondary segment whose SOC change is greater than or equal to a specified threshold, the total energy consumption is calculated first:
[0025]
[0026] In the formula, EC(F) is the total energy consumption of m secondary segments;
[0027] Then, the secondary fragments f1, f2, ..., f are obtained from the basic energy lookup table. n Base energy consumption BEC(f1), BEC(f2), ..., BEC(f n ),
[0028] Taking the secondary segment f1 as an example, the corresponding energy consumption per unit mileage is obtained in the following way:
[0029] L(f i ) = 0.1 × (cumulative mileage) a -Cumulative mileage 0)
[0030]
[0031] In the formula, L(f) i ) is a secondary fragment f i The change in mileage is expressed in km, and REC(f1) represents the energy consumption per unit mileage corresponding to the secondary segment f1, expressed in Wh / km; cumulative mileage, cumulative mileage a These represent the cumulative mileage at the beginning and end of the secondary segment, respectively.
[0032] The average speed of secondary segments is calculated using a method similar to that of energy consumption. For secondary segments with changes in mileage or time greater than or equal to a specified threshold, and for secondary segments with changes less than a specified threshold, the average speed is calculated using the following formula:
[0033]
[0034]
[0035] In the formula, subscripts 0 and a are the timing numbers of the start and end frames, respectively, and the vehicle speed is... i This represents the vehicle speed in each frame.
[0036] Furthermore, in step eleven, the energy consumption is standardized for each vehicle model based on the following formula:
[0037]
[0038] In the formula, EC std To standardize energy consumption per unit mileage, EC represents the energy consumption per unit mileage for a specific secondary segment, μ EC With σ EC These are the mean and standard deviation of the EC values for all sub-segments of this model, respectively.
[0039] Furthermore, in step twelve, when calculating the energy consumption of each secondary segment on the same road, the secondary segments contained in each road ID are counted. If the number of segments is greater than or equal to the threshold λ, then depending on whether the constraints contain only a single type of vehicle or multiple types of vehicles, the average energy consumption per unit mileage of all segments or the standardized average energy consumption per unit mileage is calculated to reflect the energy consumption level of the road. If the number of secondary segments contained in the road is less than the threshold λ, then its energy consumption level is not calculated.
[0040] Further, in step twelve, when drawing the road energy consumption map, a tile base map is first generated based on the Map class of the folium library; then, the road network data is read using the geopandas library, and the road energy consumption level is matched with the road network data based on the road ID to obtain a GeoDataFrame table containing road ID, road name, energy consumption level, and coordinates of the entire road segment; according to the distribution range of energy consumption level, a color mapping function is set to convert the input energy consumption level value into a specific color output; all roads, i.e., all rows of the table, are traversed, and for any road, the energy consumption level data is input into the color mapping function to obtain color data and store it in a newly added style field; finally, the table is input into the GeoJson class initialization function of the folium library, and the style field data is specified as image style parameters to obtain a road network map object; this object is added to the base map, and color bars are added to the map according to the color mapping function to obtain an energy consumption classification statistical road network map that intuitively presents the differences in energy consumption levels of each road through different colors, i.e., a road energy consumption map.
[0041] The electric vehicle road energy consumption map drawing method provided by the present invention is based on the mature GB / T 32960 format vehicle big data. By sequentially performing driving segment segmentation, data cleaning, feature extraction and other methods, a correspondence between vehicle energy consumption and different roads is established. This can dynamically reflect the real energy consumption level of various types of electric vehicles when driving on actual roads, which helps to achieve more efficient and accurate analysis and management of the energy consumption of massive electric vehicles, while also reducing the system's computing cost. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of the overall process of the method provided by the present invention;
[0043] Figure 2 This is a flowchart of the original data segmentation and anomaly handling process in the method proposed in this invention.
[0044] Figure 3 This is a flowchart illustrating the construction process of the road energy consumption database in the method proposed in this invention.
[0045] Figure 4 This is a flowchart of the steps for drawing a road energy consumption map in the method proposed in this invention. Detailed Implementation
[0046] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] The electric vehicle road energy consumption map drawing method provided by this invention, such as Figure 1 As shown, the specific steps include:
[0048] Step 1: Extract the raw vehicle data in GB / T 32960 format for each electric vehicle in use. Each raw data frame consists of fields such as VIN, vehicle model, vehicle status, charging status, longitude, latitude, time, cumulative mileage, SOC, and vehicle speed. The fields and their definitions are shown in Table 1 below.
[0049] Table 1 specifies the data fields and their definitions as defined in GB / T 32960.
[0050]
[0051] Step 2: Extract a corresponding dataset from the original data of each electric vehicle.
[0052] Step 3: Extract the driving frame corresponding to the driving status from the vehicle driving, parking or charging status data frames in the dataset corresponding to each vehicle.
[0053] Step 4: Since the original data does not distinguish the data of each vehicle trip, it cannot be directly used to calculate the energy consumption per unit mileage of a single trip. It is necessary to divide it into multiple trip segments (a trip segment refers to a series of data frames sampled during a single trip). Therefore, preliminary trip segment division is performed based on the trip frames, and a number field corresponding to the segment to which each data frame belongs is added to all data frames.
[0054] Step 5: Check the data after the initial driving segment segmentation to see if there are any segments that are too short, and remove the segments that are too short.
[0055] Step 6: Check the data remaining after removing excessively short driving segments for missing values and data anomalies that exceed reasonable range. Perform data cleaning processing, including null value filling and deletion of driving segments, for specific anomaly patterns. Then merge the datasets of each vehicle.
[0056] Step 7: Convert the latitude and longitude data of each initially segmented driving segment to the platform's coordinate format using the coordinate conversion service of the digital map open platform and store it in a newly added field. Then, iterate through all driving segments, input the converted coordinates, data acquisition time, and vehicle speed into the trajectory correction service interface provided by the platform for road correction, and store the corrected latitude and longitude coordinates in two newly added fields respectively. Input the corrected latitude and longitude coordinates, data acquisition time, and vehicle speed into the trajectory road attribute query service interface of the platform to query the road name and road level data corresponding to each data frame and store them in newly added fields with the same name respectively. Input the corrected latitude and longitude coordinates into the reverse geocoding service interface provided by the platform to obtain the road ID data corresponding to each frame and store it in a newly added field with the same name. This completes the identification of the roads traversed by each initially segmented driving segment.
[0057] Step 8: Traverse the road class field of each frame of the initially segmented driving segment, take consecutive data frames with the same road class in the segment as new secondary segments, then detect and remove excessively short secondary segments, thereby completing the secondary segmentation of all driving segments and obtaining secondary segments with the corresponding unique road class.
[0058] Step 9: For any vehicle traveling on the same level road in a single continuous journey, extract feature data from the corresponding sub-segments, including: vehicle type, VIN, start time, end time, road level, energy consumption per unit distance, and average speed, and establish a basic energy consumption database for the sub-segments; use the basic energy consumption database to statistically obtain a three-dimensional basic energy consumption lookup table of vehicle type, road level, and average speed.
[0059] Step 10: Traverse the road ID field of each frame in the initially segmented driving segment, and take consecutive data frames with the same road ID in the segment as new secondary segments. This completes the secondary segmentation of all driving segments, obtaining secondary segments with corresponding unique road IDs. Traverse all secondary segments with corresponding unique road IDs and extract features including: vehicle type, VIN, start time, end time, road ID, road name, road grade, SOC change, average speed, basic energy consumption, and energy consumption per unit mileage. Store these features in the same fields of the newly created segment feature data frames. Integrate all the obtained segment feature data frames to obtain the road energy consumption database.
[0060] Step 11: Based on the requirements for road energy consumption map drawing, set a series of constraints including vehicle type, number of vehicles, area range, and time range, and extract data frames that meet the requirements from the road energy consumption database based on these constraints; for different vehicle types, perform standardization processing on the energy consumption data per unit mileage of each vehicle type to make the distribution of energy consumption of each vehicle type approximately uniform.
[0061] Step 12: Statistically analyze the energy consumption of all secondary segments of each vehicle on the same road to obtain the corresponding energy consumption level of the road; generate a hierarchical statistical road network map based on the energy consumption level of each road, i.e., a road energy consumption map.
[0062] The optional implementation process of the above preliminary driving segment segmentation and abnormal data processing is as follows: Figure 2 As shown.
[0063] In a preferred embodiment of the present invention, step two involves extracting the dataset corresponding to each electric vehicle, specifically based on the VIN field in the original data, extracting and integrating data frames with the same VIN field value into a dataset.
[0064] Step 3 involves extracting driving frames from the original data based on the values of the vehicle status and charging status fields. Taking the fields in Table 1 as an example, when the vehicle status of a frame is 0x01 and the charging status is 0x02 or 0x03, it is identified as a driving frame, and all driving frames in the original data are extracted.
[0065] When performing initial segmentation, on the one hand, considering that there will inevitably be a certain time interval between two adjacent driving processes, frames with a time interval that is too large from the previous frame can be used as segmentation points. On the other hand, during vehicle operation, data loss or transmission interruption may occur due to equipment failure or communication disruption, causing the data frame time interval to be greater than the normal value. Segmentation points should not be set for this reason, as it would interrupt the data of the current driving process. Therefore, the time interval threshold for segmentation should not be too close to the normal time interval (10s or 30s). Thus, 120s can be specifically selected as the segmentation time interval threshold. After arranging the vehicle driving frame data in chronological order, all data frames are traversed. If the time interval between the current and subsequent frames exceeds the above time interval threshold, the previous frame is identified as the end frame of the current segment, and the subsequent frame is identified as the start frame of the new segment. All segments are numbered, and a new field recording the segment number is added to all data frames to complete the initial segmentation.
[0066] In a preferred embodiment of the present invention, since the data after segmentation may still have some problems, such as some segments being too short, some fields having missing values, and some fields having data exceeding reasonable ranges, the present invention proposes a data cleaning method to distinguish abnormal patterns in order to avoid these problematic data interfering with the statistics of road energy consumption levels and to retain as much usable data as possible. Considering that the collection frequency of national standard data is low and the current changes drastically during vehicle operation, the accuracy of calculating vehicle energy consumption by the volt-ampere-hour integration method is poor. Therefore, calculating the product of the SOC change at the beginning and end of the driving segment and the nominal energy of the battery of the vehicle model is a better energy consumption calculation method. However, the vehicle SOC data recorded in the national standard data is only accurate to 1%, so the absolute error of the SOC change of the segment can reach at most 1%. Since the true value of the SOC change of excessively short driving segments is small, the absolute value of the relative error of the calculated energy consumption will be too large (for example, when the SOC change data is 2%, its absolute value of the relative error is at most 100%), which will have a significant negative impact on the energy consumption statistics. Therefore, the abnormal processing step of the present invention first removes excessively short driving segments. The specific method involves setting a SOC change threshold and deleting driving segments with SOC changes less than this threshold. However, to ensure sufficient data volume for energy consumption statistics and reduce the randomness of the results, this threshold should not be set too high. Considering all factors, this embodiment sets the threshold to 3%. This step is used as the first step in anomaly handling, which also eliminates the need for subsequent anomaly detection and cleaning of excessively short segments, saving computational resources.
[0067] Next, data anomaly detection is performed. All data frames are traversed to determine if the data in the target detection field is within the specified range. If the data is outside the specified range, it is replaced with an empty value. The target detection fields and their specified data ranges are shown in Table 2.
[0068] Table 2 Target Detection Fields and Their Data Scope
[0069]
[0070]
[0071] After anomaly detection, all data exceeding the specified range is replaced with null values. These null values can then be processed along with any pre-existing null values in the data. In a preferred embodiment of the invention, step six involves the following cleaning processes for different anomaly patterns: ① No anomaly: No null values are found in the target detection field; no processing is performed on this segment of data. ② Single-frame anomaly: Null values appear independently in the target detection field; there are no consecutive null values across multiple frames. For continuous variables that are not the beginning or end frames of a segment (such as cumulative mileage or SOC), linear interpolation is used to fill null values using data from the preceding and following frames; otherwise, the data from the nearest frame is used to directly fill null values. ③ Consecutive multi-frame anomalies: Null values appear in the target detection field for multiple consecutive frames. Interpolation filling may result in significant errors, and the reliability of other data is also low; therefore, driving segments exhibiting this anomaly pattern are deleted. After anomaly processing, the target detection field data should have no null values and no values exceeding the specified range. Subsequently, the datasets of each vehicle are merged.
[0072] In such Figure 3 In the process of constructing the road energy consumption database, to statistically analyze the energy consumption per unit mileage of a vehicle on various road segments during a given trip, it is necessary to obtain the road information where the vehicle was located at the time of sampling for each data frame in the driving segment, i.e., to identify the road route of the segment. Therefore, in a preferred embodiment of the present invention, the coordinate transformation service provided by the Gaode Map Open Platform is first used to convert the latitude and longitude data in the coordinate system used by the national standard data to the Gaode Map latitude and longitude coordinate system, and store it in a newly added field for subsequent use of the platform's trajectory correction, trajectory road attribute query, and reverse geocoding services. Subsequently, due to the fluctuation of satellite signal strength and the limited accuracy of positioning sensors during vehicle travel, the driving trajectory points based on the latitude and longitude fields in the data may deviate from the road, causing a decrease in road recognition accuracy. The trajectory should be corrected before road recognition. By traversing all driving segments, the Gaode coordinate latitude and longitude data, vehicle speed, and data acquisition time of all data frames in the segment are input into the trajectory correction service interface of the Gaode Map Open Platform to obtain the road-corrected trajectory latitude and longitude coordinates, which are stored in two newly added fields. Next, by inputting the corrected latitude and longitude coordinates of all data frames, data collection time, and vehicle speed into the trajectory road attribute query service interface, the road name and road level data corresponding to each frame can be obtained and stored in a newly added field with the same name. Then, by inputting the corrected latitude and longitude coordinates of all data frames into the reverse geocoding service interface, the road ID data corresponding to each frame can be obtained and stored in a newly added field with the same name, completing the segment path road identification. The road ID is a unique number for the road segment, the road name is the Chinese name of the road segment, and the road level includes 11 possible values such as expressway, national highway, urban ring road / urban expressway, and provincial highway.
[0073] The data foundation for statistically analyzing the energy consumption level of a road is the energy consumption per unit mileage of numerous vehicles traveling on that road segment each time. Calculating these energy consumption values is the core step in constructing a road energy consumption database. As mentioned in the data preprocessing step, the volt-ampere-hour integral method is not suitable for national standard data with low collection frequency. Furthermore, the method of calculating energy consumption by multiplying the SOC change by the battery's nominal energy is affected by rounding errors and is only applicable to longer segments with large SOC changes (SOC change ≥ 3%). For most urban road segments, due to their relatively small total mileage, the SOC change of the secondary segments corresponding to that road segment is likely to be too small, leading to excessively large calculation errors in the energy consumption per unit mileage of that road segment. However, if only secondary segments with satisfactory SOC changes are used to calculate energy consumption, the data volume will be too small, resulting in poor representativeness for common situations. Therefore, to address this issue, this invention provides a method for calculating energy consumption in secondary segments with minimal SOC variation. This method indirectly estimates the energy consumption per unit mileage of the corresponding secondary segment, i.e., the road energy consumption, based on a pre-constructed basic energy consumption database and a three-dimensional basic energy consumption lookup table of vehicle type, road grade, and average speed. By employing different energy consumption measurement methods for secondary segments of varying lengths, the energy consumption of all segments can be calculated, thus constructing a road energy consumption database.
[0074] The basic energy consumption database established in this invention contains fields for vehicle type, VIN, start time, end time, road grade, average speed, and energy consumption per unit mile, corresponding to a segment of a journey undertaken by a vehicle on a road of the same grade. By filtering data within the database that specifies vehicle type, road grade, and average speed, and calculating their average energy consumption per unit mile, a preliminary estimate of road energy consumption under the corresponding conditions can be provided, serving as an important basis for road energy consumption estimation. The reason for adopting this approach is as mentioned earlier: the SOC change of some road segments corresponding to secondary segments is likely too small to be used for energy consumption calculation, thus preventing the direct acquisition of energy consumption per unit mile on the corresponding road. Therefore, this invention, as a compromise, tightens the secondary segment division conditions, segmenting only when the road grade changes, obtaining secondary segments corresponding to a unique road grade, and calculating their energy consumption per unit mile. Clearly, the number of times road class changes during a vehicle's journey is less than the number of times roads change. This reduces the number of segments, making it easier for the SOC reduction of the secondary segments corresponding to different road classes to exceed the 3% threshold required for energy consumption calculation. This significantly increases the amount of secondary segment data available for energy consumption calculation, making it more feasible. Subsequently, based on the energy consumption data of numerous secondary segments corresponding to unique road classes, the energy consumption per unit mile of the corresponding secondary segments is indirectly estimated. For secondary segments with very small SOC changes, by constructing and referencing a basic energy consumption database, the direct calculation of road energy consumption is transformed into indirect estimation, making it more feasible. In specific implementation, all initially segmented driving segments are first further segmented to ensure that the resulting secondary segments correspond to unique road classes and are as long as possible. Iterate through all data frames within a segment. When a data frame differs from the previous frame in its road grade field, use that frame as the starting frame of a new segment and the previous frame as the ending frame of the previous segment for segmentation. Calculate the SOC change of the resulting secondary segments. If it is greater than or equal to the threshold (3%) specified during preprocessing, assign a unique number to the resulting secondary segment and store it in a newly added field; otherwise, discard the secondary segment. If all data frames within a segment have the same road grade, the driving segment can be considered a secondary segment, assigned a unique number, and stored in a newly added field. Subsequently, iterate through all secondary segments, extracting vehicle type, VIN, start time, end time, road grade, average speed, and energy consumption per unit mileage features, and store them in the same-named field of the newly created segment feature data frame. This condenses the time-series sampling data (each segment contains multiple frames of data) into segment feature data (each segment corresponds to one frame of data). Suppose a secondary segment contains n+1 frames of data. The frames are numbered 0, 1, 2...n-1, n in chronological order. A field of data in data frame i is represented as the field name. i For example, the SOC field data of data frame 2 can be represented as SOC2. Thus, the extracted secondary fragment features and their extraction methods are shown in Table 3.
[0075] Table 3 shows the secondary segment features corresponding to unique road levels and their extraction methods.
[0076]
[0077] The feature data frames of all secondary segments are integrated to form a database, namely the basic energy consumption database. Specifically, this database can be continuously updated as the original data increases. Finally, to avoid calculating the average energy consumption based on the basic energy consumption database every time road energy consumption is calculated, and to facilitate the preliminary estimation of road energy consumption, it is necessary to pre-calculate a three-dimensional basic energy consumption lookup table of vehicle type, road grade, and average speed. The first step is to determine the average speed sampling points and their corresponding data ranges. This invention uses an equal-width discretization method to discretize the continuous average speed data. Considering both the amount of data in each interval and the sampling frequency requirements, the average speed interval width is set to 3 km / h, and the 0-150 km / h interval is divided into 50 equally wide intervals. Thus, the continuous average speed is discretized and allocated to 50 intervals. The midpoint of each interval is used as the average speed sampling point, and the corresponding speed interval is used as the data range constraint for the average speed dimension of the basic energy consumption statistics. The second step is basic energy consumption statistics. The algorithm iterates through all combinations of vehicle type, road grade, and average speed sampling points determined in the previous step within the basic energy consumption database using a triple loop. It then calculates the average energy consumption per unit mileage for all sub-segments under a specific combination, using this average as the basic energy consumption for that combination. The vehicle type, road grade, average speed sampling points, and the calculated basic energy consumption are stored in a data table, forming a three-dimensional basic energy consumption lookup table for vehicle type, road grade, and average speed. When using this table to look up basic energy consumption, the input average speed may not be precisely equal to the sampling point value. In such cases, linear interpolation or extrapolation methods can be used to determine the basic energy consumption.
[0078] By performing secondary segmentation on all initially segmented driving segments, the resulting secondary segments are made to correspond to unique road IDs and are as long as possible. All data frames within a segment are traversed. When the road ID field of a data frame differs from the previous frame, the new segment is started with that frame and the previous frame is started with the end frame of the previous segment. The SOC change of the resulting secondary segments is calculated, and each secondary segment is assigned a unique number and stored in two newly added fields. If all data frames within a segment have the same road ID, the segment can be considered a single secondary segment. Then, energy consumption per unit mile and average speed can be calculated for secondary segments of different lengths. The calculation process specifically includes:
[0079] The initial segmentation of the driving segment F contains m secondary segments f1, f2, ..., f1 corresponding to unique road IDs. m For secondary segments f in which the SOC change is greater than or equal to a specified threshold n+1 ,fn+2 ,…,f m Based on the change in SOC and the total energy of the on-board energy storage device type, the corresponding energy consumption per unit mile of the secondary segment and the energy consumption EC(f) of the secondary segment are directly calculated. n+1 ),EC(f n+2 ),…,EC(f m ):
[0080] EC(f i )=(SOC0-SOC a (×Total energy of on-board energy storage device type: 0×0.01)
[0081] In the formula, the subscript on the right side of the equal sign indicates the time sequence number of the frame in which the data is located, 0 is the starting value of the number, and a is the ending value of the number.
[0082] For n secondary segments f1, f2, ..., f whose SOC change is less than a specified threshold n Then, based on the total energy consumption EC(F) of the initial segmented driving segment F and the energy consumption of the secondary segment whose SOC change is greater than or equal to a specified threshold, the total energy consumption is calculated first:
[0083]
[0084] In the formula, EC(F) is the total energy consumption of m secondary segments;
[0085] Then, the secondary fragments f1, f2, ..., f are obtained from the basic energy lookup table. n Base energy consumption BEC(f1), BEC(f2), ..., BEC(f n ),
[0086] Taking the secondary segment f1 as an example, the corresponding energy consumption per unit mileage is obtained in the following way:
[0087] L(f i ) = 0.1 × (cumulative mileage) a -Cumulative mileage 0)
[0088]
[0089] In the formula, L(f) i ) is a secondary fragment f i The change in mileage is expressed in km, and REC(f1) represents the energy consumption per unit mileage corresponding to the secondary segment f1, expressed in Wh / km; cumulative mileage, cumulative mileage aThese represent the cumulative mileage at the beginning and end of the secondary segment, respectively. Similar to energy consumption calculations, considering the impact of rounding errors, the average speed of secondary segments with excessively small mileage or time changes should not be obtained by calculating the quotient of the mileage change and the time change. Within the normal speed range, the time granularity is relatively finer, and rounding errors in mileage changes are the main cause of errors in average speed calculations. Therefore, a threshold is set, and the average speed is calculated using the following formula for secondary segments with mileage or time changes greater than or equal to the specified threshold, and for secondary segments with mileage or time changes less than the specified threshold:
[0090]
[0091]
[0092] In the formula, subscripts 0 and a are the start and end frame numbers, respectively, and the vehicle speed is... i This represents the vehicle speed in each frame.
[0093] Since baseline energy consumption is the expected energy consumption per unit mileage of existing samples under specific vehicle type, road grade, and average speed conditions, it can serve as a preliminary prior estimate of road energy consumption based on the above three factors. However, the energy consumption per unit mileage of a vehicle traveling on a certain road segment is obviously also affected by other factors (such as ambient temperature and weather conditions). Therefore, directly using baseline energy consumption as road energy consumption will result in insufficient consideration of energy consumption influencing factors and low estimation accuracy due to inadequate data utilization. It is necessary to combine baseline energy consumption (i.e., prior estimate) with posterior data, and to perform scaling corrections on the baseline energy consumption to obtain a more accurate road energy consumption estimate. The calculation method provided by this invention achieves higher accuracy based on this concept.
[0094] Based on the road energy consumption, energy consumption per unit mileage, and other relevant characteristic parameters obtained above, the energy consumption levels of various vehicle types on any road can be statistically determined. For example... Figure 4As shown, before statistically analyzing road energy consumption, it is necessary to first extract suitable data frames from the road energy consumption database according to a series of constraints (such as vehicle type, number of vehicles, area range, time range, etc.) and logically. If the vehicle type is not unique, the energy consumption distribution of different vehicle types will vary significantly due to differences in vehicle specifications and configurations. Therefore, energy consumption data per unit mileage cannot be directly compared and used in the statistical calculation. Otherwise, the statistical analysis of road energy consumption levels will be affected by the coupling effect of differences in vehicle type distribution and energy consumption distribution. The energy consumption differences between different roads will not accurately reflect the impact of traffic and natural conditions on vehicle energy consumption, and will be highly sensitive to the constraints of the energy consumption map. In this case, the road energy consumption map will lose its objectivity and cannot accurately reflect the energy consumption patterns of electric vehicles. Therefore, when the vehicle type is not unique in the constraints, the energy consumption distribution of different vehicle types should be standardized before statistical analysis. In a preferred embodiment of the present invention, the energy consumption of any vehicle type on a certain road is standardized based on the following formula:
[0095]
[0096] In the formula, EC std To standardize energy consumption per unit mileage, EC represents the energy consumption per unit mileage for a specific secondary segment, μ EC With σ EC These represent the mean and standard deviation of the EC values for all secondary segments of the vehicle model. Standardizing all energy consumption data for each selected vehicle model ensures that the energy consumption distribution for each model approximates a standard normal distribution, thus achieving basic uniformity in energy consumption distribution.
[0097] In a preferred embodiment of the present invention, when statistically analyzing the energy consumption of vehicles on various roads, to ensure the reliability of the energy consumption statistics, a segment quantity threshold λ is set, and the secondary segments corresponding to the road ID are counted. If the number of secondary segments is greater than or equal to the threshold λ, then depending on whether the constraints include only a single vehicle type or multiple vehicle types, the average energy consumption per unit mileage of all segments or the standardized average energy consumption per unit mileage is calculated to reflect the road energy consumption level. If the number of included secondary segments is less than the threshold λ, then its energy consumption level is not calculated. In this invention, λ = 100 is used. The energy consumption level data of each road is obtained according to the above rules and serves as the basis for visualization in the final step.
[0098] Finally, when drawing the road energy consumption map, a tile base map is first generated based on the Map class of the folium library, specifying the tile type as the Gaode Map vector base map. Then, the road network data is read using the geopandas library, and the road energy consumption level is matched with the road network data based on the road ID to obtain a GeoDataFrame table containing road ID, road name, energy consumption level, and coordinates of the entire road segment. Based on the distribution range of energy consumption levels, a color mapping function is set to convert the input energy consumption level values into specific colors for output. All roads, i.e., all rows of the table, are traversed. For any road, the energy consumption level data is input into the color mapping function to obtain color data and store it in a newly added style field. Finally, the table is input into the GeoJson class initialization function of the folium library, and the style field data is specified as image style parameters to obtain a road network map object. This object is added to the base map, and color bars are added to the map according to the color mapping function to obtain an energy consumption classification statistical road network map that intuitively presents the differences in energy consumption levels of each road through different colors, i.e., the road energy consumption map.
[0099] The method provided by this invention segments national standard real-vehicle big data into numerous driving segments representing a single vehicle's journey, cleans the data, and constructs a basic energy consumption database for different vehicle types, road grades, and average speeds after road information matching. Based on this database, energy consumption for each road segment is calculated, and a road energy consumption database is built. According to requirements, the energy consumption level of each road segment is statistically analyzed based on this database, and an energy consumption classification statistical road network map is drawn, forming a road energy consumption map. This achieves statistical and visual presentation of the energy consumption levels of electric vehicles on different roads. Because the national standard vehicle data covers a wide spatial and temporal range, includes many vehicle types, is large in quantity, and records comprehensive information, this method can further generate road energy consumption maps under different conditions based on preset constraints, for comparative analysis of electric vehicle energy consumption variation patterns (such as drawing road energy consumption maps under different seasons, weekdays / holidays). The final road energy consumption map is based on a large amount of actual electric vehicle driving data, has low randomness, good versatility, and can serve as an important basis for research on electric vehicle energy consumption variation patterns. Because this invention combines the change in SOC with the battery's nominal energy to calculate energy consumption, rather than using volt-ampere-hour integration, it effectively reduces the computational power consumption in the energy consumption calculation process. This makes it suitable for real-time vehicle data with low sampling frequencies (e.g., one frame every 30 seconds), significantly reducing application costs. The national standard data used in this invention has numerous precedents in the field, making it technically easier to promote and apply compared to existing technologies.
[0100] It should be understood that the sequence number of each step in the embodiments of the present invention does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0101] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for drawing road energy consumption maps for electric vehicles, characterized in that: Specifically, the following steps are included: Step 1: Extract the original vehicle data in GB / T 32960 format for each electric vehicle in use. Each original data frame consists of VIN, vehicle type, vehicle status, charging status, longitude, latitude, time, cumulative mileage, SOC, vehicle speed, and total energy field of on-board energy storage device type. Step 2: Extract a corresponding dataset from the original data of each electric vehicle. Step 3: Extract the driving frame corresponding to the driving status from the vehicle driving, parking or charging status data frames in the dataset corresponding to each vehicle. Step 4: Perform preliminary segmentation of driving frames, and add a number field corresponding to the segment to which each data frame belongs; Step 5: Check the data after the initial driving segment segmentation to see if there are any segments that are too short, and remove the segments that are too short. Step 6: Check the data remaining after removing excessively short driving segments for missing values and data anomalies that exceed reasonable range. Perform data cleaning processing, including null value filling and deletion of driving segments, for specific anomaly patterns. Then merge the datasets of each vehicle. Step 7: Convert the latitude and longitude data of each initially segmented driving segment to the platform's coordinate format using the coordinate conversion service of the digital map open platform and store it in a newly added field. Then, iterate through all driving segments, input the converted coordinates, data acquisition time, and vehicle speed into the trajectory correction service interface provided by the platform for road correction, and store the corrected latitude and longitude coordinates in two newly added fields respectively. Input the corrected latitude and longitude coordinates, data acquisition time, and vehicle speed into the trajectory road attribute query service interface of the platform to query the road name and road level data corresponding to each data frame and store them in newly added fields with the same name respectively. Input the corrected latitude and longitude coordinates into the reverse geocoding service interface provided by the platform to obtain the road ID data corresponding to each frame and store it in a newly added field with the same name. This completes the identification of the roads traversed by each initially segmented driving segment. Step 8: Traverse the road class field of each frame of the initially segmented driving segment, take consecutive data frames with the same road class in the segment as new secondary segments, then detect and remove excessively short secondary segments, thereby completing the secondary segmentation of all driving segments and obtaining secondary segments with the corresponding unique road class. Step 9: For any vehicle traveling on the same level road in a single continuous journey, extract feature data from the corresponding sub-segments, including: vehicle type, VIN, start time, end time, road level, energy consumption per unit distance, and average speed, and establish a basic energy consumption database for the sub-segments; use the basic energy consumption database to statistically obtain a three-dimensional basic energy consumption lookup table of vehicle type, road level, and average speed. Step 10: Traverse the road ID field of each frame in the initially segmented driving segment, and take consecutive data frames with the same road ID in the segment as new secondary segments. This completes the secondary segmentation of all driving segments, obtaining secondary segments with corresponding unique road IDs. Traverse all secondary segments with corresponding unique road IDs and extract features including: vehicle type, VIN, start time, end time, road ID, road name, road grade, SOC change, average speed, basic energy consumption, and energy consumption per unit mileage. Store these features in the same fields of the newly created segment feature data frames. Integrate all the obtained segment feature data frames to obtain the road energy consumption database. Step 11: Based on the requirements for road energy consumption map drawing, set a series of constraints including vehicle type, number of vehicles, area range, and time range, and extract data frames that meet the requirements from the road energy consumption database based on these constraints; for different vehicle types, perform standardization processing on the energy consumption data per unit mileage of each vehicle type to make the distribution of energy consumption of each vehicle type approximately uniform. Step 12: Statistically analyze the energy consumption of all secondary segments of each vehicle on the same road to obtain the corresponding energy consumption level of the road; generate a hierarchical statistical road network map based on the energy consumption level of each road, i.e., a road energy consumption map.
2. The method as described in claim 1, characterized in that: Step two extracts the dataset corresponding to each electric vehicle, specifically based on the VIN field in the original data; Step three extracts the driving frames, specifically by extracting the values of the vehicle status and charging status fields from the original data; When performing preliminary segmentation, a segmentation time interval threshold of 120 seconds is selected. After arranging the driving frame data of a certain vehicle in chronological order, all data frames are traversed. If the time interval between the current and subsequent frames exceeds the above time interval threshold, the previous frame is identified as the end frame of the current segment, and the next frame is identified as the start frame of the new segment. All segments are numbered, and a new field recording the segment number is added to all data frames to complete the preliminary segmentation.
3. The method as described in claim 1, characterized in that: In step five, the system determines whether a driving segment is too short based on a preset threshold for the change in SOC within the segment, and deletes driving segments with a change in SOC less than the threshold.
4. The method as described in claim 1, characterized in that: In step six, the following cleaning processes are performed for different anomaly modes: ① If there is no anomaly, no processing is performed on the driving segment data; ② If a single frame is abnormal, for continuous variables that are not the beginning or end frames of the segment, linear interpolation is used to fill the null values with the data from the preceding and following frames; otherwise, the data from the nearest frame is used to directly fill the null values; ③ If multiple consecutive frames are abnormal, the driving segment is deleted.
5. The method as described in claim 1, characterized in that: In step seven, the Gaode Map Open Platform is specifically used. By sequentially performing latitude and longitude coordinate transformation, coordinate correction, road name and road level query, and road ID acquisition, the roads traversed by each initially segmented driving segment are identified.
6. The method as described in claim 1, characterized in that: The calculation process for the energy consumption per unit mileage and average speed characteristic data extracted in step ten specifically includes: The initial segmentation of the driving segment F contains m secondary segments f1, f2, ..., f1 corresponding to unique road IDs. m For secondary segments f in which the SOC change is greater than or equal to a specified threshold n+1 ,f n+2 ,…,f m Based on the change in SOC and the total energy of the on-board energy storage device type, the corresponding energy consumption per unit mile of the secondary segment and the energy consumption EC(f) of the secondary segment are directly calculated. n+1 ),EC(f n+2 ),…,EC(f m ): EC(f i ) = (SOC0 - SOC) a (×Total energy of on-board energy storage device type: 0×0.01) In the formula, the subscript on the right side of the equal sign indicates the time sequence number of the frame in which the data is located, 0 is the starting value of the number, and a is the ending value of the number; For n secondary segments f1, f2, ..., f whose SOC change is less than a specified threshold n Then, based on the total energy consumption EC(F) of the initial segmented driving segment F and the energy consumption of the secondary segment whose SOC change is greater than or equal to a specified threshold, the total energy consumption is calculated first: In the formula, EC(F) is the total energy consumption of m secondary segments; Then, the secondary fragments f1, f2, ..., f are obtained from the basic energy lookup table. n Base energy consumption BEC(f1), BEC(f2), ..., BEC(f n ), For any secondary segment f1, the corresponding energy consumption per unit mileage can be obtained as follows: L(f i ) = 0.1 × (cumulative mileage) a -Cumulative mileage 0) In the formula, L(f) i ) is a secondary fragment f i The change in mileage is expressed in km, and REC(f1) represents the energy consumption per unit mileage corresponding to the secondary segment f1, expressed in Wh / km; cumulative mileage, cumulative mileage a These represent the cumulative mileage at the beginning and end of the secondary segment, respectively. The average speed of secondary segments is calculated using a method similar to that of energy consumption. For secondary segments with changes in mileage or time greater than or equal to a specified threshold, and for secondary segments with changes less than a specified threshold, the average speed is calculated using the following formula: In the formula, subscripts 0 and a are the timing numbers of the start and end frames, respectively, and the vehicle speed is... i This represents the vehicle speed in each frame.
7. The method as described in claim 1, characterized in that: In step eleven, the energy consumption is standardized for each vehicle model based on the following formula: In the formula, EC std To standardize energy consumption per unit mileage, EC represents the energy consumption per unit mileage for a specific secondary segment, μ EC With σ EC These are the mean and standard deviation of the EC values for all sub-segments of this model, respectively.
8. The method as described in claim 1, characterized in that: When calculating the energy consumption of each secondary segment on the same road in step 12, the secondary segments contained in each road ID are counted. If the number of segments is greater than or equal to the threshold λ, the average energy consumption per unit mileage of all segments or the standardized average energy consumption per unit mileage is calculated according to whether the constraints contain only a single type of vehicle or multiple types of vehicles. The calculation result reflects the energy consumption level of the road. If the number of secondary segments contained in the road is less than the threshold λ, its energy consumption level is not calculated.
9. The method as described in claim 1, characterized in that: Step 12: When drawing the road energy consumption map, firstly, a tile base map is generated based on the Map class of the folium library; then, the road network data is read using the geopandas library, and the road energy consumption level is matched with the road network data based on the road ID to obtain a GeoDataFrame table containing road ID, road name, energy consumption level, and coordinates of the entire road segment; according to the distribution range of energy consumption levels, a color mapping function is set to convert the input energy consumption level values into specific colors for output; all roads, i.e., all rows of the table, are traversed, and for any road, the energy consumption level data is input into the color mapping function to obtain color data and store it in a newly added style field; finally, the table is input into the GeoJson class initialization function of the folium library, and the style field data is specified as image style parameters to obtain a road network map object; this object is added to the base map, and color bars are added to the map according to the color mapping function to obtain an energy consumption classification statistical road network map that intuitively presents the differences in energy consumption levels of each road through different colors, i.e., the road energy consumption map.
Citation Information
Patent Citations
Energy consumption road spectrum analysis method for vehicle cloud cooperative computing
CN111785012A
Electric vehicle caliper dragging energy consumption testing method and device
CN112179675A
Time-sharing energy consumption map extraction method and system based on electric vehicle driving data
CN114925155A