Battery charge state prediction method, medium and equipment

By improving the Gray Wolf algorithm to optimize the support vector regression model and optimizing the optimal key parameters, the problem of low battery state of charge prediction accuracy is solved, and accurate monitoring of the real-time battery state of charge and guaranteeing safe and stable operation of the battery is achieved.

CN119224581APending Publication Date: 2024-12-31ELECTRIC POWER RES INST OF GUANGXI POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411026953.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing battery state of charge prediction methods have the problem of low accuracy, especially because the prediction effect of the support vector regression model is affected by key parameters, making it difficult to accurately monitor the real-time state of charge of the battery, affecting the safe and reliable operation of the battery.

Method used

The improved Gray Wolf algorithm is used to optimize the support vector regression model. By obtaining the state quantity data during the historical charging and discharging of the battery, data preprocessing and building a model, finding the optimal key parameters, and establishing the optimal prediction model for battery charging. Prediction of status.

Benefits of technology

The prediction accuracy of the battery's state of charge is improved, and the accurate estimation of the real-time state of charge is achieved, ensuring the safe and stable operation of the battery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119224581A_ABST
    Figure CN119224581A_ABST
Patent Text Reader

Abstract

The invention discloses a battery state-of-charge prediction method, which relates to the technical field of batteries, and comprises the following steps of: acquiring state quantity data in a historical charging and discharging process of a battery, constructing a data set, and performing standardized preprocessing on the state quantity data in the data set to obtain preprocessed data; constructing a support vector regression model based on the preprocessed data, performing search optimization on key parameters of the support vector regression model by adopting an improved grey wolf optimization algorithm to obtain optimal key parameters, assigning the optimal key parameters to the support vector regression model to obtain an optimal prediction model, and performing prediction on the optimal prediction model. And predicting the state of charge of the battery by adopting the optimal prediction model. The method can monitor the real-time charge state of the battery and guarantee safe and stable operation of the battery, and can effectively improve the prediction precision of the charge state of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery technology, and in particular to a battery state of charge prediction method, medium and device. Background Art

[0002] With the development of the times, battery technology has also developed rapidly with the advancement of science and technology. Batteries have been applied in many fields such as new energy vehicles and power grid systems, bringing convenience to people's lives. Among them, the state of charge (SOC) of the battery reflects the remaining capacity of the battery. Accurate battery SOC prediction is of great significance for monitoring the real-time status of the battery and ensuring the safe and reliable operation of the battery. However, the battery SOC cannot be measured directly, but can only be calculated through parameters such as battery voltage and current.

[0003] At present, scholars have conducted a lot of research on battery SOC prediction. There are three main methods for battery SOC prediction: the first is to use traditional test methods such as ampere-hour integration method and open circuit voltage method, which are difficult to use in engineering; the second method is to establish an equivalent model of the battery for SOC prediction, but the battery model is not easy to establish and the parameters of the model are difficult to determine; the third is a data-driven SOC prediction method, which uses neural networks, vector machines, regression models, etc. to predict and estimate SOC. Among them, the Support Vector Regression (SVR) model in the regression model has the advantages of strong nonlinear mapping ability and fast convergence speed, so it is often used in the prediction and estimation of battery SOC, but the prediction effect of the SVR model will be affected by key parameters, resulting in low prediction accuracy of battery SOC. Summary of the invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a battery state of charge prediction method, which can monitor the real-time state of charge of the battery, ensure the safe and stable operation of the battery, and effectively improve the prediction accuracy of the battery state of charge.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions, a method for predicting the state of charge of a battery, comprising:

[0007] The state quantity data of the battery in the historical charging and discharging process is obtained and a data set is constructed. The state quantity data in the data set is standardized and preprocessed to obtain the preprocessed data, and a support vector regression model is constructed based on the preprocessed data; the improved gray wolf algorithm is used to calculate the individual fitness of the initial wolf pack and hunt and surround the target in the gray wolf population, and the position of each gray wolf is updated through the process of surrounding and hunting by the gray wolf population to obtain an updated wolf pack; the improved gray wolf algorithm is used to search and optimize the key parameters of the support vector regression model to obtain the optimal key parameters; the optimal key parameters are assigned to the support vector regression model to obtain the optimal prediction model, and the optimal prediction model is used to predict the battery state of charge.

[0008] As a preferred solution of the battery state of charge prediction method described in the present invention, the state quantity in the historical charge and discharge process includes extracting the ambient temperature, terminal voltage and discharge current data at different time points in the battery charge and discharge cycle through the collected battery data set;

[0009] The constructing of the data set includes calculating the state of charge according to the extracted ambient temperature, terminal voltage and discharge current data, disrupting the sequence of time points and establishing the data set.

[0010] As a preferred solution of a battery state of charge prediction method described in the present invention, the preprocessing includes checking the state quantity data in the data set, deleting erroneous data and completing missing data to obtain an initial data set. The specific formula is as follows:

[0011]

[0012] Perform Z-Score standardization on the data x in the initial data set to obtain the preprocessed data x * ; where μ and σ are the mean and standard deviation of the data in the initial data set, respectively.

[0013] As a preferred embodiment of the battery state of charge prediction method described in the present invention, the construction of the support vector regression model includes taking the ambient temperature, terminal voltage and discharge current data in the preprocessed data as input and the state of charge as output to construct the support vector regression model.

[0014] As a preferred solution of the battery state of charge prediction method described in the present invention, wherein: obtaining the optimal key parameters includes initializing the algorithm parameters of the improved grey wolf algorithm and the key parameters of the support vector regression model;

[0015] The algorithm parameters include wolf pack size and maximum number of iterations, generating an initial wolf pack and calculating the individual fitness of the initial wolf pack.

[0016] As a preferred solution of a battery state of charge prediction method described in the present invention, the individual fitness of the initial wolf pack includes, after the initial wolf pack is generated, using Skew-Tent mapping:

[0017]

[0018] in, is a mapping parameter, with a value between 0 and 1; T i and T' i are the positions of the i-th sample in the initial wolf pack before and after mapping;

[0019] The population is initialized, and the individual fitness of the initial wolf pack is calculated based on the initialized population. The individual fitness is determined based on the root mean square error (RMSE) between the model prediction results and the actual results. The RMSE is inversely proportional to the individual fitness. After calculating the individual fitness of the initial wolf pack, the individual fitness values ​​are sorted from small to large to obtain the optimal solution α wolf, the second optimal solution β wolf and the third optimal solution δ wolf in the initial wolf pack, and hunting and encirclement of the target are carried out in the gray wolf population.

[0020] As a preferred solution of a battery state of charge prediction method according to the present invention, the hunting and encircling target behaviors include: the hunting and gradually encircling target behaviors of the gray wolf population are expressed as:

[0021] D=|C·Xp(t)-X(t)|

[0022] X(t+1)=Xp(t)-A×D

[0023] Where D is the straight-line distance between the gray wolf individual and the target, A and C are position variables, t is the number of iterations so far, Xp(t) is the position vector of the target, X(t) is the position of the gray wolf individual at the iteration, and X(t+1) is the position of the gray wolf individual at the t+1 iteration;

[0024] Based on the positions of α wolf, β wolf and δ wolf, the position of each gray wolf is updated through the process of surrounding and hunting by the gray wolf population to obtain an updated wolf pack.

[0025] As a preferred solution of a battery state of charge prediction method according to the present invention, the obtaining of the updated wolf pack includes retaining the positions of α wolf, β wolf and δ wolf, and the specific formula is:

[0026]

[0027] in, are the distances between α wolf, β wolf and δ wolf and the remaining gray wolf individuals; is a random vector; are the positions of α wolf, β wolf and δ wolf respectively; is the current position of the gray wolf; are the target positions of the gray wolf moving towards wolf α, wolf β and wolf δ respectively; A is the position variable; Best position in history for the Gray Wolves; is the distance between the current position of the gray wolf and the best historical position; miu is the step size control factor, Levy(s) is the Levy random search path; for the locations of the remaining gray wolves; obtain updated wolf packs;

[0028] Obtain an updated wolf pack, change the selection of α wolf, β wolf and δ wolf, recalculate the fitness of the updated individual wolf pack, and determine the new α wolf, β wolf and δ wolf;

[0029] When the number of iterations reaches the maximum number of iterations, the optimal key parameters of the support vector regression model are output according to the new α wolf position;

[0030] Determine whether the maximum number of iterations has been reached. If not, repeat the update steps until the maximum number of iterations has been reached, and output the optimal value of the key parameters according to the current α wolf position;

[0031] Assign the optimal key parameters to the support vector regression model to obtain the optimal prediction model;

[0032] The key parameters include, c regularization parameter and g influence range parameter of a single training sample;

[0033] After obtaining the optimal key parameters, they are assigned to the support vector regression model to obtain the optimal prediction model, which is to optimize the IGWO-SVR model for the improved Grey Wolf Algorithm; after obtaining the IGWO-SVR model, the data of the validation set are substituted into the IGWO-SVR model to predict the battery SOC, and the SOC prediction value of the IGWO-SVR model is compared with the actual SOC value. The optimal prediction model is used to predict the battery state of charge, and the latest measured data of the battery's ambient temperature, terminal voltage and discharge current data are substituted into the optimal prediction model to obtain the predicted value of the battery SOC.

[0034] A computer-readable storage medium stores a computer program, which implements the battery state of charge prediction method when executed by a processor.

[0035] A computer device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the battery state of charge prediction method.

[0036] The beneficial effects of the present invention are as follows: a method, medium and device for predicting the state of charge of a battery are provided, and state quantity data measured during the historical charging and discharging process of the battery are obtained, including ambient temperature, terminal voltage, discharge current and state of charge; then the state quantity data are preprocessed and an optimal prediction model based on the improved grey wolf algorithm to optimize the support vector regression model is constructed. A support vector regression model is established based on the relationship between the three battery characteristics of ambient temperature, terminal voltage and discharge current measured during the historical charging and discharging process of the battery and the corresponding state of charge. Subsequently, the historical data is substituted into the support vector regression model for training, and the optimal prediction model is obtained after the training is completed. The real-time state of charge of the battery is estimated and predicted by the accurate optimal prediction model, and the measured state quantity data is used to accurately estimate the state of charge of the battery under different states, providing a basis for monitoring the real-time state of charge of the battery and ensuring the safe and stable operation of the battery. Therefore, a method, product, medium and device for predicting the state of charge of a battery provided by the present invention can effectively improve the prediction accuracy of the state of charge of the battery. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0038] Figure 1 A schematic flow chart of a method for predicting a battery state of charge is provided in accordance with an embodiment of the present invention.

[0039] Figure 2 A schematic flow chart of optimizing an SVR model using an improved grey wolf algorithm for a battery state of charge prediction method provided by an embodiment of the present invention.

[0040] Figure 3 A comparison diagram of a predicted SOC value and an actual SOC value of a battery state of charge prediction method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] 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.

[0042] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0043] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0044] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0045] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0046] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0047] Example 1, reference Figure 1-Figure 3 , which is the first embodiment of the present invention, provides a method for predicting a battery state of charge, comprising:

[0048] Step 1: Obtain the state quantity data of the battery during the historical charging and discharging process and construct a data set.

[0049] The present invention uses the battery data set disclosed by NASA to extract the ambient temperature, terminal voltage and discharge current data at different time points during dozens of charge and discharge cycles of No. 5 batteries in the battery data set and calculate the state of charge and other state quantity data at the corresponding time. Then, the time point order of the state quantity data acquisition is disrupted and a data set is established.

[0050] Step 2: Perform standardization preprocessing on the state quantity data in the data set to obtain preprocessed data.

[0051] The state quantity data such as ambient temperature, terminal voltage, discharge current and state of charge in the data set are carefully checked, and obviously erroneous data are deleted and missing data are supplemented to obtain the initial data set. Since the dimensions of different categories of data are different and the values ​​vary greatly, formula (1) is used for Z-Score standardization to eliminate the differences between different types of data.

[0052]

[0053] Among them, x is the data in the initial data set; x * is the preprocessed data; μ and σ are the mean and standard deviation of the data in the initial data set respectively; after the state quantity data is normalized by Z-Score, the training set and the validation set are divided into 80% and 20% respectively.

[0054] Step 3: Build a support vector regression model based on the preprocessed data.

[0055] The input features of the support vector regression model constructed by the present invention are the ambient temperature, terminal voltage and discharge current data in the preprocessed data, and the output of the support vector regression model is the charge state of the battery.

[0056] Step 4: Use the improved grey wolf algorithm to search and optimize the key parameters of the support vector regression model to obtain the optimal key parameters.

[0057] The key parameters include, c regularization parameter and g influence range parameter of a single training sample;

[0058] like Figure 2As shown, for the support vector regression model based on the radial basis function kernel, the values ​​of the key parameter penalty factor c and the radial basis function kernel parameter g play a key role in the training effect of the support vector regression model. The present invention uses the Improved Grey Wolf Optimizer (IGWO) to iteratively search and optimize the penalty factor c and the radial basis function kernel parameter g of the SVR model, find the optimal solution of the key parameters to obtain the optimal prediction model to improve the effect of the SVR model prediction. The penalty factor c and the radial basis function kernel parameter g of the SVR model exist in the position information of the gray wolf. The optimal gray wolf position is found by optimizing the improved gray wolf algorithm, so as to find the values ​​of the penalty factor c and the radial basis function kernel parameter g that make the SVR model more effective.

[0059] The step 4 specifically includes:

[0060] Step 4.1: Initialize the algorithm parameters of the improved grey wolf algorithm and the key parameters of the support vector regression model.

[0061] After inputting data into the SVR model, the algorithm parameters of the IGWO algorithm are assigned, including the wolf pack size and the maximum number of iterations. The penalty factor c and the radial basis function kernel parameter g of the SVR model are initialized. The wolf pack size is the number of individuals in the specified population, and the maximum number of iterations is the number of iterations that can be optimized. The penalty factor c and the radial basis function kernel parameter g of the SVR model are initialized.

[0062] Step 4.2: Generate an initial wolf pack and calculate the individual fitness of the initial wolf pack.

[0063] After the initial wolf pack is generated, the Skew-Tent mapping is used to generate a chaotic sequence to initialize the population of the IGWO algorithm and obtain the initialized population. The mathematical expression of the process of generating a chaotic sequence based on the Skew-Tent mapping is as follows:

[0064]

[0065] in, is a mapping parameter, with a value between 0 and 1; T i and T' i are the positions of the i-th sample in the initial wolf pack before and after mapping. The Skew-Tent mapping is used to initialize the population. The positions of the individuals in the population are first randomly initialized, and then mapped according to the mapping formula, so that the individual distribution under different iterations is more uniform. Subsequently, the individual fitness of the initial wolf pack is calculated based on the initialized population. RMSE is used as the fitness function in the invention. The smaller the RMSE, the better the effect of the individual parameters in the model.

[0066] Step 4.3: Sort the individual fitness values ​​from small to large to find the optimal solution α wolf, the second optimal solution β wolf and the third solution δ wolf.

[0067] The individual fitness is determined by the root mean square error (RMSE) between the model prediction result and the actual result. The smaller the RMSE, the greater the individual fitness. After calculating the individual fitness of the initial wolf pack, sort them from small to large according to the individual fitness value, and thus find the α wolf, β wolf and δ wolf in the initial wolf pack. Among them, the α wolf represents the optimal solution, the β wolf represents the second optimal solution, and the δ wolf represents the third optimal solution.

[0068] Step 4.4: Based on the positions of wolf α, wolf β, and wolf δ, the position of each gray wolf is updated through the process of gray wolf population encirclement and hunting to obtain an updated wolf pack.

[0069] The behavior of the gray wolf population hunting and gradually surrounding the target can be expressed as:

[0070] D=|C·Xp(t)-X(t)| (3)

[0071] X(t+1)=Xp(t)-A×D (4)

[0072] Among them, D is the straight-line distance between the gray wolf individual and the target; A and C are position variables; t is the number of iterations so far; Xp(t) is the position vector of the target; X(t) is the position of the gray wolf individual during the iteration; X(t+1) refers to the position of the gray wolf individual at the t+1 iteration.

[0073] During the hunting process of the gray wolf population, the remaining gray wolves approached the prey under the guidance of α wolf, β wolf and δ wolf, so the positions of these three wolves are kept unchanged, and the positions of the remaining gray wolf individuals are updated:

[0074]

[0075]

[0076] in, are the distances between α wolf, β wolf and δ wolf and the remaining gray wolf individuals; is a random vector; are the positions of α wolf, β wolf and δ wolf respectively; is the current position of the gray wolf; are the target positions of the gray wolf moving towards wolf α, wolf β and wolf δ respectively; A is the position variable; Best position in history for the Gray Wolves; is the distance between the current position of the gray wolf and the best historical position; miu is the step size control factor, Levy(s) is the Levy random search path; is the position of the remaining gray wolves. By using the Levy flight strategy, we can jump out of the local optimal solution and obtain the updated wolf pack.

[0077] Step 4.5: Calculate the individual fitness of the updated wolf pack and determine the new α wolf, β wolf, and δ wolf.

[0078] After obtaining the updated wolf pack through step 4.4, the selection of α wolf, β wolf and δ wolf must also be changed, so the individual fitness of the updated wolf pack is recalculated to determine the new α wolf, β wolf and δ wolf.

[0079] Step 4.6: When the number of iterations reaches the maximum number of iterations, the optimal key parameters of the support vector regression model are output according to the new position of the α wolf.

[0080] Determine whether the maximum number of iterations has been reached. If not, repeat steps 4.4 to 4.5 until the maximum number of iterations has been reached. Output the optimal value of the key parameter based on the position of the α wolf at this time.

[0081] Step 5: Assign the optimal key parameters to the support vector regression model to obtain the optimal prediction model.

[0082] The data used in the above step 4 is the training set divided in step 1. After obtaining the optimal key parameters, the values ​​are assigned to the support vector regression model to obtain the optimal prediction model, which is the improved grey wolf algorithm optimized SVR (IGWO-SVR) model.

[0083] After obtaining the IGWO-SVR model, substitute the data of the validation set into the IGWO-SVR model to predict the battery SOC, and compare the SOC prediction value obtained by the IGWO-SVR model with the actual SOC value. The comparison chart is as follows: Figure 3 As shown by Figure 3 It can be seen that the SOC prediction value is very close to the actual SOC value, which shows that the IGWO-SVR model is effective in SOC prediction.

[0084] Step 6: Use the optimal prediction model to predict the battery state of charge.

[0085] The latest measured data of the battery's ambient temperature, terminal voltage and discharge current are substituted into the optimal prediction model to obtain the predicted value of the battery SOC.

[0086] In summary, the battery state of charge prediction method described in the present invention can directly use the optimal prediction model to estimate the battery SOC in real time according to the three data of ambient temperature, terminal voltage and discharge current measured in real time, thereby effectively improving the efficiency and accuracy of battery SOC prediction.

[0087] Embodiment 2, the second embodiment of the present invention, is different from the first embodiment in that:

[0088] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0089] 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.

[0090] 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.

[0091] 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 1 The steps for the functions specified in one or more boxes.

[0092] 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.

[0093] 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.

[0094] Example 3, reference Figure 3 , which is an embodiment of the present invention, provides a method for predicting the state of charge of a battery. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments;

[0095] This experiment uses the measured battery data published by NASA as the experimental data set. There are several types of data in the battery data set, namely ambient temperature, terminal voltage, discharge current, and the state of charge SOC value obtained by calculation. These four data exist at each time point. For the prediction model, the input and output are shown in the table:

[0096]

[0097] The prediction effect of the SVR model is related to the two parameters c and g in the initial parameters set during training. If the values ​​of c and g are not good, the prediction effect of the SVR model will be relatively poor. Manual value selection is very troublesome and complicated and not necessarily reliable. Therefore, the improved gray wolf algorithm is introduced to help the SVR model find suitable values ​​for c and g parameters, so as to improve the prediction effect of the SVR model.

[0098] The data at different time points in the battery data set (each time point corresponds to four data at that moment) are selected and shuffled (even if the order is shuffled, the corresponding relationship of the data at the same time point will not change), most of them (training set) are used to train the model, and a small part (test set) is used to verify the performance accuracy of the model.

[0099] First, the c and g parameters are used as the solution sought by the improved gray wolf algorithm, and the improved gray wolf algorithm is iteratively optimized. In the optimization process, the training set data is used to calculate the fitness. The fitness is calculated by putting the c and g values ​​in the solution represented by the gray wolf individual into the SVR model, and then using the training set to train the SVR. After the training is completed, the training set is used to predict the SVR, and the RMSE root mean square error of the actual SOC value and the predicted value of the training set is used to measure the fitness. The smaller the RMSE, the greater the fitness of the gray wolf individual, indicating that c and g are better at this time. With the iterative optimization of the improved gray wolf algorithm, the c and g values ​​in the solution represented by the updated gray wolf individual make the RMSE of the SVR model smaller and smaller, which is more and more suitable for SVR prediction. Finally, the c and g values ​​in the optimal solution searched by the improved gray wolf algorithm are the c and g parameters that can make SVR perform best in the training set prediction.

[0100] The optimal c and g parameters obtained by the improved gray wolf algorithm are put into the SVR model and retrained with the training set. After the model training is completed, the three features at different time points in the test set are input into the model to obtain the SOC value predicted by the model at that time point, and then the predicted SOC value is compared with the actual SOC to illustrate the performance of the model.

[0101] 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.

Claims

1. A method for predicting a battery state of charge, characterized in that: include, Obtain the state quantity data of the battery in the historical charging and discharging process and construct a data set, perform standardized preprocessing on the state quantity data in the data set to obtain the preprocessed data, and construct a support vector regression model based on the preprocessed data; The improved gray wolf algorithm calculates the individual fitness of the initial wolf pack and performs hunting and encircling target behaviors in the gray wolf population. The position of each gray wolf is updated through the process of encirclement and hunting by the gray wolf population to obtain the updated wolf pack. The improved grey wolf algorithm is used to search and optimize the key parameters of the support vector regression model to obtain the optimal key parameters; The optimal key parameters are assigned to the support vector regression model to obtain the optimal prediction model, and the battery state of charge is predicted using the optimal prediction model.

2. A battery state of charge prediction method as claimed in claim 1, characterized in that: The state quantity in the historical charge and discharge process includes extracting the ambient temperature, terminal voltage and discharge current data at different time points in the battery charge and discharge cycle through the collected battery data set; The constructing of the data set includes calculating the state of charge according to the extracted ambient temperature, terminal voltage and discharge current data, disrupting the sequence of time points and establishing the data set.

3. A method for predicting a battery state of charge according to claim 2, characterized in that: The preprocessing includes checking the state quantity data in the data set, deleting the erroneous data and completing the missing data to obtain the initial data set. The specific formula is as follows: Perform Z-Score standardization on the data x in the initial data set to obtain the preprocessed data x * ; where μ and σ are the mean and standard deviation of the data in the initial data set, respectively.

4. A method for predicting a battery state of charge according to claim 3, characterized in that: The constructing of the support vector regression model includes taking the ambient temperature, terminal voltage and discharge current data in the preprocessed data as input and taking the state of charge as output to construct the support vector regression model.

5. A method for predicting a battery state of charge according to claim 4, characterized in that: The obtaining of the optimal key parameters includes initializing the algorithm parameters of the improved grey wolf algorithm and the key parameters of the support vector regression model; The algorithm parameters include wolf pack size and maximum number of iterations, generating an initial wolf pack and calculating the individual fitness of the initial wolf pack.

6. A battery state of charge prediction method as claimed in claim 5, characterized in that: The individual fitness of the initial wolf pack includes, after the initial wolf pack is generated, using Skew-Tent mapping: in, is a mapping parameter, with a value between 0 and 1; T i and T' i are the positions of the i-th sample in the initial wolf pack before and after mapping; The population is initialized, and the individual fitness of the initial wolf pack is calculated based on the initialized population. The individual fitness is determined based on the root mean square error (RMSE) between the model prediction results and the actual results. The RMSE is inversely proportional to the individual fitness. After calculating the individual fitness of the initial wolf pack, the individual fitness values ​​are sorted from small to large to obtain the optimal solution α wolf, the second optimal solution β wolf and the third optimal solution δ wolf in the initial wolf pack, and hunting and encirclement of the target are carried out in the gray wolf population.

7. A battery state of charge prediction method as claimed in claim 6, characterized in that: The hunting and encircling target behaviors include that the gray wolf population hunts and gradually encircles the target as follows: D=|C·Xp(t)-X(t)| X(t+1)=Xp(t)-A×D Where D is the straight-line distance between the gray wolf individual and the target, A and C are position variables, t is the number of iterations so far, Xp(t) is the position vector of the target, X(t) is the position of the gray wolf individual at the iteration, and X(t+1) is the position of the gray wolf individual at the t+1 iteration; Based on the positions of α wolf, β wolf and δ wolf, the position of each gray wolf is updated through the process of surrounding and hunting by the gray wolf population to obtain an updated wolf pack.

8. A battery state of charge prediction method as claimed in claim 7, characterized in that: The updated wolf pack is obtained by retaining the positions of α wolf, β wolf and δ wolf. The specific formula is: in, are the distances between α wolf, β wolf and δ wolf and the remaining gray wolf individuals; is a random vector; are the positions of α wolf, β wolf and δ wolf respectively; is the current position of the gray wolf; are the target positions of the gray wolf moving towards wolf α, wolf β and wolf δ respectively; A is the position variable; Best position in history for the Gray Wolves; is the distance between the current position of the gray wolf and the best historical position; miu is the step size control factor, Levy(s) is the Levy random search path; for the locations of the remaining gray wolves; obtain updated wolf packs; Obtain an updated wolf pack, change the selection of α wolf, β wolf and δ wolf, recalculate the fitness of the updated individual wolf pack, and determine the new α wolf, β wolf and δ wolf; When the number of iterations reaches the maximum number of iterations, the optimal key parameters of the support vector regression model are output according to the new α wolf position; Determine whether the maximum number of iterations has been reached. If not, repeat the update steps until the maximum number of iterations has been reached, and output the optimal value of the key parameters according to the current α wolf position; Assign the optimal key parameters to the support vector regression model to obtain the optimal prediction model; The key parameters include, c regularization parameter and g influence range parameter of a single training sample; After obtaining the optimal key parameters, they are assigned to the support vector regression model to obtain the optimal prediction model, which is to optimize the IGWO-SVR model for the improved Grey Wolf Algorithm; after obtaining the IGWO-SVR model, the data of the validation set are substituted into the IGWO-SVR model to predict the battery SOC, and the SOC prediction value of the IGWO-SVR model is compared with the actual SOC value. The optimal prediction model is used to predict the battery state of charge, and the latest measured data of the battery's ambient temperature, terminal voltage and discharge current data are substituted into the optimal prediction model to obtain the predicted value of the battery SOC.

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 8 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 8 are implemented.