Battery charge state prediction method, device, equipment and medium
By constructing a multi-level neural network model and using multi-layer long and short-term memory network units to process battery working data, the accuracy and adaptability problems of battery state of charge prediction in the prior art are solved, and high-precision and robust state of charge prediction are achieved.
Patent Information
- Application Number
- CN202510013437.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art is difficult to accurately predict battery state of charge (SOC), especially when battery behavior is affected by a variety of factors, it is difficult to adapt to the influence of dynamic changes and environmental factors.
A multi-level neural network model is adopted, combined with multi-layer long and short-term memory network units, a feature data set is constructed by acquiring and preprocessing battery working data, and model training is carried out to generate a state of charge prediction model.
Accurate prediction of battery charge state is achieved, can adapt to the dynamic changes in battery behavior and the influence of environmental factors, and improve the accuracy and robustness of the prediction.
Smart Images

Figure CN119846472A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery technology, and in particular to a battery state of charge prediction method, device, equipment and medium. Background Art
[0002] With the advent of the era of energy transformation and electrification, batteries, as key capacity storage units, play a vital role in electric vehicles, portable electronic devices, energy storage systems and other fields. The SOC (State of charge) of a battery is a core indicator for measuring the current capacity level of a battery, and its accurate prediction is crucial for battery health management, life extension and performance optimization. However, the behavior of a battery during use is affected by many factors, including charge and discharge history, temperature changes, load fluctuations, etc., which make SOC prediction a complex and challenging task. Traditional prediction methods, including direct measurement, physical modeling, capacity integration, etc., often rely on simplified physical models or empirical formulas, and it is difficult to fully capture the complexity and dynamic changes of battery behavior. Therefore, how to adapt to the high-precision SOC prediction of battery behavior diversity and environmental changes is of great strategic significance for the advancement and application of battery technology. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a battery state of charge prediction method, device, equipment and medium, which can accurately predict the SOC of the battery and adapt to the dynamic changes of battery behavior and the influence of environmental factors. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a method for predicting a battery state of charge, comprising:
[0005] Acquire working data of the battery under different working conditions, and perform preprocessing and feature engineering on the working data to obtain a feature data set for model training;
[0006] Constructing a multi-layer neural network model, and using the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model; wherein the multi-layer neural network model includes multiple levels, and each level uses multiple layers of long short-term memory network units;
[0007] The state of charge prediction model is used to predict the state of charge of the battery to be predicted.
[0008] Optionally, preprocessing the working data includes:
[0009] Removing noise and outliers from the working data by a filtering algorithm to obtain cleaned data;
[0010] Performing interpolation filling on missing values in the cleaned data to obtain preprocessed data;
[0011] The interpolation formula is: ; is the interpolated value, and are the data points on both sides of the missing value, is the timestamp of the missing value, For the last moment, For the current moment.
[0012] Optionally, feature engineering is performed on the working data to obtain a feature data set for model training, including:
[0013] Performing time series analysis on the preprocessed data to construct lag features and moving average features; wherein, The hysteresis feature is constructed by Constructing the moving average feature; is the lagged characteristic sequence, is the moving average characteristic, is the voltage at the previous moment, is the current at the previous moment, is the number of windows of the moving window;
[0014] Performing feature selection on the lag feature and the moving average feature through statistical testing to obtain selected features;
[0015] The selected features are standardized to obtain a feature data set for model training; wherein the calculation formula for the standardization is: ; To standardize the data, For the current data, is the maximum value of the data, is the minimum value of the data.
[0016] Optionally, the performing feature selection on the lag feature and the moving average feature by statistical testing to obtain the selected feature includes:
[0017] Determine a target variable, and classify the lag feature, the moving average feature, and the target variable to construct a cross table;
[0018] Performing a chi-square test on the cross table to obtain a chi-square statistic, and judging the chi-square statistic according to a preset significance level to respectively determine the correlation between the lag feature and the moving average feature and the target variable;
[0019] According to the determined correlation, feature selection is performed on the lag feature and the moving average feature to obtain a selected feature.
[0020] Optionally, the using the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model includes:
[0021] Setting hyperparameters, loss functions, and network optimization algorithms during training of the multi-level neural network model, and training the multi-level neural network model using the feature data set according to the hyperparameters, the loss function, and the network optimization algorithm to obtain a state of charge prediction model;
[0022] The hyperparameters include the number of layers, the number of hidden layer units, the learning rate, the batch size, the sequence length and the Dropout rate of the multi-layer neural network model;
[0023] The loss function is: ; is the sample size, The model predicts The state of charge value of each sample, is the actual state of charge value of the i-th sample;
[0024] The network optimization algorithm is the Adam optimization algorithm, and the parameter update rules of the Adam optimizer corresponding to the Adam optimization algorithm include: , , ;in, is the first-order moment estimate of the gradient at the current time step, is the gradient of the current time step, is the second-order moment estimate of the gradient at the current time step, and is the momentum factor, is the learning rate, is a constant used to prevent division by zero errors, is the model parameter.
[0025] Optionally, the process of training the multi-layer neural network model using the feature data set further includes:
[0026] Based on the online learning mechanism, the multi-layer neural network model is updated in real time;
[0027] The update rule of the online learning mechanism is: ;in, are model parameters, is the learning rate, is the gradient of the current time step, For in time The input data, For in time The actual state of charge value.
[0028] Optionally, the battery state of charge prediction method further includes:
[0029] Transfer learning is performed on the state of charge prediction model, and the state of charge prediction model is fine-tuned to make the state of charge prediction model adapt to the new battery type of the battery to be predicted and the new working scenario of the battery to be predicted.
[0030] In a second aspect, the present application discloses a battery state of charge prediction device, comprising:
[0031] A data acquisition module, used to obtain the working data of the battery under different working conditions;
[0032] A data processing module, used for preprocessing and feature engineering the working data to obtain a feature data set for model training;
[0033] A model training module, used to construct a multi-level neural network model, and train the multi-level neural network model using the feature data set to obtain a state of charge prediction model; wherein the multi-level neural network model includes multiple levels, and each level uses multiple layers of long short-term memory network units;
[0034] The state of charge prediction module is used to predict the state of charge of the battery to be predicted by using the state of charge prediction model.
[0035] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the battery state of charge prediction method as described above.
[0036] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the battery state of charge prediction method as described above.
[0037] The present application provides a method for predicting the state of charge of a battery, comprising: obtaining working data of a battery under different working conditions, and preprocessing and feature engineering the working data to obtain a feature data set for model training; constructing a multi-layer neural network model, and using the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model; wherein the multi-layer neural network model includes multiple layers, and each layer uses multiple layers of long short-term memory network units; and using the state of charge prediction model to predict the state of charge of a battery to be predicted.
[0038] The beneficial effects of the present application are: by constructing a multi-layer neural network model, its hierarchical structure can capture the dependencies at different levels in the sequence data, and the multi-layer information fusion can be used to enhance the modeling capabilities of feature extraction and complex dependencies. It can not only handle long-term dependencies, but also gradually abstract information and express it from local to global, which is suitable for complex sequence tasks, which makes it excellent in calculating the state of charge of the battery. In this way, the method can accurately predict the state of charge of the battery and adapt to the dynamic changes of battery behavior and the influence of environmental factors. The use of deep learning technology improves the accuracy and robustness of the prediction.
[0039] In addition, the present application provides a battery state of charge prediction device, equipment and storage medium, which correspond to the above-mentioned battery state of charge prediction method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 A flow chart of a battery state of charge prediction method disclosed in this application;
[0042] Figure 2 A schematic diagram of a specific battery state of charge prediction process disclosed in this application;
[0043] Figure 3 A schematic diagram of the structure of a battery state of charge prediction device disclosed in this application;
[0044] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Currently, battery SOC prediction is mainly based on direct measurement, physical modeling, and capacity integration methods to reflect the battery SOC. These methods often rely on simplified physical models or empirical formulas, which make it difficult to fully capture the complexity and dynamic changes of battery behavior.
[0047] To this end, the present application provides a battery state of charge prediction solution that can accurately predict the SOC of the battery and adapt to the dynamic changes in battery behavior and the influence of environmental factors.
[0048] The embodiment of the present invention discloses a method for predicting the state of charge of a battery. Figure 1 As shown, the method includes:
[0049] Step S11: Acquire the working data of the battery under different working conditions, and perform preprocessing and feature engineering on the working data to obtain a feature data set for model training.
[0050] In the embodiment of the present application, the working data of the battery is collected, and the working data includes the working data of the battery under different working conditions collected from the battery management system (BMS) or other data acquisition system, including key parameters such as timestamp, voltage (V), current (I), temperature (T), etc. It is ensured that these working data can cover the charge and discharge cycle of the battery and contain samples under environmental conditions corresponding to different working scenarios.
[0051] After the battery working data is collected, the working data is first preprocessed. Specifically, the noise and abnormal values in the working data are removed by a filtering algorithm to obtain cleaned data; and the missing values in the cleaned data are interpolated and filled to obtain preprocessed data.
[0052] In the embodiment of the present application, in the process of data preprocessing, the working data is first cleaned. Noise and outliers in the data are removed by using a filtering algorithm to improve data quality. Secondly, missing values in the cleaned data are processed. Missing values are filled by using appropriate interpolation techniques.
[0053] In a feasible implementation, the interpolation formula is:
[0054] ;
[0055] in, is the interpolated value, and are the data points on both sides of the missing value, is the timestamp of the missing value, For the last moment, For the current moment.
[0056] Furthermore, feature engineering is performed on the preprocessed data. Through the feature engineering processing stage, necessary transformation and dimensionality reduction of the data are achieved to extract features useful for predicting SOC and obtain a feature data set for model training. Specifically, the process of feature engineering on the preprocessed data includes the following steps: performing time series analysis on the preprocessed data to construct lag features and moving average features; performing feature selection on the lag features and moving average features through statistical tests to obtain selected features; and performing standardization on the selected features to obtain a feature data set for model training.
[0057] In the embodiment of the present application, in the process of feature engineering, feature construction is first performed: based on time series analysis, lag features and moving average features are constructed respectively. Lag features refer to using the past values of time series data as input features at the current time point. It can reveal potential trends in the data and smooth short-term noise, thereby helping the model better capture long-term trends. Moving average features are generated by smoothing time series data. The main function of moving average is to remove short-term fluctuations in the time series, making the data smoother, thereby making it easier to identify long-term trends.
[0058] Specifically, through The hysteresis feature is constructed by Construct the moving average feature; wherein, is the lagged characteristic sequence, is the moving average characteristic, is the voltage at the previous moment, is the current at the previous moment, is the number of windows for the moving window.
[0059] In addition, other features that may be related to SOC prediction may also be constructed in the embodiments of the present application, such as battery internal resistance , Temperature change rate wait.
[0060] Secondly, after the feature construction is completed, feature selection is performed through statistical tests to reduce the dimension and eliminate unimportant features to obtain selected features. Data features come from the sampling data of the power station. For example, for battery cell data, the Chi-Square Test can be used for feature selection. Specifically, the feature selection process includes the following steps:
[0061] Determine a target variable, and classify the lag feature, the moving average feature, and the target variable to construct a cross table;
[0062] Performing a chi-square test on the cross table to obtain a chi-square statistic, and judging the chi-square statistic according to a preset significance level to respectively determine the correlation between the lag feature and the moving average feature and the target variable;
[0063] According to the determined correlation, feature selection is performed on the lag feature and the moving average feature to obtain a selected feature.
[0064] In the embodiment of the present application, the features and the target variables are classified, a cross table is constructed, and then the chi-square statistic is calculated, and the correlation between the features and the target variable is judged according to the significance level. It can be understood that the larger the chi-square value, the stronger the correlation between the variables. By constructing a cross table and calculating the chi-square statistic, the relationship between the two categorical variables can be analyzed, which can effectively reduce the dimension and eliminate unimportant features.
[0065] Finally, after feature selection is completed, the selected features are normalized. The normalization process can eliminate the influence of different dimensions and magnitudes, preparing for subsequent model training. In a feasible implementation, the formula uses minimum-maximum normalization:
[0066] ;in, To standardize the data, For the current data, is the maximum value of the data, is the minimum value of the data.
[0067] It can be seen that the ultimate goal of data preprocessing and feature engineering is to obtain a cleaned, converted, and optimized data set, making it suitable for training and analysis of machine learning models. The ultimate goal is to obtain optimized and improved data. The preprocessed data has the following characteristics and advantages:
[0068] 1. High quality and consistency: The preprocessing process can eliminate errors, outliers and noise in the data, ensure the accuracy and consistency of the data, and thus improve the quality of the data;
[0069] 2. Interpretability and usability: Preprocessed data is easier to understand and interpret, allowing analysts and researchers to explore the characteristics and patterns of the data in more depth;
[0070] 3. Better model performance: Through data standardization, feature selection, and dimensionality reduction techniques, preprocessing can improve the distribution characteristics of data, reduce redundant information between features, and improve the training efficiency and prediction ability of machine learning models;
[0071] 4. Reduce the risk of model overfitting: Preprocessing can effectively reduce noise and irrelevant information in the data, helping the model to more accurately capture the true pattern of the data and avoid overfitting problems;
[0072] 5. Improve data processing efficiency: Preprocessing steps such as cleaning, normalization, and feature engineering can simplify the data processing process, making subsequent analysis and modeling more efficient.
[0073] Step S12: construct a multi-layer neural network model, and use the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model; wherein the multi-layer neural network model includes multiple levels, and each level uses multiple layers of long short-term memory network units.
[0074] In this embodiment, a multi-level neural network model Hierarchical-Multilayer-LSTM is constructed. The multi-level neural network model is a neural network architecture for processing sequence data, which captures dependencies on different time scales through multiple levels and multi-layer LSTM units. Its basic structure includes hierarchical processing, that is, dividing the data into different time levels to capture short-term and long-term dependencies respectively; using multi-layer LSTM units inside each level to gradually abstract and extract high-level features; different levels are connected and interacted, so that the short-term information of the low layer is combined with the long-term information of the high layer, thereby improving the modeling ability of complex sequences, and finally integrating the information between levels for SOC prediction.
[0075] The advantage of Hierarchical-Multilayer-LSTM is that its hierarchical structure can capture dependencies at different levels in sequence data, and enhance the ability to extract features and model complex dependencies through multi-layer information fusion. It can not only handle long-term dependencies, but also gradually abstract information and express it from local to global, which is suitable for complex sequence tasks. This makes it perform well in calculating SOC.
[0076] In the embodiment of the present application, the process of training the multi-level neural network model using the feature data set to obtain a state of charge prediction model includes the following steps:
[0077] The hyperparameters, loss function and network optimization algorithm are set during the training of the multi-level neural network model, and the multi-level neural network model is trained using the feature data set according to the hyperparameters, the loss function and the network optimization algorithm to obtain a state of charge prediction model.
[0078] Among them, the hyperparameters include the number of layers, the number of hidden units, the learning rate, the batch size, the sequence length and the Dropout rate of the multi-layer neural network model. It can be seen that the hyperparameter setting involves multiple aspects: the number of layers determines the depth and representation ability of the model; the number of hidden units affects the feature representation ability and computing requirements of each layer; the learning rate controls the step size of parameter updates; the batch size affects the training efficiency and stability; the sequence length determines the maximum length of the input data; the Dropout rate is used to prevent overfitting.
[0079] In a specific implementation, a suitable loss function is selected:
[0080] ;in, is the sample size, The model predicts The state of charge value of each sample, is the actual state of charge value of the i-th sample. This formula is used to measure the difference between the model-predicted SOC and the actual SOC.
[0081] Furthermore, an efficient optimization algorithm is selected to update the model weights to minimize the loss function. In a feasible implementation, when the network optimization algorithm is the Adam optimization algorithm, the parameter update rules of the Adam optimizer corresponding to the Adam optimization algorithm include:
[0082] , , ;in, is the first-order moment estimate of the gradient at the current time step, is the gradient of the current time step, is the second-order moment estimate of the gradient at the current time step, and is the momentum factor, is the learning rate, is a small constant added to prevent division by zero, is the model parameter.
[0083] It should be noted that in the embodiment of the present application, the learning rate is adaptively adjusted. Specifically, the learning rate is dynamically adjusted according to the performance of the model during the training process, such as using a learning rate decay strategy. ,in, is a decay factor less than 1.
[0084] In addition, the present invention also develops an online learning algorithm to enable the model to continuously learn and adapt according to the real-time data stream, ensuring that the model can maintain the accuracy and timeliness of prediction for a long time. Specifically, the multi-level neural network model is updated in real time based on the online learning mechanism. The update rule of the online learning mechanism is: ;in, are model parameters, is the learning rate, is the gradient of the current time step, For in time The input data, For in time The actual state of charge value.
[0085] Step S13: using the state of charge prediction model to predict the state of charge of the battery to be predicted.
[0086] In the embodiment of the present application, model evaluation and deployment are performed on the trained state of charge prediction model, and the trained state of charge prediction model is used to predict the state of charge of the battery in real time.
[0087] Specifically, when evaluating the state of charge prediction model, a suitable evaluation index can be selected to measure the prediction performance of the model. In a feasible implementation, in order to better reflect the deviation of the error from the true value, the relative error (Relative Error, RE) is selected as the evaluation index. The RE calculation formula is:
[0088] ;in, is the sample size, The model predicts The state of charge value of each sample, is the actual state of charge value of the i-th sample.
[0089] It should be pointed out that in order to evaluate the generalization ability and stability of the model and prevent overfitting, a cross-validation technique is used for the state of charge prediction model. For example, the data set is divided into k subsets, and then k training and validation are performed, each time using a different subset as the validation set and the rest as the training set. In this way, the prediction performance of the model can be estimated more accurately.
[0090] Furthermore, the trained model is deployed into the battery management system to achieve real-time SOC prediction and provide a user interface for operators to monitor and manage the system.
[0091] In addition, in order to ensure the wide applicability and long-term effectiveness of the model, the present embodiment also uses transfer learning technology to adapt the model to new battery types or changed working conditions. Specifically, transfer learning is performed on the state of charge prediction model, and the state of charge prediction model is fine-tuned to make the state of charge prediction model adapt to the new battery type of the battery to be predicted and the new working scenario of the battery to be predicted.
[0092] Among them, the fine-tuning step in transfer learning can be expressed as:
[0093] ;
[0094] in, is the weight after fine-tuning, is the pre-trained weight, is the learning rate during fine-tuning, and are the input and true SOC values of the new dataset, respectively. are model parameters, Represents gradient finding.
[0095] The present application provides a method for predicting the state of charge of a battery, comprising: obtaining working data of a battery under different working conditions, and preprocessing and feature engineering the working data to obtain a feature data set for model training; constructing a multi-layer neural network model, and using the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model; wherein the multi-layer neural network model includes multiple layers, and each layer uses multiple layers of long short-term memory network units; and using the state of charge prediction model to predict the state of charge of a battery to be predicted.
[0096] The beneficial effects of the present application are: by constructing a multi-layer neural network model, its hierarchical structure can capture the dependencies at different levels in the sequence data, and the multi-layer information fusion can be used to enhance the modeling capabilities of feature extraction and complex dependencies. It can not only handle long-term dependencies, but also gradually abstract information and express it from local to global, which is suitable for complex sequence tasks, which makes it excellent in calculating the state of charge of the battery. In this way, the method can accurately predict the state of charge of the battery and adapt to the dynamic changes of battery behavior and the influence of environmental factors. The use of deep learning technology improves the accuracy and robustness of the prediction.
[0097] like Figure 2The figure shows a schematic diagram of an overall real-time and accurate prediction process of battery SOC based on the aforementioned embodiment. The process starts with data collection and preprocessing, including the collection and cleaning of battery working data. Subsequently, the feature engineering processing stage performs necessary transformations and dimensionality reduction on the data to extract features useful for predicting SOC. Next, in the model building and training stage, a Hierarchical-Multilayer-LSTM model is constructed based on the extracted features and trained with historical data. After the model training is completed, the model evaluation and deployment stage is entered. In this stage, the accuracy and robustness of the model are evaluated, and the model that passes the evaluation is deployed to the actual battery management system. Finally, in the transfer learning and fine-tuning stage, the model continues to train to adapt to new battery types and application scenarios, and realizes accurate prediction of battery SOC under different environments and conditions. In this way, the present invention uses deep learning technology to improve the accuracy and robustness of predictions and better understand the behavior of battery systems.
[0098] Correspondingly, the present application also discloses a battery charge state prediction device, see Figure 3 As shown, the device comprises:
[0099] A data acquisition module 11 is used to acquire the working data of the battery under different working conditions;
[0100] A data processing module 12 is used to preprocess and feature engineer the working data to obtain a feature data set for model training;
[0101] A model training module 13 is used to construct a multi-level neural network model and train the multi-level neural network model using the feature data set to obtain a state of charge prediction model; wherein the multi-level neural network model includes multiple levels, and each level uses multiple layers of long short-term memory network units;
[0102] The state of charge prediction module 14 is used to predict the state of charge of the battery to be predicted by using the state of charge prediction model.
[0103] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0104] It can be seen that the above scheme of this embodiment includes: obtaining the working data of the battery under different working conditions, and preprocessing and feature engineering the working data to obtain a feature data set for model training; constructing a multi-layer neural network model, and using the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model; wherein the multi-layer neural network model contains multiple levels, and each level uses multiple layers of long short-term memory network units; and using the state of charge prediction model to predict the state of charge of the battery to be predicted.
[0105] The beneficial effects of the present application are: by constructing a multi-layer neural network model, its hierarchical structure can capture the dependencies at different levels in the sequence data, and the multi-layer information fusion can be used to enhance the modeling capabilities of feature extraction and complex dependencies. It can not only handle long-term dependencies, but also gradually abstract information and express it from local to global, which is suitable for complex sequence tasks, which makes it excellent in calculating the state of charge of the battery. In this way, the method can accurately predict the state of charge of the battery and adapt to the dynamic changes of battery behavior and the influence of environmental factors. The use of deep learning technology improves the accuracy and robustness of the prediction.
[0106] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the diagram cannot be considered as any limitation on the scope of use of the present application.
[0107] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the battery state of charge prediction method disclosed in any of the aforementioned embodiments.
[0108] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0109] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222 and data 223, etc. The data 223 may include various data. The storage method may be temporary storage or permanent storage.
[0110] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the battery state of charge prediction method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0111] Furthermore, the embodiment of the present application also discloses a computer-readable storage medium, wherein the computer-readable storage medium mentioned here includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk or an optical disk, or any other form of storage medium known in the technical field. Wherein, when the computer program is executed by the processor, the aforementioned battery state of charge prediction method is implemented. For the specific steps of the method, reference can be made to the corresponding contents disclosed in the aforementioned embodiment, and no further description will be given here.
[0112] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0113] The steps of the battery state of charge prediction method or algorithm described in conjunction with the embodiments disclosed herein can be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0114] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0115] The above is a detailed introduction to a battery state of charge prediction method, device, equipment and medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technicians in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for predicting a battery state of charge, characterized in that: include: Acquire working data of the battery under different working conditions, and perform preprocessing and feature engineering on the working data to obtain a feature data set for model training; Constructing a multi-layer neural network model, and using the feature data set to train the multi-layer neural network model to obtain a state of charge prediction model; wherein the multi-layer neural network model includes multiple levels, and each level uses multiple layers of long short-term memory network units; The state of charge prediction model is used to predict the state of charge of the battery to be predicted.
2. The battery state of charge prediction method according to claim 1, characterized in that: Preprocessing the working data includes: Removing noise and outliers from the working data by a filtering algorithm to obtain cleaned data; Performing interpolation filling on missing values in the cleaned data to obtain preprocessed data; The interpolation formula is: ; is the interpolated value, and are the data points on both sides of the missing value, is the timestamp of the missing value, For the last moment, For the current moment.
3. The battery state of charge prediction method according to claim 2, characterized in that: Performing feature engineering on the working data to obtain a feature data set for model training, including: Performing time series analysis on the preprocessed data to construct lag features and moving average features; wherein, The hysteresis feature is constructed by Constructing the moving average feature; is the lagged characteristic sequence, is the moving average characteristic, is the voltage at the previous moment, is the current at the previous moment, is the number of windows of the moving window; Performing feature selection on the lag feature and the moving average feature through statistical testing to obtain selected features; The selected features are standardized to obtain a feature data set for model training; wherein the calculation formula for the standardization is: ; To standardize the data, For the current data, is the maximum value of the data, is the minimum value of the data.
4. The method for predicting battery state of charge according to claim 3, characterized in that: The step of performing feature selection on the lag feature and the moving average feature through statistical testing to obtain selected features includes: Determine a target variable, and classify the lag feature, the moving average feature, and the target variable to construct a cross table; Performing a chi-square test on the cross table to obtain a chi-square statistic, and judging the chi-square statistic according to a preset significance level to respectively determine the correlation between the lag feature and the moving average feature and the target variable; According to the determined correlation, feature selection is performed on the lag feature and the moving average feature to obtain a selected feature.
5. The battery state of charge prediction method according to claim 1, characterized in that: The method of training the multi-layer neural network model using the feature data set to obtain a state of charge prediction model includes: Setting hyperparameters, loss functions, and network optimization algorithms during training of the multi-level neural network model, and training the multi-level neural network model using the feature data set according to the hyperparameters, the loss function, and the network optimization algorithm to obtain a state of charge prediction model; The hyperparameters include the number of layers, the number of hidden layer units, the learning rate, the batch size, the sequence length and the Dropout rate of the multi-layer neural network model; The loss function is: ; is the sample size, The model predicts The state of charge value of each sample, is the actual state of charge value of the i-th sample; The network optimization algorithm is the Adam optimization algorithm, and the parameter update rules of the Adam optimizer corresponding to the Adam optimization algorithm include: , , ;in, is the first-order moment estimate of the gradient at the current time step, is the gradient of the current time step, is the second-order moment estimate of the gradient at the current time step, and is the momentum factor, is the learning rate, is a constant used to prevent division by zero errors, is the model parameter.
6. The battery state of charge prediction method according to claim 1, characterized in that: The process of training the multi-layer neural network model using the feature data set also includes: Based on the online learning mechanism, the multi-layer neural network model is updated in real time; The update rule of the online learning mechanism is: ;in, are model parameters, is the learning rate, is the gradient of the current time step, For in time The input data, For in time The actual state of charge value.
7. The battery state of charge prediction method according to any one of claims 1 to 6, characterized in that: Also includes: Transfer learning is performed on the state of charge prediction model, and the state of charge prediction model is fine-tuned to make the state of charge prediction model adapt to the new battery type of the battery to be predicted and the new working scenario of the battery to be predicted.
8. A battery state of charge prediction device, characterized in that: include: A data acquisition module, used to obtain the working data of the battery under different working conditions; A data processing module, used for preprocessing and feature engineering the working data to obtain a feature data set for model training; A model training module, used to construct a multi-level neural network model, and train the multi-level neural network model using the feature data set to obtain a state of charge prediction model; wherein the multi-level neural network model includes multiple levels, and each level uses multiple layers of long short-term memory network units; The state of charge prediction module is used to predict the state of charge of the battery to be predicted by using the state of charge prediction model.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the battery state of charge prediction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein when the computer program is executed by a processor, the battery state of charge prediction method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Lithium battery charge state prediction method, apparatus and device, and readable storage medium
CN114966436A
Training method and device, prediction method, medium and electronic equipment
CN116595376A
Method and system for detecting charge state of lithium battery
CN118425811A
Lithium battery SOH (state of health) prediction method and device and storage medium
CN118655466A
Distributed regional generation power prediction method based on stacked integrated model
CN118863121A