Battery voltage estimation method, device, and storage medium

CN116660757BActive Publication Date: 2026-10-27DR OCTOPUS INTELLIGENT TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310799998.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-30
Publication Date
2026-10-27
Estimated Expiration
2043-06-30

AI Technical Summary

Technical Problem

[0005]本发明提供了一种电池电压预估方法、装置及存储介质,旨在有效解决现有技术中不能根据车辆的多种类型历史数据提前准确预估电池电压并输出电压异常报警的技术问题

Benefits of technology

[0050]在本发明所公开的技术方案中,不仅考虑电池参数对电池包电压的影响,还结合驾驶者的驾驶行为数据以及车辆所处的环境数据,使得模型适用场景更加接近电动汽车实际适用场景,从而提高电压预测的准确性。在神经网络模型方面,将Transformer模型应用于汽车动力电池电压预测中,并且针对时间序列预测引入循环神经网络模型(RNN)网络对Transformer模型进行改进以形成电压预测混合模型,使得模型适用于时间序列预测,提高动力电池电压预测准确性。本方案能够预测汽车动力电池包在未来时间的电压变化趋势,并对电池电压进行异常等级和类型划分,提前识别汽车动力电池的故障风险,从而获得足够的紧急处理时间。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116660757B_ABST
    Figure CN116660757B_ABST
Patent Text Reader

Abstract

The application discloses a battery voltage estimation method and device and a storage medium. The battery voltage estimation method comprises the following steps: constructing a training data set and a test data set according to historical data of multiple vehicles within a preset time, wherein the historical data comprises vehicle driving data, battery data and weather data; performing data cleaning on the training data set and the test data set and determining multiple characteristic parameters, wherein the characteristic parameters comprise training characteristic parameters; inputting the training characteristic parameters into a pre-constructed voltage prediction hybrid model and outputting a voltage estimation value; and outputting a warning information when the voltage estimation value is within a preset abnormal voltage range. The technical scheme provided by the application can solve the technical problem that the prior art cannot accurately estimate the battery voltage in advance according to multiple types of historical data of the vehicle and output an abnormal voltage alarm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery data analysis technology, and in particular to a battery voltage prediction method, apparatus, and storage medium. Background Technology

[0002] The battery system is an indispensable component of electric vehicles, largely determining their driving performance, safety, durability, and cost-effectiveness. In recent years, automotive power battery technology has developed rapidly. To meet the required voltage and capacity, multiple battery cells are typically connected in series or parallel. Due to aging or improper driver operation, various faults can occur in every single identical battery cell. Undetected faults, if not addressed promptly, can adversely affect battery safety and may even lead to thermal runaway of the battery system. Research shows that voltage anomalies can cause various battery faults, typical of which include overvoltage, undervoltage, and poor battery voltage consistency. Therefore, timely and accurate prediction of voltage anomalies during vehicle operation is crucial for preventing thermal runaway caused by voltage faults and ensuring the safe operation of electric vehicles.

[0003] Existing inventions have proposed many voltage fault diagnosis methods, which can be divided into threshold-based methods, model-based methods, and data-driven methods. Threshold-based methods are used to diagnose overvoltage and undervoltage battery faults, but they cannot predict the occurrence of battery faults in advance, and it is difficult to determine a suitable threshold in practical applications. Model-based methods can describe abnormal battery state changes relatively accurately, but they rely on conventional simulations of battery state estimation and can only be used to diagnose specific fault types. Data-driven methods, although applying artificial intelligence technology to diagnose battery voltage faults, only consider the influence of the battery's own parameters on the battery state, without considering the significant impact of driver behavior and changes in the electric vehicle's driving environment on the power battery during actual driving. This makes the model's voltage prediction under actual operating conditions of the electric vehicle inaccurate.

[0004] In summary, existing technologies have the technical problem of not being able to accurately predict battery voltage and output voltage anomaly alarms in advance based on various types of historical data of the vehicle. Summary of the Invention

[0005] This invention provides a battery voltage prediction method, device, and storage medium, aiming to effectively solve the technical problem in the prior art that it is impossible to accurately predict battery voltage in advance and output voltage abnormality alarm based on various types of historical data of the vehicle.

[0006] According to one aspect of the present invention, a battery voltage prediction method is provided, the battery voltage prediction method comprising:

[0007] Training and testing datasets are constructed based on historical data from multiple vehicles over a preset time period, wherein the historical data includes vehicle driving data, battery data, and weather data.

[0008] The training dataset and the test dataset are cleaned and multiple feature parameters are determined, wherein the feature parameters include training feature parameters;

[0009] The trained feature parameters are input into a pre-built voltage prediction hybrid model and the voltage prediction value is output.

[0010] When the voltage prediction value is within the preset abnormal voltage range, an early warning message is output.

[0011] Furthermore, the plurality of vehicles includes at least a first normal vehicle, a second normal vehicle, a first abnormal vehicle, a second abnormal vehicle, a first faulty vehicle, and a second faulty vehicle. The step of constructing training and testing datasets based on historical data from the plurality of vehicles within a preset time period includes:

[0012] The training dataset is constructed from the historical data of the first normal vehicle, the first abnormal vehicle, and the first faulty vehicle.

[0013] The test dataset is constructed from historical data of the second normal vehicle, the second abnormal vehicle, and the second faulty vehicle.

[0014] The training dataset and the test dataset are normalized using the maximum-minimum normalization method.

[0015] Furthermore, the vehicle driving data includes one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, and cumulative mileage; the battery data includes one or more of the following: total battery pack voltage, voltage of multiple individual battery cells, multiple temperature probe values, battery charge, and battery capacity; the weather data includes one or more of the following: air temperature, air humidity, air pressure, and precipitation; and the data cleaning of the training dataset and the test dataset includes:

[0016] Delete data with null values ​​from the historical data;

[0017] Delete data whose brake pedal displacement rate is not in the preset first displacement range;

[0018] Delete the data whose accelerator pedal displacement rate is not in the preset second displacement range;

[0019] Delete data whose driving speed is not within the preset speed range;

[0020] Delete data whose individual battery cell voltage is outside the preset voltage range;

[0021] Delete data whose temperature probe values ​​are outside the preset temperature range;

[0022] Delete data whose battery level is outside the preset range.

[0023] Furthermore, determining the multiple feature parameters includes:

[0024] Calculate one or more of the following: the mean voltage of the individual cells, the median voltage of the individual cells, the range of the individual cells, and the standard deviation of the individual cells;

[0025] Calculate one or more of the temperature mean, temperature median, temperature range, and temperature standard deviation of the multiple temperature probe values;

[0026] The plurality of characteristic parameters are determined to be one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, cumulative travel, total battery voltage, battery charge, battery charge percentage, air temperature value, air humidity value, air pressure value, mean voltage of individual cells, median voltage of individual cells, range of individual cell voltage, standard voltage of individual cells, mean temperature, median temperature, range of temperature, and standard deviation of temperature.

[0027] Furthermore, the battery voltage prediction method also includes:

[0028] Before constructing the training and test datasets, the vehicle driving data and the battery data are sampled according to a first sampling frequency; the weather data is sampled according to a second sampling frequency, wherein the first sampling frequency is greater than the second sampling frequency;

[0029] After determining multiple feature parameters, the weather data is interpolated using the Lagrange interpolation method to ensure that the number of weather data points matches the number of vehicle driving data points.

[0030] Furthermore, the method also includes:

[0031] The voltage prediction hybrid model is constructed by replacing the masked multi-head attention layer of the decoder module in the Transformer model with a recurrent neural network model.

[0032] Further, the step of inputting the trained feature parameters into the pre-built voltage prediction hybrid model and outputting the voltage prediction value includes:

[0033] The training feature parameters are constructed as input time series data based on the sliding window algorithm;

[0034] The training hyperparameters of the voltage prediction hybrid model are set, wherein the training hyperparameters include the input step size of the input time series data, the output step size of the output time series data, the maximum number of iterations, the number of heads in the multi-head attention model, the amount of data per batch, the probability of randomly discarding data, the initial learning rate, the adjustment coefficient, and the number of neurons in the recurrent neural network model.

[0035] The input time series data is input into the voltage prediction hybrid model, and the output time series data corresponding to the voltage prediction value is output.

[0036] The loss function is calculated based on the actual total battery pack voltage from the historical data and the voltage estimate.

[0037] Furthermore, the feature parameters also include test feature parameters, and the method further includes:

[0038] Obtain the first test feature parameter corresponding to the second normal vehicle in the test dataset;

[0039] The first test feature parameter is input into the voltage prediction hybrid model and the first voltage test value is output.

[0040] The accuracy parameters of the voltage prediction hybrid model are calculated based on the actual total battery pack voltage in the historical data and the first voltage test value. The accuracy parameters include one or more of the following: mean absolute error, root mean square error, mean relative error, and goodness of fit.

[0041] Obtain the second test feature parameters corresponding to the second abnormal vehicle and the second faulty vehicle in the test dataset;

[0042] The second test feature parameter is input into the voltage prediction hybrid model and the second voltage test value is output. It is determined whether the second voltage test value is within the abnormal voltage range and whether the warning information is output.

[0043] According to another aspect of the present invention, the present invention also provides a battery voltage prediction device, the device comprising:

[0044] The data acquisition module is used to construct training datasets and test datasets based on historical data of multiple vehicles within a preset time period, wherein the historical data includes vehicle driving data, battery data and weather data;

[0045] The data processing module is used to clean the training dataset and the test dataset and determine multiple feature parameters, wherein the feature parameters include training feature parameters;

[0046] The voltage prediction module is used to input the trained feature parameters into the pre-built voltage prediction hybrid model and output the voltage prediction value;

[0047] The voltage warning module is used to output warning information when the voltage estimate is within a preset abnormal voltage range.

[0048] According to another aspect of the invention, the invention also provides a storage medium storing a plurality of instructions adapted to be loaded by a processor to execute any of the battery voltage estimation methods described above.

[0049] Through one or more embodiments of the above embodiments of the present invention, at least the following technical effects can be achieved:

[0050] The technical solution disclosed in this invention not only considers the impact of battery parameters on battery pack voltage, but also incorporates driver behavior data and vehicle environment data, making the model's applicable scenarios closer to the actual application scenarios of electric vehicles, thereby improving the accuracy of voltage prediction. Regarding the neural network model, the Transformer model is applied to automotive power battery voltage prediction, and a recurrent neural network (RNN) is introduced to improve the Transformer model for time series prediction, forming a hybrid voltage prediction model. This makes the model suitable for time series prediction, improving the accuracy of power battery voltage prediction. This solution can predict the voltage change trend of the automotive power battery pack in the future and classify the battery voltage anomaly levels and types, identifying the failure risks of the automotive power battery in advance, thereby obtaining sufficient emergency response time.

[0051] In summary, this solution combines driving behavior data and environmental data to construct a hybrid model for voltage prediction using a recurrent neural network (RNN) model and a Transformer model. This improves the accuracy of future battery pack voltage prediction and enables early detection and warning of battery faults based on the predicted voltage, thereby enhancing the safety of electric vehicles in daily use. Attached Figure Description

[0052] The technical solution and other beneficial effects of the present invention will become apparent from the following detailed description of specific embodiments of the invention, in conjunction with the accompanying drawings.

[0053] Figure 1 A flowchart illustrating the steps of a battery voltage prediction method provided in an embodiment of the present invention;

[0054] Figure 2 A framework diagram of a voltage prediction hybrid model provided in an embodiment of the present invention;

[0055] Figure 3This is a schematic diagram of the input and output of time series data provided in an embodiment of the present invention;

[0056] Figure 4 This is a schematic diagram of a battery voltage prediction device provided in an embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0058] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the character " / " in this document, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0059] Figure 1 The diagram shows a flowchart of the battery voltage prediction method provided in an embodiment of the present invention. According to one aspect of the present invention, a battery voltage prediction method is provided, the battery voltage prediction method comprising:

[0060] Step 101: Construct a training dataset and a test dataset based on historical data of multiple vehicles within a preset time period, wherein the historical data includes vehicle driving data, battery data, and weather data;

[0061] Step 102: Clean the training dataset and the test dataset and determine multiple feature parameters, wherein the feature parameters include training feature parameters;

[0062] Step 103: Input the trained feature parameters into the pre-built voltage prediction hybrid model and output the voltage prediction value;

[0063] Step 104: Output a warning message when the voltage estimate is within the preset abnormal voltage range.

[0064] Existing electric vehicle battery technology suffers from limitations in early fault diagnosis and insufficient research on voltage prediction that incorporates driving behavior and environment, resulting in low accuracy in voltage prediction. To address this issue, this invention transfers the Transformer model to voltage prediction and integrates historical driving data collected from natural driving with environmental parameters. It assesses battery voltage based on the correlation between various vehicle data and the battery. Furthermore, to make the model suitable for predicting time-series data, a recurrent neural network (RNN) layer is introduced into the Transformer model to construct a hybrid voltage prediction model. This improves the accuracy of predicting future battery voltage and categorizes battery fault levels and types based on voltage anomaly severity and type.

[0065] The following is a detailed description of steps 101 to 104 above.

[0066] In step 101, a training dataset and a test dataset are constructed based on historical data of multiple vehicles within a preset time period, wherein the historical data includes vehicle driving data, battery data, and weather data;

[0067] For example, the training dataset is the data used to train the neural network model, and the test dataset is the data used to test the neural network model. Historical data for multiple vehicles is obtained; for example, historical data for at least three types of vehicles from the past two years is obtained. Specifically, the three types of vehicles are: vehicles with normal data, vehicles with abnormal data but no malfunctions, and vehicles that have previously experienced malfunctions.

[0068] To improve prediction accuracy, this approach combines actual historical driving data collected from natural driving, such as analyzing vehicle speed, accelerator pedal displacement, brake pedal displacement, and other vehicle driving data, as well as exploring the correlation between environmental weather data and power batteries.

[0069] In step 102, the training dataset and the test dataset are cleaned and multiple feature parameters are determined, wherein the feature parameters include training feature parameters;

[0070] For example, to improve prediction accuracy, historical data needs to be cleaned to remove outliers, and after cleaning, training and testing feature parameters are compiled. These feature parameters are data that has been preprocessed and directly input into the neural network model; they can be used to optimize and train the data. Both types of feature parameters are of the same type, including, for example, vehicle speed, cumulative mileage, air temperature, and battery charge. In practical applications, the feature parameters can be determined according to actual needs; this invention does not impose any limitations on this.

[0071] In step 103, the trained feature parameters are input into the pre-built voltage prediction hybrid model and the voltage prediction value is output.

[0072] For example, a neural network model is constructed in advance. This method does not use a single data processing model, but combines a Transformer model and a recurrent neural network model. The Transformer model is the main neural network model. However, the multi-head attention mechanism in the conventional Transformer model is not suitable for processing time series data. The data in this application is based on time ordering. Therefore, a recurrent neural network model (RNN) suitable for processing time series is selected to replace the mask multi-head attention mechanism in the Transformer model, so that the model can achieve better accuracy in time series data prediction.

[0073] In step 104, a warning message is output when the voltage estimate is within a preset abnormal voltage range.

[0074] For example, this solution aims to predict the future total battery pack voltage based on historical data, such as predicting the total battery pack voltage for the next hour based on data from the past 2.5 hours. It also helps to anticipate vehicle malfunctions. When the predicted voltage falls within a preset abnormal voltage range, a warning message is output. This abnormal voltage range can be divided into multiple intervals, and correspondingly, the warning message can be categorized into multiple warning levels.

[0075] Furthermore, the plurality of vehicles includes at least a first normal vehicle, a second normal vehicle, a first abnormal vehicle, a second abnormal vehicle, a first faulty vehicle, and a second faulty vehicle. The step of constructing training and testing datasets based on historical data from the plurality of vehicles within a preset time period includes:

[0076] The training dataset is constructed from the historical data of the first normal vehicle, the first abnormal vehicle, and the first faulty vehicle.

[0077] The test dataset is constructed from historical data of the second normal vehicle, the second abnormal vehicle, and the second faulty vehicle.

[0078] The training dataset and the test dataset are normalized using the maximum-minimum normalization method.

[0079] For example, to improve the optimization effect of the model, at least three types of vehicles are included: vehicles with normal data, vehicles with abnormal data but no malfunction, and vehicles that have previously malfunctioned. There are at least two vehicles of each type.

[0080] For example, real-time operating data from six identical electric vehicles is collected on a cloud platform, with a data collection granularity of 30-second intervals, and data from the past two years is collected for each vehicle. Based on the cloud platform's battery pack maintenance records, these vehicles are categorized into three groups:

[0081] The first category is normal vehicles. For example, the first normal vehicle (vehicle No. 1) and the second normal vehicle (vehicle No. 2) are normal vehicles, meaning that there have been no abnormal warnings in the cloud platform in the past.

[0082] The second category is abnormal vehicles. For example, the first abnormal vehicle (vehicle No. 3) and the second abnormal vehicle (vehicle No. 4) are vehicles with potential malfunctions. These two vehicles have abnormal warnings of excessive internal resistance in the cloud platform, but thermal runaway has not yet occurred.

[0083] The third category is faulty vehicles. For example, the first faulty vehicle (vehicle No. 5) and the second faulty vehicle (vehicle No. 6) are vehicles that have experienced malfunctions, while vehicles No. 5 and No. 6 are vehicles that have already experienced thermal runaway.

[0084] Specifically, the data from cars 1, 3, and 5 for one year can be used as the training data for the model, while the data from the second year and cars 2, 4, and 6 can be used as the test data for the model.

[0085] To make the data more discriminative and standardized, data normalization is performed. The training and test data are normalized using the max-min normalization formula, as follows:

[0086]

[0087] Where, x im This represents the sequence after the feature sequence has been normalized. Represents the original feature sequence. This represents the minimum value of the feature sequence in the sample. This represents the maximum value of the feature sequence in the sample, where m represents the number of features. The formula... Save it as a file in a fixed format, such as a pkl file, for easy use in subsequent denormalization processing.

[0088] Furthermore, the vehicle driving data includes one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, and cumulative mileage; the battery data includes one or more of the following: total battery pack voltage, voltage of multiple individual battery cells, multiple temperature probe values, battery charge, and battery capacity; the weather data includes one or more of the following: air temperature, air humidity, air pressure, and precipitation; and the data cleaning of the training dataset and the test dataset includes:

[0089] Delete data with null values ​​from the historical data;

[0090] Delete data whose brake pedal displacement rate is not in the preset first displacement range;

[0091] Delete the data whose accelerator pedal displacement rate is not in the preset second displacement range;

[0092] Delete data whose driving speed is not within the preset speed range;

[0093] Delete data whose individual battery cell voltage is outside the preset voltage range;

[0094] Delete data whose temperature probe values ​​are outside the preset temperature range;

[0095] Delete data whose battery level is outside the preset range.

[0096] For example, the historical data collected includes various fields, such as individual battery cell voltage, total battery pack voltage, temperature probe values, brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, current, SOC, and cumulative vehicle mileage. There are multiple individual battery cell voltage and temperature probe values ​​because a battery pack contains multiple cells, each corresponding to an individual battery cell voltage; multiple temperature probes are installed in various locations within the battery, and the battery temperature varies at different locations. Since meteorological factors can affect battery voltage, weather data needs to be collected for model training and testing.

[0097] Data cleaning is an indispensable step in the data analysis process. It can identify erroneous, inaccurate, or incomplete parts of the data to ensure the quality and reliability of the data.

[0098] First, remove any null values ​​from the data; second, delete data for each field that does not conform to its normal range. For example, the SOC should be controlled within 0%-100%, the temperature probe value should be controlled between -40-210℃, the individual battery cell voltage should be less than 5000mV, the total battery pack voltage should be less than 480V, the vehicle speed should be between 0-200km / h, and the accelerator / brake pedal displacement rate should be between 0%-100%.

[0099] Furthermore, determining the multiple feature parameters includes:

[0100] Calculate one or more of the following: the mean voltage of the individual cells, the median voltage of the individual cells, the range of the individual cells, and the standard deviation of the individual cells;

[0101] Calculate one or more of the temperature mean, temperature median, temperature range, and temperature standard deviation of the multiple temperature probe values;

[0102] The plurality of characteristic parameters are determined to be one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, cumulative travel, total battery voltage, battery charge, battery charge percentage, air temperature value, air humidity value, air pressure value, mean voltage of individual cells, median voltage of individual cells, range of individual cell voltage, standard voltage of individual cells, mean temperature, median temperature, range of temperature, and standard deviation of temperature.

[0103] For example, since there are multiple battery cell voltage and temperature probe values ​​simultaneously, these two sets of data need to be processed separately to organize one set of data into representative input values. Specifically, the mean, median, standard deviation, and range of the battery cell voltage and probe temperature in each frame of data can be calculated to generate eight characteristic parameters characterizing the battery cell voltage and battery pack temperature.

[0104] Finally, by combining other data, multiple feature parameters are obtained. The above 20 feature parameters are listed in this application. In specific applications, they can be determined according to actual needs. This invention does not limit them.

[0105] Furthermore, the battery voltage prediction method also includes:

[0106] Before constructing the training and test datasets, the vehicle driving data and the battery data are sampled according to a first sampling frequency; the weather data is sampled according to a second sampling frequency, wherein the first sampling frequency is greater than the second sampling frequency;

[0107] After determining multiple feature parameters, the weather data is interpolated using the Lagrange interpolation method to ensure that the number of weather data points matches the number of vehicle driving data points.

[0108] For example, since vehicle data changes rapidly, the sampling interval can be 20 seconds or 30 seconds. However, weather data generally changes less, so the sampling interval can be 0.5 hours or 1 hour. Therefore, the number of samples differs, and the training of the neural network model needs to maintain data consistency, with each data set having the same number of feature parameters. This invention uses the Lagrange interpolation method to interpolate the weather parameters, ensuring that the sampling times of both are consistent, and then merges the weather parameters with the vehicle data based on time calibration.

[0109] Among them, the Lagrange interpolation method is a polynomial interpolation method that can find a set of polynomials that take values ​​exactly at each observation point based on a given function.

[0110] Furthermore, the method also includes:

[0111] The voltage prediction hybrid model is constructed by replacing the masked multi-head attention layer of the decoder module in the Transformer model with a recurrent neural network model.

[0112] For example, in order to more effectively process time-series-based input data, this scheme constructs the voltage prediction hybrid model based on the Transformer model and the recurrent neural network model. Figure 2 A framework diagram of a voltage prediction hybrid model provided in an embodiment of the present invention is shown below. Figure 2 As shown, the traditional Transformer model structure includes an input layer (input Embedding), a positional encoding layer (Positional Encoding), an Encoder module, and a Decoder module.

[0113] The Encoder has six layers, each consisting of two sub-layers: a multi-head attention mechanism and a feed forward layer. Each sub-layer also includes an Add & Norm layer. The Decoder also has six layers, each containing three sub-layers: a Masked Multi-Head Attention layer, a Multi-Head Attention layer, and a Feed Forward layer. Each sub-layer also includes an Add & Norm layer.

[0114] The traditional Transformer model structure includes an input layer (input embedding), a positional encoding layer, an encoder module, and a decoder module.

[0115] The Encoder has six layers, each consisting of two sub-layers: a multi-head attention mechanism and a feed forward layer, with each sub-layer also including an Add & Norm layer. The Decoder also has six layers, each containing three sub-layers: a Masked Multi-Head Attention layer, a Multi-Head Attention layer, and a Feed Forward layer, with each sub-layer also including an Add & Norm layer. For Self-Attention, when matrix X is used as input, X is transformed linearly to obtain the matrix.

[0116] This solution primarily modifies the Decoder in the traditional Transformer model. Since the mapping between sliding window data differs from machine translation tasks, Masked Multi-Head Attention cannot be used. Furthermore, considering that Recurrent Neural Networks (RNNs) can capture time-series features, and the Encoder's output is essentially a sequence, the Masked Multi-Head Attention layer in the Decoder is replaced with an RNN layer, constructing a new hybrid prediction model. The model structure is as follows: Figure 2 As shown, the Nx module has multiple components in the complete model structure. Figure 2 Only one is listed in the text.

[0117] Because the Recurrent Neural Network (RNN) model structure can effectively utilize the relationships between sequences and has achieved great success in processing long-term series data, embedding the RNN network layers into the Transformer model structure can improve the accuracy of the model in time series data prediction.

[0118] Further, the step of inputting the trained feature parameters into the pre-built voltage prediction hybrid model and outputting the voltage prediction value includes:

[0119] The training feature parameters are constructed as input time series data based on the sliding window algorithm;

[0120] The training hyperparameters of the voltage prediction hybrid model are set, wherein the training hyperparameters include the input step size of the input time series data, the output step size of the output time series data, the maximum number of iterations, the number of heads in the multi-head attention model, the amount of data per batch, the probability of randomly discarding data, the initial learning rate, the adjustment coefficient, and the number of neurons in the recurrent neural network model.

[0121] The input time series data is input into the voltage prediction hybrid model, and the output time series data corresponding to the voltage prediction value is output.

[0122] The loss function is calculated based on the actual total battery pack voltage from the historical data and the voltage estimate.

[0123] For example, this step obtains the voltage prediction value through a voltage prediction hybrid model.

[0124] On one hand, the training feature parameters are constructed into input time series data based on the sliding window algorithm. That is, the original data is constructed into time series data using a sliding window method. This invention can provide a fixed sliding window, or the sliding window size can be customized to determine the time span of historical data used to predict future voltage levels. At the same time, the time step of the predicted data, i.e., the time span of the model output, can be customized and adjusted as needed.

[0125] Figure 3 This is a schematic diagram of the input and output of time series data provided in an embodiment of the present invention. Assuming the default sliding window size is IW and the prediction step size is OW, the input dataset of the model constructed from the original data is X = {X...} t-IW X t-IW+1 , ..., X t The model output dataset is Y = {y} t+1 y t+2 , ..., y t+OW}. Among them, X t-Iw =(x t-IW,1 x t-IW,2 , ..., x t-IW,m ), where IW represents the time step of the historical data contained in each data sample, and m represents the data feature format. Specifically, assuming an input step size IW = 240 and an output step size OW = 120, and a time interval of 30 seconds, this predicts the battery pack voltage for the next hour using historical data from the past 2 hours. Assuming the start time is 9:00 AM on a certain day, X t-IW X represents the set of feature parameters collected at 9 o'clock. t-IW+1 Then X represents the set of characteristic parameters at 9:30s. t-IW+2 Then X represents the set of characteristic parameters at 9:01. t This represents the set of characteristic parameters for 11 o'clock.

[0126] X t-IW =(x t-IW,1 x t-IW,2 , ..., x t-IW,m Assuming there are 20 feature parameters, then m is 20. For example, x t-IW,1 The value x represents the brake pedal displacement rate. t-IW,2 x represents the accelerator pedal displacement rate. t-IW,m It includes 20 characteristic parameters, such as temperature standard deviation.

[0127] The model output dataset is Y = {y t+1 y t+2 , ..., y t+OW}, where y t+1This represents the battery pack voltage at time t+1. Assuming an input step size IW = 240 and an output step size OW = 120, and a time frame of 30 seconds, this predicts the battery pack voltage for the next hour using historical data from the past 2 hours. Assuming the start time is 9:00 AM on a certain day, where y... t+1 This represents the battery pack voltage at time t+1, which is the estimated voltage value at 11 o'clock.

[0128] On the other hand, the training hyperparameters of the voltage prediction hybrid model are set, wherein the training hyperparameters include the input step size of the input time series data, the output step size of the output time series data, the maximum number of iterations, the number of heads in the multi-head attention model, the amount of data per batch, the probability of randomly discarding data, the initial learning rate, the adjustment coefficient, and the number of neurons in the recurrent neural network model.

[0129] Set the model training hyperparameters. For example, select an input step size IW = 300 for the input time series data and an input step size OW = 120 for the output time series data. That is, use historical data from the past 2.5 hours to predict the battery pack voltage for the next hour.

[0130] In the voltage prediction hybrid model structure, for example, the number of heads in the multi-head attention model is set to nhead = 10, that is, 10 attention layers are used in the Encoder module; the maximum number of iterations epochs is set to 300, and the batch size is set to batch_size = 64; the dropout probability is set to 0.2 to prevent overfitting; the initial learning rate is lr = 0.001, and the adjustment coefficient gamma = 0.95; the number of neurons in the recurrent neural network (RNN) model is set to 128.

[0131] The input time series data is input into the voltage prediction hybrid model, and the output time series data corresponding to the voltage prediction value is output.

[0132] The loss function is calculated based on the actual total battery pack voltage from the historical data and the voltage estimate.

[0133] Finally, the activation function of the fully connected layer is set to... The function is set to "Adam" as the model optimizer and MSE as the loss function, as shown in the following formula:

[0134]

[0135] Where n is the number of samples, y is the voltage estimate, where y is the actual total battery pack voltage in the historical data.

[0136] Furthermore, the feature parameters also include test feature parameters, and the method further includes:

[0137] Obtain the first test feature parameter corresponding to the second normal vehicle in the test dataset;

[0138] The first test feature parameter is input into the voltage prediction hybrid model and the first voltage test value is output.

[0139] The accuracy parameters of the voltage prediction hybrid model are calculated based on the actual total battery pack voltage in the historical data and the first voltage test value. The accuracy parameters include one or more of the following: mean absolute error, root mean square error, mean relative error, and goodness of fit.

[0140] Obtain the second test feature parameters corresponding to the second abnormal vehicle and the second faulty vehicle in the test dataset;

[0141] The second test feature parameter is input into the voltage prediction hybrid model and the second voltage test value is output. It is determined whether the second voltage test value is within the abnormal voltage range and whether the warning information is output.

[0142] For example, the evaluation accuracy of the voltage prediction hybrid model is tested based on the test feature parameters. There are two specific verification methods: one is to verify the accuracy of the model based on data from normal vehicles, and the other is to verify whether the model can detect faults in advance and issue alarm information based on data from abnormal vehicles and faulty vehicles.

[0143] The constructed training data is fed into the voltage prediction hybrid model for training, and the trained model is saved as a model file. The accuracy of the model's predictions is verified using the first test feature parameters corresponding to the second normal vehicle (vehicle number 2).

[0144] The evaluation criteria use multiple accuracy parameters to assess the model's accuracy, specifically including mean absolute error (MAE), root mean square error (RMSE), mean relative error (MAPE), and goodness of fit (R²). 2 Four indicators.

[0145] Let y i Let i be the actual total voltage of the battery pack at time i. Let be the voltage measurement value at time i. is the mean of the time series corresponding to the actual total voltage of the battery pack, and m represents the length of the time series.

[0146] The calculation formulas for the four indicators are as follows:

[0147] The mean absolute error (MAE) is calculated using the following formula:

[0148]

[0149] The root mean square error (RMSE) is calculated using the following formula:

[0150]

[0151] The mean relative error (MAPE) is calculated using the following formula:

[0152]

[0153] The goodness of fit (R) is calculated using the following formula. 2 ):

[0154]

[0155] Then, voltage anomaly detection is performed. Based on the historical operation and maintenance experience of the cloud platform, Table 1 shows the voltage anomaly warning levels and warning thresholds, where U pack This indicates the voltage test value. Voltage anomalies are subject to three levels of early warning based on threshold settings.

[0156] Table 1 Voltage Anomaly Warning Thresholds and Warning Levels (n in the table represents the number of battery cells)

[0157]

[0158] Obtain the second test feature parameters corresponding to the second abnormal vehicle and the second faulty vehicle in the test dataset; input the second test feature parameters into the voltage prediction hybrid model and output the second voltage test value; determine whether the second voltage test value is within the abnormal voltage range; and detect whether to output the warning information.

[0159] For example, the trained model and the thresholds determined in Table 1 are used to input the normalized data of the second abnormal vehicle (vehicle 4) and the second faulty vehicle (vehicle 5) in the test set for prediction. The predicted data is then denormalized to form voltage prediction data (second voltage test value). The predicted data is calculated and evaluated according to the accuracy parameter calculation formula. At the same time, the warning detection process is completed by comparing with the thresholds in Table 1, so as to realize the early warning of vehicle battery pack failure.

[0160] Through one or more embodiments of the above embodiments of the present invention, at least the following technical effects can be achieved:

[0161] The technical solution disclosed in this invention not only considers the impact of battery parameters on battery pack voltage, but also incorporates driver behavior data and vehicle environment data, making the model's applicable scenarios closer to the actual application scenarios of electric vehicles, thereby improving the accuracy of voltage prediction. Regarding the neural network model, the Transformer model is applied to automotive power battery voltage prediction, and a recurrent neural network (RNN) is introduced to improve the Transformer model for time series prediction, forming a hybrid voltage prediction model. This makes the model suitable for time series prediction, improving the accuracy of power battery voltage prediction. This solution can predict the voltage change trend of the automotive power battery pack in the future and classify the battery voltage anomaly levels and types, identifying the failure risks of the automotive power battery in advance, thereby obtaining sufficient emergency response time.

[0162] In summary, this solution combines driving behavior data and environmental data to construct a hybrid model for voltage prediction using a recurrent neural network (RNN) model and a Transformer model. This improves the accuracy of future battery pack voltage prediction and enables early detection and warning of battery faults based on the predicted voltage, thereby enhancing the safety of electric vehicles in daily use.

[0163] Based on the same inventive concept as the battery voltage prediction method in this embodiment of the invention, this embodiment of the invention provides a battery voltage prediction device. Please refer to... Figure 4 The device includes:

[0164] The data acquisition module 201 is used to construct a training dataset and a test dataset based on historical data of multiple vehicles within a preset time period, wherein the historical data includes vehicle driving data, battery data and weather data;

[0165] Data processing module 202 is used to perform data cleaning on the training dataset and the test dataset and determine multiple feature parameters, wherein the feature parameters include training feature parameters;

[0166] The voltage prediction module 203 is used to input the training feature parameters into the pre-built voltage prediction hybrid model and output the voltage prediction value;

[0167] The voltage warning module 204 is used to output warning information when the voltage estimate is within a preset abnormal voltage range.

[0168] Furthermore, the plurality of vehicles includes at least a first normal vehicle, a second normal vehicle, a first abnormal vehicle, a second abnormal vehicle, a first faulty vehicle, and a second faulty vehicle, and the data acquisition module 201 is further configured to:

[0169] The training dataset is constructed from the historical data of the first normal vehicle, the first abnormal vehicle, and the first faulty vehicle.

[0170] The test dataset is constructed from historical data of the second normal vehicle, the second abnormal vehicle, and the second faulty vehicle.

[0171] The training dataset and the test dataset are normalized using the maximum-minimum normalization method.

[0172] Furthermore, the vehicle driving data includes one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, and cumulative mileage; the battery data includes one or more of the following: total battery pack voltage, voltage of multiple individual battery cells, multiple temperature probe values, battery charge, and battery capacity; the weather data includes one or more of the following: air temperature, air humidity, air pressure, and precipitation; and the data processing module 202 is also used for:

[0173] Delete data with null values ​​from the historical data;

[0174] Delete data whose brake pedal displacement rate is not in the preset first displacement range;

[0175] Delete the data whose accelerator pedal displacement rate is not in the preset second displacement range;

[0176] Delete data whose driving speed is not within the preset speed range;

[0177] Delete data whose individual battery cell voltage is outside the preset voltage range;

[0178] Delete data whose temperature probe values ​​are outside the preset temperature range;

[0179] Delete data whose battery level is outside the preset range.

[0180] Furthermore, the data processing module 202 is also used for:

[0181] Calculate one or more of the following: the mean voltage of the individual cells, the median voltage of the individual cells, the range of the individual cells, and the standard deviation of the individual cells;

[0182] Calculate one or more of the temperature mean, temperature median, temperature range, and temperature standard deviation of the multiple temperature probe values;

[0183] The plurality of characteristic parameters are determined to be one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, cumulative travel, total battery voltage, battery charge, battery charge percentage, air temperature value, air humidity value, air pressure value, mean voltage of individual cells, median voltage of individual cells, range of individual cell voltage, standard voltage of individual cells, mean temperature, median temperature, range of temperature, and standard deviation of temperature.

[0184] Furthermore, the device is also used for:

[0185] Before constructing the training and test datasets, the vehicle driving data and the battery data are sampled according to a first sampling frequency; the weather data is sampled according to a second sampling frequency, wherein the first sampling frequency is greater than the second sampling frequency;

[0186] After determining multiple feature parameters, the weather data is interpolated using the Lagrange interpolation method to ensure that the number of weather data points matches the number of vehicle driving data points.

[0187] Furthermore, the voltage prediction module 203 is also used for:

[0188] The voltage prediction hybrid model is constructed by replacing the masked multi-head attention layer of the decoder module in the Transformer model with a recurrent neural network model.

[0189] Furthermore, the voltage prediction module 203 is also used for:

[0190] The training feature parameters are constructed as input time series data based on the sliding window algorithm;

[0191] The training hyperparameters of the voltage prediction hybrid model are set, wherein the training hyperparameters include the input step size of the input time series data, the output step size of the output time series data, the maximum number of iterations, the number of heads in the multi-head attention model, the amount of data per batch, the probability of randomly discarding data, the initial learning rate, the adjustment coefficient, and the number of neurons in the recurrent neural network model.

[0192] The input time series data is input into the voltage prediction hybrid model, and the output time series data corresponding to the voltage prediction value is output.

[0193] The loss function is calculated based on the actual total battery pack voltage from the historical data and the voltage estimate.

[0194] Furthermore, the characteristic parameters also include test characteristic parameters, and the voltage prediction module 203 is further used for:

[0195] Obtain the first test feature parameter corresponding to the second normal vehicle in the test dataset;

[0196] The first test feature parameter is input into the voltage prediction hybrid model and the first voltage test value is output.

[0197] The accuracy parameters of the voltage prediction hybrid model are calculated based on the actual total battery pack voltage in the historical data and the first voltage test value. The accuracy parameters include one or more of the following: mean absolute error, root mean square error, mean relative error, and goodness of fit.

[0198] Obtain the second test feature parameters corresponding to the second abnormal vehicle and the second faulty vehicle in the test dataset;

[0199] The second test feature parameter is input into the voltage prediction hybrid model and the second voltage test value is output. It is determined whether the second voltage test value is within the abnormal voltage range and whether the warning information is output.

[0200] Other aspects and implementation details of the battery voltage prediction device are the same as or similar to the battery voltage prediction method described above, and will not be repeated here.

[0201] According to another aspect of the invention, the invention also provides a storage medium storing a plurality of instructions adapted to be loaded by a processor to execute any of the battery voltage estimation methods described above.

[0202] In summary, although the present invention has been disclosed above with reference to preferred embodiments, the above preferred embodiments are not intended to limit the present invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope defined in the claims.

Claims

1. A method for predicting battery voltage, characterized in that, The battery voltage prediction method includes: Training and testing datasets are constructed based on historical data from multiple vehicles over a preset time period, wherein the historical data includes vehicle driving data, battery data, and weather data. The training dataset and the test dataset are cleaned and multiple feature parameters are determined, wherein the feature parameters include training feature parameters; The trained feature parameters are input into a pre-built voltage prediction hybrid model and the voltage prediction value is output; the masked multi-head attention layer of the decoder module in the Transformer model is replaced with a recurrent neural network model to construct the voltage prediction hybrid model; When the voltage prediction value is within the preset abnormal voltage range, an early warning message is output.

2. The battery voltage prediction method as described in claim 1, characterized in that, The plurality of vehicles includes at least a first normal vehicle, a second normal vehicle, a first abnormal vehicle, a second abnormal vehicle, a first faulty vehicle, and a second faulty vehicle. The step of constructing training and testing datasets based on historical data from the plurality of vehicles within a preset time period includes: The training dataset is constructed from the historical data of the first normal vehicle, the first abnormal vehicle, and the first faulty vehicle. The test dataset is constructed from historical data of the second normal vehicle, the second abnormal vehicle, and the second faulty vehicle. The training dataset and the test dataset are normalized using the maximum-minimum normalization method.

3. The battery voltage prediction method as described in claim 1, characterized in that, The vehicle driving data includes one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, and cumulative mileage. The battery data includes one or more of the following: total battery pack voltage, voltage of multiple individual battery cells, temperature probe values, battery charge, and battery capacity. The weather data includes one or more of the following: air temperature, air humidity, air pressure, and precipitation. The data cleaning of the training dataset and the test dataset includes: Delete data with null values ​​from the historical data; Delete data whose brake pedal displacement rate is not in the preset first displacement range; Delete the data whose accelerator pedal displacement rate is not in the preset second displacement range; Delete data whose driving speed is not within the preset speed range; Delete data whose individual battery cell voltage is outside the preset voltage range; Delete data whose temperature probe values ​​are outside the preset temperature range; Delete data whose battery level is outside the preset range.

4. The battery voltage prediction method as described in claim 3, characterized in that, The determination of multiple feature parameters includes: Calculate one or more of the following: the mean voltage of the individual cells, the median voltage of the individual cells, the range of the individual cells, and the standard deviation of the individual cells; Calculate one or more of the temperature mean, temperature median, temperature range, and temperature standard deviation of the multiple temperature probe values; The plurality of characteristic parameters are determined to be one or more of the following: brake pedal displacement rate, accelerator pedal displacement rate, motor speed, vehicle speed, cumulative travel, total battery voltage, battery charge, battery charge percentage, air temperature value, air humidity value, air pressure value, mean voltage of individual cells, median voltage of individual cells, range of individual cell voltage, standard voltage of individual cells, mean temperature, median temperature, range of temperature, and standard deviation of temperature.

5. The battery voltage prediction method as described in claim 1, characterized in that, The battery voltage prediction method also includes: Before constructing the training and test datasets, the vehicle driving data and the battery data are sampled according to a first sampling frequency; the weather data is sampled according to a second sampling frequency, wherein the first sampling frequency is greater than the second sampling frequency; After determining multiple feature parameters, the weather data is interpolated using the Lagrange interpolation method to ensure that the number of weather data points matches the number of vehicle driving data points.

6. The battery voltage prediction method as described in claim 1, characterized in that, The step of inputting the trained feature parameters into the pre-built voltage prediction hybrid model and outputting the voltage prediction value includes: The training feature parameters are constructed as input time series data based on the sliding window algorithm; The training hyperparameters of the voltage prediction hybrid model are set, wherein the training hyperparameters include the input step size of the input time series data, the output step size of the output time series data, the maximum number of iterations, the number of heads in the multi-head attention model, the amount of data per batch, the probability of randomly discarding data, the initial learning rate, the adjustment coefficient, and the number of neurons in the recurrent neural network model. The input time series data is input into the voltage prediction hybrid model, and the output time series data corresponding to the voltage prediction value is output. The loss function is calculated based on the actual total battery pack voltage from the historical data and the voltage estimate.

7. The battery voltage prediction method as described in claim 2, characterized in that, The feature parameters also include test feature parameters, and the method further includes: Obtain the first test feature parameter corresponding to the second normal vehicle in the test dataset; The first test feature parameter is input into the voltage prediction hybrid model and the first voltage test value is output. The accuracy parameters of the voltage prediction hybrid model are calculated based on the actual total battery pack voltage in the historical data and the first voltage test value. The accuracy parameters include one or more of the following: mean absolute error, root mean square error, mean relative error, and goodness of fit. Obtain the second test feature parameters corresponding to the second abnormal vehicle and the second faulty vehicle in the test dataset; The second test feature parameter is input into the voltage prediction hybrid model and the second voltage test value is output. It is determined whether the second voltage test value is within the abnormal voltage range and whether the warning information is output.

8. A battery voltage prediction device, characterized in that, The device includes: The data acquisition module is used to construct training datasets and test datasets based on historical data of multiple vehicles within a preset time period, wherein the historical data includes vehicle driving data, battery data and weather data; The data processing module is used to clean the training dataset and the test dataset and determine multiple feature parameters, wherein the feature parameters include training feature parameters; A voltage prediction module is used to input the trained feature parameters into a pre-built voltage prediction hybrid model and output a voltage prediction value; the masked multi-head attention layer of the decoder module in the Transformer model is replaced with a recurrent neural network model to construct the voltage prediction hybrid model; The voltage warning module is used to output warning information when the voltage estimate is within a preset abnormal voltage range.

9. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the battery voltage estimation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Single battery voltage inconsistency fault prediction method and device and server

    CN112883645A

  • Battery monomer voltage multi-step advanced prediction and fault diagnosis method

    CN115656831A