Battery power state prediction method and system based on hybrid neural network

By constructing a hybrid neural network model based on CNN-GRU, the real-time and generalization problems of traditional methods in battery power state estimation are solved, and efficient processing and accurate prediction of battery data are achieved, which is suitable for battery management of electric vehicles and renewable energy systems.

CN120405441AInactive Publication Date: 2025-08-01YANTAI UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510612562.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-08-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional lithium-ion battery power state estimation method relies on equivalent circuit models and electrochemical models, and is difficult to meet the requirements of real-time and generalization, cannot effectively handle noise and irregularity in battery data, and is difficult to adapt to the dynamic characteristics of battery state changes over time.

Method used

A hybrid neural network-based method is adopted, combining convolutional neural network (CNN) and gated cyclic unit (GRU), and a combination of feature extraction, dimensionality reduction, timing processing and a fully connected layer, a battery power state prediction model is constructed to improve the accuracy and generalization of battery power estimation.

Benefits of technology

It effectively removes noise and irregularities in battery data, improves the accuracy and stability of battery power state prediction, adapts to battery management needs under different operating conditions, and meets the efficient management and safe operation of electric vehicles and renewable energy systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120405441A_ABST
    Figure CN120405441A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of battery power state prediction, in particular to a battery power state prediction method and system based on a hybrid neural network. The method is characterized by comprising the following steps: extracting related data of the lithium ion battery; performing data preprocessing on the related data of the lithium ion battery; a CNN-GRU hybrid neural network model is constructed; performing feature extraction and feature dimension reduction on related data of the lithium ion battery by using a CNN layer of the CNN-GRU hybrid neural network model; according to the method, the salient features of the lithium ion battery data are efficiently extracted in a local range by using the CNN layer, feature dimension reduction is realized through pooling operation, and redundant information is effectively removed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery power state prediction, and in particular to a method and system for predicting the power state of a battery based on a hybrid neural network. Background Art

[0002] With the rapid development of electric vehicles and renewable energy systems, as the core energy storage component, the operational safety and efficient management requirements of lithium-ion batteries are becoming increasingly urgent. As the main power source of electric vehicles, lithium-ion batteries have become an important choice widely used in modern energy storage and conversion technologies due to their superior power density, energy density, cycle life, economy, and environmental friendliness. Among them, the State of Power (SOP), as a key indicator reflecting the ability of a battery to provide or absorb the maximum power under specific working conditions, is of great significance for energy scheduling, safety protection, and life prediction of the Battery Management System (BMS). Traditional SOP estimation methods mainly rely on equivalent circuit models and electrochemical models. Although these models have good physical interpretability, they usually require complex parameter identification and high computing resources, and it is difficult to meet the requirements of real-time performance and generalization. Therefore, it is urgent to propose a lithium battery charge and discharge SOP estimation framework based on a Convolutional Gated Recurrent Unit Neural Network (CNN-GRU) battery model. Summary of the Invention

[0003] To solve the above-mentioned problems, the present invention provides a method and system for predicting the power state of a battery based on a hybrid neural network. It can extract local features to process the noise and irregularity in battery data; improve the generalization of battery power estimation, and can also process the time dependence of sequence data, which is suitable for the dynamic characteristics of battery state changing over time, and improve the accuracy of power estimation by means of the gated recurrent unit mechanism.

[0004] In the first aspect, a method for predicting the power state of a battery based on a hybrid neural network provided by the present invention adopts the following technical solution: A method for predicting the power state of a battery based on a hybrid neural network includes: Extracting relevant data of a lithium-ion battery; Performing data preprocessing on the relevant data of the lithium-ion battery; Constructing a CNN-GRU hybrid neural network model; Using the CNN layer of the CNN-GRU hybrid neural network model to extract features and reduce the dimension of the relevant data of the lithium-ion battery; Using the GRU layer of the CNN-GRU hybrid neural network model to perform temporal processing on the dimension-reduced feature map; Performing feature linear combination using a fully connected layer; Output the prediction result.

[0005] Further, the extraction of relevant data of the lithium-ion battery includes charging the battery under test to a predetermined state of charge, measuring the discharge current and terminal voltage of the battery in each pulse segment, wherein the battery is discharged using different currents, and after each discharge ends, the battery is moderately charged with a current of the same amplitude, and the current, voltage, temperature, SOC, and SOE parameters are measured through a peak current test.

[0006] Further, the data preprocessing of the relevant data of the lithium-ion battery includes using a sliding window to cut a continuous charge-discharge data sequence into subsequences of a fixed length and connecting them to form complete time-series data, expressed as: where , represents the original data at the t-th time point, w represents the window length, s represents the sliding step, represents the i-th window, and T represents the sequence length.

[0007] Further, the construction of the CNN-GRU hybrid neural network model includes separately constructing a convolutional layer, a pooling layer, and a fully connected layer. Among them, by adjusting the size and number of convolutional kernels, convolutional operations are performed on the input data to generate feature maps, and an activation function is introduced after the convolutional operations; during the pooling process, a pooling window of a fixed size is selected and gradually moved in the feature map; according to the max pooling strategy, corresponding calculations are performed within each window, and the maximum value within the window is selected by max pooling, expressed as: where is the stride; and are the indices of the pooling window; the size of the window is .

[0008] Further, the use of the CNN layer of the CNN-GRU hybrid neural network model to extract features and reduce the dimensionality of the relevant data of the lithium-ion battery includes, in the initial stage of feature extraction, extracting significant features in the input sequence within a local range through convolutional operations. Let the input data be a matrix , where T is the number of time steps and D is the feature dimension per step. The convolutional layer performs sliding window processing on the input data through multiple groups of convolutional kernels, and the operation is expressed as: where is the k-th convolutional kernel, with a size of K*D, is the bias term, is the ReLU activation function.

[0009] Furthermore, when using the CNN layer of the CNN-GRU hybrid neural network model to extract features and reduce the dimensionality of relevant data of the lithium-ion battery, after completing local feature extraction, the pooled feature sequence is input into the GRU to further capture the long-range temporal dependence relationships in the data. The GRU dynamically controls the information flow through a gating mechanism and models the complex dynamic relationships between different time steps. The process is expressed as follows: The update gate controls the information transfer ratio: , The reset gate controls the degree of forgetting of the historical state: , Calculation of the candidate hidden state: , Update of the current hidden state: , Among them, is the hidden state at the previous moment, represents the Sigmoid activation function, and tanh() represents the hyperbolic tangent activation function. represents the Hadamard product, , , are the weight matrix and bias vector to be trained, respectively.

[0010] Furthermore, when using the GRU layer of the CNN-GRU hybrid neural network model to perform temporal processing on the dimension-reduced feature mapping, an attention mechanism is introduced for the temporal features. Taking the hidden state output by the GRU as the input, after passing through a fully connected layer and an activation function, the attention weights at each time step are obtained, and these weights are weighted and summed with the corresponding hidden states to obtain an enhanced temporal feature representation. At the same time, a Dropout layer is added to the GRU layer to randomly discard some neuron connections. Using Dropout, the neuron outputs in the GRU layer are set to 0 with a certain probability, forcing the model to learn more robust feature representations, avoiding the model relying too much on certain specific neuron connections, and preventing the model from overfitting.

[0011] Furthermore, when using the fully connected layer to perform feature linear combination, it includes using the fully connected layer to perform weighted linear combination on the input features and applying a non-linear transformation to achieve the reconstruction of the feature space and the target mapping of the downstream task. Among them, let the feature output representation after the previous processing module be a vector: where d is the feature dimension; the fully connected layer performs a linear transformation and a non-linear mapping on the input features, and the calculation process is as follows: Among them, is the weight matrix, is the output feature dimension; is the bias vector, is the non - linear activation function, is the output result of the fully - connected layer.

[0012] Furthermore, the feature linear combination using the fully - connected layer also includes applying the L2 regularization method to the weight matrix \(W\) to prevent overfitting of the fully - connected layer. By adding the square term of the Frobenius norm of the weight matrix to the loss function, it is realized that during training, the weight values tend to be smaller values. At the same time, according to the specific requirements and data characteristics of the downstream task, the output feature dimension of the fully - connected layer is dynamically adjusted.

[0013] In a second aspect, a power state prediction system for a battery based on a hybrid neural network includes: A data acquisition module, configured to extract relevant data of the lithium - ion battery; A pre - processing module, configured to perform data pre - processing on the relevant data of the lithium - ion battery; A model construction module, configured to construct a CNN - GRU hybrid neural network model; A feature module, configured to use the CNN layer of the CNN - GRU hybrid neural network model to extract features and reduce the dimensionality of the relevant data of the lithium - ion battery; A time - series module, configured to use the GRU layer of the CNN - GRU hybrid neural network model to perform time - series processing on the dimension - reduced feature map; A combination module, configured to perform feature linear combination using the fully - connected layer; An output module, configured to output the prediction result.

[0014] In a third aspect, the present invention provides a computer - readable storage medium, in which multiple instructions are stored, and the instructions are adapted to be loaded and executed by a processor of a terminal device for the power state prediction method of a battery based on a hybrid neural network.

[0015] In a fourth aspect, the present invention provides a terminal device, including a processor and a computer - readable storage medium. The processor is used to implement each instruction; the computer - readable storage medium is used to store multiple instructions, and the instructions are adapted to be loaded and executed by the processor for the power state prediction method of a battery based on a hybrid neural network.

[0016] In summary, the present invention has the following beneficial technical effects: The present invention utilizes the CNN layer to efficiently extract significant features of lithium-ion battery data within a local range, and achieves feature dimensionality reduction through pooling operations, effectively removing redundant information. The GRU layer, relying on the gating mechanism, accurately captures the long-range temporal dependencies in the feature maps after dimensionality reduction, successfully solving the problems of noise and irregularity in battery data and being able to handle the dynamic characteristics of battery states changing over time. In the data preprocessing stage, the application of the sliding window technique and the maximum-minimum normalization method further optimizes the data quality, making the model input more representative and enhancing the model's processing ability for complex battery data.

[0017] Through experimental verification, under different temperature conditions (such as 0°C, 10°C, 25°C, etc.), the CNN-GRU model of the present invention is superior to other models in key indicators such as root mean square error (RMSE), mean absolute error (MAE), and mean bias error (MBE). At 0°C, 25°C, and 40°C, the RMSE values of the CNN-GRU model are 1.21, 1.32, and 1.17 respectively, all less than those of other comparison models; the MAE values are 0.54, 1.63, and 1.18 respectively, also showing better performance. This indicates that the model can more accurately predict the battery power state and has strong stability under different working conditions, providing reliable data support for the battery management system.

[0018] The CNN-GRU hybrid neural network model effectively improves the generalization of battery power estimation and reduces the dependence on specific data and working conditions. The weighted linear combination and non-linear transformation of features by the fully connected layer realize the reconstruction of the feature space and the target mapping, enabling the model to better meet the requirements of downstream tasks such as energy scheduling, safety protection, and life prediction in the battery management system. The prediction method and system of this invention are applicable to the prediction of the power state of lithium-ion batteries in various scenarios, can meet the urgent needs of electric vehicles and renewable energy systems for efficient battery management and safe operation, and have high practical value and application prospects. Brief Description of the Drawings

[0019] Figure 1 It is a schematic diagram of a method for predicting the power state of a battery based on a hybrid neural network in Embodiment 1 of the present invention.

[0020] Figure 2 It is a schematic diagram of the CNN network structure in Embodiment 1 of the present invention.

[0021] Figure 3 It is a schematic diagram of the GRU network structure in Embodiment 1 of the present invention.

[0022] Figure 4 It is a schematic diagram of the CNN-GRU framework in Embodiment 1 of the present invention.

[0023] Figure 5 It is a schematic diagram of the estimation result of the CNN-GRU laboratory data in Embodiment 1 of the present invention. Specific implementation manners

[0024] The present invention will be further described in detail below with reference to the accompanying drawings.

[0025] Embodiment 1 Referring to Figure 1 , a method for predicting the power state of a battery based on a hybrid neural network in this embodiment S1. Extract relevant data of the lithium-ion battery; The test battery in this embodiment uses a 18650 rechargeable lithium battery. In order to obtain experimental data such as current, voltage, and temperature, a multi-stage pulse discharge test for power batteries was carried out. It includes the host computer of the battery test system, a thermostatic and humidistatic chamber, a battery charger / discharger, and a temperature monitoring system. During the experiment, data such as charging current, charging voltage, and battery temperature are stored on the host computer, and all experimental data are collected as the source data for subsequent estimation.

[0026] In this embodiment, a multifunctional battery test system is used to measure the discharge current and terminal voltage of the battery in each pulse segment. First, the battery under test is charged to a predetermined state of charge (SOC). Subsequently, the battery is discharged with different currents, and after each discharge ends, the battery is moderately charged with a current of the same amplitude to ensure that the state of charge value of the battery does not deviate too far from the set value during the next discharge. Considering factors such as experimental duration, material cost, and model training time. Based on the actual test situation, the state of charge (SOC) is set in the range of 0.10 to 0.90, and SOC test points are set at intervals of 0.1. Given that the battery test temperature is limited to 25°C, the battery under test needs to be left standing in a constant temperature experimental chamber for 4 hours to ensure that the battery temperature meets the requirements of the output peak power test. When conducting the peak current test, when the battery discharges to the test point, it needs to be left standing in a thermostatic and humidistatic chamber for 2 hours, and then the battery is discharged with a constant current, and parameters such as current, voltage, temperature, SOC, and SOE during the experiment are recorded.

[0027] The specific operation steps are as follows: (1) Before charging, leave the battery standing at room temperature (25°C) for 2 hours to ensure that its internal temperature is stable at 25°C, which is used as the starting temperature of the charging process.

[0028] (2) First, charge the battery in a constant current charging state of 1C, and then continue charging in a constant voltage state of 4.2V until the current drops below 50 mA, indicating that the battery is fully charged.

[0029] (3) Place the test battery at the test temperature and let it stand for a period of time ≥ 30 min to allow the battery to reach a stable state.

[0030] (4) Charge the battery under test to a predetermined 90% SOC, then charge and discharge the battery at a rate of 0.2C for 10 s, and record the discharge current and terminal voltage of the test battery.

[0031] (5) Let the battery stand for 30 min, and then perform pulse tests on the battery at rates of 0.4C, 0.5C, 1C, 2C, 4C, and 6C respectively and record the results.

[0032] (6) Discharge the battery to the set point SOC respectively, repeat steps Step3 - 5, and record the battery charge and discharge data.

[0033] S2. Perform data preprocessing on the relevant data of the lithium - ion battery; Among them, when the battery conducts data acquisition during the charge and discharge stages, due to the influence of various factors, the data may be missing, noisy, redundant, or abnormal. Therefore, when using a data - driven method for learning tasks, the data preprocessing link is crucial, which directly affects the training effect and estimation performance of the model. Use the sliding window technique to cut the continuous charge and discharge data sequence into subsequences of a fixed length, and then connect these subsequences to form a complete time - series data as the model input. As shown in the formula: Among them, , represents the original data at the t - th time point, w represents the window length, s represents the sliding step, represents the i - th window, and T represents the sequence length.

[0034] In the charge and discharge data of the battery, the measurement units of data such as current, voltage, temperature, SOC, SOE, and RCT are different, resulting in problems of large differences in numerical ranges and different dimensions between data. To eliminate this influence and ensure that the model can balance the weights of each feature to improve the stability and generalization ability of the model. The method of maximum - minimum normalization is used to scale the data to the interval [0, 1]. The maximum - minimum normalization calculation formula: is the normalized value; is the initial data; is the minimum value in the initial data; is the maximum value in the initial data. The normalized data is between 0 and 1.

[0035] S3. Construct a CNN-GRU hybrid neural network model; Among them, the convolutional neural network (CNN) is a feedforward neural network with a convolutional structure and a deep structure that can effectively extract spatial features

[62] . CNN is developed on the basis of the Back Propagation (BP) neural network. It replaces the hidden layer in the traditional BP network with convolutional layers, pooling layers, and fully connected layers. Although the network structure has been adjusted, the forward propagation calculation method is still adopted inside. Usually, a typical CNN model consists of three parts: convolutional layer, pooling layer, and fully connected layer, as Figure 2 shown. The convolutional layer extracts features from the input data through convolutional kernels, and the pooling layer downsamples the convolutional results to reduce the data dimension and speed up the model training speed. Finally, the regression or classification results are output through the fully connected layer.

[0036] The convolutional layer is a key component in the convolutional neural network (CNN). It mainly performs convolutional operations on the input data by adjusting the size and number of convolutional kernels (filters) to generate feature maps. This operation can effectively capture the local features of the input data. To enhance the representation ability of the network, an activation function is usually introduced after the convolutional operation to introduce non-linearity, enabling the network to learn more complex patterns and features. The calculation process of the convolutional layer can be expressed by the following formula: Among them, is the value of the pooled feature map at position ; is the input feature map; is the weight of the convolutional kernel; is the bias, which can help better fit the data; is the size of the convolutional kernel.

[0037] The pooling layer receives the output from the previous convolutional layer as its input and reduces the dimension of the feature map through pooling operations. The pooling process first selects a fixed-size pooling window and moves step by step on the feature map in the way of a sliding window. The size of the pooling window is determined by hyperparameters and directly affects the area covered by each pooling operation. According to the selected pooling strategy (usually max pooling or average pooling), corresponding calculations are performed within each window: max pooling selects the maximum value within the window, while average pooling calculates the average value within the window. The pooling window slides on the feature map with a fixed stride, and the setting of the stride has an important impact on the size of the pooled feature map. A larger stride can accelerate the dimensionality reduction process of the feature map, while a smaller stride helps to retain more detailed information. To retain more feature information, this paper adopts the max pooling strategy, and the specific calculation is shown in the following formula: wherein, is the stride; and are the indices of the pooling window; the size of the window is .

[0038] The fully connected layer is located at the last stage of the convolutional neural network and is responsible for integrating the features extracted by the convolutional layer and the pooling layer. By further processing and non-linear transformation of these features, the fully connected layer can extract higher-level abstract information and finally generate the output result of the network. Its calculation process is shown in the following formula: wherein, represents the input vector; represents the weight matrix; is the activation function; represents the output vector.

[0039] S4. Use the CNN layer of the CNN-GRU hybrid neural network model to extract features and reduce the dimension of the relevant data of the lithium-ion battery; Among them, in the initial stage of feature extraction, the CNN module first extracts significant features in the input sequence within a local range through convolution operations. Let the input data be the matrix , where T is the number of time steps and D is the feature dimension per step. The convolutional layer processes the input data through multiple groups of convolutional kernels with a sliding window, and its operation process can be expressed as: wherein, is the k-th convolutional kernel with a size of K*D, is the bias term, is the ReLU activation function.

[0040] The convolution operation can effectively capture local correlation patterns between adjacent time steps, such as trend changes, local fluctuations, etc. In addition, in order to reduce the redundancy and dimensionality burden of features, a pooling operation (such as max pooling) is usually performed after convolution, which is defined as: The features extracted by the CNN module not only retain important local change information, but also reduce the dimension of the input data, providing a more compact and effective feature representation for subsequent time series modeling.

[0041] S5. Use the GRU layer of the CNN-GRU hybrid neural network model to perform temporal processing on the dimension-reduced feature map. After local feature extraction is completed, the pooled feature sequence is input into the GRU module to further capture the long-range temporal dependencies in the data. GRU dynamically controls the information flow through a gating mechanism, effectively modeling the complex dynamic relationships between different time steps.

[0042] Among them, the gated recurrent unit (GRU) GRU is a simplified version of the LSTM neural network. LSTM contains three gating mechanisms: an input gate, a forget gate, and an output gate, which are used to regulate the input information, the memory state, and the output information, respectively. In GRU, the concept of an "update gate" is introduced, and the forget gate and the input gate in LSTM are combined into a single gating unit. Therefore, GRU only contains two gating mechanisms: an update gate and a reset gate. The update gate and the reset gate jointly regulate the state update process of the network through the current input and the hidden state at the previous moment. The reset gate controls to what extent the hidden state at the previous moment is retained or forgotten when generating a new candidate hidden state. Subsequently, the update gate weights the candidate hidden state to generate the final hidden state. The GRU network architecture is as Figure 3 shown.

[0043] Update gate is the key mechanism in GRU for regulating the information transfer between the current hidden state and the hidden state at the previous moment. Its role is to determine how much information from the hidden state at the previous moment needs to be transferred to the current moment, and at the same time update the state by combining the current input information. By precisely controlling the information flow, the update gate can effectively and selectively retain old information or introduce new information, thereby capturing the long-term dependencies in the sequence. Mathematically, the value of the update gate is calculated by inputting the linear transformation of the current input and the hidden state at the previous moment into the sigmoid activation function. The specific formula is as shown in the following formula: Among them, is the weight matrix of the input and the update gate, is the weight matrix of the previous hidden state and the update gate, is the input at the current moment; is the hidden state at the previous moment; is the sigmoid activation function, and its output range is between [0,1].

[0044] Reset gate Determines the influence of the previous hidden state on generating the candidate hidden state at the current moment. Its main function is to adjust the degree of combination of the current input and the previous hidden state, thereby controlling the calculation of the candidate hidden state. When the value of the reset gate is small, the hidden state information of the previous moment will be more ignored, and the candidate hidden state depends more on the current input; while when the value of the reset gate is large, it indicates that more hidden state information of the previous moment is utilized. The calculation of the reset gate is obtained by linearly transforming the current input and the previous hidden state and inputting them into the sigmoid activation function. The specific formula is as follows: Where, is the weight matrix of the input gate and the reset gate; is the weight matrix of the previous hidden state and the reset gate; is the input at the current moment; is the hidden state of the previous moment; is the sigmoid activation function.

[0045] The candidate hidden state is a combination of the current input and the past hidden state, and the contribution of the past hidden state is controlled by the reset gate. The expression is: represents the candidate hidden state, tanh represents the hyperbolic tangent activation function, and its value range is [-1, 1]. is the element-wise multiplication of the previous hidden state controlled by the reset gate. 、 are the weight matrices of the candidate hidden state.

[0046] The final hidden state is the weighted sum of the candidate hidden state and the previous hidden state, and the weight is controlled by the update gate. The expression is: is the hidden state at the current time step. is the contribution of the past hidden state controlled by the update gate. is the contribution of the candidate hidden state controlled by the update gate.

[0047] As a further implementation method, the GRU layer of the CNN - GRU hybrid neural network model is used to perform temporal processing on the dimension-reduced feature map. In addition to capturing the long-range temporal dependence relationship in the data through the gating mechanism, it also includes further mining, optimization of the temporal features, and using these features for more accurate prediction assistance and other operations, including: (1) Introduce an attention mechanism in the process of the GRU layer dealing with temporal features. By calculating the importance weights of the features at each time step, the model can pay more attention to the key time steps that have a greater impact on the prediction results. Specifically, take the hidden state output by the GRU as the input, process it through a fully connected layer and an activation function (such as Softmax) to obtain the attention weights at each time step. Then, perform a weighted sum of these weights and the corresponding hidden states to obtain an enhanced representation of the temporal features. This way can enable the model to automatically focus on important information and ignore irrelevant or interfering information when dealing with long sequence data, thereby improving the ability to capture complex temporal patterns.

[0048] (2) To capture information at different time scales more comprehensively, sample the dimensionality-reduced feature maps with different time steps to obtain multiple temporal feature sequences of different scales. For example, in addition to the original time step, time steps with intervals of 2, 4, etc. can also be used for sampling. Then, input these temporal features of different scales into independent GRU layers for processing, and finally fuse the outputs of each GRU layer. The fusion method can be simple concatenation or weighted fusion, where weights are assigned according to the importance of features at different scales, enabling the model to learn both short-term and long-term temporal dependencies and enhancing the adaptability to complex dynamic changes.

[0049] (3) Appropriately add a Dropout layer in the GRU layer to randomly discard some neuron connections to prevent the model from overfitting. During training, Dropout will set the outputs of neurons in the GRU layer to 0 with a certain probability, which can force the model to learn more robust feature representations, avoid the model relying too much on certain specific neuron connections, and thus improve the generalization ability of the model. When performing temporal processing on the dimensionality-reduced feature maps, the Dropout layer can be placed at the input or output position of the GRU layer, and the specific probability needs to be tuned according to experiments, and a more appropriate value is generally selected between 0.1 - 0.5.

[0050] (4) Reasonably initialize the weights of the GRU layer. For example, use the Xavier initialization or Kaiming initialization method. These initialization methods can assign appropriate initial values to the weights according to the structure of the network and the characteristics of the activation function, which helps to accelerate the convergence of the model and improve the training stability. At the same time, select an appropriate optimizer to update the parameters of the GRU layer. In addition to the commonly used Adam optimizer, you can also try optimizers with adaptive learning rates such as Adagrad and Adadelta. These optimizers can dynamically adjust the learning rate according to the update situation of the parameters, enabling the model to converge to the optimal solution faster during training, and thus improving the effect of processing time series features.

[0051] (5) Use the prediction results of previous time steps as additional features and input them into the GRU layer of the current time step. Since the historical prediction results contain the model's understanding and judgment of past data, integrating them into the current time series processing process can provide more reference information for the model and help the model better capture the changing trend of the data. For example, concatenate the predicted values of the previous few time steps with the dimension-reduced feature map and then input them into the GRU layer, enabling the model to make a more accurate prediction of the current time step by combining historical prediction information, thereby further optimizing the prediction results. Use the time series features learned by the GRU layer for anomaly detection. By setting an appropriate threshold, determine whether the features of the current time step match the normal time series pattern. If an anomaly is detected, such as the feature value deviating too much from the normal range or showing fluctuations that do not conform to historical laws, the abnormal data can be corrected according to the normal time series feature pattern learned previously. The correction method can be interpolation based on the features of adjacent time steps, or prediction substitution using the normal pattern learned by the model, to ensure the data quality input into the subsequent model and improve the accuracy and reliability of the prediction.

[0052] S6. Use a fully connected layer for feature linear combination; Among them, in a neural network, the fully connected layer (Fully Connected Layer, FC Layer) is usually an important module for feature combination and mapping. Its main function is to perform weighted linear combination on the input features and apply a non-linear transformation, so as to achieve the reconstruction of the feature space and the target mapping of downstream tasks (such as classification, regression).

[0053] Suppose the feature output after the previous processing module (such as CNN-GRU) is represented as a vector: where d is the feature dimension.

[0054] The fully connected layer performs a linear transformation and non-linear mapping on the input features, and the calculation process is as follows: Among them, is the weight matrix, is the output feature dimension. is the bias vector, is the non-linear activation function, is the output result of the fully connected layer.

[0055] The fully connected layer realizes the weighted sum of features and bias correction, and introduces non-linearity through the activation function, enabling the network to learn complex feature combinations and mapping relationships.

[0056] Specifically expressed as: Input: Feature vector extracted from the previous layer , Output: Feature representation after linear combination , Step 1: Initialize the weight matrix and the bias vector b, and Gaussian distribution, Xavier initialization or He initialization can be used.

[0057] Step 2: Perform a linear transformation to calculate the weighted sum: .

[0058] Step 3: Apply the activation function to increase the non-linear feature expression ability: .

[0059] Step 4: Output the feature vector y as the input to the subsequent network module (such as a classifier or a regressor).

[0060] As a further implementation, to prevent overfitting of the fully connected layer, regularization techniques such as L1 or L2 regularization (also called weight decay) are applied to the weight matrix W. L2 regularization is achieved by adding the square of the Frobenius norm of the weight matrix (multiplied by a regularization hyperparameter \(\lambda\)) to the loss function. The new loss function is expressed as: , where L is the original loss function. In the training process, the regularization term will encourage the weight values to tend to smaller values, avoid over-complexity of the model, and improve the generalization ability of the model. Stacking multiple fully connected layers: Multiple fully connected layers can be stacked instead of using only one fully connected layer. Each subsequent fully connected layer further combines and transforms features based on the output of the previous layer. For example, the output result of the first fully connected layer is used as the input of the second fully connected layer, and so on. This can gradually extract higher-level and more abstract features, further reconstruct the feature space, and better adapt to the complex requirements of downstream tasks. However, as the number of layers increases, attention also needs to be paid to the problems of gradient disappearance or gradient explosion, which can be alleviated by appropriate initialization strategies and activation function selections. Dynamically adjusting the output dimension: According to the specific requirements and data characteristics of the downstream task, dynamically adjust the output feature dimension of the fully connected layer. In the early stage of training, a larger output dimension can be set to fully explore the feature space; as training progresses, according to the performance of the model on the validation set, gradually reduce the output dimension, remove redundant information, and improve the computational efficiency and prediction accuracy of the model. This can be achieved by writing code logic for dynamically adjusting the structure and reconstructing the fully connected layer at different training stages. Fusion with other modules: Combine the output of the fully connected layer with other modules specifically designed for downstream tasks. For example, for the battery power state prediction task, if risk assessment is required subsequently, the output of the fully connected layer can be fused with a risk assessment module (such as a rule-based risk scoring module or another simple neural network module). The feature representation provided by the fully connected layer serves as the input to the risk assessment module, and the two work together to provide a more comprehensive and targeted output result for the final task.

[0061] Experimental verification: In this embodiment, laboratory pulse test data is selected to verify the estimation accuracy and stability of the model. During training and testing, 2 selects 30% of the data for testing, and the remaining 70% of the data for training. This section uses laboratory pulse data at temperatures of 0°C, 10°C, and 25°C to estimate the battery discharge power to verify the estimation performance of the model at different temperatures. In addition, to ensure the credibility of the results, the learning rates of all algorithms in this chapter adopt the same decay method to avoid randomness. Moreover, each neural network is trained and tested separately, and parameter adjustment is performed to obtain the optimal model. This is used to compare the generalization and accuracy of the proposed model and the comparison model.

[0062] As Figure 4As shown, during the training process of the CNN-GRU neural network, the activation function of the model is the ReLU function, the loss function is the mean squared error, and the weights and biases of the network are iteratively updated through the Adam optimization algorithm. The reasons for choosing the Adam algorithm are mainly as follows: First, the Adam algorithm combines a momentum term and an adaptive learning rate adjustment mechanism, which can accelerate the convergence process of the neural network and significantly reduce the training time. Second, the Adam algorithm usually exhibits good stability during the training process, which can effectively alleviate the problems of gradient explosion or disappearance, thereby better maintaining the numerical stability of the network. Through a large number of experiments and parameter adjustments in this paper, the size of the convolutional kernel in the CNN-GRU joint estimation model is set to 5*5, which can capture the features of data in a large range. The convolutional kernel can capture valuable feature information in a large range. To prevent overfitting of the model, Dropout is selected. The learning rate is set to 0.0001. The number of iterations is set to 100 times.

[0063] The network structure and parameter settings of the constructed neural network model are shown in Table 1. Table 1 Parameter Settings Lithium-ion battery sample Length of training set 82043 Length of validation set 12000 Input step size 10 Number of iterations 100 Number of nodes in the hidden layer of the CNN network 64 Number of nodes in the hidden layer 1 of the GRU network 64 Number of nodes in the hidden layer 1 of the GRU network 32 DropOut layer 0.1 Number of samples per batch (BatchSize) 16 Learning rate 0.0001 Through Figure 5 the quantitative analysis shows that Figure 5 in (a) represents the HPPC at 0°C, Figure 5 in (b) represents the HPPC at 5°C, Figure 5 in (c) represents the HPPC at 40°C. The CNN-GRU model is superior to other models in these metrics. It can be observed from Table 2 that the RMSE of the CNN-GRU model at each temperature is less than that of other models. At the same time, the calculated MBE values of CNN-GRU at 0°C, 25°C, and 40°C are -0.11, 0.47, and -0.21 respectively. It can be seen that except for 25°C, the MBE values at 0°C and 40°C are less than 0, which means that the predicted values of the model are generally lower than the actual values. The MAE values of CNN-GRU at different temperatures are 0.54, 1.63, and 1.18 respectively, all of which are less than those of other estimation models. Therefore, when comparing with other estimation models, it can be seen from the combination of MAE and MBE that CNN-GRU is better than other estimation models in terms of the overall error level and the accuracy of predicted values. It can be seen from the figure that the CNN-GRU model has stronger stability. According to the above experimental results, the CNN-GRU model is superior to other models in terms of SOP estimation accuracy.

[0064] Table 2 Performance Comparison

[0065] Example 2 This embodiment provides a power state prediction system for a battery based on a hybrid neural network. The working process of the system is expressed as follows: The CNN extracts local features of the time series through the convolutional layer and uses the pooling layer to reduce the dimensionality of the input data. However, its drawback is that it cannot capture the temporal dependence between data. On the contrary, the GRU is good at learning the temporal relationship between adjacent data points on the time axis, but its feature extraction ability is relatively weak. To fully utilize the advantages of both models, the CNN and GRU are combined to achieve a complementary effect, so as to improve the performance of the model in time series tasks. As Figure 2 shown, the CNN-GRU model mainly consists of an input layer, a convolutional layer, a GRU layer, and an output layer. The learning process of each functional layer is described as follows: Step1: First, relevant data of the lithium-ion battery is extracted, and the data is divided into a training set and a test set according to different prediction points. The normalized sample data is used as the input of the model to ensure that the feature values are in the same numerical range, thereby improving the training effect and convergence speed of the model.

[0066] Step2: The convolutional layer adaptively extracts the feature information of the input factors using convolutional kernels; preserves the local patterns in the time series, reduces the data dimension, and at the same time enhances the sensitivity of the model to local patterns. The pooling layer performs a dimensionality reduction operation on the extracted feature information, aiming to reduce the data dimension while retaining the key features, so as to improve the computational efficiency and reduce the model complexity. The Dropout layer effectively prevents overfitting of the model by randomly deactivating some neurons, thereby enhancing the generalization ability of the model and improving its performance on unseen data.

[0067] Step3: The GRU layer receives the feature map output by the convolutional layer and processes its temporal dependence. The reset gate adjusts the dependence of the current hidden state on the previous hidden state, while the update gate determines the information of the previous moment that should be retained or updated in the current hidden state, thereby effectively capturing the long-term dependence relationship in the sequence. And the hidden state information is passed to the fully connected layer.

[0068] Step4: The fully connected layer receives and integrates the features extracted before, performs a linear combination of all input neurons and output neurons, and finally the output layer generates the final prediction result to provide the output of the model. The battery SOP prediction is completed.

[0069] A computer-readable storage medium stores multiple instructions, and the instructions are adapted to be loaded and executed by a processor of a terminal device for the power state prediction method of a battery based on a hybrid neural network.

[0070] A terminal device includes a processor and a computer-readable storage medium. The processor is configured to implement various instructions; the computer-readable storage medium is configured to store multiple instructions, and the instructions are adapted to be loaded and executed by the processor to perform the method described above.

[0071] The above are all preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present invention shall be covered within the protection scope of the present invention.

Claims

1. A method for predicting the power state of a battery based on a hybrid neural network, characterized in that, Including: Extracting relevant data of the lithium-ion battery; Performing data preprocessing on the relevant data of the lithium-ion battery; Constructing a CNN-GRU hybrid neural network model; Using the CNN layer of the CNN-GRU hybrid neural network model to extract features and reduce the dimensionality of the relevant data of the lithium-ion battery; Using the GRU layer of the CNN-GRU hybrid neural network model to perform temporal processing on the dimension-reduced feature map; Performing feature linear combination using the fully connected layer; Outputting the prediction result.

2. The power state prediction method of a battery based on a hybrid neural network according to claim 1, wherein The extraction of the relevant data of the lithium-ion battery includes charging the battery under test to a predetermined state of charge, measuring the discharge current and terminal voltage of the battery in each pulse segment, where the battery is discharged using different currents, and after each discharge ends, the battery is moderately charged with a current of the same amplitude, and the current, voltage, temperature, SOC, and SOE parameters are measured through a peak current test.

3. A method for predicting the power state of a battery based on a hybrid neural network according to claim 1, characterized in that, The data preprocessing of the relevant data of the lithium-ion battery includes using a sliding window to cut the continuous charge-discharge data sequence into subsequences of a fixed length and concatenating them to form complete time series data, expressed as: Among them, , represents the original data at the t-th time point, w represents the window length, s represents the sliding step size, represents the i-th window, and T represents the sequence length.

4. The method for predicting battery power status based on a hybrid neural network according to claim 1, characterized in that: The construction of the CNN-GRU hybrid neural network model includes separately constructing a convolutional layer, a pooling layer, and a fully connected layer. Among them, by adjusting the size and number of convolutional kernels, convolutional operations are performed on the input data to generate a feature map, and an activation function is introduced after the convolutional operation; during the pooling process, a pooling window of a fixed size is selected and gradually moved in the feature map; according to the maximum pooling strategy, the corresponding calculation is performed within each window, and the maximum value within the window is selected for maximum pooling, expressed as: Among them, is the stride; and are the indices of the pooling window; the size of the window is .

5. A method for predicting the power state of a battery based on a hybrid neural network according to claim 1, characterized in that The CNN layer of the CNN-GRU hybrid neural network model is used to extract features and reduce the dimensionality of the relevant data of the lithium-ion battery. In the initial stage of feature extraction, significant features in the input sequence are extracted within a local range through convolution operations. Let the input data be a matrix , where T is the number of time steps and D is the feature dimension per step. The convolutional layer processes the input data through multiple groups of convolutional kernels using a sliding window. The operation is expressed as: Among them, is the k-th convolutional kernel with a size of K*D, is the bias term, is the ReLU activation function.

6. A method for predicting the power state of a battery based on a hybrid neural network according to claim 1, characterized in that, The CNN layer of the CNN-GRU hybrid neural network model is used to extract features and reduce the dimensionality of the relevant data of the lithium-ion battery. After local feature extraction is completed, the pooled feature sequence is input into the GRU to further capture the long-range temporal dependence relationship in the data. The GRU dynamically controls the information flow through the gating mechanism and models the complex dynamic relationship between different time steps. The process is expressed as: The update gate controls the information transfer ratio: , Reset the forgetting degree of the door control historical status: , Candidate hidden state calculation: , Current hidden state update: , Among them, is the hidden state at the previous moment, represents the Sigmoid activation function, and tanh() represents the hyperbolic tangent activation function, represents the Hadamard product, , , are the weight matrix and bias vector to be trained, respectively.

7. A method for predicting the power state of a battery based on a hybrid neural network according to claim 1, characterized in that, The use of the GRU layer of the CNN-GRU hybrid neural network model to perform temporal processing on the dimension-reduced feature map also includes introducing an attention mechanism for the temporal features, taking the hidden state output by the GRU as the input, passing through a fully connected layer and an activation function for processing to obtain the attention weights for each time step, and performing weighted summation of these weights with the corresponding hidden states to obtain an enhanced temporal feature representation; At the same time, a Dropout layer is added to the GRU layer to randomly discard some neuron connections. Using Dropout, the neuron outputs in the GRU layer are set to 0 with a certain probability, forcing the model to learn more robust feature representations, avoiding the model relying too much on certain specific neuron connections, and preventing the model from overfitting.

8. A method for predicting the power state of a battery based on a hybrid neural network according to claim 1, characterized in that, The use of the fully connected layer for feature linear combination includes using the fully connected layer to perform weighted linear combination on the input features and applying a non - linear transformation to achieve the reconstruction of the feature space and the target mapping of the downstream task. Among them, let the feature output after the previous processing module be represented as a vector: where d is the feature dimension; the fully connected layer performs linear transformation and non - linear mapping on the input features, and the calculation process is as follows: Among them, is the weight matrix, is the output feature dimension; is the bias vector, is the non-linear activation function, is the output result of the fully connected layer.

9. A method for predicting the power state of a battery based on a hybrid neural network according to claim 1, characterized in that, The use of the fully connected layer to perform feature linear combination also includes to prevent overfitting of the fully connected layer, applying the L2 regularization method to the weight matrix W, and by adding the square term of the Frobenius norm of the weight matrix to the loss function, achieving the promotion of the weight values to tend to smaller values during training, and at the same time, dynamically adjusting the output feature dimension of the fully connected layer according to the specific requirements and data characteristics of the downstream task.

10. A power state prediction system for a battery based on a hybrid neural network, characterized in that, Including: A data acquisition module configured to extract relevant data of the lithium-ion battery; A preprocessing module configured to perform data preprocessing on the relevant data of the lithium-ion battery; A model construction module, configured to construct a CNN-GRU hybrid neural network model; A feature module, configured to perform feature extraction and feature dimensionality reduction on the relevant data of the lithium-ion battery by using the CNN layer of the CNN-GRU hybrid neural network model; A time series module, configured to perform time series processing on the dimension-reduced feature map by using the GRU layer of the CNN-GRU hybrid neural network model; A combination module, configured to perform linear combination of features by using a fully connected layer; An output module, configured to output a prediction result.

Citation Information

Patent Citations

  • Lithium ion battery electric quantity prediction method considering aging condition

    CN112098874A

  • Lithium battery health state estimation method based on hybrid neural network and transfer learning

    CN116679232A

  • Lithium ion battery energy state prediction method

    CN117709396A

  • Battery power state estimation method and device

    CN119780731A