Battery health state estimation model training method and device, equipment and medium
The use of a generative adversarial network to generate simulated data enhances battery health state estimation by expanding data availability, addressing the challenge of insufficient data quantity and improving estimation accuracy.
Patent Information
- Application Number
- CN202310747410.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
Existing battery health state estimation models face challenges due to insufficient quantities of battery health status data, necessitating a method to collect a large amount of data efficiently.
A model training method utilizing a generative adversarial network (GAN) to generate simulated data that mimics real data distribution, combined with a health state estimator, to expand the dataset for training.
The method effectively increases the amount of battery health status data, improving the training effect and accuracy of the health state estimation model, particularly under small sample conditions, reducing collection costs.
Smart Images

Figure CN119179002A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of battery management, and in particular to a model training method, device, equipment, medium and program product for battery health state estimation. Background Art
[0002] Batteries, as a rechargeable power source, are an important component of many systems such as electric vehicles and smartphones. During the cycle of charge and discharge, the health of the battery tends to gradually deteriorate.
[0003] In the related art, in order to estimate the health state of a battery, a battery health state estimation model is used, and in order to train the model, a large amount of battery health state data is required.
[0004] However, the battery health status data collected in the related art is often small sample data, and there are problems such as insufficient quantity. Therefore, how to collect a large amount of battery health status data is an urgent problem to be solved. Summary of the invention
[0005] The present application provides a model training method, device, equipment, medium and program product for battery health state estimation, and the technical solution at least includes:
[0006] According to one aspect of an embodiment of the present application, a model training method for battery health state estimation is provided, the model includes a generative adversarial network and a health state estimator, and the method includes:
[0007] Get real data about the battery, including data about the battery's health status;
[0008] Generate simulated data using a generative adversarial network. The simulated data is consistent with the distribution of real data.
[0009] Generate data sets based on simulated data and real data;
[0010] The dataset is used to train a health state estimator, which is used to estimate the battery health state.
[0011] According to another aspect of an embodiment of the present application, a model training device for battery health state estimation is provided, wherein the model includes a generative adversarial network and a health state estimator, and the device includes:
[0012] An acquisition module is used to acquire real data of the battery, where the real data includes data on the health status of the battery;
[0013] A generation module is used to generate simulation data using a generative adversarial network, where the simulation data is consistent with the distribution of real data;
[0014] A generation module is used to generate a data set based on simulated data and real data;
[0015] A training module is used to train a health state estimator using a data set, where the health state estimator is used to estimate the health state of the battery.
[0016] According to another aspect of an embodiment of the present application, a computer device is provided, which includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute at least one program in the memory to implement the model training method for battery health status estimation in each aspect described above.
[0017] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement a model training method for battery health status estimation as described in the above-mentioned aspects.
[0018] According to another aspect of an embodiment of the present application, a computer program product (or computer program) is provided, which includes computer instructions stored in a computer-readable storage medium, a processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement a model training method for battery health status estimation as described in the above-mentioned aspects.
[0019] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0020] By generating simulation data, more battery health status data is provided, the battery health status data under small sample conditions is effectively expanded, and the amount of data used to train the health status estimator is increased, thereby improving the training effect of the model used for battery health status estimation and solving the problem of high collection cost when collecting a large amount of effective run-to-failure data. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0023] Figure 2A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0024] Figure 3 A schematic diagram of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0025] Figure 4 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0026] Figure 5 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0027] Figure 6 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0028] Figure 7 A block diagram of a model training device for battery health state estimation provided by an exemplary embodiment of the present application is shown;
[0029] Figure 8 A schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0032] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0033] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0034] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0035] In this application, a server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0036] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0037] As a cloud computing basic capability provider, a cloud computing resource pool platform will be established, referred to as a cloud platform, generally referred to as Infrastructure as a Service (IaaS), and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0038] According to the logical function division, the Platform as a Service (PaaS) layer can be deployed on the IaaS layer, and the Software as a Service (SaaS) layer can be deployed on the PaaS layer, or the SaaS layer can be directly deployed on the IaaS layer. The PaaS layer is a platform for software operation, such as databases, web containers, etc. The SaaS layer is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, the SaaS layer and PaaS layer are upper layers relative to the IaaS layer.
[0039] As a rechargeable power source, battery is an important component of many systems such as electric vehicles and smart phones. During the cyclic charging and discharging process, the health status of the battery tends to gradually deteriorate. In the related art, in order to estimate the health status of the battery, a battery health status estimation model is used, and in order to train the model, a large amount of battery health status data is required. However, the battery health status data collected in the related art is often small sample data, and there are problems such as insufficient quantity. Therefore, a method that can collect a large amount of battery health status data is needed.
[0040] Figure 1 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown, and the method includes:
[0041] Step 110: Obtain real small sample data under target working conditions.
[0042] The operating condition refers to the operating state of the device during operation, including at least one of the ambient temperature, charging current, and discharging current, and the target operating condition refers to the operating condition of the battery for battery health status estimation.
[0043] In some embodiments, real small sample data (referred to as real data or small sample data) of the battery under multiple working conditions is obtained, including real data such as current, voltage, temperature, resistance, charge and discharge time, capacity, etc., and normalized. The real small sample data includes a training set and a test set. The training set is used to train a generative adversarial network model, such as a long short-term memory conditional generative adversarial network (LSTM-CGAN) model (referred to as the model), and the test set is used to test the effect after the model training is completed.
[0044] Exemplarily, when the target operating condition is an ambient temperature of 30 degrees Celsius, real small sample data of the battery when the ambient temperature is 30 degrees Celsius is obtained.
[0045] Step 120: Use the LSTM-CGAN model.
[0046] In some embodiments, the LSTM-CGAN model includes: at least one of a generator, a discriminator, and a state of health (SOH) estimator.
[0047] In some embodiments, random noise and labels are input into a generator, and the generator generates simulated data with a distribution similar to or consistent with the real data. The label is artificially set virtual data used to represent the battery health status, and the generated simulated data corresponds to the virtual data one by one.
[0048] The generator includes m layers of Long Short-Term Memory network (LSTM) layers, each layer includes LSTM1-LSTMn, a total of n LSTM units, m and n are natural numbers, m and n are the same or different. The m*n LSTM units in the generator process the input random noise and labels to generate simulation data.
[0049] The generated simulation data and real data are input into the discriminator together, and the discriminator determines whether it is real data or simulation data. The structure of the discriminator is similar to that of the generator, and both are composed of multiple LSTM units. The number of LSTM units included in the discriminator is the same as or different from that of the generator and the SOH estimator, which is not limited in the embodiments of the present application.
[0050] The training goal of the generator is to generate simulated data that is consistent with the distribution of real data, while the training goal of the discriminator is to determine whether the generated data is real data or simulated data and output the judgment result. The two are trained in adversarial learning. As the training progresses, the adversarial learning of the two will reach a balance, the generator will generate simulated data that is similar to or consistent with the distribution of real data, and the discriminator will not be able to determine whether the generated data is real data or simulated data.
[0051] By using the generated simulation data and real data, a data set is generated, and the data set is input into the SOH estimator to estimate the battery health state, and the SOH estimation result is output. The structure of the SOH estimator is similar to that of the generator, and both are composed of multiple LSTM units. The number of LSTM units included in the SOH estimator is the same as or different from that of the generator and the discriminator, and this embodiment of the application does not limit this.
[0052] Step 130: Input random noise and training set into the model to train the generator and discriminator.
[0053] In some embodiments, random noise and labels are input into the generator, the first simulated data output by the generator and the training set of real data are input into the discriminator, and the generator and the discriminator are trained in adversarial learning.
[0054] In some embodiments, the network parameters of the generator are fixed and unchanged, and the network parameters of the discriminator are trained using a first loss function, where the first loss function is used to calculate the classification error of the second input data (the input data of the discriminator), and the second input data includes the first simulation data and a training set in the real data;
[0055] The network parameters of the discriminator are fixed and unchanged, and the network parameters of the generator are trained using the second loss function, where the second loss function is used to calculate the classification error of the first simulation data being classified as real data;
[0056] Alternately perform the above two steps until the network parameters of the generator and the network parameters of the discriminator converge;
[0057] The classification error represents the proportion of classification errors, and the classification error means that the classification result of the second input data is of an incorrect type, for example, the classification result of the first simulation data is real data, or the classification result of the real data is not real data.
[0058] Step 140: Save the generated simulation data and generate a data set.
[0059] In some embodiments, the generated simulation data is saved in a memory, and a data set is generated based on the generated simulation data and real data, and battery health status data for training the SOH estimator is added.
[0060] Step 150: Input the generated simulation data and training set into the model to train the SOH estimator.
[0061] In some embodiments, the generated simulation data and the training set of real data are input into the LSTM-CGAN model for training the SOH estimator, and the training goal is to improve the performance of the SOH estimator in estimating the battery health state.
[0062] Step 160: Input the test set into the SOH estimator to verify the SOH estimation.
[0063] In some embodiments, the real data includes a training set and a test set, the training set is used to train the model, and the test set is used to test the effect after the model training is completed. The division ratio is set by those skilled in the art, and can be a variety of different division ratios, which are not limited in this application. Exemplarily, the real data is divided into a training set and a test set at a ratio of 7:3.
[0064] The test set in the real data is input into the trained SOH estimator to obtain the battery health status corresponding to the test set.
[0065] In summary, the method provided in this embodiment provides more battery health status data by generating simulation data, increases the amount of data used to train the health status estimator, and thus improves the training effect of the model used for battery health status estimation.
[0066] The method provided in this embodiment also uses a long short-term memory network to train the LSTM-CGAN model, thereby reducing the distribution difference between the simulated data and the real data, and improving the similarity between the generated simulated data and the real data, thereby enhancing the training effect of the LSTM-CGAN model.
[0067] The method provided in this embodiment also effectively expands the battery health status data under small sample conditions by generating simulation data, thereby solving the problem of high collection costs when collecting a large amount of effective operation-to-failure data.
[0068] Figure 2 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown, and the method includes:
[0069] Step 210: Obtain real data of the battery.
[0070] In some embodiments, the real data includes data about the battery health status, such as a label and input data about the battery health status, the label is used to indicate the battery health status, and the input data includes: at least one of temperature, output voltage, output current, charging voltage, and charging current. This is not limited to the embodiments of the present application.
[0071] In some embodiments, the method of obtaining real data of the battery includes: at least one of on-site collection, acquisition from historical records, and computer simulation calculation, which is not limited in the embodiments of the present application.
[0072] Step 220: Generate simulation data using a generative adversarial network.
[0073] In some embodiments, the simulated data is data having a distribution consistent with or similar to that of real data.
[0074] In some embodiments, a Generative Adversarial Network (GAN) includes: a generator and a discriminator. The task of the generator is to generate simulated data based on the input random noise, while the discriminator is to distinguish the simulated data from the real data as much as possible. The adversarial process between the generator and the discriminator will force the generator to generate more realistic simulated data to deceive the discriminator, while the discriminator will continuously improve its discrimination ability. Eventually, the generator and the discriminator will reach a balance, and the simulated data generated by the generator will have characteristics similar to the real data.
[0075] In some embodiments, GAN includes: at least one of: original GAN, conditional GAN, stacked GAN, reverse GAN, and LSTM-CGAN. The embodiment of the present application takes the use of LSTM-CGAN to generate simulation data as an example.
[0076] In some embodiments, Figure 3 As shown, the LSTM-CGAN model 300 includes: at least one of a generator 310, a discriminator 320 and a SOH estimator 330.
[0077] In some embodiments, random noise 301 and label 302 are input into generator 310, and generator 310 generates simulated data 311 having a distribution similar to or consistent with real data 312. Label 302 is artificially set virtual data used to indicate the battery health status, and the generated simulated data 311 corresponds to the virtual data one by one.
[0078] The generator 310 includes m first LSTM layers, each layer includes first LSTM unit 1-first LSTM unit n, a total of n LSTM units, m and n are natural numbers, and m and n are the same or different. Exemplarily, the first LSTM unit of the second layer is the first LSTM unit 21. After the m*n first LSTM units in the generator 310 process the input random noise 301 and the label 302, the simulation data 311 is generated.
[0079] The generated simulation data 311 and real data 312 are input into the discriminator 320 together, and the discriminator 320 determines whether it is real data 312. The structure of the discriminator 320 is similar to that of the generator 310, and both are composed of multiple LSTM units. To distinguish them, the LSTM unit in the discriminator 320 is called the second LSTM unit. Exemplarily, the second LSTM unit of the first layer is the second LSTM unit 12. The number of LSTM units included in the discriminator 320 is the same as or different from that of the generator 310 and the SOH estimator 330, that is, m and n in the discriminator 320 are the same as or different from m and n in the generator 310, and the same as or different from m and n in the SOH estimator 330, which is not limited in the embodiments of the present application.
[0080] The training goal of the generator 310 is to generate simulated data 311 that is consistent with the distribution of the real data 312, while the training goal of the discriminator 320 is to determine whether the generated data is real data 312 or simulated data 311 and output the judgment result. The two are trained in confrontation. As the training proceeds, the confrontation between the two will reach a balance, the generator 310 will generate simulated data 311 that is similar to or consistent with the distribution of the real data 312, and the discriminator 320 will not be able to determine whether the generated data is real data 312 or simulated data 311.
[0081] Step 230: Generate a data set based on the simulated data and the real data.
[0082] In some embodiments, Figure 3 As shown, a data set is generated by using the generated simulation data 311 and the real data 312 , and the data set is used to train the SOH estimator 330 .
[0083] Step 240: Train a health state estimator using the dataset.
[0084] In some embodiments, a state of health estimator is used to estimate a battery state of health.
[0085] In some embodiments, Figure 3As shown, the data set is input into the SOH estimator 330 to estimate the battery health state, and the SOH estimation result is output. The structure of the SOH estimator 330 is similar to that of the generator 310, and both are composed of multiple LSTM units. To distinguish them, the LSTM unit in the SOH estimator 330 is called the third LSTM unit. Exemplarily, the nth LSTM unit of the second layer is the third LSTM unit 2n. The number of LSTM units included in the SOH estimator 330 is the same as or different from that of the generator 310 and the discriminator 320, that is, m and n in the SOH estimator 330 are the same as or different from m and n in the generator 310, and the same as or different from m and n in the discriminator 320. This is not limited in the embodiments of the present application.
[0086] In summary, the method provided in this embodiment provides more battery health status data by generating simulation data, increases the amount of data used to train the health status estimator, and thus improves the training effect of the model used for battery health status estimation.
[0087] The method provided in this embodiment also uses a long short-term memory network to train the LSTM-CGAN model, thereby reducing the distribution difference between the simulated data and the real data, and improving the similarity between the generated simulated data and the real data, thereby enhancing the training effect of the LSTM-CGAN model.
[0088] The method provided in this embodiment also trains the health state estimator through a data set, so that the battery health state can be accurately estimated under various working conditions.
[0089] Figure 4 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown, and the method includes:
[0090] Step 210: Obtain real data of the battery.
[0091] Step 222: Generate first simulation data using a generator.
[0092] In some embodiments, the generator includes a first long short-term memory network. The first input data acquired is generated into first simulation data through the first long short-term memory network;
[0093] The first long short-term memory network includes m first long short-term memory network layers, each layer includes n first long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
[0094] like Figure 3 As shown, the generator 310 generates simulation data 311 through a first long short-term memory network, and the simulation data 311 includes first simulation data.
[0095] In some embodiments, first simulation data is generated by using a first long short-term memory network and taking random noise and a label as first input data;
[0096] The label is artificially set virtual data used to indicate the battery health status, and the label corresponds to the first simulation data one by one. The random noise is added to make the generated first simulation data more random and diverse. In addition, the random noise can also prevent the model from overfitting and improve the generalization ability of the model.
[0097] In some embodiments, the generator 310 is a feature learner based on LSTM. The feature learning process of LSTM is as follows:
[0098] i t =Sigmoid(W i z t +V i h t-1 +b i );
[0099] f t =Sigmoid(W f z t +V f h t-1 +b f );
[0100] o t =Sigmoid(W o z t +V o h t-1 +b o );
[0101] c t =f t ⊙c t-1 +i t ⊙tanh(W c z t +W c h t-1 +b c );
[0102] h t =o t ⊙tanh(c t );
[0103] where ⊙ represents the element-wise product, c t is the current memory cell, which is a unit used to store information, c t-1is the previous memory cell, W and V represent weight matrices, Sigmoid is a nonlinear activation function, z represents input layer data, h represents hidden layer data, b represents initialization parameters, and tanh is a hyperbolic tangent function. LSTM includes input layer, hidden layer, and output layer. The hidden layer is an intermediate calculation layer, and the hidden layer data records the feature data obtained by the intermediate calculation. The initialization parameter is a random value in the initial state. Through multiple calculations of LSTM, the initialization parameter will be gradually updated.
[0104] Input gate (i t ), forget gate (f t ) and output gate (o t ) is a component used to prevent gradient disappearance. Among them, the input gate is used to input new information into the memory cell, the forget gate is used to discard part of the information in the memory cell, and the output gate is used to output the information in the memory cell.
[0105] Step 224: Use a discriminator to determine whether the first simulation data is real data.
[0106] In some embodiments, the discriminator includes a second long short-term memory network. Through the second long short-term memory network, it is determined whether the acquired second input data is real data, and the second input data includes the first simulation data and the real data;
[0107] The second long short-term memory network includes m second long short-term memory network layers, each layer includes n second long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
[0108] like Figure 3 As shown, the discriminator 320 determines whether the acquired second input data is real data 312 through the second long short-term memory network, and outputs the judgment result.
[0109] In the case where the distribution of the simulated data 311 is not similar to that of the real data 312, the simulated data 311 is input to the discriminator 320, and a judgment result that it is not the real data 312 is output. In the case where the distribution of the simulated data 311 is similar to that of the real data 312, the simulated data 311 is input to the discriminator 320, and a judgment result that it is the real data 312 is output. Whether the distribution is similar is determined by the loss function. For example, the judgment result is output through a 0-1 indicator, and 0 is output if it is not the real data 312, and 1 is output if it is the real data 312. The embodiment of the present application does not limit the way in which the discriminator 320 outputs the judgment result.
[0110] Step 226: With the goal of the discriminator determining that the first simulated data is real data, adversarial learning training is performed on the generator and the discriminator so that the generator generates simulated data.
[0111] In some embodiments, the network parameters of the generator are fixed and unchanged, and the network parameters of the discriminator are trained using a first loss function, where the first loss function is used to calculate the classification error of the second input data, and the second input data includes the first simulation data and the real data;
[0112] The network parameters of the discriminator are fixed and unchanged, and the network parameters of the generator are trained using the second loss function, where the second loss function is used to calculate the classification error of the first simulation data being classified as real data;
[0113] Alternately perform the above two steps until the network parameters of the generator and the network parameters of the discriminator converge;
[0114] Among them, classification error represents the proportion of classification errors.
[0115] In some embodiments, the training goal of the generator is to generate simulated data that is consistent with the distribution of real data, while the training goal of the discriminator is to try to distinguish between real data and simulated data.
[0116] In some embodiments, the first loss function and the second loss function are calculated by at least one of a binary cross entropy loss function, a mean square error (MSE), a root mean square error (RMSE), and a mean absolute error (MAE), which is not limited in this application.
[0117] In some embodiments, in order to train the generator 310 and the discriminator 320 simultaneously, it is necessary to understand the loss function V jointly affected by the generator 310 and the discriminator 320:
[0118]
[0119] Among them, m means that there are m data for calculation, the base of logarithm log is the natural base e, x i Indicates the real data 312, z i Indicates label 302, G(z i ) indicates that in generator 310, based on z i The generated simulation data 311, D(x i ) indicates that the discriminator 320 is i The result of the above judgment is D(G(z i )) represents the discriminator 320 in G(z i ) is the result of the judgment, where D(x i ) and D(G(z i ) are all results indicating that the signal is judged to be true data 312.
[0120] In the loss function V, both logarithms are related to the discriminator 320, and the logarithm of the second half is related to the generator 310. Therefore, the loss function V is divided into the loss function Loss for the discriminator 320. D and the loss function Loss for generator 310 G :
[0121]
[0122]
[0123] Among them, since the generator 310 cannot affect D(x i ), so in the loss function Loss G The constant C is used in denoting the discriminator 320 portion.
[0124] Because for the discriminator 320, it is expected that the judgment result is as correct as possible, that is, D(x i ) is as close to 1 as possible, and the D(G(z i ) is as close to 0 as possible, then Loss D The bigger the better, the maximum theoretical value is:
[0125]
[0126] For the generator 310, it is expected that the simulated data 311 is as close as possible to the real data 312, that is, D(G(z i ) is as close to 1 as possible, then Loss G The smaller the better, the minimum theoretical value (excluding constant C) is:
[0127]
[0128] In order to maximize the loss for the discriminator 320 and minimize the loss for the generator 310, the following formula is used:
[0129]
[0130] Where V represents the loss function, the base of the logarithm log is the natural base e, E represents the mathematical expectation, G(z|y z ) represents the generator 310 based on z|y z The generated simulation data 311, D(x|y x ) indicates that the discriminator 320 is in x|y x The result of the above judgment is D(G(z|y z )) represents the discriminator 320 in G(z|y z) is the result of the judgment. x is the real data 312, p data (x) is the distribution of real data 312, z is random noise 301, p z (z) is the distribution of random noise 301, y is the label 302, x|y x represents the set of real data 312 given the label 302, z|y z represents the set of random noise 301 given a label 302.
[0131] The above formula allows the discriminator 320 and the generator 310 to achieve confrontation under the condition of shared loss. The essence of this formula is to minimize Loss G While maximizing Loss D .
[0132] Step 230: Generate a data set based on the simulated data and the real data.
[0133] Step 240: Train a health state estimator using the dataset.
[0134] In summary, the method provided in this embodiment provides more battery health status data by generating simulation data, increases the amount of data used to train the health status estimator, and thus improves the training effect of the model used for battery health status estimation.
[0135] The method provided in this embodiment also trains the generator and the discriminator by using a loss function, so that the generator and the discriminator can achieve adversarial performance under the condition of shared loss. The training goal of the generator is to generate simulated data that is consistent with the distribution of real data, while the training goal of the discriminator is to try to distinguish between real data and simulated data. The training effect of the generator and the discriminator is improved in adversarial training.
[0136] Figure 5 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown, and the method includes:
[0137] Step 210: Obtain real data of the battery.
[0138] Step 220: Generate simulation data using a generative adversarial network.
[0139] Step 232: Save the target simulation data generated by the generator after adversarial learning training.
[0140] In some embodiments, the target simulation data is simulation data that the discriminator determines to be real data, and the target simulation data is saved in the memory of the device for generating a data set or other subsequent purposes.
[0141] Step 234: Generate a data set based on the target simulation data and the real data.
[0142] In some embodiments, compared with real data, the generated data set includes target simulation data that can be regarded as real data, thereby increasing the amount of data used to train the health status estimator and making the training results of the health status estimator more accurate.
[0143] Step 240: Train a health state estimator using the dataset.
[0144] In summary, the method provided in this embodiment saves the target simulation data into a memory so that the target simulation data can be used in other aspects besides being used for training the health state estimator, thereby improving the versatility of the method.
[0145] Figure 6 A flowchart of a model training method for battery health state estimation provided by an exemplary embodiment of the present application is shown, and the method includes:
[0146] Step 210: Obtain real data of the battery.
[0147] Step 220: Generate simulation data using a generative adversarial network.
[0148] Step 230: Generate a data set based on the simulated data and the real data.
[0149] Step 242: Train a health state estimator using the data set through a third long short-term memory network.
[0150] The third long short-term memory network includes m third long short-term memory network layers, each layer includes n third long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
[0151] In some embodiments, Figure 3 As shown, the data set is input into the SOH estimator 330 to estimate the battery health state, and the SOH estimation result is output. The structure of the SOH estimator 330 is similar to that of the generator 310, and both are composed of multiple LSTM units. To distinguish them, the LSTM unit in the SOH estimator 330 is called the third LSTM unit. Exemplarily, the nth LSTM unit of the second layer is the third LSTM unit 2n. The number of LSTM units included in the SOH estimator 330 is the same as or different from that of the generator 310 and the discriminator 320, that is, m and n in the SOH estimator 330 are the same as or different from m and n in the generator 310, and the same as or different from m and n in the discriminator 320. This is not limited in the embodiments of the present application.
[0152] In summary, the method provided in this embodiment improves the accuracy of health state estimator training by using a long short-term memory network and a generated data set, thereby enhancing the training effect of the LSTM-CGAN model.
[0153] The method provided in this embodiment also trains the health state estimator through a data set, so that the battery health state can be accurately estimated under various working conditions.
[0154] In the above embodiment, steps with the same sequence number can be considered as the same step. Figure 2 The corresponding embodiments, Figure 7 The corresponding embodiments and Figure 8 The corresponding embodiments may be implemented individually or in combination, and this application does not limit this.
[0155] Due to long-term operation, the battery system will have various faults, resulting in damage to electrical equipment and paralysis of the power system, which in turn causes economic losses and even casualties. Therefore, in order to ensure the safety of the power system, it is necessary to estimate the health status of the battery and make health predictions in a timely manner.
[0156] The embodiment of the present application makes full use of the generative adversarial learning method to narrow the distribution difference between simulation data and real data, realizes data enhancement of real data, and can effectively expand the battery life cycle data under small sample conditions, thereby solving the problem of high collection cost when collecting a large amount of effective operation-to-failure data, and adopts a long short-term memory network to achieve a higher accuracy of battery health status estimation.
[0157] The embodiments of the present application can accurately estimate the battery health status under various operating conditions, such as floating charge and equalization charge modes of data center batteries, discharge maintenance changes, online nuclear capacity discharge tests, discharge test changes, and high-voltage DC battery discharge and other application scenarios.
[0158] In some embodiments, the battery health status estimation result of the present method is compared with the estimation result of other methods, and the comparison result is shown in Table 1, where RMSE is the root mean square error and MAE is the mean absolute error.
[0159] Table 1
[0160] Estimation Method RMSE MAE No GAN 0.160 0.080 CNN-CGAN 0.084 0.053 LSTM-CGAN 0.028 0.020
[0161] Among them, No GAN means that the simulation data is not generated by using the Generative Adversarial Network (GAN), and the real data as small sample data is directly used for estimation. CNN-CGAN means the result of using the Convolution Neural Network (CNN) to generate simulation data and then estimate it. According to the experimental data in Table 1, it can be seen that after using the LSTM-CGAN method, the RMSE and MAE are significantly reduced, indicating that the performance of the SOH estimator has been improved, which can solve the problem of too little data for battery health state estimation.
[0162] Figure 7 A block diagram of a model training device for battery health state estimation provided by an exemplary embodiment of the present application is shown, wherein the model includes a generative adversarial network and a health state estimator, and the device includes: an acquisition module 710, a generation module 720, a training module 730, a judgment module 740 and a storage module 750.
[0163] An acquisition module 710 is used to acquire real data of the battery, where the real data includes data on the health status of the battery;
[0164] A generation module 720 is used to generate simulation data using a generative adversarial network, where the simulation data is data that is consistent with the distribution of real data;
[0165] A generating module 720, for generating a data set based on the simulated data and the real data;
[0166] The training module 730 is used to train a health state estimator using the data set, where the health state estimator is used to estimate the health state of the battery.
[0167] In a possible design of this embodiment, the generative adversarial network includes: a generator and a discriminator, a generating module 720, configured to generate first simulation data using the generator;
[0168] A judging module 740 is used to use a discriminator to judge whether the first simulation data is real data;
[0169] The training module 730 is used to perform adversarial learning training on the generator and the discriminator with the goal of the discriminator judging that the first simulated data is real data, so that the generator generates simulated data.
[0170] In a possible design of this embodiment, the generator includes a first long short-term memory network;
[0171] A generating module 720, configured to generate first simulation data from the acquired first input data through a first long short-term memory network;
[0172] The first long short-term memory network includes m first long short-term memory network layers, each layer includes n first long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
[0173] In a possible design of this embodiment, the generating module 720 is used to generate first simulation data by using a first long short-term memory network and taking random noise and a label as first input data;
[0174] The label is artificially set virtual data, which is used to indicate the health status of the battery, and the label corresponds to the first simulation data one by one.
[0175] In a possible design of this embodiment, the discriminator includes a second long short-term memory network;
[0176] A judgment module 740 is used to judge whether the acquired second input data is real data through a second long short-term memory network, where the second input data includes the first simulation data and the real data;
[0177] The second long short-term memory network includes m second long short-term memory network layers, each layer includes n second long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
[0178] In a possible design of this embodiment, the training module 730 is used to fix the network parameters of the generator and train the network parameters of the discriminator using a first loss function, where the first loss function is used to calculate the classification error of the second input data, where the second input data includes the first simulation data and the real data;
[0179] The network parameters of the discriminator are fixed and unchanged, and the network parameters of the generator are trained using the second loss function, where the second loss function is used to calculate the classification error of the first simulation data being classified as real data;
[0180] Alternately perform the above two steps until the network parameters of the generator and the network parameters of the discriminator converge;
[0181] Among them, classification error represents the proportion of classification errors.
[0182] In a possible design of this embodiment, the saving module 750 is used to save the target simulation data generated by the generator after adversarial learning training;
[0183] The generating module 720 is used to generate a data set based on the target simulation data and the real data.
[0184] In one possible design of this embodiment, the health state estimator includes a third long short-term memory network;
[0185] A training module 730 for training a health state estimator using the data set through a third long short-term memory network;
[0186] The third long short-term memory network includes m third long short-term memory network layers, each layer includes n third long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
[0187] In summary, the device provided in this embodiment provides more battery health status data by generating simulation data, increases the amount of data used to train the health status estimator, and thus improves the training effect of the model used for battery health status estimation.
[0188] The device provided in this embodiment also trains the LSTM-CGAN model by using a long short-term memory network, thereby reducing the distribution difference between the simulated data and the real data, and improving the similarity between the generated simulated data and the real data, thereby enhancing the training effect of the LSTM-CGAN model.
[0189] The device provided in this embodiment also effectively expands the battery health status data under small sample conditions by generating simulation data, thereby solving the problem of high collection costs when collecting a large amount of effective operation-to-failure data.
[0190] The device provided in this embodiment also trains the health state estimator through a data set, so that the battery health state can be accurately estimated under various working conditions.
[0191] An embodiment of the present application also provides a computer device, which includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute at least one program in the memory to implement the model training method for battery health status estimation provided by the above-mentioned method embodiments.
[0192] Figure 8 800 is a block diagram of a computer device 800 provided by an exemplary embodiment of the present application. Generally, the computer device 800 includes: a processor 801 and a memory 802 .
[0193] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 801 may include a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0194] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is used to be executed by the processor 801 to implement the model training method for battery health state estimation provided in the method embodiment of the present application.
[0195] In some embodiments, the server 800 may also optionally include: an input interface 803 and an output interface 804. The processor 801, the memory 802 and the input interface 803, the output interface 804 may be connected via a bus or a signal line. Each peripheral device may be connected to the input interface 803, the output interface 804 via a bus, a signal line or a circuit board. The input interface 803, the output interface 804 may be used to connect at least one peripheral device related to input / output to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802 and the input interface 803, the output interface 804 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802 and the input interface 803, the output interface 804 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.
[0196] Those skilled in the art will appreciate that the structure shown above does not constitute a limitation on the computer device 800 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0197] In an exemplary embodiment, a chip is also provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device 800, it is used to implement the model training method for battery health status estimation provided in an embodiment of the present application.
[0198] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the model training method for battery health state estimation provided in the embodiment of the present application.
[0199] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one program is stored, and the at least one program is loaded and executed by a processor to implement the model training method for battery health status estimation provided in an embodiment of the present application.
[0200] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0201] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0202] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A model training method for battery health state estimation, characterized in that: The model includes a generative adversarial network and a health state estimator, and the method includes: Acquire real data of the battery, wherein the real data includes data about the health status of the battery; Generate simulated data using the generative adversarial network, where the simulated data is data consistent with the distribution of the real data; Generate a data set based on the simulation data and the real data; The health state estimator is trained using the data set, and the health state estimator is used to estimate the battery health state.
2. The method according to claim 1, characterized in that The generative adversarial network includes: a generator and a discriminator, and the use of the generative adversarial network to generate simulation data includes: Generate first simulation data using the generator; Using the discriminator to determine whether the first simulation data is the real data; With the goal of the discriminator judging that the first simulated data is the real data, adversarial learning training is performed on the generator and the discriminator so that the generator generates the simulated data.
3. The method according to claim 2, characterized in that The generator includes a first long short-term memory network; The step of using the generator to generate first simulation data comprises: Generate the acquired first input data into the first simulation data through the first long short-term memory network; The first long short-term memory network includes m first long short-term memory network layers, each layer includes n first long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
4. The method according to claim 3, characterized in that The step of generating the first simulation data from the acquired first input data through the first long short-term memory network includes: Generate the first simulation data by using the first long short-term memory network, taking random noise and labels as the first input data; The label is artificially set virtual data, which is used to indicate the battery health status, and the label corresponds to the first simulation data one by one.
5. The method according to any one of claims 2 to 4, characterized in that: The discriminator includes a second long short-term memory network; The using the discriminator to determine whether the first simulation data is the real data includes: Determining, by the second long short-term memory network, whether the acquired second input data is the real data, wherein the second input data includes the first simulation data and the real data; The second long short-term memory network includes m second long short-term memory network layers, each layer includes n second long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
6. The method according to any one of claims 2 to 5, characterized in that: The step of performing adversarial learning training on the generator and the discriminator with the goal of the discriminator judging that the first simulation data is the real data, so that the generator generates the simulation data, includes: The network parameters of the generator are fixed and the network parameters of the discriminator are trained using a first loss function, wherein the first loss function is used to calculate the classification error of second input data, where the second input data includes the first simulation data and the real data; The network parameters of the discriminator are fixed and the network parameters of the generator are trained using a second loss function, wherein the second loss function is used to calculate the classification error of the first simulation data being classified as the real data; Alternately perform the above two steps until the network parameters of the generator and the network parameters of the discriminator converge; The classification error represents the proportion of classification errors.
7. The method according to any one of claims 2 to 6, characterized in that: The step of generating a data set based on the simulation data and the real data comprises: Saving target simulation data generated by the generator after the adversarial learning training; The data set is generated based on the target simulation data and the real data.
8. The method according to any one of claims 1 to 7, characterized in that: The health state estimator includes a third long short-term memory network; The using the data set to train the health state estimator comprises: Training the health state estimator using the data set through the third long short-term memory network; The third long short-term memory network includes m third long short-term memory network layers, each layer includes n third long short-term memory network units, m and n are natural numbers, and m and n are the same or different.
9. A model training device for battery health state estimation, characterized in that: The model includes a generative adversarial network and a health state estimator, and the device includes: An acquisition module, used to acquire real data of the battery, wherein the real data includes data on the health status of the battery; A generation module, used to generate simulation data using the generative adversarial network, wherein the simulation data is data consistent with the distribution of the real data; A generating module, used for generating a data set based on the simulation data and the real data; A training module is used to train the health state estimator using the data set, and the health state estimator is used to estimate the battery health state.
10. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute the at least one program in the memory to implement the model training method for battery health status estimation as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the model training method for battery health state estimation as described in any one of claims 1 to 8.
12. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the model training method for battery health state estimation as described in any one of claims 1 to 8.
Citation Information
Cited By
Battery fault early warning method and system based on controllable causes
CN122017603A
