Marine lithium battery SOC and SOH estimation method and system based on GA-BP neural network

Through genetic algorithms, the weight and bias of BP neural network are optimized, combined with GA-BP neural network, the problems of high cost and easy to fall into local optimal solutions in the existing marine lithium battery SOC and SOH estimation methods are solved, high-precision and stable real-time estimation are achieved, and the intelligence level of lithium battery management system is improved.

CN120493684APending Publication Date: 2025-08-15SHANGHAI SHIP & SHIPPING RES INST CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510444866.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing SOC and SOH estimation methods for marine lithium batteries have problems such as high experimental cost, poor universality of the model method, and the BP neural network in the data-driven method is prone to fall into local optimal solutions, resulting in insufficient estimation accuracy and poor convergence.

Method used

Genetic algorithms are used to optimize the weight and bias of the BP neural network, combined with GA-BP neural network, and by obtaining the index data of the charging and discharging cycles of multiple ship lithium batteries, normalizing the processing and division, building a BP neural network model, and using genetic algorithms to optimize the weight and bias, generating a GA-BP neural network model, and finally embed it into the battery management system for real-time estimation.

Benefits of technology

It significantly improves the estimation accuracy and convergence of SOC and SOH of lithium batteries, enhances the generalization ability and adaptability of the algorithm, ensures the high accuracy and stability of the model, supports fault warning and charging and discharging strategy optimization, and ensures the safe operation and life of lithium batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493684A_ABST
    Figure CN120493684A_ABST
Patent Text Reader

Abstract

The invention discloses a marine lithium battery SOC and SOH estimation method and system based on a GA-BP neural network. The method comprises the following steps: obtaining index data in a charging and discharging complete period of a plurality of marine lithium batteries; performing normalization processing on the index data, and then dividing the index data into a training set and a test set; constructing a BP neural network model; generating a GA-BP neural network model according to the weight and bias of the BP neural network model by adopting a genetic algorithm; training the GA-BP neural network model to convergence by using the training set, verifying the precision by using the test set, and if the precision does not meet the requirement, continuing to optimize the BP model by using the genetic algorithm; and embedding the trained and evaluated GA-BP neural network model into a battery management system to realize the real-time estimation of the SOC and SOH of the marine lithium battery. The SOC and SOH of the lithium battery are estimated by combining the GA and the BP neural network, the mapping function of the GA-BP neural network is fully played, the problem of falling into a local optimal solution is effectively avoided, and the convergence and estimation accuracy of the algorithm are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship lithium battery management, and in particular to a method and system for estimating the SOC and SOH of a ship lithium battery based on a GA-BP neural network. Background Art

[0002] As a clean energy source, lithium batteries have the advantages of high energy density, low self-discharge rate and long life. Their application rate in ships is continuously increasing. However, as the use time increases, the internal resistance of lithium batteries will increase, the capacity will decay, and may even cause safety problems. Therefore, estimating the state of lithium batteries is crucial to ensure their safe and stable operation. The internal state of lithium batteries mainly includes the state of charge (SOC) and the state of health (SOH). Accurately estimating the SOC and SOH of lithium batteries helps to improve energy utilization and ensure long-term safe operation. Therefore, accurate estimation of SOC and SOH is a difficult and hot issue in this research field.

[0003] Due to the highly nonlinear characteristics of lithium batteries themselves, SOC and SOH cannot be measured directly, but need to be obtained through estimation. At present, the estimation methods for lithium battery SOH and SOC can be roughly divided into the following three types: experimental method, model-based method and data-driven method. Although the experimental method has high accuracy, the cost is relatively high. Although the model-based method has high interpretability, the modeling process is complex and the universality of the model is poor. The data-driven method can establish a mapping relationship between external signals and the internal aging state of the battery. In recent years, BP (Back Propagation) neural network has been widely used because it does not rely on accurate battery models but only considers data processing. However, this method ignores the influence of the initial weights and thresholds of the model. The random initialization of weights and thresholds has uncertainty, which may cause deviations in the estimation results, making the estimation of SOC and SOH easy to fall into local optimal solutions. Summary of the Invention

[0004] In order to solve the problems of the existing SOC and SOH estimation methods for marine lithium batteries, such as the high cost of experimental methods, the poor universality of model methods, and the BP neural network in the data-driven method that easily falls into the local optimal solution, resulting in insufficient estimation accuracy and poor convergence, the present invention proposes a marine lithium battery SOC and SOH estimation method based on a GA-BP neural network. This method estimates the SOC and SOH of the lithium battery by combining a GA (genetic algorithm) with a BP neural network. It can achieve accurate estimation of the SOC and SOH of the lithium battery, fully utilizing the mapping function of the GA-BP neural network, and effectively avoiding the problem of falling into the local optimal solution, significantly improving the convergence of the algorithm and the estimation accuracy. The present invention also relates to a marine lithium battery SOC and SOH estimation system based on a GA-BP neural network.

[0005] The present invention is achieved through the following technical solutions:

[0006] A method for estimating SOC and SOH of a marine lithium battery based on a GA-BP neural network comprises the following steps:

[0007] S1: Acquire indicator data of a plurality of ship lithium batteries during a complete charge and discharge cycle, wherein the indicator data includes terminal voltage, terminal current, and operating temperature of the ship lithium batteries;

[0008] S2: normalizing the indicator data to obtain a normalized data set, and dividing the data set into a training set and a test set;

[0009] S3: Constructing a BP neural network model, wherein the structure of the BP neural network model includes an input layer, a hidden layer, and an output layer. The input layer includes three nodes, the output layer includes one node, the number of nodes in the hidden layer is determined based on the number of nodes in the input layer, the number of nodes in the output layer, and a single-digit random integer. The input layer and the hidden layer are fully connected, and the hidden layer and the output layer are fully connected.

[0010] S4: using a genetic algorithm to optimize the weights and biases of the BP neural network model, taking the weights and biases of the BP neural network model as individuals in the genetic algorithm, taking the mean square error of the training set and the test set as the fitness function, searching for the optimal weight and bias combination through selection, crossover, and mutation operations, and generating a GA-BP neural network model;

[0011] S5: Input the training set obtained in step S2 into the GA-BP neural network model, and train the GA-BP neural network model using the LM algorithm; then evaluate the accuracy of the trained GA-BP neural network model using the test set obtained in step S2. If the model accuracy meets the preset accuracy threshold, retain the trained and evaluated GA-BP neural network model; otherwise, return to step S4 and optimize again;

[0012] S6: The trained and evaluated GA-BP neural network model is embedded into the battery management system to achieve real-time estimation of the SOC and SOH of marine lithium batteries.

[0013] Preferably, in step S2, the indicator data is first filtered using a box plot method to filter out abnormal indicator data generated during the static stage; and then the filtered indicator data is normalized using min-max standardization to obtain normalized indicator data.

[0014] Preferably, in step S3, the BP neural network model is constructed, wherein the three nodes of the input layer correspond to the terminal voltage, terminal current, and operating temperature of the ship's lithium battery, respectively, and one node of the output layer corresponds to the estimated value of the SOC or SOH of the ship's lithium battery. The nodes of the hidden layer provide feature information for the weights and biases of the subsequent genetic algorithm optimization model by processing and converting the data corresponding to the input layer nodes. The number of nodes in the hidden layer is obtained by the following empirical formula:

[0015]

[0016] Among them, m is the number of nodes in the input layer, n is the number of nodes in the output layer, a is a random integer between 1 and 10, and simulation comparisons are performed one by one starting from 1. After multiple simulation experiments, the one with the smallest error is selected to determine the BP neural network model.

[0017] Preferably, in step S4, optimizing the weights and biases of the BP neural network model using a genetic algorithm includes:

[0018] Population initialization: The weights from the input layer to the hidden layer, the weights from the hidden layer to the output layer, the bias of the hidden layer, and the bias of the output layer in the BP neural network model are used as parameters to be optimized in the genetic algorithm. The parameters to be optimized are encoded in real number form to form chromosome individuals, and the initial population is randomly initialized to generate the initial population.

[0019] Calculate the fitness value: Use the training set data to train the BP neural network model corresponding to each individual, and use the mean square error of the true value of the training set and the predicted value output by the model and the mean square error of the true value of the test set and the predicted value output by the model as the fitness function to calculate the fitness value of each individual;

[0020] Generate new population: Generate a new generation of population through selection, crossover and mutation operations;

[0021] Iterative optimization: Repeat the process of calculating fitness values and generating new populations through selection, crossover, and mutation operations. Iterative optimization is performed until the fitness value meets the termination condition, and the optimal weight and bias combination is obtained to generate a GA-BP neural network model.

[0022] Preferably, in step S4, a new generation population is generated through selection operation, crossover operation and mutation operation, specifically:

[0023] Selection operation: Roulette selection method is used to calculate the probability of each individual being selected based on its fitness value. The probability of each individual being selected is proportional to the fitness value of the individual, and a certain number of individuals are selected from the current population;

[0024] Crossover operation: Use the two-point crossover method to cross the individual weights and biases;

[0025] Mutation operation: Use the Gaussian mutation method to mutate the weights and biases of individuals, and merge the mutated individuals to form a new generation of population.

[0026] Preferably, in step S5, the LM algorithm used adopts dual termination conditions of the number of iterations and the error threshold. When the number of iterations reaches a preset maximum number of iterations or the error of the GA-BP neural network model is less than a preset error threshold, training is stopped; the maximum number of iterations is set to 500 times, and the error threshold is 0.01; when evaluating the accuracy of the trained GA-BP neural network model using the test set obtained in step S2, the preset accuracy threshold is 0.05.

[0027] Preferably, in step S6, the trained and evaluated GA-BP neural network model is embedded in the battery management system, and the terminal voltage, terminal current and operating temperature data of the ship's lithium battery are collected in real time through the battery management system, and then input into the trained and evaluated GA-BP neural network model to obtain real-time estimated values of the SOC and SOH of the ship's lithium battery.

[0028] A marine lithium battery SOC and SOH estimation system based on GA-BP neural network includes an index data acquisition module, an index data preprocessing and division module, a BP neural network model construction module, a genetic algorithm optimization module, a GA-BP neural network model training and evaluation module, and a real-time estimation module connected in sequence; wherein,

[0029] The index data acquisition module is used to obtain index data of multiple ship lithium batteries during a complete charge and discharge cycle, wherein the index data includes the terminal voltage, terminal current and operating temperature of the ship lithium batteries;

[0030] The indicator data preprocessing and division module is used to normalize the indicator data to obtain a normalized data set, and divide the data set into a training set and a test set;

[0031] The BP neural network model construction module is used to construct a BP neural network model. The structure of the BP neural network model includes an input layer, a hidden layer and an output layer. The input layer includes 3 nodes, the output layer includes 1 node, the number of nodes in the hidden layer is determined based on the number of nodes in the input layer, the number of nodes in the output layer and a single-digit random integer, the input layer and the hidden layer are fully connected, and the hidden layer and the output layer are fully connected;

[0032] The genetic algorithm optimization module is used to optimize the weights and biases of the BP neural network model using a genetic algorithm, taking the weights and biases of the BP neural network model as individuals in the genetic algorithm, using the mean square error of the training set and the test set as the fitness function, searching for the optimal weight and bias combination through selection, crossover, and mutation operations, and generating a GA-BP neural network model;

[0033] The GA-BP neural network model training and evaluation module is used to input the training set obtained by the indicator data preprocessing and partitioning module into the GA-BP neural network model and train the GA-BP neural network model using the LM algorithm; then evaluate the accuracy of the trained GA-BP neural network model using the test set obtained by the indicator data preprocessing and partitioning module. If the model accuracy meets the preset accuracy threshold, the trained and evaluated GA-BP neural network model is retained; otherwise, the model is returned to the genetic algorithm optimization module for re-optimization;

[0034] The real-time estimation module is used to embed the trained and evaluated GA-BP neural network model into the battery management system to achieve real-time estimation of the SOC and SOH of marine lithium batteries.

[0035] Preferably, in the indicator data preprocessing and division module, the indicator data is first filtered using a box plot method to filter out abnormal indicator data generated during the static stage; and then the filtered indicator data is normalized using min-max standardization to obtain normalized indicator data.

[0036] Preferably, in the genetic algorithm optimization module, optimizing the weights and biases of the BP neural network model using a genetic algorithm includes:

[0037] Population initialization: The weights from the input layer to the hidden layer, the weights from the hidden layer to the output layer, the bias of the hidden layer, and the bias of the output layer in the BP neural network model are used as parameters to be optimized in the genetic algorithm. The parameters to be optimized are encoded in real number form to form chromosome individuals, and the initial population is randomly initialized to generate the initial population.

[0038] Calculate the fitness value: Use the training set data to train the BP neural network model corresponding to each individual, and use the mean square error of the true value of the training set and the predicted value output by the model and the mean square error of the true value of the test set and the predicted value output by the model as the fitness function to calculate the fitness value of each individual;

[0039] Generate new population: Generate a new generation of population through selection, crossover and mutation operations;

[0040] Iterative optimization: Repeat the process of calculating fitness values and generating new populations through selection, crossover, and mutation operations. Iterative optimization is performed until the fitness value meets the termination condition, and the optimal weight and bias combination is obtained to generate a GA-BP neural network model.

[0041] The beneficial effects of the present invention are as follows:

[0042] The present invention provides a method for estimating the SOC and SOH of a marine lithium battery based on a GA-BP neural network. The method obtains index data of multiple marine lithium batteries during a complete charge and discharge cycle, wherein the index data includes the terminal voltage, terminal current, and operating temperature of the marine lithium battery. The terminal voltage, terminal current, and operating temperature of the marine lithium battery are used to indirectly reflect the internal resistance and capacity indicators associated with the SOC and SOH, thereby reducing the difficulty of obtaining the indicators and covering the characteristics of the lithium battery under different working conditions (such as fast charging, slow charging, high temperature, and low temperature). This ensures the comprehensiveness and dynamic coverage of the data, provides highly reliable input indicators for subsequent model training, avoids estimation bias caused by data missing or one-sidedness, and uses multiple indicators to estimate the SOC. , SOH can improve the estimation accuracy; normalize the index data to obtain a normalized data set, and divide the data set into a training set and a test set. By normalizing the index data, the dimensional differences between different data (such as voltage, current, temperature) can be reduced, and the model training deviation caused by different data scales can be avoided, thereby improving the convergence speed and stability of the algorithm. At the same time, it can also effectively screen the data in the indirect charging and discharging process, reduce the impact of the static stage on the internal resistance calculation, and improve the accuracy of the model estimation. The division of the training set and the test set ensures that the model learns the data rules in the training stage and verifies the generalization ability in the test stage, thereby preventing overfitting and improving the adaptability of the model to new data; construct a BP neural network model, The three nodes in its input layer correspond to the key characteristics of lithium batteries (terminal voltage, terminal current, operating temperature), accurately matching the input requirements of lithium battery state estimation and reducing redundant information. The hidden layer determines the number of hidden layer nodes by random integers, balances the model complexity and computational efficiency, and enhances the model's ability to fit nonlinear relationships. The fully connected structure ensures that each layer of nodes is connected to all nodes in the next layer, maximizes feature transfer efficiency, captures the complex interactions between input features, and provides a basic model framework for subsequent optimization. A genetic algorithm is used to optimize the weights and biases of the BP neural network model. The weights and biases of the BP neural network model are used as individuals in the genetic algorithm, and the mean square error of the training set and the test set is used as the fitness function. Through selection, crossover, and variation, the model is optimized. The optimal weight and bias combination is searched by different operations to generate a GA-BP neural network model. The BP neural network model is optimized by a genetic algorithm, which can simultaneously evaluate multiple parameter combinations (such as weights and biases) to improve optimization efficiency. The population diversity can avoid the problem of the BP neural network model falling into the local optimal solution. The optimized GA-BP neural network model effectively solves the problem of the BP neural network model causing deviation in the estimation results due to the uncertainty of the random initialization of weights and thresholds, and significantly improves the convergence of the algorithm and the estimation accuracy. Moreover, the BP neural network optimized by the genetic algorithm has a simple structure, good generalization ability and high theoretical value, which can provide certain guidance for practical engineering applications.The training set obtained in step S2 is input into the GA-BP neural network model, and the GA-BP neural network model is trained using the LM algorithm; the accuracy of the trained GA-BP neural network model is then evaluated using the test set obtained in step S2. If the model accuracy meets the preset accuracy threshold, the trained and evaluated GA-BP neural network model is retained; otherwise, the optimization is repeated in step S4 to form a closed-loop iterative mechanism, and a high-precision and high-stability GA-BP neural network model is finally output. The LM algorithm combines the steepest descent method with the Gauss-Newton method. Using the LM algorithm to train the GA-BP neural network model can achieve better convergence speed, stability, and robustness; the trained GA-BP neural network model is embedded in the battery management system (BMS) to achieve online real-time estimation of the SOC and SOH of the lithium battery, significantly improving the intelligent level of ship energy management. By collecting data in real time and inputting the model, the battery status changes are dynamically fed back, supporting fault warning and charge and discharge strategy optimization, and ensuring the safe operation and life extension of the lithium battery. The present invention achieves real-time SOC and SOH estimation by acquiring indicator data, normalizing and partitioning the indicator data, constructing a BP neural network model, optimizing the BP model using a genetic algorithm, training the GA-BP neural network model using the LM algorithm, and embedding the GA-BP neural network model into a battery management system. Combining the genetic algorithm with the LM algorithm fully leverages the mapping function of the GA-BP neural network while effectively avoiding the problem of falling into a local optimal solution, significantly improving the algorithm's convergence and estimation accuracy.

[0043] The present invention first uses a box plot method to filter the indicator data to filter out abnormal indicator data generated in the static stage; then uses min-max standardization to normalize the filtered indicator data to obtain normalized indicator data. The box plot method can filter out irregular noise in the static stage of the battery to avoid abnormal values interfering with subsequent analysis. Min-max standardization can eliminate dimensional differences (such as the dimensional differences of the terminal voltage, terminal current and operating temperature of the lithium battery), avoid the imbalance of weight distribution caused by directly inputting the indicator data into the model, and thus improve the accuracy of the model estimation.

[0044] The BP neural network model constructed by the present invention has three nodes in its input layer corresponding to the terminal voltage, terminal current, and operating temperature of the ship's lithium battery, respectively, and one node in its output layer corresponding to the estimated state of charge (SOC) or state of health (SOH) of the ship's lithium battery. Through multiple simulation experiments, the solution with the smallest error is selected to determine the value of variable a in the empirical formula and the network structure of the model. The ultimately optimized model network structure can reduce data noise and redundancy and improve estimation accuracy.

[0045] The present invention adopts a genetic algorithm to optimize the weights and biases of a BP neural network model, and uses the weights from the input layer to the hidden layer, the weights from the hidden layer to the output layer, the biases of the hidden layer, and the biases of the output layer in the BP neural network model as parameters to be optimized by the genetic algorithm. Compared with the traditional BP network using a back propagation algorithm (gradient descent) to optimize these parameters, the problem that the settings of the initial weights and biases affect the final results can be solved, multiple parameter combinations can be evaluated simultaneously, and the optimization efficiency can be improved. The population diversity can avoid the problem of the BP neural network model falling into a local optimal solution. The optimized GA-BP neural network model effectively solves the problem that the estimation results of the BP neural network model are biased due to the uncertainty of the random initialization of weights and thresholds, significantly improves the convergence of the algorithm and the estimation accuracy, and the BP neural network optimized by the genetic algorithm has a simple structure, good generalization ability and high theoretical value, and can provide certain guiding significance for practical engineering applications.

[0046] The LM algorithm used in the present invention adopts dual termination conditions of the number of iterations and the error threshold. When the number of iterations reaches a preset maximum number of iterations or the error of the GA-BP neural network model is less than the preset error threshold, the training is stopped. The dual termination conditions can prevent problems such as the number of iterations being too high and the training error being not low enough. In addition, using the LM algorithm to train the GA-BP neural network model can have better convergence speed, stability and robustness.

[0047] The present invention also relates to a marine lithium battery SOC and SOH estimation system based on GA-BP neural network, which corresponds to the above-mentioned marine lithium battery SOC and SOH estimation method based on GA-BP neural network, and can be understood as a system that implements the above-mentioned marine lithium battery SOC and SOH estimation method based on GA-BP neural network, including an index data acquisition module, an index data preprocessing and division module, a BP neural network model construction module, a genetic algorithm optimization module, a GA-BP neural network model training and evaluation module and a real-time estimation module. Each module works together to construct a BP neural network model and uses a genetic algorithm to optimize the BP neural network model to generate a GA-BP neural network model. Compared with the BP neural network model The prediction of SOC / SOH based on the GA-BP neural network model shows better accuracy and convergence, providing an accurate and effective SOC / SOH estimation solution for BMS; strong generalization ability: the GA-BP neural network optimized by the genetic algorithm has a simple structure, good generalization ability and high theoretical value, which can provide certain guidance for practical engineering applications; strong adaptability: the GA-BP neural network algorithm can be adaptively adjusted according to real-time data, and has good adaptability to different working conditions and environmental changes of the battery, which makes the estimation results more stable and reliable; strong feature extraction ability: the GA-BP neural network algorithm can be used to extract and select features from the original data of the battery, thereby improving the estimation effect. By selecting appropriate input features and optimizing the network structure, data noise and redundancy can be reduced and the accuracy of the estimation can be improved. The present invention covers the entire process of data preparation, model construction, optimization training, evaluation and deployment, which not only solves the problems of traditional BP neural networks that are prone to falling into local optimality and insufficient generalization ability, but also realizes high-precision and high-real-time lithium battery state estimation through the coordinated optimization of genetic algorithm and LM algorithm, which has significant theoretical innovation and engineering practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The present invention is a flow chart of the method for estimating SOC and SOH of marine lithium batteries based on GA-BP neural network.

[0049] Figure 2 This is a detailed flow chart of the SOC and SOH estimation method for marine lithium batteries based on the GA-BP neural network of the present invention.

[0050] Figure 3 This is a diagram of the preferred structure of the BP neural network model for estimating SOC according to the present invention.

[0051] Figure 4 This is a diagram of the preferred structure of the BP neural network model for estimating SOH according to the present invention.

[0052] Figure 5It is a simulation diagram of the battery SOC prediction value estimated before and after optimization of the BP neural network model of the present invention.

[0053] Figure 6 It is a simulation diagram of the battery SOC prediction error before and after optimization of the BP neural network model of the present invention.

[0054] Figure 7 It is the SOC prediction error convergence diagram before the BP neural network model is optimized.

[0055] Figure 8 It is a SOC prediction error convergence diagram after the BP neural network model of the present invention is optimized.

[0056] Figure 9 This is a simulation diagram comparing the estimated SOH prediction values before and after optimization of the BP neural network model of the present invention.

[0057] Figure 10 It is a simulation diagram comparing the estimated SOH prediction errors before and after optimization of the BP model of the present invention.

[0058] Figure 11 This is a structural diagram of the SOC and SOH estimation of marine lithium batteries based on the GA-BP neural network of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be described below with reference to the accompanying drawings.

[0060] The present invention discloses a method for estimating the SOC and SOH of marine lithium batteries based on a GA-BP neural network. The method aims to solve the problems of the existing SOC and SOH estimation methods for marine lithium batteries, such as the high cost of the experimental method, the poor universality of the model method, and the BP neural network in the data-driven method easily falling into the local optimal solution, resulting in insufficient estimation accuracy and poor convergence. The method uses a genetic algorithm to optimize the weights and biases of the BP neural network model to avoid falling into the local optimal solution. The optimized GA-BP neural network significantly improves the convergence and estimation accuracy. The method can be executed by a processor or an electronic device with processing capabilities, such as Figure 1 and Figure 2As shown, first, the cargo index data is normalized, and then the processed data set is divided into a training set and a test set. Then, a BP neural network model is constructed, and the genetic algorithm is used to optimize the weights and biases of the BP model to generate a GA-BP neural network model. The GA-BP neural network model is then trained using the LM algorithm and the training set, and the accuracy of the model is evaluated using the test set. If the accuracy does not meet the standard, the BP neural network model is continuously optimized using the genetic algorithm until the model accuracy meets the standard. Finally, the trained and evaluated GA-BP neural network model is embedded in the battery management system to achieve real-time estimation of the SOC and SOH of the marine lithium battery. The trained and evaluated GA-BP neural network model of the present invention can also be adaptively adjusted according to the real-time index data of the ship's lithium battery, and has good adaptability to different working conditions and environmental changes of the battery, making the estimation results more stable and reliable. Specifically, the method includes the following steps:

[0061] S1. Obtaining index data of a plurality of ship lithium batteries during a complete charge and discharge cycle, wherein the index data includes terminal voltage, terminal current, and operating temperature of the ship lithium batteries.

[0062] Because it's difficult to obtain the internal resistance and capacitance of a lithium battery in a dynamic environment, it's necessary to select indicator data that can indirectly reflect the internal resistance and capacity. Therefore, the present invention uses the terminal voltage, terminal current, and operating temperature of the lithium battery as indicator data, making it easier to obtain the indicators. Furthermore, using multiple indicators to estimate SOC and SOH improves estimation accuracy. The indicator data is collected over an entire lithium battery charge and discharge cycle. The data is collected multiple times at different time points during the battery charge and discharge process, and the sampled indicator data is used as a lithium battery charge and discharge dataset.

[0063] S2. Normalize the indicator data to obtain a normalized data set, and divide the data set into a training set and a test set.

[0064] Preferably, the specific steps of the normalization processing in step S2 are: first, the indicator data are filtered using the box plot method to filter out abnormal indicator data generated in the static stage; then the filtered indicator data are normalized using min-max standardization to obtain normalized indicator data.

[0065] Since indirect charging and discharging is used, there will inevitably be data generated during a static phase in the data. Errors will occur when calculating the internal resistance based on the data generated during the static phase. To solve this problem, the embodiment of the present invention uses a boxplot method to screen abnormal data to filter out abnormal indicator data generated during the static phase, thereby reducing the impact of the static phase on the internal resistance calculation and improving the accuracy of the internal resistance calculation.

[0066] Since the embodiment of the present invention collects indicator data of three different dimensions, the dimensions of the three indicator data are different. In order to reduce the dimension of the indicator data, min-max standardization is used to normalize the filtered terminal voltage, terminal current, and operating temperature indicator data. This can eliminate the dimensional differences of the terminal voltage, terminal current, and operating temperature of the lithium battery, avoid the imbalance of weight distribution caused by directly inputting the indicator data into the model, and thus improve the accuracy of the model estimation. The min-max normalization formula is as follows:

[0067]

[0068] Among them, x' represents the normalized data set, x represents the original indicator data, and x max Indicates the maximum value of the original indicator data, x min Indicates the minimum value of the original indicator data.

[0069] For example, the input dataset in the normalized data set is divided into the input training set Xtrain and the input test set Xtest, and the output dataset is divided into the output training set Ytrain and the output test set Ytest. For SOC estimation, a full charge and discharge cycle is used as the experimental object. For SOH estimation, due to the indirect charge and discharge method, there is a rest period, which requires screening for abnormal data.

[0070] S3. Construct a BP neural network model. The structure of the BP neural network model includes an input layer, a hidden layer and an output layer. The input layer includes 3 nodes, the output layer includes 1 node, the number of nodes in the hidden layer is determined based on the number of nodes in the input layer, the number of nodes in the output layer and a single-digit random integer, the input layer and the hidden layer are fully connected, and the hidden layer and the output layer are fully connected.

[0071] In the BP neural network model constructed in the embodiment of the present invention, the three nodes of the input layer correspond to the terminal voltage, terminal current, and operating temperature of the ship's lithium battery, respectively. The one node of the output layer corresponds to the estimated SOC or SOH of the ship's lithium battery. The nodes of the hidden layer process and convert the data corresponding to the input layer nodes to provide feature information for the weights and biases of the subsequent genetic algorithm optimization model. The number of nodes in the hidden layer is obtained by the following empirical formula:

[0072]

[0073] Among them, m is the number of nodes in the input layer, n is the number of nodes in the output layer, a is a random integer between 1 and 10, and simulation comparisons are performed one by one starting from 1. After multiple simulation experiments, the one with the smallest error is selected to determine the BP neural network model.

[0074] For the estimation of SOC and SOH in the embodiment of the present invention, m=3, n=1; for SOC estimation, when a=9, hidden=11, that is, when the number of hidden layer nodes is 11, the mean square error is the smallest; for SOH estimation, when a=7, hidden=9, that is, when the number of hidden layer nodes is 9, the mean square error is the smallest. The final structure diagrams of the BP neural network model for estimating SOC and SOH are as follows: Figure 3 、 Figure 4 As shown, Figure 3 The preferred structure diagram of the BP neural network model for estimating SOC is shown in the figure. w represents weight, b represents bias, and the number of nodes in the Hidden Layer is 11. Each layer is connected by weight w and bias b. It receives the input of 3 indicator data ( Figure 3 Input), the number of nodes in the Output Layer is 1 ( Figure 3 Output in ). For example Figure 4 The preferred structure diagram of the BP neural network model for estimating SOH is shown in the figure. w represents weight, b represents bias, the number of nodes in the Hidden Layer is 9, and it receives input of 3 indicator data ( Figure 4 Input), the number of nodes in the Output Layer is 1 ( Figure 4 Output in ).

[0075] S4. Using a genetic algorithm to optimize the weights and biases of the BP neural network model, the weights and biases of the BP neural network model are used as individuals in the genetic algorithm, the mean squared error of the training set and the test set is used as the fitness function, and the optimal weight and bias combination is searched through selection, crossover, and mutation operations to generate a GA-BP neural network model. The BP neural network model has the disadvantage of being difficult to find or losing the optimal solution. The GA-BP neural network model can continuously adjust and optimize the weights and biases of the network, thereby improving model performance.

[0076] The specific steps are:

[0077] Population initialization: The weight W1 from the input layer to the hidden layer, the weight W2 from the hidden layer to the output layer, the bias B1 of the hidden layer, and the bias B2 of the output layer in the BP neural network model are used as the parameters to be optimized in the genetic algorithm. The parameters to be optimized are encoded in real number form to form chromosome individuals, and randomly initialized to generate the initial population;

[0078] Calculate the fitness value: Use the training set data to train the BP neural network model corresponding to each individual, and use the mean square error of the training set true value and the predicted value output by the model and the mean square error of the test set true value and the predicted value output by the model as the fitness function to calculate the fitness value of each individual;

[0079] The fitness function of the present invention is selected as the mean square error of the entire training set and the test set, which is denoted as:

[0080]

[0081] Among them, fitness represents the fitness function, mse represents the mean square error, output_tra in_error represents the output error of the training set, and output_test_error represents the output error of the test set. A lower fitness function indicates a higher learning accuracy and a higher overall prediction accuracy.

[0082] Selection operation: Roulette selection method is used to calculate the probability of each individual being selected based on its fitness value. The probability of each individual being selected is proportional to the fitness value of the individual, and a certain number of individuals are selected from the current population;

[0083] For example, when calculating the probability of being selected, the following formula can be used:

[0084]

[0085] Among them, P i represents the probability of the individual at the i-th node being selected, f i Represents the individual fitness value of the i-th node of the neural network, f j represents the individual fitness value of the jth node of the neural network, and N represents the number of populations;

[0086] Crossover operation: Use the real number crossover method, select the double-point crossover operator, and cross the individual weights and biases;

[0087] For example, the i-th chromosome a i and the kth chromosome a k For the crossover operation at j positions, the following formula can be used:

[0088] a kj =a kj (1-b)+a ij b, a ij =a ij (1-b)+a kj b

[0089] Among them, a kjrepresents the original value of the kth chromosome at position j, a ij represents the original value of the i-th chromosome at position j, and b represents a random number between 0 and 1, which is used to control the degree of crossover;

[0090] Mutation operation: Use Gaussian mutation method to mutate the weights and biases of individuals (with mean μ and variance σ 2 A random number from the normal distribution replaces the original gene value), and the mutated individuals are merged to form a new generation of population;

[0091] Iterative optimization: Repeat the process of calculating fitness values and generating new populations through selection, crossover, and mutation operations. Iterative optimization is performed until the fitness value meets the termination condition, and the optimal weight and bias combination is obtained to generate a GA-BP neural network model.

[0092] If the iteration termination condition is not met, the process returns to the selection operation step to regenerate individuals with higher fitness and continue the iterative calculation; if the iteration termination condition is met, the optimization process ends, and the optimal individual found is decoded according to the encoding rules to obtain the weights and biases corresponding to each optimized network layer.

[0093] S5. Input the training set obtained in step S2 into the GA-BP neural network model, and use the LM algorithm to train the GA-BP neural network model; then evaluate the accuracy of the trained GA-BP neural network model using the test set obtained in step S2. If the model accuracy meets the preset accuracy threshold, retain the trained and evaluated GA-BP neural network model; otherwise, return to step S4 and optimize again.

[0094] LM algorithm can be regarded as a novel method that the steepest descent method and Gauss-Newton method are merged, because there are advantages such as fast training speed and high stability, so the embodiment of the invention selects trainlm in LM algorithm as training function to train GA-BP neural network model. The trainlm training function can be trained by a large amount of data, and the input (input training set or input test set) and the output (output training set or output test set) are linked through a certain relationship, and then the predictive ability of the model is realized. The LM algorithm used preferably adopts the dual termination conditions of number of iterations and error threshold, and stops training when the number of iterations reaches the preset maximum number of iterations or the error of the GA-BP neural network model is less than the preset error threshold.

[0095] Preferably, the maximum number of iterations is set to 500 times, and the error threshold is 0.01; when the accuracy of the trained GA-BP neural network model is evaluated by the test set obtained in step S2, the preset accuracy threshold is 0.05.

[0096] For example, the embodiment of the present invention can use 1650 sets of data for SOC, of which 1262 sets are training sets and 388 sets are test sets. In order to avoid errors in calculating the internal resistance during the static phase of indirect charge and discharge data, the data is screened. For SOH, 306 sets of data can be used, of which 226 sets are training sets and 80 sets are test sets. Figure 5 The SOC test set shown in the figure compares the prediction data of the GA-BP neural network model optimized by the above method and the unoptimized BP neural network model. The SOC estimated by the unoptimized BP neural network model will have a large jump during the battery state transition, and the estimated value deviates greatly in the initial stage. However, the optimized GA-BP neural network model can closely fit the actual SOC curve in the 150-250 test sample data period. Even when the state changes, there is only a slight jump, and the entire prediction curve is closer to the actual value. Figure 6 The SOC test set shown tests the prediction error comparison between the GA-BP neural network model optimized by the above method and the unoptimized BP neural network model. The prediction error of the unoptimized BP neural network model fluctuates greatly overall, and the error is getting larger and larger; the prediction error of the optimized GA-BP neural network model is mostly maintained near 0, and the basic error does not exceed -0.3 to +0.4, so the optimized GA-BP neural network model is more accurate in estimating SOC.

[0097] For example, Figure 7 The convergence of the error curve of the unoptimized BP neural network model shown in the figure (Train represents the training set curve, Validation represents the validation set curve, and Test represents the test set curve. The above curves can be represented by different colors, such as blue, green, and red). The horizontal axis (40 Epochs) refers to the training round, that is, the number of times the model has completely iterated the entire training data set. The figure shows that the training was carried out for 40 rounds, which is used to observe the error changes of the model at different training stages; the vertical axis (Mean Squared Error, mse) refers to the mean squared error, which is used to measure the deviation between the model prediction value and the true value. The smaller the value, the more accurate the model prediction. The vertical axis uses a logarithmic scale (10 0 , 10 -2etc.), which is convenient for showing the change of error at different orders of magnitude. The upper dotted line Best represents the best performance level line, and the lower dotted line Goal represents the target error line. During the training process, the best performance of the validation set (Validation) appeared in the 34th round (Epoch 34), as marked by the circle in the figure. The corresponding mean square error (MSE) at this time is 0.081453. In other words, although the unoptimized BP neural network model has a low training generation number (34 generations), its error has reached 0.081; the convergence of the error curve of the optimized GA-BP neural network model is shown in the figure below. Figure 8 As shown in the figure, the horizontal axis (58 epochs) indicates that the optimized model was trained for 58 rounds. The error of the GA-BP neural network optimized by the genetic algorithm was rapidly reduced and converged. During the training process, the best performance of the validation set (Validation) occurred in epoch 52, with a mean square error (MSE) of 0.06272. In other words, the 52nd epoch was the optimal convergence point, with an error of only 0.06272. This shows that the GA-BP neural network model optimized by the genetic algorithm has a lower error rate.

[0098] For example, Figure 9 As shown in the figure, by comparing the predicted values and true values of the BP neural network model (abbreviated as BP neural network, or BP model) and the GA-BP neural network model (abbreviated as GA-BP neural network, or GA-BP model), the prediction effect of the two models (BP model and GA-BP model) on the SOH of marine lithium batteries before and after optimization is intuitively demonstrated. 80 groups are selected as the test set for SOH estimation. The GA-BP neural network optimized by the genetic algorithm has very few continuous processes in the SOH estimation. In the later stage of estimation, even if the true value fluctuates greatly, the GA-BP neural network optimized by the genetic algorithm can still predict the trend of change, thereby reducing the estimation error. In other words, the red GA-BP predicted value (GABP predicted value) is closer to the black true value as a whole, indicating that the GA-BP neural network has a smaller error when predicting SOH and the prediction result is closer to the actual value, verifying that the prediction accuracy of the model is significantly improved after the genetic algorithm optimizes the BP neural network model; the blue BP predicted value deviates relatively greatly from the true value, indicating that the generalization ability and accuracy of the traditional BP neural network model are inferior to the optimized GA-BP model when processing the lithium battery SOH prediction task. Therefore, the GA-BP neural network optimized by genetic algorithm has better performance than the traditional BP neural network in the task of estimating the SOH of marine lithium batteries and can more accurately reflect the real health status of the battery. Figure 10As shown in the figure, 80 groups were used as the test set for SOH estimation. The GA-BP neural network optimized by the genetic algorithm had an SOH estimation error that mostly fluctuated around 0, with the error fluctuation not exceeding ±0.2. In contrast, the unoptimized BP neural network had a larger error fluctuation on the same test set. This shows that the GA-BP neural network optimized by the genetic algorithm has more accurate predictions.

[0099] For example, the error comparison of SOC and SOH estimation by the unoptimized BP neural network and the GA-BP neural network optimized by the genetic algorithm is shown in Table 1 below:

[0100] Table 1 Comparison of SOC and SOH errors before and after BP model optimization

[0101] BP neural network GA-BP neural network SOC estimation 1.059% 0.762% SOH estimation 0.400% 0.184%

[0102] The mean square error of the SOC estimation dropped from 1.059% before optimization to 0.762% after optimization, and the mean square error of the SOH estimation dropped from 0.400% before optimization to 0.184% after optimization. Therefore, it can be concluded that the estimation accuracy of the model has been significantly improved after optimization using the genetic algorithm.

[0103] S6. Embed the trained and evaluated GA-BP neural network model into the battery management system to achieve real-time estimation of SOC and SOH of marine lithium batteries.

[0104] In an embodiment of the present invention, a trained and evaluated GA-BP neural network model is embedded in a battery management system. The battery management system collects terminal voltage, terminal current, and operating temperature data of a ship's lithium battery in real time, and then inputs the data into the trained and evaluated GA-BP neural network model to obtain real-time estimated values of the SOC and SOH of the ship's lithium battery.

[0105] The embodiment of the present invention realizes real-time estimation of SOC and SOH by acquiring indicator data, normalizing and dividing the indicator data, constructing a BP neural network model, optimizing the BP model with a genetic algorithm, training the GA-BP neural network model with a LM algorithm, and embedding the GA-BP neural network model into a battery management system. By combining the genetic algorithm and the LM algorithm, the mapping function of the GA-BP neural network is fully utilized, and the problem of falling into a local optimal solution is effectively avoided, which significantly improves the convergence and estimation accuracy of the algorithm. At the same time, it also provides real-time optimization capabilities, so that the GA-BP neural network model has better adaptability to different working conditions and environmental changes of the battery, and makes the estimation results more stable and reliable.

[0106] Based on the same inventive concept, one or more embodiments of this specification also provide a marine lithium battery SOC and SOH estimation system based on a GA-BP neural network. Since the principles of the problems solved by the marine lithium battery SOC and SOH estimation system based on a GA-BP neural network are similar to those of the aforementioned marine lithium battery SOC and SOH estimation method based on a GA-BP neural network, the implementation of the marine lithium battery SOC and SOH estimation system based on a GA-BP neural network can refer to the aforementioned implementation of the marine lithium battery SOC and SOH estimation method based on a GA-BP neural network, and the repeated parts will not be repeated.

[0107] Figure 11 This is a structural diagram of a marine lithium battery SOC and SOH estimation system based on a GA-BP neural network according to one or more embodiments of this specification. Figure 11 As shown, the marine lithium battery SOC and SOH estimation system based on GA-BP neural network includes an index data acquisition module 101, an index data preprocessing and division module 102, a BP neural network model construction module 103, a genetic algorithm optimization module 104, a GA-BP neural network model training and evaluation module 105, and a real-time evaluation module 106, which are connected in sequence.

[0108] The index data acquisition module 101 is used to obtain index data of a plurality of ship lithium batteries during a complete charge and discharge cycle, wherein the index data includes the terminal voltage, terminal current, and operating temperature of the ship lithium batteries;

[0109] The indicator data preprocessing and division module 102 is used to normalize the indicator data to obtain a normalized data set, and divide the data set into a training set and a test set;

[0110] BP neural network model construction module 103 is used to construct a BP neural network model. The structure of the BP neural network model includes an input layer, a hidden layer, and an output layer. The input layer includes three nodes, the output layer includes one node, the number of nodes in the hidden layer is determined based on the number of nodes in the input layer, the number of nodes in the output layer, and a single-digit random integer. The input layer and the hidden layer are fully connected, and the hidden layer and the output layer are fully connected.

[0111] A genetic algorithm optimization module 104 is configured to optimize the weights and biases of the BP neural network model using a genetic algorithm, using the weights and biases of the BP neural network model as individuals in the genetic algorithm, using the mean square error of the training set and the test set as the fitness function, searching for the optimal weight and bias combination through selection, crossover, and mutation operations, and generating a GA-BP neural network model;

[0112] The GA-BP neural network model training and evaluation module 105 is used to input the training set obtained by the indicator data preprocessing and partitioning module into the GA-BP neural network model and train the GA-BP neural network model using the LM algorithm; then the accuracy of the trained GA-BP neural network model is evaluated using the test set obtained by the indicator data preprocessing and partitioning module. If the model accuracy meets the preset accuracy threshold, the trained and evaluated GA-BP neural network model is retained; otherwise, the model is returned to the genetic algorithm optimization module for re-optimization;

[0113] The real-time estimation module 106 is used to embed the trained and evaluated GA-BP neural network model into the battery management system to achieve real-time estimation of the SOC and SOH of the marine lithium battery.

[0114] Furthermore, in the indicator data preprocessing and division module 102, the indicator data is first filtered using the box plot method to filter out abnormal indicator data generated during the static stage; and then the filtered indicator data is normalized using min-max standardization to obtain normalized indicator data.

[0115] Furthermore, in the genetic algorithm optimization module 104, optimizing the weights and biases of the BP neural network model using a genetic algorithm includes:

[0116] Population initialization: The weights from the input layer to the hidden layer, the weights from the hidden layer to the output layer, the bias of the hidden layer, and the bias of the output layer in the BP neural network model are used as parameters to be optimized in the genetic algorithm. The parameters to be optimized are encoded in real number form to form chromosome individuals, and the initial population is randomly initialized to generate the initial population.

[0117] Calculate the fitness value: Use the training set data to train the BP neural network model corresponding to each individual, and use the mean square error of the true value of the training set and the predicted value output by the model and the mean square error of the true value of the test set and the predicted value output by the model as the fitness function to calculate the fitness value of each individual;

[0118] Generate new population: Generate a new generation of population through selection, crossover and mutation operations;

[0119] Iterative optimization: Repeat the process of calculating fitness values and generating new populations through selection, crossover, and mutation operations. Iterative optimization is performed until the fitness value meets the termination condition, and the optimal weight and bias combination is obtained to generate a GA-BP neural network model.

[0120] The present invention proposes a marine lithium battery SOC and SOH estimation system based on a GA-BP neural network. The system obtains the terminal voltage, terminal current, and operating temperature of the marine lithium battery as indicator data, indirectly reflecting the internal resistance and capacity indicators related to SOC and SOH. This solves the problem of difficulty in obtaining the internal resistance and capacitance of lithium batteries under dynamic conditions, making the acquisition of indicators easier. It can also cover the characteristics of lithium batteries under different operating conditions (such as fast charging, slow charging, high temperature, and low temperature), ensuring the comprehensiveness and dynamic coverage of the data. The use of multiple indicators to estimate SOC and SOH can improve estimation accuracy. The system uses a genetic algorithm to optimize the BP neural network model, which can simultaneously evaluate multiple parameter combinations (such as weights and biases) to improve optimization efficiency. The population diversity can prevent the BP neural network model from falling into a local optimal solution. The optimized GA-BP neural network model effectively solves the problem of estimation results bias caused by the uncertainty of the random initialization of weights and thresholds in the BP neural network model, significantly improving the algorithm's convergence and estimation accuracy. Moreover, the BP neural network optimized by the genetic algorithm has a simple structure, good generalization ability, and high theoretical value, providing certain guidance for practical engineering applications. The GA-BP neural network uses the trainlm method from the LM technique as its training function, which boasts fast training speed and strong robustness. Once deployed onboard, the system's real-time estimation module can adaptively adjust based on real-time data, providing excellent adaptability to varying battery operating conditions and environmental changes. This makes the estimation results more stable and reliable.

[0121] It should be noted that the specific embodiments described above can enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail with reference to the drawings and embodiments, those skilled in the art should understand that the present invention can still be modified or replaced with equivalents. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be included in the scope of protection of the patent for the present invention.

Claims

1. A method for estimating SOC and SOH of marine lithium batteries based on GA-BP neural network, characterized in that: The following steps are involved: S1: Acquire indicator data of a plurality of ship lithium batteries during a complete charge and discharge cycle, wherein the indicator data includes terminal voltage, terminal current, and operating temperature of the ship lithium batteries; S2: normalizing the indicator data to obtain a normalized data set, and dividing the data set into a training set and a test set; S3: Constructing a BP neural network model, wherein the structure of the BP neural network model includes an input layer, a hidden layer, and an output layer. The input layer includes three nodes, the output layer includes one node, the number of nodes in the hidden layer is determined based on the number of nodes in the input layer, the number of nodes in the output layer, and a single-digit random integer. The input layer and the hidden layer are fully connected, and the hidden layer and the output layer are fully connected. S4: using a genetic algorithm to optimize the weights and biases of the BP neural network model, taking the weights and biases of the BP neural network model as individuals in the genetic algorithm, taking the mean square error of the training set and the test set as the fitness function, searching for the optimal weight and bias combination through selection, crossover, and mutation operations, and generating a GA-BP neural network model; S5: inputting the training set obtained in step S2 into the GA-BP neural network model, and training the GA-BP neural network model using the LM algorithm; Then, the accuracy of the trained GA-BP neural network model is evaluated using the test set obtained in step S2. If the model accuracy meets the preset accuracy threshold, the trained and evaluated GA-BP neural network model is retained; otherwise, the process returns to step S4 for re-optimization. S6: The trained and evaluated GA-BP neural network model is embedded into the battery management system to achieve real-time estimation of the SOC and SOH of marine lithium batteries.

2. The method according to claim 1, characterized in that In step S2, the indicator data are first filtered using a box plot method to filter out abnormal indicator data generated during the static stage; and then the filtered indicator data are normalized using min-max standardization to obtain normalized indicator data.

3. The method according to claim 1, characterized in that In step S3, the BP neural network model is constructed, in which the three nodes of the input layer correspond to the terminal voltage, terminal current, and operating temperature of the ship's lithium battery, respectively, and one node of the output layer corresponds to the estimated SOC or SOH of the ship's lithium battery. The nodes of the hidden layer provide feature information for the weights and biases of the subsequent genetic algorithm optimization model by processing and converting the data corresponding to the input layer nodes. The number of nodes in the hidden layer is obtained by the following empirical formula: Among them, m is the number of nodes in the input layer, n is the number of nodes in the output layer, a is a random integer between 1 and 10, and simulation comparisons are performed one by one starting from 1. After multiple simulation experiments, the one with the smallest error is selected to determine the BP neural network model.

4. The method according to any one of claims 1 to 3, characterized in that In step S4, optimizing the weights and biases of the BP neural network model using a genetic algorithm includes: Population initialization: The weights from the input layer to the hidden layer, the weights from the hidden layer to the output layer, the bias of the hidden layer, and the bias of the output layer in the BP neural network model are used as parameters to be optimized in the genetic algorithm. The parameters to be optimized are encoded in real number form to form chromosome individuals, and the initial population is randomly initialized to generate the initial population. Calculate the fitness value: Use the training set data to train the BP neural network model corresponding to each individual, and use the mean square error of the true value of the training set and the predicted value output by the model and the mean square error of the true value of the test set and the predicted value output by the model as the fitness function to calculate the fitness value of each individual; Generate new population: Generate a new generation of population through selection, crossover and mutation operations; Iterative optimization: Repeat the process of calculating fitness values and generating new populations through selection, crossover, and mutation operations. Iterative optimization is performed until the fitness value meets the termination condition, and the optimal weight and bias combination is obtained to generate a GA-BP neural network model.

5. The method according to claim 4, characterized in that In step S4, a new generation population is generated through selection, crossover and mutation operations, specifically: Selection operation: Roulette selection method is used to calculate the probability of each individual being selected based on its fitness value. The probability of each individual being selected is proportional to the fitness value of the individual, and a certain number of individuals are selected from the current population; Crossover operation: Use the two-point crossover method to cross the individual weights and biases; Mutation operation: Use the Gaussian mutation method to mutate the weights and biases of individuals, and merge the mutated individuals to form a new generation of population.

6. The method according to any one of claims 1 to 3, characterized in that In step S5, the LM algorithm used adopts dual termination conditions of the number of iterations and the error threshold. When the number of iterations reaches the preset maximum number of iterations or the error of the GA-BP neural network model is less than the preset error threshold, the training is stopped; the maximum number of iterations is set to 500 times, and the error threshold is 0.01; when the accuracy of the trained GA-BP neural network model is evaluated by the test set obtained in step S2, the preset accuracy threshold is 0.

05.

7. The method according to claim 1, characterized in that In step S6, the trained and evaluated GA-BP neural network model is embedded in the battery management system. The terminal voltage, terminal current and operating temperature data of the ship's lithium battery are collected in real time through the battery management system, and then input into the trained and evaluated GA-BP neural network model to obtain real-time estimated values of the SOC and SOH of the ship's lithium battery.

8. A marine lithium battery SOC and SOH estimation system based on GA-BP neural network, characterized in that: It includes an indicator data acquisition module, an indicator data preprocessing and division module, a BP neural network model construction module, a genetic algorithm optimization module, a GA-BP neural network model training and evaluation module, and a real-time estimation module connected in sequence; among them, The index data acquisition module is used to obtain index data of multiple ship lithium batteries during a complete charge and discharge cycle, wherein the index data includes the terminal voltage, terminal current and operating temperature of the ship lithium batteries; The indicator data preprocessing and division module is used to normalize the indicator data to obtain a normalized data set, and divide the data set into a training set and a test set; The BP neural network model construction module is used to construct a BP neural network model. The structure of the BP neural network model includes an input layer, a hidden layer and an output layer. The input layer includes 3 nodes, the output layer includes 1 node, the number of nodes in the hidden layer is determined based on the number of nodes in the input layer, the number of nodes in the output layer and a single-digit random integer, the input layer and the hidden layer are fully connected, and the hidden layer and the output layer are fully connected; The genetic algorithm optimization module is used to optimize the weights and biases of the BP neural network model using a genetic algorithm, taking the weights and biases of the BP neural network model as individuals in the genetic algorithm, using the mean square error of the training set and the test set as the fitness function, searching for the optimal weight and bias combination through selection, crossover, and mutation operations, and generating a GA-BP neural network model; The GA-BP neural network model training and evaluation module is used to input the training set obtained by the indicator data preprocessing and partitioning module into the GA-BP neural network model and train the GA-BP neural network model using the LM algorithm; then evaluate the accuracy of the trained GA-BP neural network model using the test set obtained by the indicator data preprocessing and partitioning module. If the model accuracy meets the preset accuracy threshold, the trained and evaluated GA-BP neural network model is retained; otherwise, the model is returned to the genetic algorithm optimization module for re-optimization; The real-time estimation module is used to embed the trained and evaluated GA-BP neural network model into the battery management system to achieve real-time estimation of the SOC and SOH of marine lithium batteries.

9. The system according to claim 8, characterized in that In the indicator data preprocessing and division module, the indicator data is first filtered using the box plot method to filter out abnormal indicator data generated in the static stage; then the filtered indicator data is normalized using min-max standardization to obtain normalized indicator data.

10. The system according to claim 8, wherein: In the genetic algorithm optimization module, optimizing the weights and biases of the BP neural network model using a genetic algorithm includes: Population initialization: The weights from the input layer to the hidden layer, the weights from the hidden layer to the output layer, the bias of the hidden layer, and the bias of the output layer in the BP neural network model are used as parameters to be optimized in the genetic algorithm. The parameters to be optimized are encoded in real number form to form chromosome individuals, and the initial population is randomly initialized to generate the initial population. Calculate the fitness value: Use the training set data to train the BP neural network model corresponding to each individual, and use the mean square error of the true value of the training set and the predicted value output by the model and the mean square error of the true value of the test set and the predicted value output by the model as the fitness function to calculate the fitness value of each individual; Generate new population: Generate a new generation of population through selection, crossover and mutation operations; Iterative optimization: Repeat the process of calculating fitness values and generating new populations through selection, crossover, and mutation operations. Iterative optimization is performed until the fitness value meets the termination condition, and the optimal weight and bias combination is obtained to generate a GA-BP neural network model.

Citation Information

Cited By

  • Multi-stage circulating fluidized bed hydrogen peroxide integrated production method

    CN120664502A

  • Heat transfer performance prediction and optimization method of multi-dimensional data weighted neural network

    CN121328340A

  • Arctic pole ship navigation risk prediction method and system based on GA-BP neural network model

    CN122290386A