Method and system for predicting SOC (State of Charge) of battery
By building a neural network model and combining PNGV equivalent model and improving whale optimization algorithm, the problem of insufficient accuracy and generalization ability of battery SOC prediction methods is solved, and accurate prediction of lithium iron phosphate battery SOC is achieved, and battery management is improved Systematic decision support capabilities.
Patent Information
- Application Number
- CN202411026948.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-20
AI Technical Summary
The existing battery SOC prediction methods have insufficient accuracy and generalization capabilities. Traditional methods such as the A-time Integration Method and the open-circuit voltage method have limitations in practical applications. Although the neural network model has been improved, it still needs to improve prediction accuracy and generalization. ability.
By obtaining the historical status and SOC values of the battery sample, a neural network model is constructed, and an improved whale optimization algorithm is used for model training, combining PNGV equivalent model and mixed pulse power performance testing, training data is generated and pre-processed to achieve lithium iron phosphate Accurate prediction of battery SOC.
It improves the accuracy and generalization ability of battery SOC prediction, can provide strong support in practical applications, extend battery life and ensure safe and stable operation.
Smart Images

Figure CN119165358A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery SOC prediction, and in particular to a battery SOC prediction method and system. Background Art
[0002] With the continuous development of science and technology, batteries are increasingly used in electric vehicles, mobile devices, energy storage systems and other fields. The state of charge (SOC) of a battery is an important parameter that describes the remaining power or remaining capacity of a battery. It is of great significance for the safe use, energy management and life prediction of the battery. Therefore, accurately predicting the SOC of a battery is a research hotspot in the field of battery technology.
[0003] Traditional battery SOC prediction methods mainly include the ampere-hour integration method and the open circuit voltage method. However, these methods have certain limitations in practical applications. For example, the ampere-hour integration method requires accurate recording of the battery's initial SOC and current changes during charging and discharging, but due to factors such as current sensor errors and battery self-discharge, it is easy to cause inaccurate SOC prediction. Although the open circuit voltage method can predict SOC more accurately, it requires the battery to be stationary for a long time to reach a stable state, which is not feasible in practical applications.
[0004] In recent years, with the rapid development of artificial intelligence technology, neural network models have been widely used in the field of battery SOC prediction. By learning and training a large amount of battery data, neural network models can establish a complex mapping relationship between battery status and SOC, thereby achieving more accurate SOC prediction. However, the existing neural network models still need to be improved in terms of prediction accuracy and generalization ability. Summary of the invention
[0005] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0006] In view of the above existing problems, the present invention is proposed.
[0007] Therefore, the present invention provides a method and system for predicting battery SOC, which can solve the problems mentioned in the background technology.
[0008] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0009] In a first aspect, the present invention provides a method for predicting battery SOC, comprising:
[0010] Acquire training data, wherein the training data includes historical battery states of battery samples at different times and SOC values corresponding to the historical battery states of battery samples at different times, wherein the battery states include battery charging current, discharging current, voltage and temperature;
[0011] Constructing a neural network model, taking the historical battery states of the battery samples at different times in the training data as inputs of the neural network model, taking the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as outputs of the neural network model, training the neural network model with the purpose of minimizing the loss function, and obtaining a prediction model;
[0012] The battery state of the battery to be predicted is input into the prediction model to obtain the SOC value of the battery to be predicted.
[0013] As a preferred solution of the battery SOC prediction method of the present invention, the obtaining of training data includes:
[0014] Build a PNGV equivalent model of the battery;
[0015] Obtain the open circuit voltage, main circuit current and SOC value of the battery sample;
[0016] Identifying the PNGV equivalent model based on the open circuit voltage, main circuit current and SOC value of the battery sample to obtain an identified PNGV equivalent model;
[0017] The training data is obtained by simulation based on the identified PNGV equivalent model.
[0018] As a preferred solution of the battery SOC prediction method of the present invention, the training data obtained by simulating the identified PNGV equivalent model includes:
[0019] The training data to be processed are obtained based on the simulation of the identified PNGV equivalent model;
[0020] The training data to be processed is preprocessed to obtain training data.
[0021] As a preferred solution of the battery SOC prediction method of the present invention, the preprocessing of the training data to be processed to obtain the training data includes:
[0022] Normalizing the training data to be processed to obtain normalized training data;
[0023] If there are moments with missing data in the normalized training data, the data of the previous moment and the next moment corresponding to the moment with missing data are added and averaged to obtain the average value as the data of the moment with missing data to obtain the training data;
[0024] If there is no moment of missing data in the normalized training data, the normalized training data is used as the training data.
[0025] As a preferred solution of the battery SOC prediction method of the present invention, the obtaining of the open circuit voltage, main circuit current and SOC value of the battery sample includes:
[0026] The hybrid pulse power performance test was used to carry out charge and discharge experiments on the battery samples to obtain the open circuit voltage, main circuit current and SOC value of the battery samples.
[0027] As a preferred solution of the battery SOC prediction method of the present invention, the state equation of the identified PNGV equivalent model includes:
[0028]
[0029] Among them, U b U is the voltage across the energy storage capacitor. p is the voltage across the parallel circuit of polarization resistance and polarization capacitance; C p is the polarization capacitance; R P is the polarization resistance, C b is the energy storage capacitor, I L is the load current, U L is the terminal voltage, R0 is the internal resistance of the battery, U OC is the open circuit voltage.
[0030] As a preferred solution of the battery SOC prediction method of the present invention, the step of constructing a neural network model includes:
[0031] The historical battery state of the lithium iron phosphate battery in the training data is used as the input of the neural network model, and the SOC data corresponding to the historical battery state of the lithium iron phosphate battery in the training data is used as the output of the neural network model. The improved whale optimization algorithm is used to train the neural network model with the purpose of minimizing the loss function to obtain a prediction model.
[0032] In a second aspect, the present invention provides a battery SOC prediction system, comprising:
[0033] A data acquisition module, used to acquire training data, wherein the training data includes historical battery states of battery samples at different times and SOC values corresponding to the historical battery states of battery samples at different times, wherein the battery states include battery charging current, discharging current, voltage and temperature;
[0034] A model building module, used to build a neural network model, taking the historical battery states of the battery samples at different times in the training data as inputs of the neural network model, taking the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as outputs of the neural network model, training the neural network model with the purpose of minimizing the loss function, and obtaining a prediction model;
[0035] The SOC value acquisition module is used to input the battery state of the battery to be predicted into the prediction model to obtain the SOC value of the battery to be predicted.
[0036] In a third aspect, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method when executing the computer program.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method described above when executed by a processor.
[0038] Compared with the prior art, the invention has the following beneficial effects: the invention proposes a method and system for predicting battery SOC, obtains training data, the training data includes the historical battery status of battery samples at different times and the SOC values corresponding to the historical battery status of battery samples at different times, the battery status includes battery charging current, discharge current, voltage and temperature status; constructs a neural network model, takes the historical battery status of battery samples at different times in the training data as input of the neural network model, takes the SOC values corresponding to the historical battery status of battery samples at different times in the training data as output of the neural network model, trains the neural network model with the purpose of minimizing the loss function, and obtains a prediction model; inputs the battery status of the battery to be predicted into the prediction model, and obtains the SOC value of the battery to be predicted. The state of charge of lithium iron phosphate batteries can be accurately predicted. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0040] Figure 1 A method flow chart of a battery SOC prediction method and system provided by an embodiment of the present invention;
[0041] Figure 2A HPPC test voltage response curve diagram of a battery SOC prediction method and system provided by an embodiment of the present invention;
[0042] Figure 3 A voltage response curve diagram of a battery SOC prediction method and system provided by an embodiment of the present invention when the SOC is 0.4 in an HPPC experiment;
[0043] Figure 4 An improved WOA-BP model prediction curve diagram of a battery SOC prediction method and system provided by an embodiment of the present invention;
[0044] Figure 5 An improved WOA-BP model regression curve diagram of a battery SOC prediction method and system provided by an embodiment of the present invention;
[0045] Figure 6 An internal structure diagram of a computer device of a battery SOC prediction method and system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0047] Example 1
[0048] Reference Figure 1-Figure 6 , which is the first embodiment of the present invention, and which provides a method and system for predicting a battery SOC. A method for predicting a battery SOC includes:
[0049] In the relevant technology, lithium iron phosphate batteries are widely used in the field of electric vehicles because of their advantages such as high operating voltage, high energy density, long cycle life, good safety performance, low self-discharge rate, and no memory effect. However, in actual use, the battery performance will change due to factors such as temperature, charge and discharge current, and battery aging, resulting in inaccurate battery SOC (State of Charge) estimation. Battery SOC reflects the remaining power of the battery and is the basis for the battery management system to perform energy management, power management, thermal management, and battery balancing.
[0050] The present application provides a method that can effectively solve the above-mentioned problems. Next, a plurality of embodiments will be combined to explain in detail how to implement the battery SOC prediction method;
[0051] Figure 1 A method flow chart of a battery SOC prediction method and system is shown, including:
[0052] S101, obtaining training data, where the training data includes historical battery states of battery samples at different times and SOC values corresponding to the historical battery states of battery samples at different times, where the battery states include battery charging current, discharging current, voltage and temperature;
[0053] Among them, obtaining training data includes:
[0054] Build a PNGV equivalent model of the battery;
[0055] Furthermore, the open circuit voltage, main circuit current and SOC value of the battery sample are obtained;
[0056] Furthermore, the PNGV equivalent model is identified based on the open circuit voltage, main circuit current and SOC value of the battery sample to obtain the identified PNGV equivalent model;
[0057] Furthermore, training data is obtained based on the simulation of the identified PNGV equivalent model.
[0058] The training data obtained by simulation based on the identified PNGV equivalent model includes:
[0059] Furthermore, the training data to be processed is obtained based on the simulation of the identified PNGV equivalent model;
[0060] Furthermore, the training data to be processed is preprocessed to obtain training data.
[0061] The training data to be processed is preprocessed to obtain the training data including:
[0062] Furthermore, the training data to be processed is normalized to obtain normalized training data;
[0063] Furthermore, if there is a moment of missing data in the normalized training data, the data of the previous moment and the next moment corresponding to the moment of missing data are added and averaged to obtain the average value as the data of the moment of missing data to obtain the training data;
[0064] Furthermore, if there is no moment of missing data in the normalized training data, the normalized training data is used as the training data.
[0065] Furthermore, obtaining the open circuit voltage, main circuit current and SOC value of the battery sample includes:
[0066] The hybrid pulse power performance test was used to carry out charge and discharge experiments on the battery samples to obtain the open circuit voltage, main circuit current and SOC value of the battery samples.
[0067] Furthermore, the state equations of the identified PNGV equivalent model include:
[0068]
[0069] Among them, U b U is the voltage across the energy storage capacitor. p is the voltage across the parallel circuit of polarization resistance and polarization capacitance; C p is the polarization capacitance; R P is the polarization resistance, C b is the energy storage capacitor, I L is the load current, U L is the terminal voltage, R0 is the internal resistance of the battery, U OC is the open circuit voltage.
[0070] It should be noted that obtaining training data in S101 is an important step in battery SOC prediction, which provides necessary input for subsequent steps. By obtaining the historical battery status and corresponding SOC values of battery samples at different times, a rich data set can be constructed for training the prediction model. In this way, the model can learn the complex relationship between battery status and SOC, thereby improving the accuracy of the prediction.
[0071] In addition, by building a PNGV equivalent model and identifying it, the behavior characteristics of the battery can be simulated more accurately. Simulation based on the identified model can generate a large amount of training data, further enriching the data set and improving the generalization ability of the model.
[0072] When preprocessing training data, normalization helps eliminate the dimensional differences between different features, so that the model can better learn the impact of each feature on SOC. At the same time, for the processing of missing data, filling it with the average value of the data at adjacent moments can reduce the impact of missing data on model training to a certain extent.
[0073] S102, constructing a neural network model, taking the historical battery states of the battery samples at different times in the training data as the input of the neural network model, taking the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as the output of the neural network model, training the neural network model with the purpose of minimizing the loss function, and obtaining a prediction model;
[0074] Among them, building a neural network model includes:
[0075] The historical battery status of the lithium iron phosphate battery in the training data is used as the input of the neural network model, and the SOC data corresponding to the historical battery status of the lithium iron phosphate battery in the training data is used as the output of the neural network model. The improved whale optimization algorithm is used to train the neural network model with the purpose of minimizing the loss function to obtain a prediction model.
[0076] In the embodiment of the present application, the prediction model data learning process is as follows:
[0077] 1) First, input the sample data from the input layer into the neural network model, calculate the weights between the input layer and the hidden layer neurons, and input the results into the hidden layer. The input formulas for each hidden layer are as follows:
[0078]
[0079] In the formula, A i is the input of the i-th hidden layer, m is the number of neurons in the input layer, ω ij is the weight between the input layer neuron node i and the hidden layer neuron node j, x i are the vectors of the input layer, b t is the hidden layer neuron threshold.
[0080] 2) Perform threshold calculation in the hidden layer, and calculate the result through the weight between the hidden layer and the output layer. The output formula of each hidden layer is as follows:
[0081] Y i =f i (A i )
[0082] Where: Y i is the output of the i-th hidden layer neuron, and f1 is the transfer function from the input layer to the hidden layer.
[0083] 3) Input the result to the output layer, and after the threshold calculation of the output layer, the result is output by the output layer. The input formula of each node of the output layer is as follows:
[0084]
[0085] Where: S k is the input of the kth output layer, q is the number of neurons in the hidden layer, ω ij is the weight between the hidden layer neuron node i and the output layer neuron node j, a k is the output layer neuron threshold.
[0086] The output formula of each output layer is as follows:
[0087] Q k =f2(S k )
[0088] Where: Q k is the output of the kth output layer neuron, and f2 is the transfer function from the hidden layer to the output layer.
[0089] Furthermore, the prediction results of the prediction model of the present invention are as follows Figure 4 As shown in Figure 2, the regression results of the prediction model are as follows: Figure 5 shown.
[0090] Furthermore, in order to quantitatively evaluate the effectiveness and accuracy of the prediction model, the MSE (mean square error), RMSE (root mean square error), MAE (mean deviation), and MAPE (mean square error) formulas are considered as follows:
[0091]
[0092]
[0093]
[0094]
[0095] Where: N is the total number of data, is the predicted value of the t-th data, and y(t') is the true value of the t-th data.
[0096] The evaluation results of the prediction model are shown in Table 1.
[0097] Table 1 Prediction model results
[0098]
[0099] It should be noted that by building a neural network model, the historical battery status information in the training data can be fully utilized to learn the complex relationship between the battery status and SOC. This learning method is more flexible and powerful than traditional statistical models or simple models, and can better capture the inherent laws and trends of the data, thereby improving the accuracy of predictions. The improved whale optimization algorithm is used to train the neural network model to optimize the model parameters. This optimization algorithm can better adapt to complex data distribution and model structure, find the parameter combination that minimizes the loss function, and further improve the prediction performance of the model.
[0100] By quantitatively evaluating the effectiveness and accuracy of the prediction model, we can intuitively understand the performance of the model. Evaluation indicators such as MSE, RMSE, MAE and MAPE can help comprehensively evaluate the prediction error and stability of the model, providing a strong basis for subsequent model optimization and application.
[0101] S103, inputting the battery state of the battery to be predicted into the prediction model to obtain the SOC value of the battery to be predicted.
[0102] It should be noted that this step is the key link in the application of the model. By inputting new battery status data, the model can output the corresponding SOC prediction value and provide data support for the decision-making of the battery management system.
[0103] In practical applications, the battery status data of the battery to be predicted can be collected in real time through the battery management system or other sensors. These data include key parameters such as battery voltage, current, temperature, etc., reflecting the current operating status of the battery. When these data are input into the prediction model, the model will use the learned rules to quickly and accurately predict the SOC value.
[0104] It is worth noting that the performance of the prediction model is affected by many factors, such as the complexity of the model, the quantity and quality of training data, the choice of optimization algorithm, etc. Therefore, when building and training the prediction model, these factors need to be fully considered to ensure that the model can show good performance in practical applications.
[0105] The prediction method of the present invention can accurately predict the SOC of lithium iron phosphate batteries, providing strong support for the decision-making of battery management systems. This helps to improve the efficiency of battery use, extend battery life, and also helps to ensure the safe and stable operation of the battery.
[0106] In an optional embodiment, the battery status can be monitored and early warning can be provided based on the predicted SOC value.
[0107] It should be noted that the predicted SOC value is an important parameter of the battery status, which can reflect the remaining power and performance status of the battery. Through real-time monitoring and analysis of the SOC value, abnormal conditions during battery operation can be discovered in time, providing data support for the decision-making of the battery management system.
[0108] In terms of battery status monitoring, the SOC threshold can be set. When the predicted SOC value is lower than the threshold, it means that the battery power is insufficient and corresponding measures need to be taken to charge or replace the battery. At the same time, the battery's voltage, current, temperature and other parameters can be combined to comprehensively evaluate the battery's health status and promptly detect problems such as battery aging and damage.
[0109] In terms of early warning, an early warning model can be built based on the predicted SOC value and other battery status parameters to predict and warn of possible battery failures or abnormalities. When the early warning model detects an abnormal situation, it can send early warning information to the battery management system in a timely manner so that appropriate measures can be taken to deal with it and avoid adverse effects of battery failure on the system.
[0110] The prediction method of the present invention can accurately predict the SOC of lithium iron phosphate batteries, and combined with battery status monitoring and early warning technology, it can provide comprehensive support for the decision-making of the battery management system. This helps to improve the efficiency of battery use and extend battery life, while also helping to ensure the safe and stable operation of the battery and improve the reliability and stability of the entire system.
[0111] In an optional embodiment, the battery usage strategy may be adjusted or battery maintenance may be performed according to the results of battery status monitoring and early warning.
[0112] In terms of battery usage strategy adjustment, the battery charging and discharging strategy, power output and other parameters can be dynamically adjusted based on the SOC prediction value and battery status monitoring results to adapt to different application scenarios and needs. For example, when the battery is low on power, the power supply of key devices can be prioritized and the power output of non-key devices can be reduced; when the battery temperature is too high or too low, the battery's operating mode can be adjusted to avoid battery damage or performance degradation.
[0113] In terms of battery maintenance, based on early warning information, possible battery failures or hidden dangers can be discovered in a timely manner, and corresponding maintenance measures can be taken. For example, severely aged batteries can be replaced, batteries with abnormal temperatures can be cooled or heated, and batteries with unstable voltages can be calibrated or repaired. These maintenance measures can effectively extend the battery life and improve the performance stability of the battery.
[0114] By adjusting the battery usage strategy or performing battery maintenance, the performance of the battery management system can be further optimized and the battery efficiency and safety can be improved. This not only helps to reduce the operating cost of the battery management system, but also improves the stability and reliability of the entire system, bringing a better user experience.
[0115] In summary, the present invention provides a method for predicting the SOC of a lithium iron phosphate battery. By constructing a neural network prediction model and combining the improved whale optimization algorithm for model training, the accurate prediction of the battery SOC is achieved. At the same time, battery status monitoring and early warning are performed according to the prediction results, and the battery use strategy is adjusted or battery maintenance is performed, providing comprehensive support for the decision-making of the battery management system. This prediction method helps to improve the use efficiency of the battery, extend the battery life, and ensure the safe and stable operation of the battery.
[0116] This embodiment also provides a battery SOC prediction system, including:
[0117] A data acquisition module is used to acquire training data, wherein the training data includes the historical battery status of battery samples at different times and the SOC values corresponding to the historical battery status of battery samples at different times, and the battery status includes the battery charging current, discharging current, voltage and temperature status;
[0118] A model building module is used to build a neural network model, taking the historical battery states of the battery samples at different times in the training data as the input of the neural network model, taking the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as the output of the neural network model, and training the neural network model with the purpose of minimizing the loss function to obtain a prediction model;
[0119] The SOC value acquisition module is used to input the battery state of the battery to be predicted into the prediction model to obtain the SOC value of the battery to be predicted.
[0120] The above-mentioned unit modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above-mentioned modules.
[0121] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for predicting battery SOC is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0122] This embodiment further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0123] Acquire training data, where the training data includes historical battery states of battery samples at different times and SOC values corresponding to the historical battery states of battery samples at different times, and the battery states include battery charging current, discharging current, voltage, and temperature;
[0124] Construct a neural network model, use the historical battery states of the battery samples at different times in the training data as the input of the neural network model, use the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as the output of the neural network model, train the neural network model with the purpose of minimizing the loss function, and obtain a prediction model;
[0125] The battery state of the battery to be predicted is input into the prediction model to obtain the SOC value of the battery to be predicted.
[0126] Example 2
[0127] Reference Figure 1-Figure 6 , which is an embodiment of the present invention, provides a method and system for predicting battery SOC. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.
[0128] Step 1: Build a PNGV equivalent model of lithium iron phosphate battery.
[0129] The present invention adopts the PNGV equivalent model of lithium iron phosphate battery. The PNGV equivalent model of lithium iron phosphate battery can accurately simulate the charging and discharging process of lithium iron phosphate battery, and considers the open circuit voltage change caused by current accumulation, overcharge and self-discharge, etc., which is suitable for long-term simulation. The open circuit voltage formula of the PNGV equivalent model of lithium iron phosphate battery is as follows:
[0130]
[0131] In the formula, C PN is the polarization capacitance, R PN is the polarization resistance, I L is the load current, I PN is the polarization current.
[0132] Step 2: Using the Hybrid Pulse Power Performance Test (HPPC), the simulation circuit is regularly charged and discharged to record the current SOC value of the battery, the open circuit voltage of the simulation circuit, and the main circuit current.
[0133] The HPPC experimental steps are as follows:
[0134] like Figure 2 and Figure 3 As shown, step 201, at room temperature of 25°C, charge the battery to the charging cut-off voltage with a constant current of 1, then fill the battery with a current that gradually decays under a constant voltage state, and leave it for 30 minutes.
[0135] Step 202, discharge at a current of 1 for 10 seconds, then leave it for 40 seconds, then charge at a current of 1 for 10 seconds, and leave it for 40 seconds.
[0136] Step 203: After the 40-second pause, discharge at a current of 1 for 6 minutes to remove 0.1% of the battery charge. Leave for 1 hour to obtain the accurate U at the start time of the next discharge. oc .
[0137] Step 204, cycle the previous steps until the battery is discharged to the cut-off voltage. In the cycle test, the lithium battery is subjected to a composite pulse test at equally spaced points, selected as 0.1, 0.2 ... 0.9, and the experimental interval between adjacent pulses is 1 hour.
[0138] Step 3: Identify the parameters of the lithium iron phosphate battery PNGV equivalent model. The identification results are shown in Table 2.
[0139] Table 2 PNGV equivalent model parameter identification results of lithium iron phosphate battery
[0140]
[0141]
[0142] According to the data extracted from the HPPC experiment, the parameters of the PNGV equivalent model of the lithium iron phosphate battery are identified. The characteristic parameters of the PNGV equivalent model of the lithium iron phosphate battery are as follows:
[0143]
[0144] Wherein: U1 is the voltage at time t1, U2 is the voltage at time t2, U3 is the voltage at time t3, U4 is the voltage at time t4, and I is the discharge current.
[0145]
[0146] Where: K1 is the size before discharge in each HPPC stage; ΔW is the energy storage capacitor C b The amount of electricity stored. b is the energy storage capacitor, U1 is the voltage at time t1, and U5 is the voltage at time t5.
[0147]
[0148] Where: U PN is the polarization voltage of the RC circuit, and T is the discharge period.
[0149]
[0150] Where: U0 is the initial polarization voltage of the RC circuit, and τ is the time constant.
[0151] Step 4: Generate data such as charging and discharging current, voltage, temperature state, SOC, etc. of the lithium iron phosphate battery as a model training and test data set through simulation of the lithium iron phosphate battery PNGV equivalent model.
[0152] Step 5: Preprocess the acquired data to remove bad data and repair missing data.
[0153] Preprocess the acquired data and repair missing data.
[0154] Data preprocessing, standardize the sample data, normalize it, the formula is as follows:
[0155]
[0156] Where: for the data to be normalized c; and is the maximum c of the total sample data max , the minimum corresponding data c min .
[0157] To repair missing data, the data of the time period before the missing data and the data of the time period after the missing data are averaged to fill the missing data. The formula is as follows:
[0158]
[0159] Where: k t'-1 is the data of hour t'-1, k t'+1 The data is t'+1 hour.
[0160] Step 6: Build the prediction model and adjust the parameters of the prediction model.
[0161] The process of optimizing the prediction model parameters is as follows:
[0162] Step 601, surround the prey. First, determine the initial optimal whale position, and other whales in the group move towards it to surround the prey. The distance D between the individual and the prey can be expressed as:
[0163] D=|CX * (d)-X(d)|
[0164] X(d+1)=X * (d)-AD
[0165] Where: d is the current iteration number, X * is the position vector of the current optimal whale, X is the current whale position vector, D is the distance between the individual and the prey, A and C are the representation coefficients; it can be calculated as:
[0166]
[0167] Where: r1 and r2 are random numbers in (0, 1), d max represents the maximum number of iterations.
[0168] Step 602: Hunting behavior. The whale approaches its prey by swimming in a spiral motion. The mathematical model can be expressed as:
[0169] X(d+1)=X * (d)+D p e bl cos(2πl)
[0170] Where: D p is the distance between the whale and its prey; b is the spiral shape; l is a random number within (-1,1).
[0171] The whale approaches its prey by swimming in a spiral to narrow the encirclement. In this process, assuming that P i The probability of choosing the shrinking encirclement mechanism and 1~P i The probability of choosing the spiral model to update the whale position can be expressed as:
[0172]
[0173] Where: D is the distance between the individual and the prey, A is the representation coefficient, P i To set the probability.
[0174] When hunting, if a is set to decrease as it approaches the prey, the fluctuation range of A will decrease. During the iteration process, when a decreases from 2 to 0, A changes randomly within (-a, a). When A is within (-1, 1), the whale's next position is any point between the current position and the prey's position. Therefore, when A<1 is set, the whale attacks the prey.
[0175] Step 603: Search for prey. The mathematical model for searching for prey is as follows:
[0176] D=|CX rand -X(d)|
[0177] X(d+1)=X rand -AD
[0178] Where: X rand is the random position of the whale. When A≥1 is set, the position of the whale is randomly selected to update the positions of other whales, forcing the whale group to move away from the prey to find more suitable prey, so as to enhance the algorithm's surveying ability and optimize the global situation.
[0179] Step 7: Put the data into the prediction model for training, and evaluate the prediction performance of the trained prediction model.
[0180] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0181] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0182] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0183] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0184] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
[0185] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0186] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for predicting battery SOC, characterized in that: include: Acquire training data, wherein the training data includes historical battery states of battery samples at different times and SOC values corresponding to the historical battery states of battery samples at different times, wherein the battery states include battery charging current, discharging current, voltage and temperature; Constructing a neural network model, taking the historical battery states of the battery samples at different times in the training data as inputs of the neural network model, taking the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as outputs of the neural network model, training the neural network model with the purpose of minimizing the loss function, and obtaining a prediction model; The battery state of the battery to be predicted is input into the prediction model to obtain the SOC value of the battery to be predicted.
2. The method for predicting battery SOC according to claim 1, characterized in that: The obtaining of training data comprises: Build a PNGV equivalent model of the battery; Obtain the open circuit voltage, main circuit current and SOC value of the battery sample; Identify the PNGV equivalent model based on the open circuit voltage, main circuit current and SOC value of the battery sample to obtain an identified PNGV equivalent model; The training data is obtained by simulation based on the identified PNGV equivalent model.
3. The method for predicting battery SOC according to claim 2, characterized in that: The training data obtained by simulating the identified PNGV equivalent model includes: The training data to be processed is obtained based on the simulation of the identified PNGV equivalent model; The training data to be processed is preprocessed to obtain training data.
4. The method for predicting battery SOC according to claim 3, characterized in that: The preprocessing of the training data to be processed to obtain the training data includes: Normalizing the training data to be processed to obtain normalized training data; If there are moments with missing data in the normalized training data, the data of the previous moment and the next moment corresponding to the moment with missing data are added and averaged to obtain the average value as the data of the moment with missing data to obtain the training data; If there is no moment of missing data in the normalized training data, the normalized training data is used as the training data.
5. The method for predicting battery SOC according to claim 4, characterized in that: The obtaining of the open circuit voltage, main circuit current and SOC value of the battery sample comprises: The hybrid pulse power performance test was used to carry out charge and discharge experiments on the battery samples to obtain the open circuit voltage, main circuit current and SOC value of the battery samples.
6. The method for predicting battery SOC according to claim 5, characterized in that: The state equation of the identified PNGV equivalent model includes: Among them, U b U is the voltage across the energy storage capacitor. p is the voltage across the parallel circuit of polarization resistance and polarization capacitance; C p is the polarization capacitance; R P is the polarization resistance, C b is the energy storage capacitor, I L is the load current, U L is the terminal voltage, R0 is the internal resistance of the battery, U OC is the open circuit voltage.
7. The method for predicting battery SOC according to claim 6, characterized in that: The construction of the neural network model includes: The historical battery state of the lithium iron phosphate battery in the training data is used as the input of the neural network model, and the SOC data corresponding to the historical battery state of the lithium iron phosphate battery in the training data is used as the output of the neural network model. The improved whale optimization algorithm is used to train the neural network model with the purpose of minimizing the loss function to obtain a prediction model.
8. A battery SOC prediction system, characterized in that: include: A data acquisition module, used to acquire training data, wherein the training data includes historical battery states of battery samples at different times and SOC values corresponding to the historical battery states of battery samples at different times, wherein the battery states include battery charging current, discharging current, voltage and temperature; A model building module, used to build a neural network model, taking the historical battery states of the battery samples at different times in the training data as inputs of the neural network model, taking the SOC values corresponding to the historical battery states of the battery samples at different times in the training data as outputs of the neural network model, training the neural network model with the purpose of minimizing the loss function, and obtaining a prediction model; The SOC value acquisition module is used to input the battery state of the battery to be predicted into the prediction model to obtain the SOC value of the battery to be predicted.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Battery SOC prediction method and device, monitoring system and storage medium
CN120142948A
Method and system for calibrating SOC (State of Charge) of user side energy storage battery
CN121831576A
