Cross-battery state of charge prediction method, prediction device and storage medium
By using the GWO algorithm to train the LSTM model and the RBF-SVM online PA algorithm in the battery management system, combined with online transfer learning, a cross-battery state of charge combination model is formed, which solves the problem of model sharing between different batteries and improves the accuracy and safety of state of charge prediction.
Patent Information
- Application Number
- CN202210444059.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-04-26
AI Technical Summary
The existing SOC prediction algorithm cannot share the same model in different batteries, resulting in the battery management system requiring a large amount of computing resources and being unable to process battery performance changes in real time, posing a safety hazard.
An offline prediction state of charge model based on the GWO algorithm to train the LSTM model is adopted, and the online PA algorithm of RBF-SVM is combined for online learning. The offline and online models are combined through online transfer learning to form a cross-battery prediction state of charge combination model.
The availability and accuracy of the same model among different batteries are achieved, the accuracy of state of charge prediction is improved, and the safety risks of battery overcharging and over-discharging are reduced.
Smart Images

Figure CN114879058B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicles, and in particular to a method, a device and a storage medium for predicting a state of charge of a battery. Background Art
[0002] With the increasing global awareness of environmental protection, more and more people choose electric vehicles (EVs) when buying cars, which makes electric vehicles more and more popular.
[0003] The core component of electric vehicles is the power battery, and its safety management system plays a crucial role in safety management in the electric vehicle industry. To effectively protect the power battery, most electric vehicles are equipped with a BMS (Battery Management System). The BMS is the core of an electric vehicle's power battery, monitoring and managing the battery. By collecting and calculating parameters such as voltage, current, temperature, power, and State of Charge (SOC), it controls the battery's charge and discharge processes, protects the battery, and improves its overall performance. This management system is a crucial link between the on-board power battery and the electric vehicle. The SOC indicator is one of the core monitoring indicators in the battery management system. As the battery's state of charge, it describes the percentage of the battery's remaining capacity. Accurately predicting the remaining capacity during the battery's charge or discharge process can prevent overcharging and over-discharging, thereby reducing the incidence of safety incidents such as battery explosions caused by overcharging and over-discharging.
[0004] Existing SOC estimation algorithms primarily include open-loop and closed-loop algorithms. Open-loop algorithms primarily include the ampere-hour integration method, the open-circuit voltage method, and neural network methods, while closed-loop algorithms primarily include the Kalman filter, particle filter, and sliding film observer. In real-world applications, these algorithms primarily combine open-loop and closed-loop methods, using equivalent circuit-based ampere-hour integration with an extended Kalman filter, big data-driven neural network algorithms, and algorithms that fuse and improve multiple algorithms. Currently, big data-driven algorithms are limited to offline processes, where models are trained offline and then deployed and regularly iterated online. However, in battery management systems, battery data is continuously generated and battery performance constantly changes, requiring real-time data processing, analysis, and learning. Offline methods often lag in monitoring real-time changes in battery performance. Furthermore, the distribution of battery parameters varies among different batteries. Training a separate model for each battery in a large population would require significant computational effort.
[0005] Therefore, how to share the same model in different batteries is also an urgent problem that needs to be solved. Summary of the Invention
[0006] The embodiments of the present invention aim to provide a method, device, and storage medium for predicting the state of charge of a battery, which can solve the existing problem that the same model cannot be used to predict the state of charge of different batteries.
[0007] To solve the above technical problems, a first embodiment of the present invention provides a method for predicting the state of charge of a battery, the method comprising:
[0008] determining an offline predicted state of charge model based on charging data of the first battery;
[0009] determining an online prediction state of charge model based on charging data of the second battery;
[0010] Combining the offline state-of-charge prediction model and the online state-of-charge prediction model through online transfer learning to determine a combined state-of-charge prediction model;
[0011] The state of charge of the second battery is predicted based on the predicted state of charge combination model.
[0012] Optionally, determining the offline state-of-charge prediction model based on the charging data of the first battery includes: using a GWO algorithm to train an LSTM model using the charging data of the first battery to determine the offline state-of-charge prediction model.
[0013] Optionally, the adopting of the GWO algorithm to train an LSTM model using charging data of the first battery to determine an offline prediction state of charge model includes:
[0014] Determine the optimal parameters of the LSTM model using the GWO algorithm;
[0015] According to the optimal parameters of the LSTM model, the charging data of the first battery is used to train the LSTM model to determine an offline prediction state of charge model.
[0016] Optionally, according to the optimal parameters of the LSTM model, the charging data of the first battery is used to train the LSTM model to determine an offline state of charge prediction model, including:
[0017] According to the optimal parameters of the LSTM model, determine the parameters to be trained for the LSTM model;
[0018] The charging data of the first battery is used to train the LSTM model to determine an offline prediction state of charge model.
[0019] Optionally, the adopting the charging data of the first battery to train the LSTM model to determine the offline prediction state of charge model includes:
[0020] The charging data of the first battery is used as a training sample, and the input features are extracted and input into the input layer of the LSTM model. The training results are output in the output layer based on the number of network nodes and learning rate data of the hidden layer.
[0021] According to the output training results, an offline prediction state of charge model is determined.
[0022] Optionally, determining an online prediction state of charge model based on the charging data of the second battery includes: adopting an online PA algorithm based on RBF-SVM, and using the RBF-SVM model to online learn the charging data of the second battery to determine the online prediction state of charge model.
[0023] Optionally, the online PA algorithm based on RBF-SVM is adopted, and the RBF-SVM model online learns the charging data of the second battery to determine an online prediction state of charge model; including:
[0024] Determine the RBF-SVM model through the RBF-SVM online PA algorithm;
[0025] The RBF-SVM model is used to online learn the charging data of the second battery and determine the online prediction state of charge model.
[0026] Optionally, combining the offline state-of-charge prediction model and the online state-of-charge prediction model through online transfer learning to determine a combined state-of-charge prediction model includes:
[0027] Combining the offline predicted state of charge model and the online predicted state of charge model with initial preset weights through online transfer learning to determine a predicted state of charge combination model;
[0028] Iteratively testing the combined state-of-charge prediction model using partial charging data of the second battery, and continuously adjusting the weights of the offline state-of-charge prediction model and the online state-of-charge prediction model during the iterative process based on the difference between the predicted result and the actual result, so as to optimize the prediction result of the combined state-of-charge prediction model;
[0029] The weight ratio of the optimal prediction result is selected from the prediction results of the state of charge prediction combination model as the final weight ratio to determine the final state of charge prediction combination model.
[0030] An embodiment of the second aspect of the present invention provides a device for predicting the state of charge across batteries, the device comprising at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the device to perform the steps of the method for predicting the state of charge across batteries described in the embodiment of the first aspect of the present invention.
[0031] An embodiment of the third aspect of the present invention provides a computer storage medium, on which is stored a computer program for a method for predicting the state of charge across batteries. When the computer program is executed by a processor, the steps of the method for predicting the state of charge across batteries described in the embodiment of the first aspect of the present invention are implemented.
[0032] Compared with the prior art, the embodiments of the present invention provide a cross-battery state of charge prediction method, prediction device, and storage medium, which determine an offline predicted state of charge model based on the charging data of a first battery; determine an online predicted state of charge model based on the charging data of a second battery; combine the offline predicted state of charge model and the online predicted state of charge model through online transfer learning to determine a predicted state of charge combination model; and predict the state of charge of the second battery based on the predicted state of charge combination model. The offline predicted state of charge model of the first battery is used as the offline predicted state of charge model of the second battery. This can solve the existing problem of being unable to train models due to the inability to collect data for some batteries in certain time periods. It also solves the problem of operating resource loss when training different models offline for different batteries. Through online transfer learning, the offline predicted state of charge model and the online predicted state of charge model are combined to form a predicted state of charge combination model, achieving the availability and accuracy of the same model in cross-battery prediction, improving the accuracy of the second battery's state of charge prediction, and thus accurately predicting the remaining power of the battery during charging or discharging. It can avoid overcharging and over-discharging of the battery, thereby reducing the incidence of safety incidents such as battery explosion caused by overcharging and over-discharging. This solves the existing problem of not being able to share the same model to predict the state of charge for different batteries. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0034] Figure 1 It is a flow chart of a method for predicting the state of charge of a battery provided by the present invention.
[0035] Figure 2 This is a flow chart of determining the optimal parameters of an LSTM model using a GWO algorithm in a method for predicting the state of charge of a battery provided by the present invention.
[0036] Figure 3 This is a graph showing the results of fitting the offline prediction state of charge model to the full test set using the test set data of the first battery.
[0037] Figure 4 This is a graph showing the fitting results of an offline state-of-charge prediction model by randomly selecting a set of charging data from the test set data of the first battery.
[0038] Figure 5 This is a graph showing the fitting results of an online state of charge prediction model by randomly selecting a set of charging data from the charging data of the second battery.
[0039] Figure 6 This is a trend chart of the RMSE error of the second battery during the state of charge prediction process using the online state of charge prediction model.
[0040] Figure 7 This is a diagram showing the prediction result of selecting one line of charging data from the charging data samples of the second battery B and performing a prediction on the determined state of charge combination model.
[0041] Figure 8 This is a comparison chart of the prediction results of the second battery based on the predicted state of charge combination model, the prediction results based on the offline predicted state of charge model, and the prediction results based on the online predicted state of charge model in a cross-battery state of charge prediction method provided by the present invention.
[0042] Figure 9 It is a structural schematic diagram of a cross-battery state of charge prediction device provided by the present invention. DETAILED DESCRIPTION
[0043] For ease of understanding of the present invention, the present invention will be described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as being "fixed to" another element, it can be directly on the other element, or there can be one or more centered elements therebetween. When an element is described as being "connected to" another element, it can be directly connected to the other element, or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" etc. used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, and is 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 orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0044] Unless otherwise defined, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which this invention belongs. The terms used in this specification and in the description of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" as used in this specification includes any and all combinations of one or more of the relevant listed items.
[0045] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0046] In one embodiment, Figure 1 As shown, the present invention provides a method for predicting the state of charge of a battery, the method comprising:
[0047] S1. Determine an offline state-of-charge prediction model based on charging data of a first battery;
[0048] S2. Determine an online state-of-charge prediction model based on charging data of the second battery;
[0049] S3. Combining the offline state-of-charge prediction model and the online state-of-charge prediction model through online transfer learning to determine a combined state-of-charge prediction model;
[0050] S4. Predicting the state of charge of the second battery based on the predicted state of charge combination model.
[0051] In this embodiment, an offline predicted SOC model is determined based on the charging data of a first battery; an online predicted SOC model is determined based on the charging data of a second battery; the offline predicted SOC model and the online predicted SOC model are combined through online transfer learning to determine a combined predicted SOC model; and the SOC of the second battery is predicted based on the combined predicted SOC model. This allows the offline predicted SOC model of the first battery to be used as the offline predicted SOC model of the second battery. This solves the existing problem of being unable to train models due to the lack of data collection for some batteries during certain time periods. It also addresses the resource consumption associated with training different models for different batteries offline. Furthermore, by combining the offline predicted SOC model with the online predicted SOC model through online transfer learning to form the combined predicted SOC model, the availability and accuracy of the same model for cross-battery predictions is ensured, improving the accuracy of the second battery's SOC prediction. This allows for accurate prediction of the remaining charge during the battery's charging or discharging process, preventing overcharging and over-discharging, and reducing the incidence of safety incidents such as battery explosions caused by overcharging and over-discharging. This solves the existing problem of being unable to share the same model for SOC prediction across different batteries.
[0052] In one embodiment, in step S1, an offline predicted state of charge model is determined based on charging data of the first battery.
[0053] Specifically, the GWO (Gray Wolf) algorithm is used to train an LSTM (Long Short-Term Memory) model using the charging data of the first battery to determine an offline state-of-charge prediction model. This includes:
[0054] S11. Determine the optimal parameters of the LSTM model using the GWO algorithm.
[0055] like Figure 2 As shown, specifically including:
[0056] S111. Initialize LSTM model parameters, including the positions a, b, and c of the three gray wolves and the objective function values s1, s2, and s3.
[0057] Specifically, according to the GWO algorithm, the three gray wolves include gray wolf Alpha, gray wolf Beta, and gray wolf Delta. The positions a, b, and c of the three gray wolves Alpha, Beta, and Delta are initialized, and the objective function values s1, s2, and s3 of the three gray wolves Alpha, Beta, and Delta are initialized respectively.
[0058] S112. Traverse each gray wolf, calculate the LSTM model target loss function, and update the positions a, b, c and target function values s1, s2, s3 of the three wolves.
[0059] S113. Traverse each gray wolf and determine the optimal gray wolf position for this iteration, i.e., the LSTM parameters, based on the updated positions of the three gray wolves. This includes:
[0060] If the objective loss function is less than the objective function value of the gray wolf Alpha's location, then the objective function value of the gray wolf Alpha is updated to the optimal objective function value, and the position of the gray wolf Alpha is updated to the optimal gray wolf position;
[0061] If the objective loss function is between the objective function values of gray wolf Alpha and gray wolf Beta, then the objective function value of gray wolf Beta is updated to the optimal objective function value, and the position of gray wolf Beta is updated to the optimal gray wolf position;
[0062] If the objective loss function is between the objective function values of gray wolf Beta and gray wolf Delta, the objective function value of gray wolf Delta is updated to the optimal objective function value, and the position of gray wolf Delta is updated to the optimal gray wolf position.
[0063] S114. At a given number of iterations, continuously iterate through S112 and S113 until the final target loss function reaches a given threshold or the number of iterations is met, then terminate.
[0064] S115. After the iteration is terminated, the position of the best gray wolf in the last iteration is output as the determined position of the best gray wolf, and the position of the best gray wolf is the optimal parameter of the LSTM model.
[0065] S12: Based on the optimal parameters of the LSTM model, the charging data of the first battery is used to train the LSTM model to determine an offline prediction state of charge model. Specifically, the following steps are included:
[0066] S121. Determine the parameters to be trained of the LSTM model based on the optimal parameters of the LSTM model.
[0067] Specifically, the parameters to be trained of the LSTM model are determined to be the number of hidden layer network nodes and the learning rate.
[0068] The optimal parameters of the LSTM model obtained by fitting the GWO algorithm are the number of hidden layer network nodes and the learning rate of the LSTM model.
[0069] As an example, the parameters to be trained for the LSTM model are the number of hidden layer nodes and the learning rate. Given the initial hidden layer position parameters of [20, 50, 80, 100, 120, 150] and the initial learning rate parameters of [0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1], the optimal parameters for fitting the LSTM model using the GWO algorithm are 57 hidden layer nodes and a learning rate of 0.0195.
[0070] S122: Use the charging data of the first battery to train an LSTM model to determine an offline state of charge prediction model.
[0071] Specifically, the LSTM model includes an input layer, a hidden layer and an output layer; wherein the hidden layer includes the number of network nodes and a learning rate.
[0072] The input layer inputs the selected input features, including the current at the previous moment, the voltage at the previous moment, the time difference between the current moment and the previous moment, the cumulative time from the current moment to the initial charging moment, the cumulative capacity from the previous moment to the current moment, the cumulative capacity from the initial charging moment to the current moment, the state of charge (SOC) at the previous moment, and the current moment's SOC. The current moment's SOC serves as the target variable y, and the other variables serve as x. All input features are normalized before being input into the LSTM model using the MinMaxScaler method.
[0073] In the prior art, the input features of the LSTM model's input layer are the battery's measured temperature, current, voltage, internal resistance, capacitance, and SOC at the previous moment. In the present invention, the capacity increment feature (i.e., the cumulative capacity from the previous moment to the current moment, and the cumulative capacity from the initial charging moment to the current moment) is added as an input feature to the input features. By statistically calculating the historical trends and distribution of the capacity increment feature in each SOC segment, the statistical values of the corresponding segments of the previous seven charges are used as the reference standard for the capacity increment feature of this charge. This not only considers the dynamic changes in battery performance characteristics over time from a finer dimension, but also provides a range standard and comparison standard for feature value selection, thereby better introducing the battery's temporal change factors from a data level.
[0074] Specifically, the method of using the charging data of the first battery to train the LSTM model and determine the offline prediction state of charge model includes:
[0075] The charging data of the first battery is used as a training sample, the aforementioned input features are extracted, and the input features are input into the input layer of the LSTM model. The training results are output in the output layer based on the number of network nodes and the learning rate data of the hidden layer;
[0076] According to the output training results, an offline prediction state of charge model is determined.
[0077] As an example, let's consider Battery A. The charging data samples for Battery A span the period from August to October 2020, comprising 128 sets of approximately 200,000 charging data points. The data from August and September were used as the training set, and the data from October was used as the test set. The optimal parameters for fitting the LSTM model using the GWO algorithm were 57 hidden layer nodes and a learning rate of 0.0195.
[0078] The charging data of the first battery A is used to train the LSTM model to determine an offline prediction state of charge model.
[0079] Then, the October data of the first battery A is used as the test set to fit the offline prediction state of charge model to the full test set. The fitting results are as follows: Figure 3 shown.
[0080] from Figure 3 As can be seen in the figure, the fitting results of more than 20 sets of charging data corresponding to the first battery A in October are included. The upper line is the collection result of the actual SOC, and the lower line is the prediction result of the offline prediction state of charge model. It can be seen from the figure that the two are highly fitted.
[0081] Then, a group of charging processes is randomly selected from the October data of the first battery A for fitting. The fitting results are as follows: Figure 4 shown.
[0082] from Figure 4 It can be seen that the upper line is the acquisition result of the actual SOC, and the lower line is the prediction result of the offline prediction state of charge model, and the two are highly fitted.
[0083] In the full and randomly selected charging data of the first battery A test set, the prediction performance index results of the offline prediction state of charge model are shown in Table 1:
[0084] Table 1 Evaluation of the offline prediction state of charge model on the first battery A dataset
[0085]
[0086] In one embodiment, in step S2, an online prediction state of charge model is determined based on the charging data of the second battery.
[0087] Specifically, an online PA algorithm (Online Passive-Aggressive Algorithms, also known as an online passive-aggressive algorithm) based on RBF-SVM (Radial Basis Function-Support Vector Machine) is adopted. The RBF-SVM model online learns the charging data of the second battery and determines an online prediction state of charge model.
[0088] Specifically include:
[0089] S21. Determine the RBF-SVM model using the RBF-SVM online PA algorithm.
[0090] Specifically include:
[0091] Specifically, the core idea of the online PA algorithm is to continuously learn from online data and update the algorithm weight W to make the algorithm prediction results closer to the real results.
[0092] The specific process of the PA algorithm is as follows:
[0093]
[0094] In the above PA algorithm:
[0095] W t+1 = W t + τ t * y t * X t
[0096] Among them, W t+1 is the weight of the next moment t+1, Wt is the weight of the current moment t, y t is the judgment value, x t is the input value at time t, τ t is the weight coefficient, and t is a positive number such as 1, 2, ,3, ….
[0097] According to the weight coefficient τ t According to different values, the PA algorithm is divided into three types: PA, PA-I and PA-II. The present invention adopts the PA-I algorithm.
[0098] Since there is a complex nonlinear relationship between the second battery SOC and various variables, and the radial basis kernel (RBF) function can linearize the nonlinear problem by mapping the kernel to a high-dimensional space, the present invention uses the radial basis kernel function as the kernel of the SVM (support vector machine) to perform online SCO estimation in the process of online SOC estimation using the PA algorithm.
[0099] The kernel function of RBF is:
[0100]
[0101] The optimal classification function of the support vector machine is:
[0102]
[0103] By using the Lagrange multiplier method, the above problem can be transformed into:
[0104]
[0105] in, f(x) That is the determined RBF-SVM model, is the kernel function.
[0106] In the present invention, RBF is used as the kernel function of the support vector machine, and the input items of the kernel function are the current feature input list X and the first n support vectors X1, X2, …, Xn.
[0107] During the online iteration of the RBF-SVM model, the iterative update of the support vector corresponds to the update process of the following formula in the PA algorithm:
[0108] W t+1 = W t + τ t * y t * X t
[0109] The predicted value y of the SOC of the RBF-SVM model is accumulated and summed using the following formula:
[0110] y = τt * flag * kernel_e(xt, B[i].x)+y
[0111] S22: Using the RBF-SVM model to online learn the charging data of the second battery, and determining an online prediction state of charge model.
[0112] In this embodiment, the second battery is B, and the time span of the charging data sample of the second battery B is October 2020. The second battery B contains 25 groups of about 40,000 data.
[0113] Evaluation of the effect of RBF-SVM algorithm in predicting SOC
[0114] The RBF-SVM model is used to perform online learning on the second battery B, the charging data of the second battery B in October is learned online, the optimal parameters are learned online, and the online prediction state of charge model is determined.
[0115] Then, from the charging data of the second battery B in October, the prediction results of one group of data are randomly selected and visualized. The results are as follows Figure 5 shown.
[0116] exist Figure 5 In the figure, the horizontal axis is the charging time, the vertical axis is the state of charge SOC, the middle line is the actual SOC, and the broken line is the online predicted SOC. The trend of the error RMSE in the prediction process is as follows: Figure 6 As shown:
[0117] from Figure 5 It can be seen that the online predicted SOC and the actual SOC are highly matched. Figure 6 As can be seen from the figure, the average value of RMSE is 0.015635, and the error between the online prediction and the actual is very small.
[0118] In one embodiment, in step S3, the offline predicted state of charge model and the online predicted state of charge model are combined through online transfer learning to determine a predicted state of charge combined model.
[0119] Specifically, the online transfer learning (HomOTL-I, Homogeneous Online Transfer Learning) mainly combines the results of online learning and offline learning with certain weights. The respective weights are continuously adjusted during the iterative process based on the proportion of the gap between the predicted results and the actual results, so that the prediction results of the final combined model are optimized.
[0120] The method of combining the offline state-of-charge prediction model and the online state-of-charge prediction model through online transfer learning to determine a combined state-of-charge prediction model specifically includes:
[0121] Combining the offline state-of-charge prediction model and the online state-of-charge prediction model with initial preset weights through online transfer learning HomOTL-I to determine a predicted state-of-charge combination model;
[0122] Iteratively testing the combined state-of-charge prediction model using partial charging data of the second battery, and continuously adjusting the weights of the offline state-of-charge prediction model and the online state-of-charge prediction model during the iterative process based on the difference between the predicted result and the actual result, so as to optimize the prediction result of the combined state-of-charge prediction model;
[0123] The weight ratio of the optimal prediction result is selected from the prediction results of the state of charge prediction combination model as the final weight ratio to determine the final state of charge prediction combination model.
[0124] In one embodiment, in step S4, the state of charge of the second battery is predicted based on the predicted state of charge combination model.
[0125] As an example, one line of charging data is selected from the charging data sample of the second battery B to predict the final predicted state of charge combination model, and the prediction result is as follows: Figure 7 shown.
[0126] exist Figure 7 In the figure, the horizontal axis is the charging time, the vertical axis is the state of charge SOC, the upper line is the actual SOC measurement result, and the lower line is the prediction result of combining offline and online transfer learning. Figure 7 It can be seen that the predicted results are highly consistent with the actual results.
[0127] The comparison of the prediction results of the state of charge combination model of the second battery B based on online transfer learning, the prediction results of the offline state of charge model of the second battery B based on the GWO algorithm trained with the data of the first battery A, and the prediction results of the online state of charge model of the RBF-SVM online PA algorithm based on the data of the second battery B is shown in Figure 2. Figure 8 shown.
[0128] exist Figure 8 In the figure, the horizontal axis is the charging time, the vertical axis is the mean square error between the predicted value and the actual value, the upper line is the online state-of-charge prediction model (PA), the middle line is the offline state-of-charge prediction model (LSTM), and the lower line is the online transfer learning state-of-charge prediction model (OTL). Figure 8It can be seen that the prediction effect of the combined state-of-charge prediction model based on online transfer learning is better than the prediction results of the offline state-of-charge prediction model, and the prediction results of the offline state-of-charge prediction model are better than the prediction results of the online state-of-charge prediction model. The specific evaluation index values are shown in Table 2 below:
[0129] Table 2 Offline, online and combined model prediction mean square error
[0130]
[0131] As shown in Table 2, the online SOC prediction model based on the online PA algorithm using RBF-SVM for the data of the second battery B was used. Simultaneously, online transfer learning was introduced to combine the offline SOC prediction model based on the GWO algorithm trained on the data of the first battery with the online SOC prediction model based on the online PA algorithm using RBF-SVM. Transfer learning was performed on the data set of the second battery. Experimental results show that the performance of the online SOC prediction model is inferior to that of the offline SOC prediction model, but the combined SOC prediction model after online transfer learning outperforms the offline SOC prediction model. Therefore, in the application of the combined SOC prediction model in cross-battery SOC prediction, online transfer learning of the combined SOC prediction model can ensure the availability and accuracy of the same model in cross-battery prediction, thereby improving the accuracy of the second battery's SOC prediction.
[0132] In another embodiment, Figure 9 As shown, the present invention provides a device for predicting the state of charge of a battery, wherein the device 900 includes one or more processors 901 and a memory 902. Figure 9 In the example, a processor 901 is used. The processor 901 and the memory 902 may be connected via a bus or other means. Figure 9 The connection via bus 903 is taken as an example.
[0133] The memory 902 stores instructions executable by the at least one processor 901, and the instructions are executed by the at least one processor 901 to enable the prediction device to perform the following steps of a method for predicting a state of charge of a battery provided in an embodiment of the present invention:
[0134] S1. Determine an offline state-of-charge prediction model based on charging data of a first battery;
[0135] S2. Determine an online state-of-charge prediction model based on charging data of the second battery;
[0136] S3. Combining the offline state-of-charge prediction model and the online state-of-charge prediction model through online transfer learning to determine a combined state-of-charge prediction model;
[0137] S4. Predicting the state of charge of the second battery based on the predicted state of charge combination model.
[0138] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by the processor 901. The processor 901 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be performed by hardware integrated logic circuits or software instructions in the processor 901. The processor 901 may be a general-purpose processor, a DSP, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The processor 901 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 902. The processor 901 reads information from the memory 902 and, in conjunction with its hardware, completes the steps of the above method.
[0139] It can be understood that the memory 902 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device; the volatile memory can be random access memory (RAM), by way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM) Memory), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0140] It should be noted that the above-mentioned prediction device embodiment and method embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the prediction device embodiment, which will not be repeated here.
[0141] In addition, in an exemplary embodiment, an embodiment of the present invention further provides a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 902 storing a computer program, wherein the computer storage medium stores one or more programs of a method for predicting a state of charge across batteries. When the one or more programs of the method for predicting a state of charge across batteries are executed by the processor 901, the following steps of the method for predicting a state of charge across batteries provided in an embodiment of the present invention are implemented:
[0142] S1. Determine an offline state-of-charge prediction model based on charging data of a first battery;
[0143] S2. Determine an online state-of-charge prediction model based on charging data of the second battery;
[0144] S3. Combining the offline state-of-charge prediction model and the online state-of-charge prediction model through online transfer learning to determine a combined state-of-charge prediction model;
[0145] S4. Predicting the state of charge of the second battery based on the predicted state of charge combination model.
[0146] It should be noted that the program embodiment of a method for predicting the state of charge of a battery across the above-mentioned computer-readable storage medium and the method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are applicable in the embodiment of the above-mentioned computer-readable storage medium, which will not be repeated here.
[0147] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0148] Finally, 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. Under the concept of the present invention, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the present invention as described above. For the sake of simplicity, they are not provided in detail. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the state of charge of a battery, characterized in that: The method comprises: Determining an offline state-of-charge prediction model based on the charging data of the first battery, including: using a GWO algorithm to train an LSTM model using the charging data of the first battery to determine the offline state-of-charge prediction model; Determining an online prediction state of charge model based on the charging data of the second battery, including: using an online PA algorithm based on RBF-SVM, and using the RBF-SVM model to online learn the charging data of the second battery to determine the online prediction state of charge model; The offline predicted state of charge model and the online predicted state of charge model are combined through online transfer learning to determine a predicted state of charge combination model, including: combining the offline predicted state of charge model and the online predicted state of charge model with initial preset weights through online transfer learning to determine the predicted state of charge combination model; iteratively testing the predicted state of charge combination model using partial charging data of the second battery, and continuously adjusting the weights of the offline predicted state of charge model and the online predicted state of charge model during the iteration process according to the gap between the predicted result and the actual result, so that the prediction result of the predicted state of charge combination model is optimized; selecting the weight ratio of the prediction result with the best prediction result from the prediction results of the predicted state of charge combination model as the final weight ratio to determine the final predicted state of charge combination model; The state of charge of the second battery is predicted based on the predicted state of charge combination model.
2. The method according to claim 1, characterized in that The method adopts the GWO algorithm and the charging data of the first battery to train the LSTM model to determine the offline prediction state of charge model, including: Determine the optimal parameters of the LSTM model using the GWO algorithm; According to the optimal parameters of the LSTM model, the charging data of the first battery is used to train the LSTM model to determine an offline prediction state of charge model.
3. The method according to claim 2, characterized in that Based on the optimal parameters of the LSTM model, the charging data of the first battery is used to train the LSTM model to determine an offline state of charge prediction model, including: According to the optimal parameters of the LSTM model, determine the parameters to be trained for the LSTM model; The charging data of the first battery is used to train the LSTM model to determine an offline prediction state of charge model.
4. The method according to claim 3, characterized in that The method of training the LSTM model using the charging data of the first battery to determine the offline state of charge prediction model includes: The charging data of the first battery is used as a training sample, and the input features are extracted and input into the input layer of the LSTM model. The training results are output in the output layer based on the number of network nodes and learning rate data of the hidden layer. According to the output training results, an offline prediction state of charge model is determined.
5. The method according to claim 1, wherein The online PA algorithm based on RBF-SVM is adopted, and the RBF-SVM model online learns the charging data of the second battery to determine the online prediction state of charge model; including: Determine the RBF-SVM model through the RBF-SVM online PA algorithm; The RBF-SVM model is used to online learn the charging data of the second battery and determine the online prediction state of charge model.
6. A device for predicting state of charge of a battery, characterized in that: The prediction device includes at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the prediction device to perform the method for predicting the state of charge across batteries as described in any one of claims 1 to 5.
7. A computer storage medium, characterized in that The storage medium stores a computer program for a method for predicting a state of charge across batteries. When the computer program is executed by a processor, the steps of the method for predicting a state of charge across batteries as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Lithium battery charge state prediction algorithm based on deep neural network
CN107870306A
Regional power distribution network short-term load prediction method
CN112116144A