Method and device for predicting remaining endurance mileage of electric vehicle and electronic equipment
By adopting a three-layer weighted stacking model, combined with multiple iterative training and testing methods, the remaining range of electric vehicles is predicted, and the problem of inaccurate prediction results in the existing technology is solved, and higher prediction accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202411889984.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-30
AI Technical Summary
The existing method of predicting residual range of electric vehicles is based on simple linear models or empirical formulas, resulting in insufficient accuracy and reliability of prediction results.
A three-layer weighted stacking model is used, including the base layer, generalization layer and meta-model layer, to predict the remaining range of the electric vehicle through the trained model. The training steps of the model include multiple iterative training and testing, and optimize the output of the meta-model layer by combining the output of the first base model and the second base model.
It improves the accuracy and efficiency of the remaining range prediction of electric vehicles, solves the problem of inaccurate prediction results in existing methods, and enhances the reliability of prediction.
Smart Images

Figure CN120067924A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electric vehicles, and particularly to a method, device, and electronic device for predicting the remaining driving range of an electric vehicle. Background Art
[0002] Predicting the remaining driving range of an electric vehicle usually depends on factors such as the vehicle's battery level, driving speed, climate conditions, and driving habits. However, most existing prediction methods are based on simple linear models or empirical formulas, and cannot fully consider the variable road conditions and driving environments, resulting in insufficient accuracy and reliability of the prediction results. In actual use, users may have unexpected charging needs due to inaccurate range information, affecting the travel experience.
[0003] Regarding the problem that most existing prediction methods are based on simple linear models or empirical formulas, resulting in insufficient accuracy and reliability of the prediction results, no effective solution has been proposed yet. Summary of the Invention
[0004] In the present invention, a method, device, and electronic device for predicting the remaining driving range of an electric vehicle are provided to solve the problem that most existing prediction methods are based on simple linear models or empirical formulas, resulting in insufficient accuracy and reliability of the prediction results.
[0005] In a first aspect, the present invention provides a method for predicting the remaining driving range of an electric vehicle, including:
[0006] Based on the target actual operation data of the target electric vehicle, predicting the remaining driving range of the target electric vehicle through a trained three-layer weighted stacking model, where the three-layer weighted stacking model includes a base layer, a generalization layer, and a meta-model layer, and the base layer includes a plurality of first base models, and the generalization layer includes a plurality of second base models;
[0007] Wherein, the training steps of the three-layer weighted stacking model include:
[0008] Obtaining the target sample operation data of a number of electric vehicles;
[0009] Dividing the target sample operation data into a training set and a test set, and equally dividing the training set into a first subset, a second subset, and a third subset;
[0010] Performing a first training on each of the first base models through the first subset and the second subset to obtain the first training results of each of the first base models; and, performing a first test on each of the first base models after the first training through the third subset and the test set to obtain the first test results of each of the first base models;
[0011] Performing a second training on each of the first base models respectively through the first subset and the third subset to obtain second training results of each of the first base models; and, performing a second test on each of the first base models after the second training respectively through the second subset and the test set to obtain second test results of each of the first base models;
[0012] Performing a third training on each of the first base models respectively through the second subset and the third subset to obtain third training results of each of the first base models; and, performing a third test on each of the first base models after the third training respectively through the second subset and the test set to obtain third test results of each of the first base models;
[0013] Training multiple second base models respectively through output combination results of each of the first base models, and training the meta-model layer through outputs of each of the second base models.
[0014] In a second aspect, an electric vehicle remaining driving range prediction device is provided in the present invention, including:
[0015] A driving range prediction module, configured to predict the remaining driving range of a target electric vehicle based on target actual operation data of the target electric vehicle through a trained three-layer weighted stacking model, where the three-layer weighted stacking model includes a base layer, a generalization layer, and a meta-model layer, the base layer includes multiple first base models, and the generalization layer includes multiple second base models;
[0016] Wherein, the training steps of the three-layer weighted stacking model include:
[0017] Obtaining target sample operation data of a plurality of electric vehicles;
[0018] Dividing the target sample operation data into a training set and a test set, and equally dividing the training set into a first subset, a second subset, and a third subset;
[0019] Performing a first training on each of the first base models respectively through the first subset and the second subset to obtain first training results of each of the first base models; and, performing a first test on each of the first base models after the first training respectively through the third subset and the test set to obtain first test results of each of the first base models;
[0020] Performing a second training on each of the first base models respectively through the first subset and the third subset to obtain second training results of each of the first base models; and, performing a second test on each of the first base models after the second training respectively through the second subset and the test set to obtain second test results of each of the first base models;
[0021] The third training of each of the first base models is performed respectively by the second subset and the third subset to obtain the third training results of each of the first base models; and, the third testing of each of the first base models after the third training is performed respectively by the second subset and the test set to obtain the third testing results of each of the first base models;
[0022] Multiple second base models are trained respectively by the output combination results of each of the first base models, and the meta-model layer is trained by the outputs of each of the second base models.
[0023] In a third aspect, an electronic device is provided in the present invention, including a memory and a processor, a computer program is stored in the memory, and the processor is configured to run the computer program to execute the electric vehicle remaining cruising range prediction method described in the first aspect.
[0024] In a fourth aspect, a computer-readable storage medium is provided in the present invention, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the electric vehicle remaining cruising range prediction method described in the first aspect are implemented.
[0025] Compared with the related art, the electric vehicle remaining cruising range prediction method provided by the present invention uses a three-layer weighted stacking model to predict the remaining cruising range of a target electric vehicle. The three-layer weighted stacking model can improve the prediction accuracy and prediction efficiency compared with a simple linear model or an empirical formula. Moreover, the three-layer weighted stacking model uses a specific training method, which can further improve the prediction accuracy of the three-layer weighted stacking model compared with the conventional training method. The problem that most of the existing prediction methods are based on simple linear models or empirical formulas, resulting in insufficient accuracy and reliability of the prediction results, is solved.
[0026] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is an architecture diagram of a three-layer weighted stacking model in some embodiments of the present invention;
[0028] Figure 2 is a comparison diagram of the model prediction effects of the feature selection method in some embodiments of the present invention and other feature selection methods;
[0029] Figure 3 is an architecture diagram of the three-layer weighted stacking model in the first comparative example;
[0030] Figure 4It is the architecture diagram of the three-layer weighted stacking model in the second comparative example;
[0031] Figure 5 It is the architecture diagram of the three-layer weighted stacking model in the third comparative example;
[0032] Figure 6 It is the comparison diagram of the prediction effects between the three-layer weighted stacking model and other stacking models in some embodiments of the present invention. Detailed implementation manners
[0033] To understand the purpose, technical solution and advantages of the present application more clearly, the present application will be described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0034] Unless otherwise defined, the technical terms or scientific terms involved in the present application shall have the general meanings understood by those with ordinary skills in the technical field to which the present application belongs. In the present application, words such as "a", "one", "a kind of", "the", "these" and the like do not represent a limitation in quantity, and they can be singular or plural. The terms "including", "comprising", "having" and any variants thereof involved in the present application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device including 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 may include other steps or modules (units) inherent in these processes, methods, products or devices. The terms "connected", "coupled" and the like involved in the present application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "plurality" involved in the present application means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. Usually, the character " / " indicates that the objects associated before and after are in an "or" relationship. The terms "first", "second", "third" and the like involved in the present application are only used to distinguish similar objects and do not represent a specific sorting for the objects.
[0035] In an embodiment of the present invention, a method for predicting the remaining driving range of an electric vehicle is provided. Figure 1 It is the flowchart of the method for predicting the remaining driving range of an electric vehicle provided in the embodiment of the present invention. As Figure 1 shown, this process includes step S110.
[0036] Step S110: Based on the target actual operation data of the target electric vehicle, predict the remaining driving range of the target electric vehicle through the trained three-layer weighted stacking model. The three-layer weighted stacking model includes a base layer, a generalization layer, and a meta-model layer. The base layer includes multiple first base models, and the generalization layer includes multiple second base models. In some embodiments, the base layer respectively uses Extreme Gradient Boosting (XGBoost), Random Forest (RF), Gradient Boosting Decision Tree (GBDT), Support Vector Machine (SVM), and BP Neural Network (BP) as the five first base models, and the generalization layer uses Ridge regression and Lasso regression as the two second base models. The meta-model layer linearly weights the results of the two second base models to obtain the final prediction result.
[0037] The target electric vehicle is the electric vehicle for which the remaining driving range needs to be predicted, and the target actual operation data is the actual feature values of each target feature, such as the vehicle speed value, voltage value, and current value of the target electric vehicle, etc. In different embodiments, different target features can be considered. Compared with ordinary linear deep learning models, the three-layer weighted stacking model has higher prediction accuracy.
[0038] In an actual scenario, for example, after the vehicle system obtains the predicted value of the remaining driving range of the electric vehicle, it returns this predicted value to the driver. The driver can decide whether to charge or replace the battery of the electric vehicle based on this predicted value. If the driver chooses to charge or replace the battery, the system will display the locations of nearby charging and battery replacement stations on the map; if the driver chooses not to charge or replace the battery, the system will continuously monitor the remaining driving range of the electric vehicle. When the remaining driving range is less than 20 km, the system will forcibly remind the driver to charge or replace the battery to ensure the normal operation of the electric vehicle.
[0039] More importantly, the present invention adopts a specific training method for this three-layer weighted stacking model, which can further improve the prediction accuracy of the three-layer weighted stacking model compared with ordinary training methods.
[0040] Among them, the training steps of the three-layer weighted stacking model include Step S210 to Step S260.
[0041] Step S210: Obtain the target sample operation data of several electric vehicles.
[0042] The target sample operation data is the sample feature values of each target feature. It should be noted that the target sample operation data and the target actual operation data are corresponding, that is, both are the feature values of the same target feature.
[0043] In some embodiments, the determination steps of each target feature include Step S211 and Step S212.
[0044] Step S211: Construct a candidate feature dataset from the historical operation data of a number of electric vehicles. The candidate feature dataset includes the feature values of a number of electric vehicles corresponding to multiple candidate features. Among them, the candidate feature dataset includes vehicle intrinsic characteristic features, driver behavior habit features, and external operation environment features. The vehicle intrinsic characteristic features include vehicle speed, voltage, current, state of charge of the battery, battery cell voltage threshold, temperature threshold, drive motor speed, drive motor torque, drive motor temperature, drive motor controller temperature, drive motor controller voltage, and drive motor controller current. The driver behavior habit features include accelerator pedal travel and brake pedal state, air temperature, humidity, precipitation, and wind speed.
[0045] Exemplarily, the actual operation data of 10 electric vehicles in the new energy vehicle supervision platform in the past year can be collected through the on-vehicle terminal to construct a candidate feature dataset. In addition to the feature values of the above-mentioned candidate features, these historical actual operation data may also include the feature values of other features, or there may be some abnormal or non-conforming data. Furthermore, the historical actual operation data directly obtained can be preprocessed. The preprocessing steps include:
[0046] First, screen out the operation data during the discharge process of electric vehicles according to the vehicle state and charging state, and delete the useless data columns. Secondly, judge the outliers according to the 3σ criterion, and set the identified outliers as null values, and then use the Lagrange interpolation method to fill the null values and missing values in the original data. Finally, considering that the battery life is closely related to the depth of charge and discharge, maintaining 30% remaining battery power can avoid deep discharge and extend the battery life. Therefore, in the present invention, 30% remaining battery power is used as the minimum safe discharge power. On this basis, a dataset with a remaining battery power range of 30% to 100% is screened out as the candidate feature dataset for predicting the remaining driving range of electric vehicles.
[0047] In the candidate feature dataset, the data format of the vehicle intrinsic characteristic feature V is:
[0048]
[0049] v represents the vehicle speed, U represents the voltage, I represents the current, S represents the state of charge of the battery, U max and U min represent the battery cell voltage threshold, t max and t min represent the temperature threshold, n represents the drive motor speed, T represents the drive motor torque, T t represents the drive motor temperature, T t c represents the drive motor controller temperature, represents the drive motor controller voltage, Indicates the current of the drive motor controller.
[0050] The data format of the driver behavior habit feature H is:
[0051]
[0052] s a Indicates the accelerator pedal travel, Indicates the brake pedal state.
[0053] The data format of the external operating environment feature E is:
[0054] E = (Tp, Sd, R, w) T
[0055] Tp represents the air temperature, Sd represents the humidity, R represents the precipitation, and w represents the wind speed.
[0056] Step S212, iteratively determine the candidate feature with the largest target ratio among the candidate features as the target feature. Among them, the target ratio is the ratio of the first correlation to the second correlation. The first correlation is the correlation between the candidate feature and the remaining driving range, and the second correlation is the average correlation between the candidate feature and at least one determined target feature.
[0057] Among them, the screening principle of the above target features is minimum redundancy and maximum correlation. Minimum redundancy means that the correlation between each target feature is as small as possible. Because the contribution of similar features to target prediction has a lot of repetition, selecting target features with as small a correlation as possible can avoid contribution redundancy as much as possible, thereby reducing the number of target features without affecting target prediction and improving the calculation speed. Maximum correlation means that the correlation between each target feature and the prediction target is as large as possible. The greater the correlation between the target feature and the prediction target, the greater the contribution of this feature to target prediction. In the present invention, the prediction target is the remaining driving range.
[0058] Preferably, the correlation between the candidate feature and the remaining driving range and the correlation between the candidate feature and at least one determined target feature are determined by weighted addition of the maximum information coefficient and the Spearman coefficient.
[0059] Specifically, the correlation calculation formula M(u, v) between two features is:
[0060] M(u, v) = ω m MIC(u, v) + ω s SC(u, v)
[0061]
[0062] Among them, u and v respectively represent two features. In the above embodiments, they respectively correspond to a candidate feature and the remaining battery life or respectively correspond to a candidate feature and a determined target feature. MIC(u, v) represents the maximum information coefficient function, SC(u, v) represents the Spearman coefficient function, ω m and ω s are respectively the weights of the maximum information coefficient function and the Spearman coefficient function, taking values between 0 and 1, and the two satisfy ω m +ω s = 1, a and b are respectively the number of networks in the directions of features u and v, G is the total number of grids, d i is the rank difference of the feature observation values, and n is the number of samples.
[0063] Through the above screening principle, m candidate features can be selected as the target features. This set of m candidate features satisfies the following conditions compared with other possible sets of candidate features:
[0064]
[0065] Among them, S represents the set of candidate features, x i and x j represent two distinct features in the set of candidate features, y represents the target feature, |S| represents the number of features in the set of candidate features, R represents the average correlation degree between each feature in the set of candidate features and the target feature, and R' represents the average correlation degree between each pair of distinct features in the set of candidate features.
[0066] The above conditions indicate that the selected set of candidate features has the largest R and the smallest R' compared with other possible sets of candidate features.
[0067] The maximum correlation and minimum redundancy can be expressed as:
[0068]
[0069] The above feature screening process is a process of maximizing φ using the incremental search method. For example, after obtaining n (n < m) target features S n , continue to select candidate features that meet the following conditions from the remaining candidate features S O - S n (S O represents the initial candidate feature data set) as the (n + 1)-th target feature:
[0070]
[0071] The above conditions are equivalent to the maximization of the above target ratio.
[0072] Meanwhile, the present invention uses the mean squared error (MSE) to evaluate the prediction effect of the model. The number of features is increased by 2 in sequence until the upper limit of the input features is reached. Then, the input features are input into the prediction model one by one to obtain different ω m and ω s The changing trend of MSE under different weight values. When the number of input features is less than 10, the MSEs under different ω m and ω s weight values are significantly different. When the number of input features reaches 10, the MSE tends to be stable.
[0073] In some of these embodiments, ω m and ω s are selected to be 0.7 and 0.3 respectively as the weights of the maximum information coefficient and the Spearman coefficient. Meanwhile, the feature selection method adopted in this embodiment is compared with other feature selection methods. The comparison results are as Figure 2 shown. Referring to Figure 2 , the features selected by the feature selection method in this embodiment are more conducive to subsequent model prediction, and the model prediction results are more accurate and stable. Specifically, the mean squared error (MSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and coefficient of determination (R2) of the model prediction results are all significantly better than other methods.
[0074] Furthermore, through the feature selection method in the above embodiments, a total of 12 target features are selected, which are: state of charge of the battery, minimum temperature value, maximum value of the battery cell voltage, voltage, minimum value of the battery cell voltage, accelerator pedal stroke, air temperature, vehicle speed, brake pedal state, humidity, current, and maximum temperature value, as shown in Table 1 specifically.
[0075] Table 1 Target Feature Set
[0076]
[0077] Therefore, in some of these embodiments, the target sample operation data is the target feature values of several electric vehicles.
[0078] Step S220: Divide the target sample operation data into a training set and a test set, and divide the training set into a first subset, a second subset, and a third subset equally.
[0079] For the training of the three-layer weighted stacking model, first, the target sample operation data can be divided into a training set and a test set by traditional data set division methods, such as a ratio of 7 / 3. The present invention further divides the training set into a first subset, a second subset, and a third subset equally. Then, each first base model is iteratively trained and tested. The three-round iterative processes correspond to step S230, step S240, and step S250 respectively.
[0080] Step S230: Use the first subset and the second subset to perform the first training on each first base model respectively, to obtain the first training results of each first base model; and use the third subset and the test set to perform the first test on each first base model after the first training respectively, to obtain the first test results of each first base model.
[0081] Step S240: Use the first subset and the third subset to perform the second training on each first base model respectively, to obtain the second training results of each first base model; and use the second subset and the test set to perform the second test on each first base model after the second training respectively, to obtain the second test results of each first base model.
[0082] Step S250: Use the second subset and the third subset to perform the third training on each first base model respectively, to obtain the third training results of each first base model; and use the second subset and the test set to perform the third test on each first base model after the third training respectively, to obtain the third test results of each first base model.
[0083] In the above iterative training and testing process of the first base model, in each round, first select two subsets (different selections in different rounds) as the training set to perform training on the first base model, and then incorporate the remaining one subset into the test set to perform testing on the first base model. After three rounds of training and testing, the first training results, the first test results, the second training results, the second test results, the third training results and the third test results of each first base model can be obtained.
[0084] Step S260: Use the output combination results of each first base model to perform training on multiple second base models respectively, and use the outputs of each second base model to perform training on the meta-model layer.
[0085] Specifically, the output combination result of n first base models can be expressed as:
[0086]
[0087] Test = [Test 1 , Test 2 , …, Test n
[0088] represents the i-th training result of the n-th first base model, and Test n represents the average value of the three test results of the n-th first base model. Train and Test will constitute the output combination result of each first base model.
[0089] Preferably, the training data of the second base model further includes target sample operation data. By combining the target sample operation data and the output combination results of each first base model, the training effect of the second base model can be improved. Correspondingly, in some embodiments, training multiple second base models through the output combination results of each first base model includes: training multiple second base models respectively through the combined data sets composed of the output combination results of each first base model and the target sample operation data.
[0090] In the above training process, the outputs of each first base model need to be combined by weighting and provided to the second base model, and the meta-model also needs to stack the outputs of each second base model by weighting to obtain the output of the three-layer weighted stacking model. In one example, the meta-model is expressed as:
[0091] f(x) = θ ridge f ridge (x) + θ lasso f lasso (x)
[0092] where θ ridge and θ lasso are the weight coefficients of Ridge regression and Lasso regression (two second base models), and f ridge (x) and f lasso (x) are the prediction results of the generalization layers of Ridge regression and Lasso regression.
[0093] Therefore, the output weights of each first base model and each second base model are the key to model training.
[0094] Preferably, the Bayesian optimization algorithm is used to determine the output weights of each base model. That is, in the output combination results of each first base model and the output combination results of each second base model respectively, the output weights of each first base model and the output weights of each second base model are both determined by the Bayesian optimization algorithm.
[0095] This optimization algorithm mainly includes two parts: a probabilistic surrogate model and an acquisition function during the optimization process.
[0096] Among them, the probabilistic surrogate model refers to the construction method of the objective function, and the distribution estimation of the objective function can be realized through the observation points. In the present invention, a Gaussian process is selected as the probabilistic surrogate model. The specific expression form of the Gaussian process is:
[0097] f(x) ∼ GP(μ(x), k(x, x))
[0098] where f(x) is the objective function, μ(x) is the mean function in the Gaussian process, and k(x, x) is the covariance function.
[0099] The acquisition function is used to select the next point to be evaluated under the current probabilistic surrogate model. The present invention selects the expected improvement function as the acquisition function. The expression of the expected improvement function is:
[0100] EI(x) = E[max(f(x) - f(best), 0)]
[0101] where f(best) represents the current best objective function value.
[0102] After determining the probabilistic surrogate model and the acquisition function, the Bayesian optimization algorithm is used to optimize the output weights of each base model.
[0103] Specifically, the optimization model for the output weights of each first base model or each second base model is:
[0104]
[0105] When optimizing the output weights of each first base model through the above optimization model: θ j represents the output weight of the j-th first base model, o ij represents the output of the j-th first base model in the i-th batch, y i represents the label of the i-th batch, c represents the total number of first base models, and N represents the total number of batches.
[0106] When optimizing the output weights of each second base model through the above optimization model: θ j represents the output weight of the j-th second base model, o ij represents the output of the j-th second base model in the i-th batch, y i represents the label of the i-th batch, c represents the total number of second base models, and N represents the total number of batches.
[0107] During the model training process, the output weights of each base model are continuously iteratively updated through the above optimization model to gradually reduce the model loss.
[0108] In one of the embodiments, the optimization results of the output weights of each base model are shown in Table 2.
[0109] Table 2 Output Weights of Base Models
[0110]
[0111] As can be seen from the table, the weights of XGBoost, RF, and GBDT in the base layer are 0.4503, 0.3697, and 0.1720 respectively, accounting for a large proportion among various base models, indicating that these three models can better capture data features; in the generalization layer, the weights of Ridge and Lasso are 0.6310 and 0.3690 respectively. By determining the weights of the above base models, the remaining driving range of electric vehicles can be predicted better.
[0112] In summary, the method for predicting the remaining driving range of an electric vehicle provided by the present invention uses a three-layer weighted stacking model to predict the remaining driving range of the target electric vehicle. Compared with a simple linear model or empirical formula, the three-layer weighted stacking model can improve the prediction accuracy and prediction efficiency. Moreover, the three-layer weighted stacking model adopts a specific training method, which can further improve the prediction accuracy of the three-layer weighted stacking model compared with the conventional training method. It solves the problem that most of the existing prediction methods are based on simple linear models or empirical formulas, resulting in insufficient accuracy and reliability of the prediction results.
[0113] As above, the method for predicting the remaining driving range of an electric vehicle provided by the present invention has been described relatively fully. Below, the effectiveness of some key technical means in the above prediction method is demonstrated through some comparative experiments.
[0114] In some embodiments, the present invention combines the output combination results of each first base model with the target sample operation data to train the second base model, and optimizes the output weights of each base model during the training process. To prove the effectiveness of the above technical means, in an experiment, the prediction effect of the model using the above technical means is compared with that of the first comparison means (refer to Figure 3 , also optimizing the output weights of each base model during the training process, but the training data of the second base model only contains the output combination results of each first base model), the second comparison means (refer to Figure 4 , using fixed output weights for each base model during the training process, and the training data of the second base model only contains the output combination results of each first base model) and the third comparison means (refer to Figure 5 , using fixed output weights for each base model during the training process, and the training data of the second base model only contains the output combination results of each first base model and only using one second base model).
[0115] The stacking models using the above four different technical solutions are respectively denoted as Stacking-A, Stacking-B, Stacking-C, and Stacking-D. Table 3 shows the prediction results of different stacking models.
[0116] Table 3 Prediction Results of Different Stacking Models
[0117]
[0118] As Figure 6 shown is a comparison chart of the predicted results of the remaining driving range of electric vehicles for different stacking models. From Table 3 and Figure 6 it can be seen that the MSE, MAE, MAPE, and R2 of the Stacking-A model adopted by the present invention are all significantly better than other algorithms. The three-layer weighted stacking model has a higher prediction accuracy and stronger generalization ability. The root mean square error, mean absolute error, mean absolute percentage error, and coefficient of determination reach 0.4568, 0.4932, 4.34%, and 0.9852 respectively.
[0119] In summary, on the one hand, the present invention significantly improves the prediction accuracy of the model for the remaining driving range of electric vehicles by combining the maximum information coefficient and the Spearman coefficient as variable evaluation criteria and using the minimum redundancy maximum correlation algorithm to optimize the input feature set, making it more accurately reflect the actual driving range. In addition, the constructed three-layer stacking model adjusts the weights of the base models through the Bayesian optimization algorithm, enhancing the generalization ability of the model on different data sets and ensuring the adaptability and stability in various environments.
[0120] On the other hand, the present invention effectively integrates various factors affecting the remaining driving range through comprehensive feature utilization, improving the information utilization rate. The accurate prediction results help users better plan their trips, reduce the anxiety caused by driving range uncertainty, and enhance the travel experience and confidence. At the same time, users can make reasonable travel decisions based on accurate driving range information, optimize the driving route, save time and costs, thereby improving the overall travel efficiency. These advantages jointly promote the wide application of electric vehicles.
[0121] In an embodiment of the present invention, a device for predicting the remaining driving range of an electric vehicle is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. The following terms "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0122] The device for predicting the remaining driving range of an electric vehicle includes:
[0123] A mileage prediction module, configured to predict the remaining driving range of the target electric vehicle based on the target actual operation data of the target electric vehicle through a trained three-layer weighted stacking model. The three-layer weighted stacking model includes a base layer, a generalization layer, and a meta-model layer. The base layer includes a plurality of first base models, and the generalization layer includes a plurality of second base models.
[0124] Among them, the training steps of the three-layer weighted stacking model include:
[0125] Obtain the target sample operation data of a number of electric vehicles.
[0126] Divide the target sample operation data into a training set and a test set, and divide the training set into a first subset, a second subset, and a third subset equally.
[0127] Perform the first training on each first base model through the first subset and the second subset respectively to obtain the first training results of each first base model; and, perform the first test on each first base model after the first training through the third subset and the test set respectively to obtain the first test results of each first base model.
[0128] Perform the second training on each first base model through the first subset and the third subset respectively to obtain the second training results of each first base model; and, perform the second test on each first base model after the second training through the second subset and the test set respectively to obtain the second test results of each first base model.
[0129] Perform the third training on each first base model through the second subset and the third subset respectively to obtain the third training results of each first base model; and, perform the third test on each first base model after the third training through the second subset and the test set respectively to obtain the third test results of each first base model.
[0130] Train multiple second base models respectively through the output combination results of each first base model, and train the meta-model layer through the outputs of each second base model.
[0131] The electric vehicle remaining driving range prediction device provided by the present invention uses a three-layer weighted stacking model to predict the remaining driving range of a target electric vehicle. Compared with a simple linear model or an empirical formula, the three-layer weighted stacking model can improve the prediction accuracy and prediction efficiency. Moreover, the three-layer weighted stacking model adopts a specific training method, which can further improve the prediction accuracy of the three-layer weighted stacking model compared with the conventional training method. It solves the problem that most of the existing prediction methods are based on simple linear models or empirical formulas, resulting in insufficient accuracy and reliability of the prediction results.
[0132] It should be noted that the above-mentioned each module can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned each module can be located in the same processor; or the above-mentioned each module can also be located in different processors in any combination form.
[0133] It should be understood that the specific embodiments described herein are for explaining this application rather than limiting it. All other embodiments obtained by those of ordinary skill in the art without creative efforts according to the embodiments provided in this application fall within the protection scope of this application.
[0134] Obviously, the accompanying drawings are only some examples or embodiments of this application. For those of ordinary skill in the art, this application can also be applied to other similar situations based on these drawings without creative efforts. Additionally, it can be understood that although the work done during this development process may be complex and time-consuming, for those of ordinary skill in the art, certain design, manufacturing, or production changes based on the technical content disclosed in this application are only routine technical means and should not be regarded as insufficient disclosure of this application.
Claims
1. A method for predicting the remaining cruising range of an electric vehicle, characterized in that: include: Based on the target actual operation data of the target electric vehicle, predicting the remaining cruising range of the target electric vehicle through a trained three-layer weighted stacking model, the three-layer weighted stacking model includes a base layer, a generalization layer and a metamodel layer, the base layer includes a plurality of first base models, and the generalization layer includes a plurality of second base models; The training steps of the three-layer weighted stacking model include: Obtain target sample operation data of several electric vehicles; Dividing the target sample running data into a training set and a test set, and equally dividing the training set into a first subset, a second subset, and a third subset; Performing a first training on each of the first base models using the first subset and the second subset, respectively, to obtain a first training result of each of the first base models; and performing a first test on each of the first base models after the first training, respectively, using the third subset and the test set, to obtain a first test result of each of the first base models; Performing a second training on each of the first base models using the first subset and the third subset, respectively, to obtain a second training result of each of the first base models; and performing a second test on each of the first base models after the second training, respectively, using the second subset and the test set, to obtain a second test result of each of the first base models; Performing a third training on each of the first base models using the second subset and the third subset, respectively, to obtain a third training result of each of the first base models; and performing a third test on each of the first base models after the third training using the second subset and the test set, respectively, to obtain a third test result of each of the first base models; The plurality of second base models are trained respectively through the output combination results of each of the first base models, and the meta-model layer is trained through the output of each of the second base models.
2. The method for predicting the remaining cruising range of an electric vehicle according to claim 1, characterized in that: In the output combination results of each of the first base models and the output combination results of each of the second base models, the output weights of each of the first base models and the output weights of each of the second base models are determined by a Bayesian optimization algorithm.
3. The method for predicting the remaining cruising range of an electric vehicle according to claim 2, characterized in that: The optimization model of the output weights of each of the first base models or the output weights of each of the second base models is: Among them, θ j represents the output weight of the jth first base model, o ij represents the output of the jth first base model in the i-th batch, y i represents the label of the i-th batch, c represents the total number of the first base model, and N represents the total number of batches; or, θ j represents the output weight of the jth second base model, o ij represents the output of the jth second base model in the i-th batch, y i represents the label of the i-th batch, c represents the total number of the second base models, and N represents the total number of batches.
4. The method for predicting the remaining cruising range of an electric vehicle according to claim 2, characterized in that: The step of training the plurality of second base models respectively by combining the output results of the first base models comprises: The plurality of second base models are trained respectively by using a combined data set formed by the output combination results of each of the first base models and the target sample operation data.
5. The method for predicting the remaining cruising range of an electric vehicle according to claim 1, characterized in that: The target sample operation data is the sample characteristic value of each target characteristic, the target actual operation data is the actual characteristic value of each target characteristic, and the determination step of each target characteristic includes: Building a candidate feature data set through historical operation data of a number of electric vehicles, wherein the candidate feature data set includes feature values of the number of electric vehicles corresponding to a plurality of candidate features; Iteratively determining a candidate feature having a maximum target ratio among the candidate features as a target feature; The target ratio is a ratio of a first correlation to a second correlation, wherein the first correlation is a correlation between the candidate feature and the remaining cruising range, and the second correlation is an average correlation between the candidate feature and at least one determined target feature.
6. The method for predicting the remaining cruising range of an electric vehicle according to claim 5, characterized in that: The candidate feature data set includes vehicle intrinsic characteristics, driver behavior characteristics and external operating environment characteristics. The vehicle intrinsic characteristics include vehicle speed, voltage, current, battery state of charge, battery cell voltage threshold, temperature threshold, drive motor speed, drive motor torque, drive motor temperature, drive motor controller temperature, drive motor controller voltage and drive motor controller current. The driver behavior characteristics include accelerator pedal travel and brake pedal status. The external operating environment characteristics include air temperature, humidity, precipitation and wind speed.
7. The method for predicting the remaining cruising range of an electric vehicle according to claim 5, characterized in that: The correlation is determined by weighted addition of the maximum information coefficient and the Spearman coefficient.
8. A device for predicting the remaining cruising range of an electric vehicle, characterized in that: include: A mileage prediction module, used to predict the remaining cruising range of the target electric vehicle through a trained three-layer weighted stacking model based on the target actual operation data of the target electric vehicle, wherein the three-layer weighted stacking model includes a base layer, a generalization layer and a metamodel layer, wherein the base layer includes a plurality of first base models, and the generalization layer includes a plurality of second base models; The training steps of the three-layer weighted stacking model include: Obtain target sample operation data of several electric vehicles; Dividing the target sample running data into a training set and a test set, and equally dividing the training set into a first subset, a second subset, and a third subset; Performing a first training on each of the first base models using the first subset and the second subset, respectively, to obtain a first training result of each of the first base models; and performing a first test on each of the first base models after the first training, respectively, using the third subset and the test set, to obtain a first test result of each of the first base models; Performing a second training on each of the first base models using the first subset and the third subset, respectively, to obtain a second training result of each of the first base models; and performing a second test on each of the first base models after the second training, respectively, using the second subset and the test set, to obtain a second test result of each of the first base models; Performing a third training on each of the first base models using the second subset and the third subset, respectively, to obtain a third training result of each of the first base models; and performing a third test on each of the first base models after the third training using the second subset and the test set, respectively, to obtain a third test result of each of the first base models; The plurality of second base models are trained respectively through the output combination results of each of the first base models, and the meta-model layer is trained through the output of each of the second base models.
9. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for predicting the remaining cruising range of an electric vehicle according to any one of claims 1 to 7.
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 for predicting the remaining cruising range of an electric vehicle according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Ozone precursor prediction method and system based on three-layer stacking ensemble learning
CN122133527A
An ozone precursor prediction method and system based on three-layer stacked ensemble learning
CN122133527B