New energy storage and energy supply lithium battery state prediction method and device, and storage medium

By improving the crown porcupine algorithm (ICPO), combining differential evolution and Levi flight mechanism, the accuracy and generalization ability of lithium battery state prediction are improved, and the problem of insufficient local optimization and prediction accuracy of OSELM algorithm under complex data is solved, achieving higher prediction accuracy and reliability.

CN120490837APending Publication Date: 2025-08-15CHENGDU IND VOCATIONAL TECHN COLLEGE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510862512.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing online sequential overlimit learning machine (OSELM) algorithm has problems such as local optimization, insufficient prediction accuracy and generalization capabilities in predicting the health status of lithium batteries, especially when data is insufficient or quality is low, which affects the prediction accuracy of the model.

Method used

By improving the crown porcupine algorithm (ICPO), differential evolution, dynamic step size and Levi flight mechanism are introduced, the core parameters of OSELM are optimized, and its global optimal solution capability and local accuracy in complex search spaces are improved.

Benefits of technology

The accuracy and generalization ability of lithium battery state prediction are improved, and are manifested as lower average absolute percentage error (MAPE), root mean square error (RMSE) and higher decision coefficient (R2), making the prediction results more reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120490837A_ABST
    Figure CN120490837A_ABST
Patent Text Reader

Abstract

The invention relates to a new energy storage and energy supply lithium battery state prediction method and device, and a storage medium, and the method comprises the following steps: S1, reading a lithium battery data set, constructing a training sample set and a test sample set according to a proportion, and carrying out the normalization processing; s2, improving a crown porcupine algorithm ICPO through a differential evolution theory, a dynamic step length and weight adjustment strategy and a Levy flight mechanism; and S3, optimizing the core parameters of the OSELM through an ICPO algorithm of an improved crown porcupine algorithm, and applying the optimized core parameters of the OSELM to the OSELM for training of the OSELM. According to the technical scheme, the improved crown porcupine algorithm ICPO introduces differential evolution, dynamic step length, Levy flight and other mechanisms, so that the improved crown porcupine algorithm ICPO can more effectively find a globally optimal solution when processing complex data, and the improved crown porcupine algorithm ICPO is better in local accuracy, and particularly, the improved crown porcupine algorithm ICPO can more effectively find the globally optimal solution on evaluation indexes such as mean absolute percentage error (MAPE), root-mean-square error (RMSE) and decision coefficient (R2). And a lower error and a higher fitting degree can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lithium battery status prediction, and in particular to a method, device, and storage medium for predicting the status of a new energy storage and supply lithium battery. Background Art

[0002] With the widespread adoption of new energy vehicles and energy storage systems, the reliability and safety of lithium batteries have become critical issues. The performance and health of lithium batteries are directly related to the lifespan, safety, and economic viability of the equipment. Accurate battery status prediction can provide early warning before battery failure occurs, preventing safety incidents caused by battery failure. Furthermore, battery status prediction enables precise battery management, helping to improve overall performance and optimize charging and discharging strategies, thereby extending battery life.

[0003] At present, the main estimation methods for battery state prediction (SOH) include empirical model method, physical model method, data-driven method, etc. The empirical model has the advantages of simple calculation and easy implementation, but the model accuracy is low and it cannot adapt to complex changes in working conditions. The physical model method can effectively capture the internal state of the battery and has a high physical interpretability, but it is highly dependent on the internal parameters of the battery and is complex to construct, making it difficult to obtain accurate internal parameters in practical applications. With the continuous improvement of modern artificial intelligence chips and computing power, the application advantages of data-driven methods in many fields are becoming more and more obvious, especially in complex nonlinear problems such as battery SOH prediction. Data-driven methods can provide more accurate predictions through analysis and learning through intelligent algorithms.

[0004] As an efficient learning algorithm, the online sequential extreme learning machine (OSELM) has been widely used in lithium battery state-of-health (SOH) prediction due to its fast training speed and efficient data processing. However, it still suffers from numerous deficiencies in local optimality, prediction accuracy, data sensitivity, and generalization. These issues limit OSELM's application in complex battery operating conditions, especially when data is insufficient or of low quality, such as in the presence of noise and bias, which directly impacts the model's prediction accuracy. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method, device, and storage medium for predicting the status of new energy storage and power supply lithium batteries, integrating OSELM with other optimization algorithms, while giving full play to the advantages of OSELM's fast training and efficient processing of online data, and being able to effectively find the global optimal solution in a complex search space, thereby improving its prediction accuracy and generalization ability.

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

[0007] A method for predicting the state of a new energy storage and supply lithium battery comprises the following steps:

[0008] S1. Read the lithium battery data set, construct the training sample set and the test sample set in proportion, and perform normalization.

[0009] S2. Improve the crested porcupine algorithm ICPO through differential evolution theory, dynamic step size and weight adjustment strategy, and Levy flight mechanism;

[0010] S3. Optimize the core parameters of OSELM by improving the ICPO algorithm, and apply the optimized core parameters of OSELM to OSELM for training.

[0011] Further limiting, S1 uses maximum value normalization to normalize the sample data, and the processing formula is as follows:

[0012]

[0013] Among them, x' is the normalized data.

[0014] It is further defined that the specific steps of improving the crested porcupine algorithm ICPO in S2 are as follows:

[0015] S2.1, Control parameter setting:

[0016] N: the size of the population, that is, the number of initial solutions in the algorithm;

[0017] Tmax: maximum number of iterations, that is, the maximum number of cycles of the algorithm;

[0018] lb, ub: lower and upper bounds of the search space, used to limit the value range of each solution;

[0019] dim: the dimension of the problem, which indicates the number of variables in the optimization problem;

[0020] f: objective function, used to evaluate the quality of each solution;

[0021] Nmin: minimum population size N min =0.8·N#(2);

[0022] Tf: control ratio of the third and fourth defense mechanisms;

[0023] S2.2. Initialize the population, randomly generate initial solutions, and calculate the fitness value of each solution:

[0024]

[0025] f i =f(X i )#(4)

[0026] Where N represents the size of the population, and rand(0,1) is a random number between (0,1) used to randomly initialize each individual in the population between the upper bound ub and the lower bound lb. i is the solution of the ith individual, f i is the fitness value, which is calculated by the objective function f.

[0027] Find the current optimal fitness Gb_Fit in the initial population and the global optimal solution

[0028] Gb_Fit=min(fitness)#(5)

[0029] Among them, fitness is the population fitness vector, expressed as fitness = [f1,f2,···,f N ];

[0030] S2.3, loop iteration, the number of executions of the loop is Tmax times, and the population is updated and the defense mechanism is adjusted in each loop;

[0031] S2.3.1. Dynamic step size and weight factor update

[0032] The linear attenuation step factor is calculated as follows:

[0033]

[0034] The formula for updating the exponential decay weight factor is as follows:

[0035]

[0036] The coefficient 0.9 in formula (7) is the initial weight value;

[0037] The coefficient 0.5 is the decay rate;

[0038] The calculation formula of dynamic step length based on fitness is as follows:

[0039]

[0040] In formula (8), ε is used to prevent division by zero errors.

[0041] S2.3.2, Exploration Phase

[0042] The exploration phase includes the first and second defense mechanisms;

[0043] The differential vector is generated by the difference information of different individuals in the population, and the position of the individual is updated by combining the dynamic step size and scaling factor. The solution is generated by the differential evolution strategy. The calculation formula is as follows:

[0044]

[0045] In formula (9) are random solutions in the population. F is the differential scaling factor, a random number in the range [0.5, 1.0]. β = 0.01 is the perturbation factor, and N(0, 1) is a normally distributed random variable with mean 0 and standard deviation 1, used to introduce randomness.

[0046] This algorithm improves the second defense mechanism based on neighborhood search, and its calculation formula is as follows;

[0047]

[0048] S2.3.3, Development Phase

[0049] The development phase mainly includes the third and fourth defense mechanisms;

[0050] In this algorithm, the third defense mechanism guides the individual to approach the global optimal solution by using the weight factor through the guidance of the global optimal solution. The calculation formula for updating the individual position is as follows:

[0051]

[0052] In formula (11) is the global optimal solution in the current iteration number t;

[0053] In the fourth defense mechanism, this algorithm introduces a more complex random jump strategy through the Lévy flight operator; this mechanism simulates the flight path of animals in nature when hunting, avoiding local search traps by long-distance jumps. The position update equation is as follows:

[0054]

[0055] In formula (12), L is the random step size generated by the Levy distribution, which is defined as:

[0056]

[0057] In formula (13), μ and ν are normally distributed random numbers;

[0058] β is the Levy distribution coefficient used to control the shape of the Levy distribution.

[0059] Further defined, said S3 uses said ICPO in S2 to find the optimal parameter X best Finally, it is applied to the OSELM model. The specific optimization process is as follows:

[0060] S3.1, OSELM parameter setting steps, including:

[0061] Set the number of neurons in the hidden layer nHiddenNeurons;

[0062] Activation function type Type; Task type Elm_Type;

[0063] The number of input layer neurons nInputNeurons;

[0064] The size of the data block;

[0065] S3.2, the goal of OSELM is to minimize the prediction error by optimizing the input weights IW. Its steps are summarized as follows:

[0066] S3.2.1, input weight matrix IW and bias matrix Bias initialization:

[0067] The optimal input weight vector Xbest of OSELM is obtained by the ICPO algorithm described in S2, and converted into an m×n input weight matrix IW;

[0068]

[0069] m is the number of neurons in the hidden layer nHiddenNeurons, the number of neurons in the input layer nInputNeurons;

[0070] wij represents the weight from the i-th hidden layer neuron to the j-th input feature;

[0071] Randomly generate a 1×nHiddenNeurons bias matrix Bias in the interval [0,1];

[0072] Bias=[b1,b2,b3,…,b nHiddenNeurons ]

[0073] S3.2.2, output calculation;

[0074] According to the input data IN, the input weight matrix IW, and the bias vector Bias, the signal Z of the hidden layer input to the hidden layer is calculated;

[0075] Z=IW·IN+Bias#(14)

[0076] Apply the activation function G to calculate the output matrix H of the hidden layer neurons;

[0077] H=G(Z)=G(W·IN+B)#(15)

[0078] The model's predicted output Y is calculated by the hidden layer output H and the output weight β. The formula is as follows:

[0079] Y=H·β#(16)

[0080] S3.2.3, update output weights;

[0081] The output weight β is solved by the least squares method to minimize the error between the predicted output Y and the true output T. The specific calculation process is as follows:

[0082] 1. The error between the predicted output Y and the true output T is calculated as follows:

[0083]

[0084] 2. Derivative E(β)E and set the derivative to 0 to obtain the optimal solution β;

[0085]

[0086] H T H·β=H T ·T

[0087] β=(H T H) -1 H T ·T

[0088] S3.3 uses mean absolute percentage error (MAPE), root mean square error (RMSE) and coefficient of determination (R 2 ) formula to calculate the OSELM error evaluation index:

[0089]

[0090] In formula (18) and (19),

[0091] Yi is the output value predicted by the model;

[0092] Ti is the target output value;

[0093] n is the number of samples, that is, the total number of data points in the test set.

[0094] In formula (20) T i The arithmetic mean of

[0095] A device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the steps of the above-mentioned new energy storage and energy supply lithium battery status prediction method are implemented.

[0096] A storage medium, the readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned new energy storage and energy supply lithium battery status prediction method steps.

[0097] The beneficial effects of the present invention are:

[0098] The present invention relates to a new energy storage and power supply lithium battery state prediction method, device, and storage medium. The improved crown porcupine algorithm ICPO introduces differential evolution, dynamic step size, Levy flight and other mechanisms to enable it to more effectively find the global optimal solution when processing complex data, and perform better in local accuracy, specifically in terms of mean absolute percentage error (MAPE), root mean square error (RMSE) and determination coefficient (R 2 ) evaluation indicators, lower errors and higher fitting degrees can be achieved, and the prediction results are more reliable.

[0099] Other advantages, objects, and features of the present invention will be described in part in the following description and, in part, will be apparent to those skilled in the art upon examination of the following description or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] Figure 1 This is a logic diagram of the new energy storage and supply lithium battery status prediction method. DETAILED DESCRIPTION

[0101] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0102] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0103] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0104] In the above description of the present invention, it should be noted that the terms "one side," "the other side," and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or the orientations or positional relationships in which the inventive product is typically placed when in use. These terms are intended solely to facilitate the description of the present invention and simplify the description, and are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and the like are used solely for distinction and should not be construed as indicating or implying relative importance.

[0105] Furthermore, the term "identical" and similar terms do not necessarily require that the components be absolutely identical; slight variations are permitted. The term "perpendicular" simply refers to the positional relationship between components being more perpendicular than "parallel," not that the structure must be perfectly vertical; rather, it can be slightly tilted.

[0106] See also Figure 1 The present invention provides a technical solution: a method for predicting the state of a new energy storage and energy supply lithium battery, which mainly includes the following three steps:

[0107] The test data set for this paper is derived from lithium battery test data from the University of Maryland. The test used an Arbin BT200 battery testing system to test the performance of a Samsung INR 18650-20R ternary lithium-ion battery with a rated capacity of 2Ah, a nominal voltage of 3.6V, a charge cut-off voltage of 4.2V, and a discharge cut-off voltage of 2.5V.

[0108] S1. Read the lithium battery dataset, construct the training sample set and test sample set in proportion, and perform normalization.

[0109] S2. Improve the crested porcupine algorithm ICPO through differential evolution theory, dynamic step size and weight adjustment strategy, and Levy flight mechanism.

[0110] S3. The core parameters of OSELM are optimized by improving the crested porcupine algorithm (ICPO) and applying it to the OSELM model. OSELM uses this set of optimized parameters for training, thereby reducing the errors on the training and test sets and obtaining the final state variable estimates.

[0111] Furthermore, the aforementioned S1 uses maximum value normalization to normalize the sample data, and the processing formula is as follows:

[0112]

[0113] Where x' is the normalized data. Normalization can be used to convert data in different ranges to the same dimension or range, thereby improving the efficiency and accuracy of model training.

[0114] Furthermore, the aforementioned S2 is the improved crested porcupine algorithm ICPO. This algorithm introduces multiple improved optimization strategies such as differential evolution, dynamic step size, weight decay, and Lévy flight on the basis of the traditional crested porcupine algorithm CPO, improves the first, second, and fourth defense mechanisms, and specifically includes the following steps:

[0115] S2.1, control parameter setting, including:

[0116] N: the size of the population, that is, the number of initial solutions in the algorithm;

[0117] Tmax: maximum number of iterations, that is, the maximum number of cycles of the algorithm;

[0118] lb, ub: lower and upper bounds of the search space, used to limit the value range of each solution;

[0119] dim: the dimension of the problem, which indicates the number of variables in the optimization problem;

[0120] f: objective function, used to evaluate the quality of each solution;

[0121] Nmin: minimum population size N min =0.8·N#(2);

[0122] Tf: control ratio of the third and fourth defense mechanisms;

[0123] S2.2. Initialize the population, randomly generate initial solutions, and calculate the fitness value of each solution:

[0124]

[0125] f i =f(X i )#(4)

[0126] Where N represents the size of the population, and rand(0,1) is a random number between (0,1) used to randomly initialize each individual in the population between the upper bound ub and the lower bound lb. i is the solution of the ith individual, f i is the fitness value, which is calculated by the objective function f.

[0127] Find the current optimal fitness Gb_Fit in the initial population and the global optimal solution

[0128] Gb_Fit=min(fitness)#(5)

[0129] Among them, fitness is the population fitness vector, expressed as fitness = [f1,f2,···,fN ];

[0130] S2.3, loop iteration, the number of executions of the loop is Tmax times, and the population is updated and the defense mechanism is adjusted in each loop.

[0131] S2.3.1, Dynamic Step Size and Weight Factor Update

[0132] Dynamic linear decay step size: The step size factor is used to control the moving distance of individual updates. By controlling the step size factor, the algorithm can balance global exploration and local development at different stages. The step size factor gradually decreases with the number of iterations. In the initial stage, a larger step size is maintained to enhance exploration capabilities, and the step size is gradually reduced in the later stages to improve convergence accuracy. The step size factor calculation formula is as follows:

[0133]

[0134] The step size step_factor(t) in formula (6) decreases linearly from 1.5 to 0.5 as the number of iterations t increases. The step size is large in the initial search to facilitate extensive exploration in the search space. In the later iterations, the step size is gradually reduced to ensure a more refined local search to accurately find the optimal solution.

[0135] Weight factor update: The weight factor is used to adjust the weight between global and local searches. As the number of iterations increases, the weight factor gradually decreases, and the algorithm gradually shifts to local search. Ultimately, the weight factor tends to a smaller value, allowing the algorithm to conduct a detailed search near the global optimum, improving convergence accuracy.

[0136] In this algorithm, the weight factor adopts exponential decay, and the calculation formula is as follows:

[0137]

[0138] In formula (7), the coefficient 0.9 is the initial weight value, indicating that the algorithm has a larger search step size in the initial stage, which is used to enhance the global search capability. The coefficient 0.5 is the decay rate, which is used to control the decay speed of the weight. A larger coefficient will cause the weight to decrease rapidly.

[0139] The calculation formula of dynamic step length based on fitness is as follows:

[0140]

[0141] In formula (8), ε is used to prevent division by zero errors.

[0142] S2.3.2, Exploration Phase

[0143] The exploration phase includes the first and second defense mechanisms.

[0144] This algorithm uses differential evolution to improve the first defense mechanism. It generates differential vectors based on the differential information of different individuals in the population, and then uses a dynamic step size and scaling factor to update the individual's position. This mechanism is an improved version of the classic differential evolution (DE) algorithm. Its goal is to generate new solutions through differential evolution strategies. The new solution is calculated as follows:

[0145]

[0146] In formula (9) are random solutions in the population. F is the differential scaling factor, a random number in the range [0.5, 1.0]. β = 0.01 is the perturbation factor, and N(0, 1) is a normally distributed random variable with mean 0 and standard deviation 1, which is used to introduce randomness. This mechanism generates new solutions by scaling the differences of random individuals and then adding the result to another random individual. This improvement in the algorithm facilitates the exploration of differences between individuals in the population, enhancing the algorithm's early exploration capabilities and global search capabilities, making it easier to escape local optima.

[0147] This algorithm uses fitness-guided jumping to improve the second defense mechanism, mainly targeting poor individuals, enabling them to escape from the local optimum faster.

[0148]

[0149] In formula (10), w(t) is a weight factor used to control the step size. The improved second defense mechanism updates individuals through better solutions in the neighborhood. In combination with a dynamic step size, the step size is adjusted based on the fitness value. Individuals with poor fitness will have larger jumps. This improvement in the algorithm further helps to balance the exploration and exploitation phases.

[0150] S2.3.3, Development Phase

[0151] The development stage mainly includes the third defense mechanism and the fourth defense mechanism.

[0152] In this algorithm, the third defense mechanism guides individuals to approach the global optimal solution by using weight factors, thereby enhancing local search capabilities. The individual position is updated according to the following formula:

[0153]

[0154] In formula (11), w(t) is a weight factor used to control the size of the step size, which gradually decreases as the number of iterations increases. is the global optimal solution in the current iteration.

[0155] In the fourth defense mechanism, this algorithm introduces a more complex random jump strategy through the Lévy flight operator. This mechanism simulates the flight paths of animals in nature when hunting, avoiding local search traps and increasing search diversity through long-distance jumps. The position update equation is as follows:

[0156]

[0157] Where L is the random step size generated by the Levy distribution, defined as:

[0158]

[0159] In formula (13), μ and ν are normally distributed random numbers. β is the Levy distribution coefficient used to control the shape of the Levy distribution.

[0160] This algorithm selects which defense mechanism to execute based on different probabilities. Specifically, it employs a two-layer random number judgment logic: the first layer compares the first generated random number 1 with the random number 2 to determine whether to enter the exploration phase (defense modes 1 and 2) or the development phase (defense modes 3 and 4). Once the program is in the exploration or development phase, the second layer of judgment logic is activated. If the program is in the exploration phase, the second generated random number 1 is compared with the random number 2 to determine whether to activate defense mode 1 or 2. If the program is in the development phase, the second generated random number is compared with the control ratio of the third and fourth defense mechanisms in the control parameter settings (Tf) to determine whether to activate defense mode 3 or 4.

[0161] S2.3.4, Fitness Calculation and Global Update: Each individual position is updated during the iteration process, and the fitness value of the updated individual position needs to be recalculated. If the fitness of the new solution is worse than the old solution, the old solution is retained; otherwise, it can be updated.

[0162] like but

[0163] like but

[0164]

[0165] Furthermore, after using the ICPO described in S2 to find the optimal parameters Xbest, S3 applies them to the OSELM model. The OSELM model is trained using this set of optimized input parameters and ultimately outputs the optimal prediction results. The goal of OSELM optimization is to minimize the error between the predicted values and the true values of the training and test data sets. The specific optimization process is as follows:

[0166] S3.1, OSELM parameter settings, including setting the number of neurons in the hidden layer nHiddenNeurons; activation function type Type; task type Elm_Type; the number of neurons in the input layer nInputNeurons; and the size of the data block block.

[0167] S3.2, the goal of OSELM is to minimize the prediction error by optimizing the input weights IW. Its steps are summarized as follows:

[0168] S3.2.1, input weight matrix IW and bias matrix Bias initialization:

[0169] The optimal input weight vector Xbest of OSELM is obtained through the ICPO algorithm described in S2 and converted into an m×n input weight matrix IW.

[0170]

[0171] m is the number of neurons in the hidden layer, nHiddenNeurons, and the number of neurons in the input layer, nInputNeurons.

[0172] wij represents the weight from the i-th hidden layer neuron to the j-th input feature.

[0173] Randomly generate a 1×nHiddenNeurons bias matrix Bias in the interval [0,1].

[0174] Bias=[b1,b2,b3,…,b nHiddenNeurons ]

[0175] S3.2.2, Output Calculation

[0176] According to the input data IN, the input weight matrix IW, and the bias vector Bias, the signal Z of the input to the hidden layer is calculated.

[0177] Z=IW·IN+Bias#(14)

[0178] Apply the activation function G to calculate the output matrix H of the hidden layer neurons.

[0179] H=G(Z)=G(W·IN+B)#(15)

[0180] The model's predicted output Y is calculated by the hidden layer output H and the output weight β. The formula is as follows:

[0181] Y=H·β#(16)

[0182] S3.2.3, Update output weights

[0183] The output weight β is solved by the least squares method to minimize the error between the predicted output Y and the true output T. The specific calculation process is as follows:

[0184] 1. The error between the predicted output Y and the true output T is calculated as follows:

[0185]

[0186] 2. Take the derivative of E(β)E and set the derivative to 0 to obtain the optimal solution β.

[0187]

[0188] H T H·β=H T ·T

[0189] β=(H T H) -1 H T ·T

[0190] S3.3 Further, using the mean absolute percentage error (MAPE), root mean square error (RMSE) and coefficient of determination (R 2 ) formula to calculate the OSELM error evaluation index:

[0191]

[0192]

[0193] In formula (18) and (19),

[0194] Yi is the output value predicted by the model;

[0195] Ti is the target output value;

[0196] n is the number of samples, that is, the total number of data points in the test set.

[0197] In formula (20) T i The arithmetic mean of

[0198] S3.4 simulates and tests the algorithm based on the Matlab R2023b platform to verify the performance of the algorithm (ICPO-OSELM) in lithium battery state prediction. The population size is set to 50 and the maximum number of iterations is 80.

[0199] The proposed algorithm (ICPO-OSELM) is used to predict the state of lithium batteries and compared with two algorithms: the online sequential extreme learning machine (OSELM) and the crown porcupine algorithm optimized online sequential extreme learning machine (CPO-OSELM). The results show that the average absolute percentage error (MAPE), root mean square error (RMSE) and coefficient of determination (R 2 ) are evaluated based on three indicators:

[0200]

[0201] From the simulation test results, the ICPO-OSELM algorithm has smaller mean absolute percentage error (MAPE) and root mean square error (RMSE) than OSELM and CPO-OSELM, and the coefficient of determination (R 2 ) is closer to 1, so the application of ICPO-OSELM to predict the state of lithium batteries is more accurate and the fitting effect is better.

[0202] The present invention also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any of the method steps described above when executing the computer program.

[0203] The present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the method steps as described above.

[0204] The embodiment of the present invention is a new energy storage and power supply lithium battery state prediction method, device, and storage medium based on the improved crown porcupine algorithm to optimize the online sequential extreme learning machine. Compared with the existing technology, it has the following beneficial effects: better performance in fitness value, especially in the global search and local optimization stages. The improved crown porcupine algorithm ICPO introduces mechanisms such as differential evolution, dynamic step size, and Levy flight, so that it can more effectively find the global optimal solution when processing complex data, and performs better in local accuracy, specifically in terms of mean absolute percentage error (MAPE), root mean square error (RMSE), and determination coefficient (R 2 ) and other evaluation indicators, lower errors and higher fitting degrees can be achieved, and the prediction results are more reliable.

[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. 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 purpose 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.

Claims

1. A method for predicting the state of a new energy storage and supply lithium battery, characterized by: The steps are as follows: S1. Read the lithium battery data set, construct the training sample set and the test sample set in proportion, and perform normalization. S2. Improve the crested porcupine algorithm ICPO through differential evolution theory, dynamic step size and weight adjustment strategy, and Levy flight mechanism; S3. Optimize the core parameters of OSELM by improving the ICPO algorithm, and apply the optimized core parameters of OSELM to OSELM for training.

2. The method, device, and storage medium for predicting the state of a new energy storage and supply lithium battery according to claim 1, characterized in that: The S1 uses maximum value normalization to normalize the sample data, and the processing formula is as follows: Among them, x' is the normalized data.

3. The method, device, and storage medium for predicting the state of a new energy storage and supply lithium battery according to claim 1, characterized in that: The specific steps of improving the crested porcupine algorithm ICPO in S2 are as follows: S2.1, Control parameter setting: N: the size of the population, that is, the number of initial solutions in the algorithm; Tmax: maximum number of iterations, that is, the maximum number of cycles of the algorithm; lb, ub: lower and upper bounds of the search space, used to limit the value range of each solution; dim: the dimension of the problem, which indicates the number of variables in the optimization problem; f: objective function, used to evaluate the quality of each solution; Nmin: minimum population size N min =0.8·N#(2); Tf: control ratio of the third and fourth defense mechanisms; S2.

2. Initialize the population, randomly generate initial solutions, and calculate the fitness value of each solution: f i =f(X i )#(4) Where N represents the size of the population, and rand(0,1) is a random number between (0,1) used to randomly initialize each individual in the population between the upper bound ub and the lower bound lb. i is the solution of the ith individual, f i is the fitness value, which is calculated by the objective function f. Find the current optimal fitness Gb-Fit and the global optimal solution in the initial population Gb-Fit=min(fitness)#(5) Among them, fitness is the population fitness vector, expressed as fitness = [f1,f2,···,f N ]; S2.3, loop iteration, the number of executions of the loop is Tmax times, and the population is updated and the defense mechanism is adjusted in each loop; S2.3.

1. Dynamic step size and weight factor update The linear attenuation step factor is calculated as follows: The formula for updating the exponential decay weight factor is as follows: The coefficient 0.9 in formula (7) is the initial weight value; The coefficient 0.5 is the decay rate; The calculation formula of dynamic step length based on fitness is as follows: In formula (8), ε is used to prevent division by zero errors. S2.3.2, Exploration Phase The exploration phase includes the first and second defense mechanisms; The differential vector is generated by the difference information of different individuals in the population, and the position of the individual is updated by combining the dynamic step size and scaling factor. The solution is generated by the differential evolution strategy. The calculation formula is as follows: In formula (9) are random solutions in the population. F is the differential scaling factor, a random number in the range [0.5, 1.0]. β = 0.01 is the perturbation factor, and N(0, 1) is a normally distributed random variable with mean 0 and standard deviation 1, used to introduce randomness. This algorithm improves the second defense mechanism based on neighborhood search, and its calculation formula is as follows; S2.3.3, Development Phase The development phase mainly includes the third and fourth defense mechanisms; In this algorithm, the third defense mechanism guides the individual to approach the global optimal solution by using the weight factor through the guidance of the global optimal solution. The calculation formula for updating the individual position is as follows: In formula (11) is the global optimal solution in the current iteration number t; In the fourth defense mechanism, this algorithm introduces a more complex random jump strategy through the Lévy flight operator; this mechanism simulates the flight path of animals in nature when hunting, avoiding local search traps by long-distance jumps. The position update equation is as follows: In formula (12), L is the random step size generated by the Levy distribution, which is defined as: In formula (13), μ and ν are normally distributed random numbers; β is the Levy distribution coefficient used to control the shape of the Levy distribution.

4. The method for predicting the state of a new energy storage and supply lithium battery according to claim 1, characterized in that: S3 uses the ICPO described in S2 to find the optimal parameter X best Finally, it is applied to the OSELM model. The specific optimization process is as follows: S3.1, OSELM parameter setting steps, including: Set the number of neurons in the hidden layer nHiddenNeurons; Activation function type Type; Task type Elm_Type; The number of input layer neurons nInputNeurons; The size of the data block; S3.2, the goal of OSELM is to minimize the prediction error by optimizing the input weights IW. Its steps are summarized as follows: S3.2.1, input weight matrix IW and bias matrix Bias initialization: The optimal input weight vector X of OSELM is obtained by the ICPO algorithm described in S2 best , and convert it into an m×n input weight matrix IW; m is the number of neurons in the hidden layer nHiddenNeurons, the number of neurons in the input layer nInputNeurons; wij represents the weight from the i-th hidden layer neuron to the j-th input feature; Randomly generate a 1×nHiddenNeurons bias matrix Bias in the interval [0,1]; <h2 style=";text-align:left;direction:ltr">Bias=[b1,b2,b3,…,b<h2 style=";text-align:left;direction:ltr"> nHiddenNeurons <h2 style=";text-align:left;direction:ltr"> ] S3.2.2, output calculation; According to the input data IN, the input weight matrix IW, and the bias vector Bias, the signal Z of the hidden layer input to the hidden layer is calculated; Z=IW·IN+Bias#(14) Apply the activation function G to calculate the output matrix H of the hidden layer neurons; H=G(Z)=G(W·IN+B)#(15) The model's predicted output Y is calculated by the hidden layer output H and the output weight β. The formula is as follows: Y=H·β#(16) S3.2.3, update output weights; The output weight β is solved by the least squares method to minimize the error between the predicted output Y and the true output T. The specific calculation process is as follows:

1. The error between the predicted output Y and the true output T is calculated as follows:

2. Derivative E(β)E and set the derivative to 0 to obtain the optimal solution β; H T H·β=H T ·T β=(H T H) -1 H T ·T S3.3 uses mean absolute percentage error (MAPE), root mean square error (RMSE) and coefficient of determination (R 2 ) formula to calculate the OSELM error evaluation index: In formula (18) and (19), Yi is the output value predicted by the model; Ti is the target output value; n is the number of samples, that is, the total number of data points in the test set. In formula (20) T i The arithmetic mean of 5. A device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps of the new energy storage and energy supply lithium battery status prediction method as described in any one of claims 1 to 4.

6. A storage medium, characterized in that: The read storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the steps of the new energy storage and energy supply lithium battery status prediction method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Photovoltaic short-term generation power combined prediction method, system, equipment and medium

    CN118801343A

  • Load prediction method, system and device based on CPO-VMD-MLKELM combination model and medium

    CN119940980A

  • Short-term photovoltaic power prediction method for optimizing bidirectional gating circulation unit based on improved crown porcupine algorithm

    CN120090163A

  • Method and apparatus for estimating SOH of lithium battery

    WO2024016496A1