SOC estimation method and device based on machine learning, equipment and medium

By introducing attention mechanism and CNN-LSTM fusion model in lithium battery SOC estimation, the problem of limited SOC prediction accuracy and inability to be carried out in real time in traditional methods is solved, and the online accurate prediction of lithium battery SOC is realized, and the real-time performance of the system is improved and operability.

CN119249062APending Publication Date: 2025-01-03CHINA FAW CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411193926.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Traditional SOC estimation methods have problems such as difficulty in determining the initial value, insufficient accuracy of the current sensor, and inability to use it online, resulting in limited prediction accuracy and in real time.

Method used

Using machine learning methods based on attention mechanism and CNN-LSTM fusion model, feature extraction and SOC prediction of lithium battery discharge data through one-dimensional convolutional neural network, LSTM neural network and attention mechanism to provide online accurate prediction.

Benefits of technology

Improve the accuracy and stability of SOC prediction, realize continuous monitoring and prediction of lithium battery SOC in real-time state, overcome the limitations of traditional methods when dealing with complex battery characteristics, and enhance the real-time performance of lithium battery systems and Operability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249062A_ABST
    Figure CN119249062A_ABST
Patent Text Reader

Abstract

The invention provides an SOC estimation method and device based on machine learning, equipment and a medium, and belongs to the technical field of SOC estimation, and the method comprises the steps: obtaining a preprocessed discharge data sample set; constructing a fusion model framework based on the attention mechanism and the CNN-LSTM, and training the fusion model based on the attention mechanism and the CNN-LSTM by using the preprocessed discharge data sample set to obtain a trained fusion model based on the attention mechanism and the CNN-LSTM; and obtaining preprocessed to-be-identified discharge data, and inputting the to-be-identified discharge data into the fusion model based on the attention mechanism and the CNN-LSTM to obtain an SOC predicted value corresponding to the to-be-identified discharge data. Therefore, the one-dimensional convolutional neural network, the LSTM neural network and the attention mechanism are combined together, the trend of each part is fully utilized, and the accuracy and stability of SOC prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of SOC estimation, and in particular to a SOC estimation method, device, equipment and medium based on machine learning. Background Art

[0002] SOC (State of Charge) estimation is an estimate of the remaining battery power. It expresses the ratio of the current remaining charge of the battery to the charge when the battery is fully charged in the form of a percentage, which is very important for the effective use and management of the battery. The problems of the traditional physical model-based method are as follows:

[0003] Current integration method, which calculates the current SOC based on the initial value of SOC and the difference between the current integral in a fixed time interval. The advantage is that it can be used online and the prediction accuracy is not affected by the battery charge and discharge state. However, its disadvantage is that the initial value of SOC is difficult to determine, and the insufficient accuracy of the current sensor may lead to cumulative errors;

[0004] Open circuit voltage method: This method obtains the mapping relationship between SOC and open circuit voltage of lithium battery based on OCV-SOC curve. The advantage is that the principle is simple, no complex algorithm needs to be designed, and it is easy to implement. However, the disadvantage is that it cannot be used online, and it needs to be shut down for a period of time to measure voltage and predict SOC, and the prediction accuracy is limited;

[0005] AC excitation impedance method: This method provides a basis for SOC prediction by studying the relationship between EIS and SOC based on the differences in AC impedance of lithium batteries under different states of charge. The advantage is that it does not require the design of complex algorithms, is easy to implement, and is applicable to different types of lithium batteries. However, the disadvantage is that it cannot be used online, has limited prediction accuracy, and is generally used for offline SOC calibration. Summary of the invention

[0006] In view of this, the purpose of this application is to provide a SOC estimation method, device, equipment and medium based on machine learning, and to realize online accurate prediction of SOC based on attention mechanism and CNN-LSTM fusion model.

[0007] In a first aspect, the present application provides a SOC estimation method based on machine learning, the method comprising the following steps:

[0008] Acquire a preprocessed discharge data sample set; the preprocessed discharge data sample set includes the current and voltage of the lithium battery at different times;

[0009] Constructing a fusion model framework based on the attention mechanism and CNN-LSTM, and training the fusion model based on the attention mechanism and CNN-LSTM using the preprocessed discharge data sample set to obtain a trained fusion model based on the attention mechanism and CNN-LSTM;

[0010] The preprocessed discharge data to be identified is obtained, and the discharge data to be identified is input into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified.

[0011] In a possible implementation, the preprocessing includes data cleaning and normalization.

[0012] In a possible implementation, the preprocessed discharge data sample set is used to train the attention mechanism and CNN-LSTM fusion model to obtain a trained attention mechanism and CNN-LSTM fusion model, including the following steps:

[0013] Dividing the preprocessed discharge data sample set into a discharge data sample training set and a discharge data sample verification set according to a preset ratio;

[0014] Training the attention mechanism and CNN-LSTM fusion model framework based on the discharge data sample training set to obtain an initial attention mechanism and CNN-LSTM fusion model;

[0015] Input the discharge data in the discharge data sample verification set into the initial attention-based and CNN-LSTM fusion model to obtain an SOC prediction result, and compare the SOC prediction result with the annotated SOC actual result, and verify the prediction accuracy of the initial attention-based and CNN-LSTM fusion model according to the comparison result;

[0016] If the prediction accuracy of the initial attention-based and CNN-LSTM fusion model meets the preset requirements, the initial attention-based and CNN-LSTM fusion model is used as the trained attention-based and CNN-LSTM fusion model.

[0017] In a possible implementation, the discharge data in the discharge data sample verification set is input into the initial SOC prediction result obtained by the attention mechanism and CNN-LSTM fusion model, and the annotated SOC actual result is plotted as a SOC prediction curve and an actual SOC curve, respectively. By comparing the SOC prediction curve with the actual SOC curve, the prediction accuracy of the initial attention mechanism and CNN-LSTM fusion model is obtained.

[0018] In a possible implementation, the attention mechanism and CNN-LSTM fusion model framework includes the following settings:

[0019] One-dimensional convolutional neural network layer, used to extract features from the input discharge data according to the time series to obtain feature vectors;

[0020] An LSTM neural network layer is used to learn the nonlinear mapping relationship between the SOC and the feature vector, capture the long-term dependency of the SOC sequence, and output a hidden state;

[0021] The attention mechanism layer is used to assign different weights to historical discharge data;

[0022] The output layer is used to output the SOC prediction value.

[0023] In a possible implementation, the one-dimensional convolutional neural network layer extracts features from the input discharge data in time series through a sliding window operation of the convolution kernel.

[0024] In a possible implementation, the attention mechanism layer assigns different weights to historical discharge data in the following manner, including the following steps:

[0025] A scoring function is used to obtain the correlation score of the impact of the discharge data at each moment on the current SOC;

[0026] The relevance score is normalized using a softmax function to obtain the attention weight of the discharge data at each moment, and the hidden state of the LSTM neural network layer is weightedly aggregated using the attention weight.

[0027] In a second aspect, the present application provides a SOC estimation device based on machine learning, the device comprising:

[0028] An acquisition module, used to acquire a pre-processed discharge data sample set; the pre-processed discharge data sample set includes the current and voltage of the lithium battery at different times;

[0029] A construction module is used to construct a fusion model framework based on the attention mechanism and CNN-LSTM, and train the fusion model based on the attention mechanism and CNN-LSTM using the preprocessed discharge data sample set to obtain a trained fusion model based on the attention mechanism and CNN-LSTM;

[0030] The prediction module is used to obtain the preprocessed discharge data to be identified, and input the discharge data to be identified into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified.

[0031] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the SOC estimation method based on machine learning as described in the first aspect are performed.

[0032] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the SOC estimation method based on machine learning as described in the first aspect are executed.

[0033] The present embodiment provides a method, device, equipment and medium for SOC estimation based on machine learning, which obtains a sample set of discharge data after preprocessing; constructs a fusion model framework based on the attention mechanism and CNN-LSTM, and uses the sample set of discharge data after preprocessing to train the fusion model based on the attention mechanism and CNN-LSTM to obtain a trained fusion model based on the attention mechanism and CNN-LSTM; obtains the discharge data to be identified after preprocessing, and inputs the discharge data to be identified into the fusion model based on the attention mechanism and CNN-LSTM to obtain the SOC prediction value corresponding to the discharge data to be identified. Thus, the one-dimensional convolutional neural network, LSTM neural network and attention mechanism are combined together, the trend of each part is fully utilized, and the accuracy and stability of SOC prediction are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 Schematic diagram of the process of the SOC estimation method based on machine learning in one embodiment of the present application;

[0036] Figure 2 A schematic diagram of a process of training the attention mechanism and CNN-LSTM fusion model using the preprocessed discharge data sample set in one embodiment of the present application;

[0037] Figure 3 A schematic diagram of a process of assigning different weights to historical discharge data by the attention mechanism layer described in one embodiment of the present application;

[0038] Figure 4 It is a structural block diagram of a SOC estimation device based on machine learning described in an embodiment of the present application;

[0039] Figure 5 It is a structural block diagram of an electronic device described in an embodiment of the present application. DETAILED DESCRIPTION

[0040] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0041] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and marked in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0042] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0043] Based on the technical problems raised by the background technology, the present application provides a SOC estimation method, device, equipment and medium based on machine learning, which realizes online accurate prediction of SOC based on attention mechanism and CNN-LSTM fusion model.

[0044] See the instruction manual Figure 1 In one embodiment, the present application provides a SOC estimation method based on machine learning, comprising the following steps:

[0045] S1. Acquire a preprocessed discharge data sample set; the preprocessed discharge data sample set includes the current and voltage of the lithium battery at different times;

[0046] S2, constructing a fusion model framework based on the attention mechanism and CNN-LSTM, and using the preprocessed discharge data sample set to train the fusion model based on the attention mechanism and CNN-LSTM to obtain a trained fusion model based on the attention mechanism and CNN-LSTM;

[0047] S3. Obtain the preprocessed discharge data to be identified, and input the discharge data to be identified into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified.

[0048] That is, the SOC estimation method based on machine learning provided by this application can more accurately capture the complex nonlinear relationship in the lithium battery discharge data through the deep learning model, thereby improving the accuracy of SOC prediction. Compared with traditional methods, it can more effectively utilize discharge data, overcome the limitations of traditional methods in dealing with complex battery characteristics; and can make predictions in real time or online without stopping for measurement or offline processing, so as to achieve continuous monitoring and prediction of the SOC state of lithium batteries, and improve the real-time and operability of lithium battery systems.

[0049] Specifically, in step S1, an experimental platform can be built, including a lithium battery testing system, a data acquisition device, and a computer processing unit. On this platform, a group of lithium batteries are selected as experimental objects, and the data of the discharge process of these batteries are collected using a standard charge and discharge test procedure, thereby obtaining a discharge data sample set. And the obtained discharge data sample set is preprocessed, such as through data cleaning, processing missing values, outliers and duplicate data, and scaling the data range to a uniform range through normalization, so as to ensure the accuracy and reliability of the data, so that the subsequent construction based on the attention mechanism and CNN-LSTM fusion model can more easily learn the patterns and laws in the data, and improve the accuracy and generalization ability of the model.

[0050] In step S2, the constructed framework based on the attention mechanism and CNN-LSTM fusion model includes a one-dimensional convolutional neural network layer, an LSTM neural network layer and an output layer. Specifically, the one-dimensional convolutional neural network layer uses convolution kernels to extract features from input data, wherein the number of convolution kernels can be selected according to the specific situation, and the spatial features of the input data are extracted through convolution operations and nonlinear activation functions to obtain new feature vectors; the LSTM neural network layer is used to learn the nonlinear mapping relationship between SOC and input features, and capture the long-term dependency of the SOC sequence, wherein multiple hidden units can be set in the LSTM neural network layer to increase the complexity and expression ability of the model; further, at the top of the model, an attention mechanism is designed to enhance the attention to historical features that have a greater impact on the current SOC by assigning different weights to historical discharge data, and to achieve a focus on important moment data by calculating the attention weight of the discharge data at each moment, and weighting and aggregating the hidden state output by the LSTM neural network layer; the output layer is used to output the predicted value of SOC, and a fully connected layer can be used to map the final hidden state to the predicted value of SOC, and the model is trained and optimized through a loss function and an optimization algorithm. During the implementation process, it is necessary to adjust the model's hyperparameters, such as the number of convolution kernels, the number of LSTM hidden units, and the method of calculating attention weights, according to the size and feature distribution of the specific data set. By repeatedly training and verifying the model, the model's performance is evaluated on the test set, and adjustments and optimizations are made based on the evaluation results. Finally, a model that performs well in lithium battery SOC prediction is obtained.

[0051] See the instruction manual Figure 2 In one embodiment, the preprocessed discharge data sample set is used to train the attention mechanism and CNN-LSTM fusion model to obtain a trained attention mechanism and CNN-LSTM fusion model, including the following steps:

[0052] S201, dividing the preprocessed discharge data sample set into a discharge data sample training set and a discharge data sample verification set according to a preset ratio;

[0053] S202, training the attention mechanism and CNN-LSTM fusion model framework based on the discharge data sample training set to obtain an initial attention mechanism and CNN-LSTM fusion model;

[0054] S203, inputting the discharge data in the discharge data sample verification set into the initial attention-based and CNN-LSTM fusion model to obtain an SOC prediction result, and comparing the SOC prediction result with the annotated SOC actual result, and verifying the prediction accuracy of the initial attention-based and CNN-LSTM fusion model according to the comparison result;

[0055] S204. If the prediction accuracy of the initial attention-based and CNN-LSTM fusion model meets the preset requirements, the initial attention-based and CNN-LSTM fusion model is used as the trained attention-based and CNN-LSTM fusion model.

[0056] Specifically, in step S201-step S204, a part of the obtained discharge data sample set is used as a discharge data sample training set for model training, and the other part is used as a discharge data sample verification set for model verification and testing. During the training process, the performance of the model is optimized by adjusting the hyperparameters and structure of the model to improve its prediction accuracy and stability for SOC; after the training is completed, the discharge data in the discharge data sample verification set is used to verify the initial attention mechanism and CNN-LSTM fusion model obtained to evaluate its performance on real data. By comparing with the actual SOC value, the prediction error of the model can be obtained, and its performance characteristics and advantages and disadvantages can be further analyzed. At the same time, the SOC prediction results obtained in the initial attention mechanism and CNN-LSTM fusion model, as well as the annotated SOC actual results, can be plotted as SOC prediction curves and actual SOC curves respectively. By comparing the SOC prediction curve with the actual SOC curve, the prediction effect of the model is intuitively displayed, and then the prediction accuracy of the initial attention mechanism and CNN-LSTM fusion model is obtained. If the prediction accuracy of the initial model based on the attention mechanism and the CNN-LSTM fusion model does not meet the preset requirements, the model training is performed again; if the prediction accuracy of the initial model based on the attention mechanism and the CNN-LSTM fusion model meets the preset requirements, the initial model based on the attention mechanism and the CNN-LSTM fusion model is used as the trained model based on the attention mechanism and the CNN-LSTM fusion model.

[0057] In step S3, the process of inputting the discharge data to be identified into the trained attention mechanism-based CNN-LSTM fusion model for SOC prediction is as follows:

[0058] First, the discharge data to be identified is divided into time series and formatted into a matrix, in which each row represents a time step and each column represents a feature. These features may include current, voltage and other parameters related to SOC prediction, and then a one-dimensional convolutional neural network layer is used to extract features from the time series data. As a feedforward neural network, the convolutional neural network extracts the spatial features of the input data through convolution layers and pooling layers, and is suitable for processing data with a sequence structure. In the application, a one-dimensional CNN is used to process lithium battery discharge data. Through the sliding window operation of the convolution kernel, the time-related features in the data are extracted. These features play a key role in SOC prediction;

[0059] Then, the LSTM neural network layer is used to learn the nonlinear mapping relationship between SOC and input features and the long-term dependency of the SOC sequence. Compared with the traditional recurrent neural network (RNN), LSTM can more effectively capture the long-term dependency in time series data, thereby better adapting to the characteristics of lithium battery discharge data. Through the training of the LSTM network, the model can learn the complex patterns and laws in the SOC prediction task, improving the accuracy and generalization ability of the prediction;

[0060] Finally, the ability to utilize historical discharge data is further improved by introducing the attention mechanism. The attention mechanism gives different weights to discharge data at different historical moments, allowing the model to pay more attention to data that has a greater impact on the current SOC, thereby improving the accuracy and stability of the prediction.

[0061] It should be noted that the introduction of the attention mechanism in this application is to solve an important problem existing in the traditional SOC prediction model: that is, the different degrees of influence on the discharge data at historical moments have not been effectively considered. In the traditional model, the discharge data at any moment are treated equally, but in actual situations, the impact of data at certain moments on the current SOC may be more significant. Therefore, the introduction of the attention mechanism has become one of the keys to improving model performance. In this application, the introduced attention mechanism is designed based on a "many-to-one" model structure. This design aims to improve the model's ability to utilize the historical feature information contained in the lithium battery discharge data, thereby improving the accuracy of SOC prediction. In practical applications, this design can enable the model to more intelligently select the discharge data at historical moments that have a greater impact on the current SOC, rather than simply treating the data at all moments equally, thereby improving the flexibility and adaptability of the model.

[0062] See the instruction manual Figure 3 In one embodiment, the attention mechanism layer assigns different weights to the historical discharge data in the following manner, including the following steps:

[0063] S301, using a scoring function to obtain a correlation score of the influence of the discharge data at each moment on the current SOC;

[0064] S302, using a softmax function to normalize the correlation score to obtain the attention weight of the discharge data at each moment, and using the attention weight to perform weighted aggregation on the hidden state of the LSTM neural network layer.

[0065] Specifically, in step S301, a scoring function is used to obtain the correlation score of the degree of influence of the discharge data at each moment on the current SOC. This scoring function is implemented by a fully connected layer, whose input is the transposed LSTM hidden state and whose output is the correlation score at each moment. The purpose of this step is to quantify the degree of association between the discharge data at historical moments and the current SOC according to the characteristics of the discharge data at historical moments; in step S302, the softmax function is used to normalize these correlation scores to obtain the attention weight of the data at each moment. These weights reflect the importance of the discharge data at each moment in the current SOC prediction, that is, the larger the weight, the greater the influence of the data at that moment on the current SOC. The purpose of this step is to enable the model to intelligently adjust the degree of attention to the discharge data at historical moments according to their importance. Then, these attention weights are used to perform weighted aggregation on the LSTM hidden state to obtain the output of the attention layer. This output is a representation of the discharge data at historical moments adjusted by the attention mechanism, reflecting the relative importance of the data at each moment. The purpose of this step is to introduce the attention mechanism into the prediction process of the model so that the model can more accurately capture the influence of the discharge data at historical moments on the current SOC.

[0066] The present application adds an importance assessment and adjustment mechanism for discharge data at historical moments to the SOC prediction model, thereby improving the prediction accuracy and stability of the model.

[0067] The present application provides a SOC estimation method based on machine learning, which combines a one-dimensional convolutional neural network, an LSTM neural network and an attention mechanism, makes full use of the trends of each part, improves the accuracy and stability of SOC prediction, and can perform SOC prediction in real time or online, thereby improving the real-time and operability of the lithium battery system.

[0068] As the instruction manual Figure 4 As shown, the present application also provides a SOC estimation device based on machine learning, the device comprising:

[0069] The acquisition module 401 is used to acquire a pre-processed discharge data sample set; the pre-processed discharge data sample set includes the current and voltage of the lithium battery at different times; the pre-processing includes data cleaning and normalization processing;

[0070] A construction module 402 is used to construct a fusion model framework based on the attention mechanism and CNN-LSTM, and train the fusion model based on the attention mechanism and CNN-LSTM using the preprocessed discharge data sample set to obtain a trained fusion model based on the attention mechanism and CNN-LSTM; wherein the fusion model framework based on the attention mechanism and CNN-LSTM includes sequentially setting a one-dimensional convolutional neural network layer for extracting features of the input discharge data according to a time series to obtain a feature vector; an LSTM neural network layer for learning the nonlinear mapping relationship between the SOC and the feature vector, and capturing the long-term dependency of the SOC sequence, and outputting a hidden state; an attention mechanism layer for assigning different weights to historical discharge data; and an output layer for outputting a predicted SOC value;

[0071] The prediction module 403 is used to obtain the pre-processed discharge data to be identified, and input the discharge data to be identified into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified.

[0072] In some embodiments, the construction module 402 uses the preprocessed discharge data sample set to train the attention mechanism and CNN-LSTM fusion model to obtain a trained attention mechanism and CNN-LSTM fusion model, including: dividing the preprocessed discharge data sample set into a discharge data sample training set and a discharge data sample verification set according to a preset ratio; training the attention mechanism and CNN-LSTM fusion model framework based on the discharge data sample training set to obtain an initial attention mechanism and CNN-LSTM fusion model; inputting the discharge data in the discharge data sample verification set into the initial attention mechanism and CNN-LSTM fusion model to obtain an SOC prediction result, and comparing the SOC prediction result with the annotated SOC actual result. The results are compared, and the prediction accuracy of the initial model based on attention mechanism and CNN-LSTM fusion model is verified according to the comparison result; if the prediction accuracy of the initial model based on attention mechanism and CNN-LSTM fusion model meets the preset requirements, the initial model based on attention mechanism and CNN-LSTM fusion model is used as the trained model based on attention mechanism and CNN-LSTM fusion model; wherein, the discharge data in the discharge data sample verification set is input into the SOC prediction result obtained in the initial model based on attention mechanism and CNN-LSTM fusion model, and the annotated SOC actual result is plotted as a SOC prediction curve and an actual SOC curve respectively, and the prediction accuracy of the initial model based on attention mechanism and CNN-LSTM fusion model is obtained by comparing the SOC prediction curve with the actual SOC curve.

[0073] In some embodiments, the prediction module 403 inputs the discharge data to be identified into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified, including: based on the one-dimensional convolutional neural network layer through the sliding window operation of the convolution kernel, the input discharge data is subjected to feature extraction according to the time series; a scoring function is used to obtain the correlation score of the degree of influence of the discharge data at each moment on the current SOC; the correlation score is normalized by the softmax function to obtain the attention weight of the discharge data at each moment, and the hidden state of the LSTM neural network layer is weightedly aggregated by using the attention weight.

[0074] The present application provides a SOC estimation device based on machine learning, which obtains a pre-processed discharge data sample set through an acquisition module; constructs a fusion model framework based on an attention mechanism and CNN-LSTM through a construction module, and uses the pre-processed discharge data sample set to train the fusion model based on the attention mechanism and CNN-LSTM to obtain a trained fusion model based on the attention mechanism and CNN-LSTM; obtains the pre-processed discharge data to be identified through a prediction module, and inputs the discharge data to be identified into the fusion model based on the attention mechanism and CNN-LSTM to obtain the SOC prediction value corresponding to the discharge data to be identified. Thus, the one-dimensional convolutional neural network, the LSTM neural network and the attention mechanism are combined together, the trend of each part is fully utilized, and the accuracy and stability of the SOC prediction are improved.

[0075] Based on the same concept of the present invention, the specification is attached Figure 5 As shown, the structure of an electronic device 500 provided in an embodiment of the present application includes: at least one processor 501, at least one network interface 504 or other user interface 503, a memory 505, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The electronic device 500 optionally includes a user interface 503, including a display (for example, a touch screen, LCD, CRT, holographic imaging (Holographic) or projection (Projector), etc.), a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch pad or a touch screen, etc.).

[0076] The memory 505 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501. A portion of the memory 505 may also include a non-volatile random access memory (NVRAM).

[0077] In some implementations, the memory 505 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:

[0078] Operating system 5051, including various system programs, used to implement various basic services and process hardware-based tasks;

[0079] The application module 5052 includes various application programs, such as a launcher, a media player, a browser, etc., which are used to implement various application services.

[0080] In an embodiment of the present application, by calling the program or instructions stored in the memory 505, the processor 501 is used to execute steps in a SOC estimation method based on machine learning, and can realize online accurate prediction of SOC based on the attention mechanism and the CNN-LSTM fusion model.

[0081] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the SOC estimation method based on machine learning are executed.

[0082] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned SOC estimation method based on machine learning can be executed.

[0083] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0084] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0085] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0086] If the function is implemented in the form of a business function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0087] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A SOC estimation method based on machine learning, characterized in that: The method comprises the following steps: Acquire a preprocessed discharge data sample set; the preprocessed discharge data sample set includes the current and voltage of the lithium battery at different times; Constructing a fusion model framework based on the attention mechanism and CNN-LSTM, and training the fusion model based on the attention mechanism and CNN-LSTM using the preprocessed discharge data sample set to obtain a trained fusion model based on the attention mechanism and CNN-LSTM; The preprocessed discharge data to be identified is obtained, and the discharge data to be identified is input into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified.

2. The SOC estimation method based on machine learning according to claim 1, characterized in that: The preprocessing includes data cleaning and normalization.

3. The SOC estimation method based on machine learning according to claim 2, characterized in that: The method of training the attention mechanism and CNN-LSTM fusion model with the preprocessed discharge data sample set to obtain a trained attention mechanism and CNN-LSTM fusion model comprises the following steps: Dividing the preprocessed discharge data sample set into a discharge data sample training set and a discharge data sample verification set according to a preset ratio; Training the attention mechanism and CNN-LSTM fusion model framework based on the discharge data sample training set to obtain an initial attention mechanism and CNN-LSTM fusion model; Input the discharge data in the discharge data sample verification set into the initial attention-based and CNN-LSTM fusion model to obtain an SOC prediction result, and compare the SOC prediction result with the annotated SOC actual result, and verify the prediction accuracy of the initial attention-based and CNN-LSTM fusion model according to the comparison result; If the prediction accuracy of the initial attention-based and CNN-LSTM fusion model meets the preset requirements, the initial attention-based and CNN-LSTM fusion model is used as the trained attention-based and CNN-LSTM fusion model.

4. The SOC estimation method based on machine learning according to claim 3, characterized in that: in, The discharge data in the discharge data sample verification set is input into the initial SOC prediction result obtained by the attention mechanism and CNN-LSTM fusion model, and the annotated SOC actual result is plotted as a SOC prediction curve and an actual SOC curve respectively. By comparing the SOC prediction curve with the actual SOC curve, the prediction accuracy of the initial attention mechanism and CNN-LSTM fusion model is obtained.

5. The SOC estimation method based on machine learning according to claim 4, characterized in that: The attention mechanism and CNN-LSTM fusion model framework includes the following settings: One-dimensional convolutional neural network layer, used to extract features from the input discharge data according to the time series to obtain feature vectors; An LSTM neural network layer is used to learn the nonlinear mapping relationship between the SOC and the feature vector, capture the long-term dependency of the SOC sequence, and output a hidden state; The attention mechanism layer is used to assign different weights to historical discharge data; The output layer is used to output the SOC prediction value.

6. The SOC estimation method based on machine learning according to claim 5, characterized in that: in, The one-dimensional convolutional neural network layer extracts features from the input discharge data in time series through a sliding window operation of the convolution kernel.

7. The SOC estimation method based on machine learning according to claim 6, characterized in that: The attention mechanism layer assigns different weights to the historical discharge data in the following manner, including the following steps: A scoring function is used to obtain the correlation score of the impact of the discharge data at each moment on the current SOC; The relevance score is normalized using a softmax function to obtain the attention weight of the discharge data at each moment, and the hidden state of the LSTM neural network layer is weightedly aggregated using the attention weight.

8. A SOC estimation device based on machine learning, characterized in that: The device comprises: An acquisition module, used to acquire a pre-processed discharge data sample set; the pre-processed discharge data sample set includes the current and voltage of the lithium battery at different times; A construction module is used to construct a fusion model framework based on the attention mechanism and CNN-LSTM, and train the fusion model based on the attention mechanism and CNN-LSTM using the preprocessed discharge data sample set to obtain a trained fusion model based on the attention mechanism and CNN-LSTM; The prediction module is used to obtain the preprocessed discharge data to be identified, and input the discharge data to be identified into the attention mechanism and CNN-LSTM fusion model to obtain the SOC prediction value corresponding to the discharge data to be identified.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the SOC estimation method based on machine learning are performed as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the SOC estimation method based on machine learning as described in any one of claims 1-7 are executed.

Citation Information

Cited By

  • Priori knowledge fused heat transfer process multi-cycle energy efficiency prediction method and related device

    CN120724817A

  • Real-time prediction method for charge state and energy state of lithium battery

    CN121091112A