Electric vehicle remaining driving range estimation method, computer equipment and storage medium
By combining the battery status, driving behavior and ambient temperature parameters with a two-layer random forest model, the energy consumption rate is first predicted and then the remaining driving range is predicted. This solves the problem of inaccurate estimation of the driving range of electric vehicles and achieves more accurate range prediction and optimization suggestions.
Patent Information
- Application Number
- CN202510690931.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-26
AI Technical Summary
The existing technology is not accurate enough in estimating the remaining driving range of electric vehicles under real-time working conditions, and the influencing factors are not fully considered, resulting in inaccurate estimation.
A two-layer random forest model is used to first predict the energy consumption rate (ECR) through battery status parameters, driving behavior parameters and ambient temperature parameters, and then the remaining driving range (RDR) is predicted based on the ECR, which enriches the dimensions of influencing factors and improves the accuracy of estimation.
Through layered and sequential estimation, the accuracy and interpretability of the remaining driving range estimation are improved, providing a scientific basis for optimizing driving behavior and battery management, and improving the accuracy of electric vehicle range prediction.
Smart Images

Figure CN120697571A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric vehicles, and in particular to a method for estimating the remaining driving range of an electric vehicle, a computer device, and a storage medium. Background Art
[0002] With the development of electric vehicles, range anxiety is one of the main issues hindering their widespread adoption. Accurately estimating the remaining driving range (RDR) can effectively alleviate this problem. Currently, some physics-based or data-driven black box models have been developed to achieve preliminary RDR estimation.
[0003] For example, the relevant technology provides a method for predicting the driving range of an electric vehicle by obtaining the current driving information of the electric vehicle; using the driving information, determining the road type of the road on which the electric vehicle is currently traveling, and obtaining the target road type; determining the unit energy consumption corresponding to the target road type, and obtaining the current battery power of the electric vehicle; using the unit energy consumption and the current battery power, calculating the sustainable mileage of the current electric vehicle.
[0004] However, under real-time operating conditions, the operation of the vehicle is often very complex, and the coupling of multiple factors makes the RDR estimation inaccurate. Summary of the Invention
[0005] Based on this, it is necessary to provide an electric vehicle remaining driving range estimation method, computer equipment and storage medium that can accurately estimate RDR to address the above technical problems.
[0006] In a first aspect, the present application provides a method for estimating the remaining driving range of an electric vehicle. The method comprises:
[0007] Acquiring operating data of a target vehicle, the operating data including battery state parameters, driving behavior parameters, and ambient temperature parameters, wherein the battery state parameters include SOH;
[0008] Using the operating data as an input variable of a first random forest model, obtaining first prediction values of a plurality of decision trees in the first random forest model, calculating an average of the plurality of first prediction values, and outputting an ECR prediction value of the target vehicle;
[0009] Using the operating data and the ECR prediction value as input variables of a second random forest model, obtaining second prediction values of multiple decision trees in the second random forest model, calculating an average of the multiple second prediction values, and outputting an RDR prediction value of the target vehicle;
[0010] Determining the remaining driving range of the target vehicle according to the RDR prediction value;
[0011] The first random forest model and the second random forest model are trained through sample data, the sample data includes a feature vector and a corresponding target variable, the feature vector is composed of multiple features, and the features are extracted based on the operating data of multiple vehicles, and the target variables include ECR and RDR.
[0012] In one embodiment, obtaining the battery status parameter includes:
[0013] determining a first charging stage of the target vehicle;
[0014] Obtaining the instantaneous value of the charging current, the charging duration, the initial capacity of the battery, the starting SOC value, and the ending SOC value in the first charging stage;
[0015] Integrating the instantaneous value of the charging current based on the charging duration to obtain an integrated value;
[0016] Calculating a difference between the SOC start value and the SOC end value, and calculating a charging capacity based on a ratio of the integral value to the difference;
[0017] The SOH is calculated according to the ratio of the charging capacity to the initial capacity of the battery.
[0018] In one embodiment, the battery status parameter further includes:
[0019] The SOC starting value of the target vehicle in the first charging stage;
[0020] The cumulative mileage of the target vehicle.
[0021] In one embodiment, the driving behavior parameter includes at least one of the following:
[0022] Average vehicle speed, vehicle speed standard deviation, vehicle speed variation coefficient, average acceleration, average current, current standard deviation, current variation coefficient, and mean absolute value of current.
[0023] In one embodiment, the ambient temperature parameter includes at least one of the following:
[0024] Mean temperature, mean absolute temperature deviation.
[0025] In one embodiment, the method further comprises:
[0026] Randomly extracting the sample data from the original data set, and constructing multiple training sets based on the extracted sample data;
[0027] Constructing a decision tree for each of the training sets, and forming the first random forest model and the second random forest model based on a combination of multiple decision trees;
[0028] At the decision nodes of each decision tree, a plurality of features are randomly selected, and an optimal partitioning feature and a corresponding partitioning threshold are found from the selected features, and based on the optimal partitioning feature and the corresponding partitioning threshold, the sample data of the current decision node are binary partitioned;
[0029] Each division is aimed at minimizing the mean square error, and the optimal division feature and the corresponding division threshold are found to train the first random forest model and the second random forest model.
[0030] In one embodiment, the method further comprises:
[0031] Calculate the contribution value of each feature to the reduction of the mean square error in all decision trees;
[0032] Weighing the impact of each input variable on the ECR prediction value and the RDR prediction value according to the reduction contribution value corresponding to each feature;
[0033] According to the influence of each input variable on the ECR predicted value and the RDR predicted value, a target parameter is determined from the operating data, and the target parameter is used as the input variable.
[0034] In one embodiment, after determining the remaining driving range of the target vehicle according to the RDR prediction value, the method further includes:
[0035] At any time, other input variables are fixed and only the target variable is changed so that the target variable varies between the upper and lower quartiles, and the impact value of the target variable on the RDR is calculated;
[0036] If the impact value of the corresponding battery status parameter in each input target variable is relatively large, it means that replacing the battery can effectively improve the battery life, and a corresponding user prompt message is generated;
[0037] If the impact value of the driving behavior parameter in each input target variable is relatively large, it means that optimizing the driving behavior can effectively improve the battery life, and a corresponding user prompt message is generated;
[0038] Among the input target variables, if the impact value corresponding to the ambient temperature parameter is relatively large, it means that temperature control or seasonal changes have a greater impact on the battery life, and corresponding user prompt information is generated.
[0039] In a second aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.
[0040] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0041] The above-mentioned remaining driving range estimation method, computer device and storage medium for electric vehicles, by combining the vehicle's battery state parameters, driving behavior parameters and ambient temperature parameters as inputs to the random forest model, predicts the vehicle's RDR, enriches the dimensions of the factors affecting RDR estimation, and improves the accuracy of RDR estimation. In addition, the battery state parameters include SOH, which is calculated by the change in SOC during a single charge process. SOH can objectively and to a large extent determine the RDR, which helps to improve the accuracy of RDR estimation. Furthermore, by first estimating the energy consumption rate ECR and then estimating the remaining driving range RDR, the layered and sequential estimation scheme gives the algorithm interpretability. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a hardware structure block diagram of a terminal for estimating the remaining driving range of an electric vehicle in one embodiment;
[0043] Figure 2 1 is a flow chart of a method for estimating the remaining driving range of an electric vehicle according to an embodiment;
[0044] Figure 3 Schematic diagram of input variables of a first random forest model in one embodiment;
[0045] Figure 4 1 is a flow chart of a method for training a random forest model in one embodiment;
[0046] Figure 5 1 is a flow chart of a method for estimating the remaining driving range of an electric vehicle according to an embodiment;
[0047] Figure 6 Provided Figure 5 A schematic diagram of a specific process of estimating the remaining driving range of an electric vehicle;
[0048] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0050] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and similar expressions in this application do not denote limitations on quantity and may be singular or plural. The terms "comprise," "include," "have," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include unlisted steps or modules (units) or other steps or modules (units) inherent to the process, method, product, or device. The terms "connected," "connected," "coupled," and similar expressions used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used in this application, "plurality" means two or more. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone; A and B exist simultaneously; or B exists alone. Generally, the character " / " indicates that the objects in the preceding and following relationship are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0051] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 This is a hardware structure block diagram of a terminal for estimating the remaining driving range of an electric vehicle according to an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown) a processor 101 and a memory 102 for storing data, wherein the processor 101 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 103 for communication functions and an input and output device 104. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0052] The memory 102 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the remaining driving range estimation method of an electric vehicle in this embodiment. The processor 101 executes various functional applications and data processing by running the computer program stored in the memory 102, that is, to implement the above-mentioned method. The memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 102 may further include a memory remotely located relative to the processor 101, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0053] Transmission device 103 is used to receive or transmit data via a network. This network may include a wireless network provided by the terminal's communications provider. In one embodiment, transmission device 103 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 103 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0054] The terms appearing in the embodiments of this application are explained as follows:
[0055] SOH (State of health): The ratio of the capacity of a power battery discharged from a fully charged state at a certain rate to the cut-off voltage under standard conditions to its corresponding nominal capacity. This ratio reflects the health of the power battery.
[0056] SOC (State of charge): State of charge refers to the ratio of the current remaining power of the power battery to its rated capacity, which is used to evaluate the real-time power level of the battery.
[0057] ECR (Energy consumption rate): The energy consumed by electric vehicles per unit distance traveled. This indicator is used to measure the energy utilization efficiency of the battery. The smaller the value, the lower the energy consumption and the longer the endurance.
[0058] DR (Driving Range): refers to the maximum distance an electric vehicle can travel after being fully charged in the current battery health state, that is, the maximum distance it can travel at 100% SOC.
[0059] RDR (Remaining Driving Range): refers to the distance an electric vehicle is expected to travel before the battery is exhausted under the current SOC.
[0060] In one embodiment, Figure 2 As shown, a method for estimating the remaining driving range of an electric vehicle is provided. Figure 1 The following steps are used as an example to illustrate the terminal in the figure:
[0061] Step S101 , obtaining operating data of a target vehicle, the operating data including battery state parameters, driving behavior parameters and ambient temperature parameters, wherein the battery state parameters include SOH.
[0062] In this embodiment, the operating data may be historical operating data or real-time operating data. The driving behavior parameters may include one or more of the following parameters: average vehicle speed, vehicle speed standard deviation, vehicle speed coefficient of variation, average acceleration, average current, current standard deviation, current coefficient of variation, and current absolute value mean. The ambient temperature parameter may include average temperature and / or mean absolute temperature deviation.
[0063] In some embodiments, the battery state parameter includes SOH. In other embodiments, in addition to SOH, the battery state parameter may also include an SOC starting value of the target vehicle in the first charging stage and / or the accumulated mileage of the target vehicle.
[0064] SOH can be calculated by the change in SOC during a single charging process. Specifically, determine the first charging stage of the target vehicle; obtain the instantaneous value of the charging current, charging time, initial battery capacity, SOC starting value, and SOC ending value in the first charging stage; integrate the instantaneous value of the charging current based on the charging time to obtain the integral value; calculate the difference between the SOC starting value and the SOC ending value, and calculate the charging capacity based on the ratio of the integral value to the difference; calculate the SOH based on the ratio of the charging capacity to the initial battery capacity. The specific calculation formula for SOH is as follows:
[0065]
[0066] Among them, C represents the charging capacity, Initial cap represents the initial capacity of the battery, I(t) represents the instantaneous value of the charging current (the terminal current at time t), SOC e Indicates the SOC end value of the first charging stage, SOC s Indicates the SOC starting value of the first charging stage, and SOC e Greater than SOC s .
[0067] Step S102: Using the operating data as an input variable of the first random forest model, obtaining first prediction values of multiple decision trees in the first random forest model, calculating an average of the multiple first prediction values, and outputting an ECR prediction value of the target vehicle.
[0068] For the first random forest model, the input variable is the running data. Each decision tree makes predictions independently, and the final prediction result is calculated by averaging the results of all decision trees. The specific calculation is as follows:
[0069] ;
[0070] in, is the average of the first predicted values, hi(x) is the prediction result of the i-th decision tree (i.e., the first predicted value), and k is the number of decision trees (for example, set to 100).
[0071] In one embodiment, Figure 3 A schematic diagram of the input variables of the first random forest model is provided. Figure 3 As shown, the input variables of the first random forest model include battery state parameters, driving behavior parameters, and ambient temperature parameters. Among them, driving behavior parameters include average vehicle speed, vehicle speed standard deviation, vehicle speed coefficient of variation, average acceleration, average current, current standard deviation, current coefficient of variation, and mean absolute value of current. Ambient temperature parameters include average temperature and mean absolute temperature deviation. Battery state parameters include SOH, SOC starting value, and accumulated mileage. The calculation formula of the first random forest model is as follows:
[0072] ;
[0073] Where X represents the input variable, ECR estimation Represents the estimation result, that is, the predicted value, and f1 represents the estimation algorithm model.
[0074] Step S103: Using the operating data and the ECR prediction value as input variables of the second random forest model, obtaining the second prediction values of multiple decision trees in the second random forest model, and calculating the average of the multiple second prediction values to output the RDR prediction value of the target vehicle.
[0075] For the second random forest model, its input variables are the running data and the intermediate variable, namely the ECR prediction value. Each decision tree also makes predictions independently, and the final prediction result is calculated by averaging all the decision trees. The specific calculation principle is similar to that of the first random forest model. The calculation formula of the second random forest model is as follows:
[0076] ;
[0077] Among them, X represents the input variable, RDRestimation Represents the estimation result, that is, the predicted value, and f2 represents the estimation algorithm model.
[0078] In this embodiment, the first and second random forest models are trained using sample data. The sample data includes a feature vector and a corresponding target variable. The feature vector is composed of multiple features extracted based on the operating data of multiple vehicles. The target variables include ECR and RDR. Specifically, n samples of data can be randomly extracted from the original dataset D and then sampled with replacement. This process is repeated k times to construct k training sets. The first and second random forest models are then trained based on the k training sets.
[0079] Step S104: determining the remaining driving range of the target vehicle according to the RDR prediction value.
[0080] Traditional RDR estimation methods usually only focus on one dimension (such as driving information and battery power), and lack analysis of comprehensive influencing factors. There is a problem of insufficient consideration of influencing factors. This embodiment combines the vehicle's battery status parameters, driving behavior parameters, and ambient temperature parameters as inputs to the random forest model to predict the vehicle's RDR, enriching the dimensions of the influencing factors of RDR estimation and improving the accuracy of RDR estimation. Moreover, the battery status parameters include SOH, which is calculated by the change in SOC during a single charging process. It can objectively and to a large extent determine the RDR, which helps to improve the accuracy of RDR estimation.
[0081] Furthermore, by first estimating the energy consumption rate (ECR) and then the remaining driving range (RDR), the layered and sequential estimation scheme makes the algorithm interpretable. This embodiment involves a two-layer random forest model prediction mechanism, using a random forest regression method to sequentially estimate ECR and RDR. Through a staged feature combination and information transmission mechanism, it achieves the effect of optimizing prediction accuracy. The specific explanation is as follows:
[0082] (1) The first random forest model predicts ECR by inputting operating data, capturing the nonlinear relationship of transient energy consumption. The second random forest model predicts RDR by combining the ECR prediction value with the original operating data, achieving deep interaction of global features. The remaining driving range (RDR) mainly depends on two aspects: the current battery state (including the state of health (SOH) and the remaining charge (SOC)), and the energy consumption rate (ECR) caused by driving behavior and environmental influences. Predicting ECR first and then predicting RDR can put factors such as ECR, which are to some extent controllable by humans, on the same level as objective fixed factors such as SOH and SOC, facilitating subsequent prediction and research analysis.
[0083] (2) The first-layer ECR model focuses on calculating energy consumption in the current state, while the second-layer RDR model introduces ECR as an intermediate variable to simulate its dynamic impact on the remaining driving range (such as the nonlinear decrease in range caused by the persistence of high energy consumption). This hierarchical progressive structure is more consistent with the causal relationship between energy consumption and range in actual driving. ECR represents the instantaneous state, while RDR reflects the cumulative effect. For example, a short-term increase in ECR in a low-temperature environment can be corrected into a mild RDR change by the second-layer model combined with long-term temperature fluctuation data, avoiding the overfitting of the single-layer model to short-term fluctuations.
[0084] (3) The integration characteristics of random forests reduce the variance of ECR predictions. Even if there is a certain error in the output of the first layer, the second layer model can still adjust the RDR prediction by reweighting the original parameters (such as the compensatory effect of ambient temperature on battery performance), forming an error buffer. Moreover, in extreme driving scenarios such as emergency braking or severe acceleration, the first layer model may output highly fluctuating ECR values, but the second layer model can weaken the interference of occasional outliers on the final mileage prediction by correlating operating data (such as the average vehicle speed in driving behavior parameters).
[0085] In one embodiment, before step S101, the method further includes creating and training a random forest model. That is, the model training process of f1 and f2 is as follows:
[0086] Step 1: Start the environment and parameter settings.
[0087] We use Python as the programming environment and the scikit-learn machine learning library for model training. The environment configuration is as follows:
[0088] Python version: Use Python 3.8 and above to ensure compatibility with the latest machine learning algorithms.
[0089] Dependent libraries: numpy and pandas for data processing; matplotlib and seaborn for data visualization; scikit-learn for machine learning algorithms.
[0090] Software Environment: Can be run in Jupyter Notebook, VS Code, or PyCharm; if using a Linux or Windows terminal, you can directly execute Python scripts.
[0091] Step 2: Random forest model parameter setting.
[0092] Random forest regression is used as the core modeling method, and the specific parameters are set as follows:
[0093] (1) Number of decision trees (n_estimators): set to 100, that is, each random forest model consists of 100 decision trees.
[0094] (2) Maximum tree depth (max_depth): Set to None, that is, no maximum depth is set and it is automatically determined by the model.
[0095] (3) Minimum sample split (min_samples_split): Set to 2, that is, when the number of samples of a node (the internal node currently being considered for splitting) is not less than 2, the node is allowed to be further split. Otherwise, the node will stop splitting and become a leaf node.
[0096] Among them, min_samples_split controls the conditions for whether an internal node in the decision tree is allowed to split further. Specifically, if the number of samples in an internal node is greater than or equal to the threshold set by min_samples_split (for example, 2), then the internal node can be split further. If the number of samples in an internal node is less than the threshold set by min_samples_split, then the internal node will not be split further and will become a leaf node.
[0097] (4) Minimum number of leaf node samples (min_samples_leaf): Set to 1, that is, the leaf node contains at least 1 sample.
[0098] (5) Feature selection method (max_features): Set to "auto", which automatically selects the number of features for splitting. The default is to take the square root of the total number of features.
[0099] (6) Parallel computing (n_jobs): Set to -1 to use all CPU threads for parallel computing to accelerate model training.
[0100] Step 3: Model training. Figure 4 A random forest model training method is provided, such as Figure 4 As shown, the process includes the following steps:
[0101] Step S201, randomly extract sample data from the original data set, and construct multiple training data sets based on the extracted sample data; wherein each sample data includes a feature vector and a corresponding target variable, the feature vector is composed of multiple features, and the features are constructed based on the operating data of multiple vehicles, and the target variables include ECR and RDR.
[0102] Randomly extract sample data of size n from the original dataset D and perform replacement sampling. Repeat this process k times to construct k training sets. The unselected samples are called out-of-bag samples and are used to calculate the error and evaluate the model.
[0103] ;
[0104] Among them, D i represents the i-th sample data (self-sampling set), X represents the feature vector, y is the corresponding target variable, where the target variable of the first random forest model is ECR, the target variable of the second random forest model is RDR, n is the number of samples of each sample data, and k is the total number of sample data used to construct the random forest model.
[0105] Step S202: construct multiple decision trees for each training set, and form a first random forest model and a second random forest model based on the multiple decision trees.
[0106] For each training set, a decision tree is independently constructed. Each decision tree includes multiple decision nodes. Multiple decision trees can be combined to form a first random forest model and a second random forest model. The first random forest model takes as input the battery state parameters, driving behavior parameters, and ambient temperature parameters, and outputs the ECR prediction value. The second random forest model takes as input the battery state parameters, driving behavior parameters, ambient temperature parameters, and ECR prediction value, and outputs the RDR prediction value.
[0107] Step S203: randomly select multiple features at the decision nodes of each decision tree, and find the optimal partitioning feature and the corresponding partitioning threshold from the selected features. Based on the optimal partitioning feature and the corresponding partitioning threshold, perform binary partitioning on the sample data of the current decision node.
[0108] In step S204, each partition is performed with the goal of minimizing the mean square error, and the optimal partition feature and the corresponding partition threshold are found, thereby training the first random forest model and the second random forest model.
[0109] At each decision node, multiple features (for example, m) are randomly selected, and then the optimal partitioning feature and corresponding partitioning threshold are selected from the multiple features. The optimization goal is to minimize the mean square error (MSE). The calculation formula is as follows:
[0110] ;
[0111] Among them, y i is the actual value, is the predicted value, and N is the number of samples.
[0112] In one embodiment, a method for calculating the actual ECR and RDR values is provided. ECR is a straightforward parameter for measuring the energy consumption of electric vehicles. This embodiment calculates ECR by calculating the ratio of charging energy to driving distance within the same SOC interval within adjacent charge and discharge phases. The calculation formula is as follows:
[0113] ;
[0114] Among them, D trip Indicates the driving distance of a certain driving stage, which is obtained by subtracting the mileage at the end of the driving and the cumulative mileage at the end of the driving stage. charge Represents the charging energy between adjacent charging phases, calculated by integrating the product of current and voltage over time. The SOC intervals of the selected charging phase are intersected to ensure that the SOC interval of the selected charging phase is consistent with the corresponding driving phase.
[0115] In the context of electric vehicle applications, RDR represents the distance that can be continued to travel under the current vehicle state. This embodiment calculates RDR based on SOC consumption, and its calculation formula is as follows:
[0116] ;
[0117] Among them, DR represents the driving range, that is, the maximum driving capacity of the vehicle, SOC e Indicates the SOC end value of this driving phase, SOC s Indicates the SOC starting value of the driving phase, and SOC s Greater than SOC e .
[0118] In one embodiment, the contribution value of each feature to the reduction of the mean square error in all decision trees can be calculated; the influence of each input variable on the ECR prediction value and the RDR prediction value can be measured according to the reduction contribution value corresponding to each feature; according to the influence of each input variable on the ECR prediction value and the RDR prediction value, the target parameter can be determined from the operating data and the target parameter can be used as the input variable.
[0119] In the random forest model of this embodiment, the mean squared error (MSE) is used as the splitting criterion. When a feature is used to split a node in the decision tree, the reduction in the MSE of the node, ΔMSE(n), reflects the contribution of the feature. The contribution of feature f to the reduction in the mean squared error can be reflected by the importance score I(f). The calculation formula for the importance score I(f) of feature f is as follows:
[0120] ;
[0121] Where, ΔMSE(n) is the reduction of MSE at node n, Nunber Total_nodesis the total number of nodes. This embodiment calculates each feature's contribution to the reduction of the mean squared error (splitting criterion) across all decision trees (i.e., the importance score of feature f) to effectively measure the contribution of input variables to ECR and RDR, enabling quantitative analysis of influencing factors. From the operating data of battery state parameters, driving behavior parameters, and ambient temperature parameters, target parameters with significant contributions (e.g., no less than a preset contribution threshold) are selected as input variables to improve the accuracy and interpretability of electric vehicle range predictions.
[0122] In one embodiment, based on the trained random forest model, the variable control method is used to evaluate the optimization potential of different factors on RDR. At any time, other input variables are fixed and only the target variable X is changed. i , so that the target variable X i In the upper and lower quartiles Q1(X i ) and Q3(X i ) changes between them, and calculate the impact of the target variable on RDR. i , its optimization potential for RDR is defined as:
[0123] ;
[0124] Through this embodiment, the quantitative optimization potential of each influencing factor dimension at the corresponding moment can be calculated for optimization reference.
[0125] For example, among the target variables of each input, if the impact value of the corresponding battery status parameter (ΔRDR(SOH)) is relatively large, it means that replacing the battery can effectively improve the battery life, and a corresponding user prompt message is generated.
[0126] Among the input target variables, if the impact value of the corresponding driving behavior parameter (ΔRDR (average current) or ΔRDR (average vehicle speed)) is relatively large, it means that optimizing driving behavior can effectively improve battery life and generate corresponding user prompt information.
[0127] Among the target variables input, if the impact value of the corresponding ambient temperature parameter (ΔRDR (temperature term)) is relatively large, it means that temperature control or seasonal changes have a significant impact on battery life, and a corresponding user prompt message is generated.
[0128] By combining variable control methods with statistical quantiles, we provide quantitative evaluation for optimization strategies in different dimensions and provide data support for the optimization of electric vehicle endurance.
[0129] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0130] In one embodiment, Figure 5 A flowchart of another method for estimating the remaining driving range of an electric vehicle is provided. This embodiment is applicable to electric vehicles, and the normative references include: GB / T 19596-2017 Electric Vehicle Terminology, GB / T 38146.1-2019 China Automobile Driving Conditions, and GB / T 32960.1-2016 Technical Specification for Electric Vehicle Remote Service and Management Systems. The vehicle status parameters involved in this embodiment are obtained in accordance with national standards through vehicle-mounted terminals and sensor devices, uploaded to a vehicle data cloud platform via network connectivity technology. The specific data items and formats refer to GB / T 32960. Data items relevant to the subsequent processes of this embodiment include: vehicle speed, cumulative mileage, data collection time, SOC, battery pack terminal voltage, battery pack terminal current, maximum battery temperature, minimum battery temperature, vehicle status (including driving and charging), and charging status. This embodiment uses a real vehicle big data training model from the same model. First, real vehicle operating data is extracted, and key intermediate parameters are calculated using the proposed energy consumption rate (ECR) and battery state of health (SOH) calculation methods. Then, using a random forest regression approach, a random forest regression model (RF) is gradually trained to estimate the ECR and remaining driving range (RDR). Finally, based on the trained model, online estimation and multi-dimensional analysis of the EV's range are performed, quantifying the influencing factors and providing a reference value for the remaining driving range optimization space based on actual conditions.
[0131] In one embodiment, Figure 6 Provided Figure 5 The specific flow chart of the remaining driving range estimation method of electric vehicles is as follows: Figure 6 As shown, the process includes the following steps:
[0132] Step S601: randomly extract sample data from the original data set and construct multiple training sets based on the extracted sample data; wherein each sample data includes a feature vector and a corresponding target variable, the feature vector is composed of multiple features, the features are extracted based on the operating data of multiple vehicles, and the target variables include ECR and RDR;
[0133] Step S602: construct multiple decision trees for each training set, and form a first random forest model and a second random forest model based on the multiple decision trees.
[0134] Step S603: Randomly select multiple features at the decision nodes of each decision tree, and find the optimal partitioning feature and the corresponding partitioning threshold from the selected features. Based on the optimal partitioning feature and the corresponding partitioning threshold, perform a binary partitioning on the sample data of the current decision node. Each partitioning is performed with the goal of minimizing the mean square error, and the optimal partitioning feature and the corresponding partitioning threshold are found, thereby training a first random forest model and a second random forest model.
[0135] Step S604, calculating the contribution of each feature to the reduction of the mean square error in all decision trees;
[0136] Step S605, measuring the impact of each input variable on the ECR prediction value and the RDR prediction value according to the reduction contribution value corresponding to each feature;
[0137] Step S606: Determine target parameters from the operating data based on the impact of each input variable on the ECR prediction value and the RDR prediction value, and use the target parameters as input variables;
[0138] Step S607: Input the target parameters into the first random forest model, obtain first prediction values of multiple decision trees in the first random forest model, calculate the average of the multiple first prediction values, and output the ECR prediction value of the target vehicle;
[0139] Step S608: Using the target parameter and the ECR prediction value as input variables of the second random forest model, obtaining second prediction values of multiple decision trees in the second random forest model, and calculating the average of the multiple second prediction values to output the RDR prediction value of the target vehicle;
[0140] Step S609, determining the remaining driving range of the target vehicle according to the RDR prediction value;
[0141] Step S610: at any time, other input variables are fixed and only the target variable is changed so that the target variable varies between the upper and lower quartiles, and the impact value of the target variable on the RDR is calculated;
[0142] Step S611: If the impact value of the corresponding battery status parameter among the input target variables is relatively large, it means that replacing the battery can effectively improve the battery life, and a corresponding user prompt message is generated;
[0143] Step S612: If the impact value of the corresponding driving behavior parameter among the input target variables is relatively large, it means that optimizing the driving behavior can effectively improve the battery life, and a corresponding user prompt information is generated;
[0144] Step S613: If the impact value of the corresponding ambient temperature parameter is relatively large among the input target variables, it means that temperature control or seasonal changes have a greater impact on the battery life, and a corresponding user prompt message is generated.
[0145] In the above steps S601 to S613, in response to the shortcomings of related technologies that cannot quantify the impact of key factors on the remaining driving range and lack optimization space evaluation, a remaining driving range estimation method combining energy consumption rate estimation, feature importance analysis and optimization potential evaluation is proposed to achieve accurate estimation and optimization analysis of the remaining driving range.
[0146] First, by estimating the energy consumption rate first and then the remaining driving range, the hierarchical and sequential estimation scheme makes the algorithm interpretable. Second, by calculating feature importance, the contribution of each factor to the remaining driving range in the decision-making process is quantified, enabling an analysis of the importance of influencing factors. Finally, based on the trained model and statistical analysis data, the optimization potential of the remaining driving range is further quantitatively evaluated, providing a scientific basis for adjusting driving behavior and optimizing battery management strategies. This embodiment not only improves the accuracy of the remaining driving range estimation but also provides a direction for electric vehicle optimization, contributing to the development of intelligent battery management and the electric vehicle industry.
[0147] In addition, in conjunction with the remaining range estimation method for an electric vehicle provided in the above embodiments, this embodiment may also provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any of the remaining range estimation methods for an electric vehicle provided in the above embodiments is implemented.
[0148] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication. The wireless communication can be achieved via Wi-Fi, a mobile cellular network, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a method for estimating the remaining driving range of an electric vehicle. The display screen of the computer device can be a liquid crystal display or an electronic ink display. The input device of the computer device can be a touch layer covering the display screen, keys, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse.
[0149] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0150] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0151] Acquiring operating data of the target vehicle, the operating data including battery state parameters, driving behavior parameters, and ambient temperature parameters, wherein the battery state parameters include SOH;
[0152] Using the operating data as an input variable of the first random forest model, obtaining first prediction values of multiple decision trees in the first random forest model, calculating an average of the multiple first prediction values, and outputting an ECR prediction value of the target vehicle;
[0153] The operating data and the ECR prediction value are used as input variables of the second random forest model, the second prediction values of multiple decision trees in the second random forest model are obtained, and the average of the multiple second prediction values is calculated to output the RDR prediction value of the target vehicle;
[0154] Determine the remaining driving range of the target vehicle based on the RDR prediction value;
[0155] Among them, the first random forest model and the second random forest model are obtained by training sample data, the sample data includes a feature vector and a corresponding target variable, the feature vector is composed of multiple features, the features are extracted based on the operating data of multiple vehicles, and the target variables include ECR and RDR.
[0156] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0157] determining a first charging stage of a target vehicle;
[0158] Obtain the instantaneous value of the charging current, charging time, initial battery capacity, SOC starting value, and SOC ending value in the first charging stage;
[0159] Integrating the instantaneous value of the charging current based on the charging time to obtain an integral value;
[0160] Calculate the difference between the SOC start value and the SOC end value, and calculate the charging capacity based on the ratio of the integral value to the difference;
[0161] The SOH is calculated based on the ratio of the charged capacity to the initial capacity of the battery.
[0162] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0163] Randomly extract sample data from the original data set and construct multiple training sets based on the extracted sample data;
[0164] Constructing a decision tree for each training set, and combining multiple decision trees to form a first random forest model and a second random forest model;
[0165] At the decision node of each decision tree, multiple features are randomly selected, and the optimal partition feature and corresponding partition threshold are found from the selected features. Based on the optimal partition feature and the corresponding partition threshold, the sample data of the current decision node is binary partitioned;
[0166] Each division aims to minimize the mean square error and find the optimal division features and corresponding division thresholds to train the first random forest model and the second random forest model.
[0167] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0168] Calculate the contribution of each feature to the reduction of mean square error in all decision trees;
[0169] The impact of each input variable on the ECR prediction value and RDR prediction value is measured based on the reduction contribution value corresponding to each feature;
[0170] According to the influence of each input variable on the ECR prediction value and the RDR prediction value, the target parameters are determined from the operating data and used as input variables.
[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0172] At any time, other input variables are fixed and only the target variable is changed so that the target variable varies between the upper and lower quartiles, and the impact of the target variable on RDR is calculated;
[0173] Among the input target variables, if the impact value of the corresponding battery status parameter is relatively large, it means that replacing the battery can effectively improve the battery life, and a corresponding user prompt message is generated;
[0174] If the impact value of the corresponding driving behavior parameter is relatively large among the input target variables, it means that optimizing driving behavior can effectively improve the battery life, and corresponding user prompt information will be generated;
[0175] Among the target variables input, if the impact value of the corresponding ambient temperature parameter is relatively large, it means that temperature control or seasonal changes have a greater impact on battery life, and corresponding user prompt information is generated.
[0176] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0177] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0178] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0179] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for estimating the remaining driving range of an electric vehicle, characterized in that: include: Acquiring operating data of a target vehicle, the operating data including battery state parameters, driving behavior parameters, and ambient temperature parameters, wherein the battery state parameters include SOH; Using the operating data as an input variable of a first random forest model, obtaining first prediction values of a plurality of decision trees in the first random forest model, calculating an average of the plurality of first prediction values, and outputting an ECR prediction value of the target vehicle; Using the operating data and the ECR prediction value as input variables of a second random forest model, obtaining second prediction values of multiple decision trees in the second random forest model, calculating an average of the multiple second prediction values, and outputting an RDR prediction value of the target vehicle; Determining the remaining driving range of the target vehicle according to the RDR prediction value; The first random forest model and the second random forest model are trained through sample data, the sample data includes a feature vector and a corresponding target variable, the feature vector is composed of multiple features, the features are extracted based on the operating data of multiple vehicles, and the target variables include ECR and RDR.
2. The method for estimating the remaining driving range of an electric vehicle according to claim 1, characterized in that: Obtaining the battery status parameter includes: determining a first charging stage of the target vehicle; Obtaining the instantaneous value of the charging current, the charging duration, the initial capacity of the battery, the starting SOC value, and the ending SOC value in the first charging stage; Integrating the instantaneous value of the charging current based on the charging duration to obtain an integrated value; Calculating a difference between the SOC start value and the SOC end value, and calculating a charging capacity based on a ratio of the integral value to the difference; The SOH is calculated according to the ratio of the charging capacity to the initial capacity of the battery.
3. The method for estimating the remaining driving range of an electric vehicle according to claim 1, wherein: The battery status parameters also include: The SOC starting value of the target vehicle in the first charging stage; The cumulative mileage of the target vehicle.
4. The method for estimating the remaining driving range of an electric vehicle according to claim 1, wherein: The driving behavior parameter includes at least one of the following: Average vehicle speed, vehicle speed standard deviation, vehicle speed variation coefficient, average acceleration, average current, current standard deviation, current variation coefficient, and mean absolute value of current.
5. The method for estimating the remaining driving range of an electric vehicle according to claim 1, wherein: The ambient temperature parameter includes at least one of the following: Mean temperature, mean absolute temperature deviation.
6. The method for estimating the remaining driving range of an electric vehicle according to claim 1, characterized in that: The method further comprises: Randomly extracting the sample data from the original data set, and constructing multiple training sets based on the extracted sample data; Constructing a decision tree for each of the training sets, and forming the first random forest model and the second random forest model based on a combination of multiple decision trees; At the decision nodes of each decision tree, a plurality of features are randomly selected, and an optimal partitioning feature and a corresponding partitioning threshold are found from the selected features, and based on the optimal partitioning feature and the corresponding partitioning threshold, the sample data of the current decision node are binary partitioned; Each division is aimed at minimizing the mean square error, and the optimal division feature and the corresponding division threshold are found to train the first random forest model and the second random forest model.
7. The method for estimating the remaining driving range of an electric vehicle according to claim 6, characterized in that: The method further comprises: Calculate the contribution value of each feature to the reduction of the mean square error in all decision trees; Weighing the impact of each input variable on the ECR prediction value and the RDR prediction value according to the reduction contribution value corresponding to each feature; According to the influence of each input variable on the ECR predicted value and the RDR predicted value, a target parameter is determined from the operating data, and the target parameter is used as the input variable.
8. The method for estimating the remaining driving range of an electric vehicle according to claim 1, wherein: After determining the remaining driving range of the target vehicle according to the RDR prediction value, the method further includes: At any time, other input variables are fixed and only the target variable is changed so that the target variable varies between the upper and lower quartiles, and the impact value of the target variable on the RDR is calculated; If the impact value of the corresponding battery status parameter in each input target variable is relatively large, it means that replacing the battery can effectively improve the battery life, and a corresponding user prompt message is generated; If the impact value of the driving behavior parameter in each input target variable is relatively large, it means that optimizing the driving behavior can effectively improve the battery life, and a corresponding user prompt message is generated; Among the input target variables, if the impact value corresponding to the ambient temperature parameter is relatively large, it means that temperature control or seasonal changes have a greater impact on the battery life, and a corresponding user prompt message is generated.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.