Battery impedance spectrum prediction method, device, medium and equipment based on MAE model
By using the MAE model to process incomplete battery state data, potential vectors are generated and used to predict the impedance spectrum data of the battery, the impedance spectrum data accuracy problem caused by incomplete data is solved, and high-accurate impedance spectrum prediction is achieved.
Patent Information
- Application Number
- CN202410327613.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-03-21
AI Technical Summary
When acquiring battery impedance spectrum data in the prior art, if the current data, voltage data and temperature data are incomplete, the accuracy of the impedance spectrum data is poor.
Using the battery impedance spectrum prediction method based on the MAE model, the incomplete battery actual state data of the target battery is obtained, and the potential vector is obtained by obtaining the impedance spectrum prediction model to predict the impedance spectrum data.
When the current data, voltage data and temperature data are incomplete, the impedance spectrum data of the battery can be accurately predicted, improving the accuracy of the data.
Smart Images

Figure CN118191613B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrochemical technology, and in particular to a method, device, medium and equipment for predicting battery impedance spectrum based on a MAE model. Background Art
[0002] The Masked Autoencoders (MAE) model is a computer vision pre-training model that randomly blocks a large number of areas of the image during training, and then lets the model reconstruct these blocked areas. Electrochemical Impedance Spectroscopy (EIS) data refers to a series of values about battery impedance obtained by the battery impedance spectrum test, which is used to study the electrochemical reaction inside the battery. It applies small-amplitude AC sinusoidal potential waves of different frequencies to the battery, measures the ratio of the AC potential to the current signal (i.e., the impedance of the system) as the sine wave frequency changes, and thus obtains the impedance spectrum of the battery. In actual research, the impedance spectrum data of the battery is often obtained to study the electrochemical performance of the battery, and even to evaluate the battery life. The impedance spectrum data of the battery is mainly obtained by testing with professional impedance spectrum test instruments, but the impedance spectrum test instruments are relatively expensive, making the acquisition cost of impedance spectrum data high. Therefore, how to obtain impedance spectrum data at a low cost has become an urgent problem to be solved.
[0003] In this regard, the commonly used solution is to establish a mapping relationship between the battery's current data, voltage data, and temperature data and the impedance spectrum data, and build a corresponding impedance spectrum prediction model. Simply input the tested current data, voltage data, and temperature data into the impedance spectrum prediction model to predict the corresponding impedance spectrum data. However, in the process of obtaining impedance spectrum data in this way, once the actual tested current data, voltage data, and temperature data are incomplete, for example, there are missing values or abnormal values, the final impedance spectrum data will be less accurate. Summary of the invention
[0004] In order to improve the accuracy of the obtained impedance spectrum data, the present application provides a battery impedance spectrum prediction method, device, medium and equipment based on the MAE model.
[0005] In a first aspect of the present application, a battery impedance spectrum prediction method based on a MAE model is provided, which specifically includes:
[0006] Acquire actual battery status data of a target battery, wherein at least one of current actual data, voltage actual data, and temperature actual data in the actual battery status data is missing;
[0007] Inputting the actual battery state data into a trained encoder in a trained MAE model to obtain a potential vector corresponding to the actual battery state data, wherein the trained MAE model is a trained MAE model capable of restoring missing data in the actual current data, the actual voltage data, and the actual temperature data;
[0008] The potential vector is input into an impedance spectrum prediction model to obtain impedance spectrum data of the target battery.
[0009] By adopting the above technical solution, after obtaining incomplete actual battery state data of the target battery, the actual battery state data is input into the trained encoder in the trained MAE model. Since the trained MAE model can restore and reconstruct missing data, the trained encoder can accurately extract the feature vector corresponding to the incomplete actual battery state data, that is, the latent vector, so as to facilitate the subsequent input of the latent vector into the impedance spectrum prediction model. The impedance spectrum prediction model can accurately predict the impedance spectrum data associated with the actual battery state data in the target battery based on the accurate features corresponding to the actual battery state data, thereby achieving impedance spectrum data with higher accuracy even when the tested current data, voltage data and temperature data are incomplete.
[0010] Optionally, before inputting the actual battery status data into the trained encoder in the trained MAE model, the method further includes:
[0011] Acquire multiple groups of battery sample status data, wherein the battery sample status data includes complete current sample data, voltage sample data and temperature sample data;
[0012] Randomly masking each group of battery sample status data to obtain masked data and unmasked data;
[0013] Based on the masked data and the unmasked data, a preset MAE model is trained to obtain a trained MAE model.
[0014] By adopting the above technical solution, the complete battery sample status data is obtained for random masking to obtain masked data and unmasked data, thereby obtaining incomplete sample data with higher randomness, which is convenient for subsequent training of the MAE model, so that the MAE model can learn to reconstruct the missing parts based on the incomplete battery status data.
[0015] Optionally, the step of training a preset MAE model based on the masked data and the unmasked data to obtain a trained MAE model specifically includes:
[0016] Inputting the unmasked data corresponding to each group of the battery sample state data as the first input data into the initial encoder in the preset MAE model for training to obtain an output result;
[0017] Fusing the output result with the corresponding masked data to obtain corresponding second input data;
[0018] Each of the second input data is input into the initial decoder in the MAE model for training to obtain a trained MAE model.
[0019] By adopting the above technical solution, the unmasked data is input into the initial encoder for training to obtain the output result, so that the initial encoder learns to extract the feature vector of the incomplete data. Furthermore, the output result is fused with the masked data, and the initial decoder is trained with the second input data obtained by fusion, so that it learns to reconstruct and restore the missing part according to the incomplete data, and finally obtains the trained MAE model.
[0020] Optionally, the randomly masking each group of battery sample status data to obtain masked data and unmasked data specifically includes:
[0021] Randomly select one sample data from the current sample data, voltage sample data and temperature sample data in each group of the battery sample state data to perform random masking to obtain corresponding masked data;
[0022] Sample data other than sample data subjected to random masking are screened from the masked data and determined as unmasked data.
[0023] By adopting the above technical solution, one sample data is randomly selected from the current sample data, voltage sample data and temperature sample data for random masking processing, that is, covering, and a more reasonable masking ratio of 33% is adopted to obtain masked data and unmasked data, so that when the MAE model is subsequently trained based on the masked data and unmasked data, better training results can be obtained. If the masking ratio is too early or too low, poor training results will be caused.
[0024] Optionally, the current sample data, the voltage sample data, and the temperature sample data in each group of the battery sample status data each include at least one sub-sample data, and the randomly masking each group of the battery sample status data to obtain the masked data and the unmasked data specifically includes:
[0025] Determine a first shielding ratio interval corresponding to each group of the battery sample state data, and randomly select a first shielding ratio from the first shielding ratio interval;
[0026] According to the first shielding ratio, randomly selecting a shielding object from the current sample data, the voltage sample data and the temperature sample data in the corresponding battery sample state data;
[0027] Determining a corresponding second masking ratio interval according to the mutual correlation and quantity of all sub-sample data in each of the masked objects;
[0028] A second masking ratio is randomly selected from the second masking ratio interval, and according to the second masking ratio, target sub-sample data is randomly selected from the sub-sample data in the corresponding masked object, and masking processing is performed on the target sub-sample data to obtain masked data and unmasked data corresponding to each group of the battery sample status data.
[0029] By adopting the above technical solution, the first masking ratio is randomly selected from the first masking ratio interval, so as to better ensure the randomness of the size of the masked part of the battery sample status data. Then, according to the first masking ratio, the masked object is randomly selected from the sample data of each dimension of the battery sample status data, so as to ensure the randomness of the masked object of the battery sample status data. Furthermore, the second masking ratio is randomly selected from the second masking ratio interval to make the masking size of each masked object random. Finally, according to the second masking ratio, the target sub-sample data is randomly selected from the sub-sample data in the corresponding masking object for masking, so as to further improve the randomness of the masked part, thereby making the subsequent unmasked data more random, and the training effect of inputting into the MAE model is better.
[0030] Optionally, determining the corresponding second masking ratio interval according to the mutual correlation and quantity of all sub-sample data in each of the masked objects specifically includes:
[0031] Determine the mutual correlation between the single sub-sample data and each remaining sub-sample data in each of the masked objects;
[0032] Counting the first number of mutual correlations exceeding the correlation threshold among the mutual correlations, and when the first number is greater than the first number threshold, determining the corresponding sub-sample data as easy-to-restore sub-sample data;
[0033] If the second number of the easily restored sub-sample data exceeds the second number threshold, determining a corresponding second masking ratio interval according to the second number;
[0034] If the second number of the easily restored sub-sample data does not exceed the second number threshold, a corresponding second masking ratio interval is determined according to the number of all sub-sample data in the corresponding masked object.
[0035] By adopting the above technical solution, if the first number exceeds the first number threshold, it means that this single sub-sample data has a strong correlation with other more sub-sample data in the masked object, which further means that it is easy to infer and restore based on other unmasked sub-sample data after being masked, so this single sub-sample data is determined as easy-to-restore sample data. If the second number exceeds the second number threshold, it means that more sub-sample data in this masked object is easy to infer and restore based on unmasked sub-sample data even if it is masked, so the corresponding second masking ratio interval is determined according to the second number; if the second number does not exceed the second number threshold, it means that less sub-sample data in this masked object is easy to infer and restore based on unmasked sub-sample data after being masked, and it is necessary to mainly refer to the amount of data contained in the masked object to determine the masking ratio interval, so according to the number of sub-sample data in this masked object, the corresponding second masking ratio interval is determined. In this way, the masking ratio interval of the masked object is determined more reasonably, ensuring the training effect of the MAE model while avoiding the large amount of calculation of the initial encoder.
[0036] Optionally, the randomly selecting target sub-sample data from the sub-sample data in the corresponding masked object according to the second masking ratio specifically includes:
[0037] Determine the masking object of the sub-sample data currently selected to be masked as the current masking object;
[0038] When the second number of the easily restored sub-sample data of the currently masked object does not exceed the second number threshold, if the selected target sub-sample data includes all the easily restored sub-sample data and the selected ratio is less than the corresponding second masking ratio, suspending the selection;
[0039] If the selected target sub-sample data does not include the easily restored sub-sample data and the selected ratio reaches the corresponding second masking ratio, the corresponding second masking ratio is increased and random selection continues.
[0040] By adopting the above technical solution, if the selected target sub-sample data contains all the easily restored sub-sample data and the selected ratio is less than the corresponding second masking ratio, it means that the sub-sample data with a high correlation with the other remaining sub-sample data are determined to be masked. Continuing to select sub-sample data for masking will make it difficult to infer and restore based on the remaining sub-sample data. In this case, the selection of target sub-sample data is suspended, so that the subsequent training effect of the MAE model is better; if the selected target sub-sample data does not contain the easily restored sub-sample data, and the selected ratio also reaches the corresponding second masking ratio, it means that after the selection is completed according to the second masking ratio, the sub-sample data selected for masking are easy to infer and restore based on the remaining unmasked sub-sample data (including the easily restored sub-sample data). In this case, appropriately increasing the second masking ratio will have little effect on the training effect of the MAE model, and can also reduce the calculation amount of the initial encoder to a certain extent.
[0041] In a second aspect of the present application, a battery impedance spectrum prediction device based on a MAE model is provided, specifically comprising:
[0042] A data acquisition module, used for acquiring actual battery status data of a target battery, wherein at least one of current actual data, voltage actual data and temperature actual data in the actual battery status data is missing;
[0043] A vector determination module, used for inputting the actual battery state data into a trained encoder in a trained MAE model to obtain a potential vector corresponding to the actual battery state data, wherein the trained MAE model is a trained MAE model capable of restoring missing data in the actual current data, the actual voltage data, and the actual temperature data;
[0044] The impedance prediction module is used to input the potential vector into an impedance spectrum prediction model to obtain the impedance spectrum data of the target battery.
[0045] By adopting the above technical solution, after the data acquisition module obtains the actual battery status data of the target battery, the vector determination module inputs the actual battery status data into the trained encoder in the trained MAE model to obtain the potential vector corresponding to the actual battery status data. Finally, the impedance prediction module inputs the potential vector into the preset impedance spectrum prediction model, and the impedance spectrum data of the target battery is predicted by the impedance spectrum prediction model.
[0046] In a third aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps described in any one of the first aspects are performed.
[0047] In a fourth aspect of the present application, an electronic device is provided, specifically comprising:
[0048] A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the processor is used to load and execute the computer program stored in the memory so that the electronic device performs the method as described in any one of the first aspects.
[0049] In summary, the present application includes at least one of the following beneficial technical effects: after obtaining incomplete actual battery state data of the target battery, the actual battery state data is input into the trained encoder in the trained MAE model. Since the trained MAE model can restore and reconstruct missing data after training, the trained encoder can accurately extract the feature vector corresponding to the incomplete actual battery state data, that is, the latent vector, thereby facilitating the subsequent input of the latent vector into the impedance spectrum prediction model. The impedance spectrum prediction model can accurately predict the impedance spectrum data associated with the actual battery state data in the target battery based on the accurate features corresponding to the actual battery state data, thereby achieving impedance spectrum data with higher accuracy even when the tested current data, voltage data and temperature data are incomplete. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of a battery impedance spectrum prediction method based on a MAE model provided in an embodiment of the present application;
[0051] Figure 2 It is a flow chart of another method for predicting battery impedance spectrum based on MAE model provided in an embodiment of the present application;
[0052] Figure 3 It is a structural schematic diagram of a battery impedance spectrum prediction device based on a MAE model provided in an embodiment of the present application;
[0053] Figure 4 It is a structural schematic diagram of another battery impedance spectrum prediction device based on the MAE model provided in an embodiment of the present application.
[0054] Explanation of the reference numerals: 11. Data acquisition module; 12. Vector determination module; 13. Impedance prediction module; 14. Model training module. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0056] In the description of the embodiments of the present application, words such as "illustrative", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "illustrative", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "illustrative", "for example" or "for example" is intended to present related concepts in a concrete way.
[0057] In the description of the embodiments of the present application, the term "and / or" is only a kind of association relationship describing the associated objects, indicating that there may be three kinds of relationships, for example, A and / or B, which can represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0058] See also Figure 1 The present application embodiment discloses a flowchart of a method for predicting battery impedance spectrum based on a MAE model, which can be implemented by a computer program or run on a battery impedance spectrum prediction device based on a MAE model based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:
[0059] S101: Acquire multiple groups of battery sample status data, where the battery sample status data includes complete current sample data, voltage sample data, and temperature sample data.
[0060] S102: Randomly mask each group of battery sample status data to obtain masked data and unmasked data.
[0061] S103: Based on the masked data and the unmasked data, a preset MAE model is trained to obtain a trained MAE model.
[0062] Specifically, before predicting the corresponding impedance spectrum data based on the actual battery status data, multiple sets of current sample data, voltage sample data, and temperature sample data are tested on the preset sample battery, and the three items of data in each set are complete without missing items, and finally multiple sets of battery sample status data are obtained. In the process of obtaining each set of battery sample status data, the impedance value corresponding to the sample battery at a certain frequency is tested synchronously through an impedance spectrum tester. The impedance spectrum data includes impedance values at different frequencies. Specifically: The frequency range that the impedance spectrum tester can cover is 10 -2 HZ to 10 5 HZ, multiple frequency values are selected from the frequency range at preset intervals, and each time the impedance spectrum tester is used to test the impedance value sample corresponding to one of the frequency values. Furthermore, according to the test time node, a corresponding relationship is established between each group of battery sample state data and the corresponding impedance value sample.
[0063] Furthermore, the current sample data, voltage sample data and temperature sample data in each group of battery sample status data are randomly masked. A feasible masking method is: randomly select one sample data from the current sample data, voltage sample data and temperature sample data, and perform random masking processing through masking technology to obtain the masked data corresponding to this battery sample status data, that is, a masking ratio of 33%. Among them, masking technology is a data preprocessing technology, which is used to select part of the battery sample status data and mask or replace it with other values. Furthermore, sample data other than the randomly masked or masked sample data is screened out from the masked data and determined as unmasked data. It should be noted that, under normal circumstances, the MAE model is applied in the scene of image reconstruction. During the training process, the masking ratio of the image samples is 75%, which can reduce information redundancy and calculation amount. Moreover, the information of each area in the image is highly correlated with each other, and the amount of information is sufficient. Even if a higher masking ratio of 75% is used, it does not affect the model's reconstruction learning of the masked part of the image, and can better infer and reconstruct the masked part based on the unmasked part. In the reconstruction scenario of battery current, voltage and temperature data in this application, the amount of information is small, and the correlation of each data is also limited. If the masking ratio is high, it will affect the effect of MAE model training.
[0064] Further, based on the masked data and unmasked data corresponding to each group of battery sample state data, the preset MAE model is trained to obtain the trained MAE model. A feasible training method is: the unmasked data corresponding to each group of battery sample state data is input into the MAE model as the first input data, and the initial encoder is trained to obtain the output result, that is, the corresponding feature vector is extracted from the unmasked data. Then the output result is fused with the corresponding masked data to obtain the second input data corresponding to each group of battery sample state data. Finally, each second input data is input into the initial decoder in this MAE model for training, so that the initial decoder continuously learns how to reconstruct and restore the masked data on the basis of the unmasked data, reconstructs the complete battery sample state data, and finally obtains the trained MAE model. Among them, under normal circumstances, the decoder in the MAE model mainly performs image reconstruction tasks during model training and is a key component in the MAE model. In an embodiment of the present application, the initial decoder in the MAE model mainly performs the restoration and reconstruction tasks of the battery sample state data during model training.
[0065] S104: Acquire actual battery status data of the target battery, wherein at least one of the current actual data, voltage actual data and temperature actual data in the actual battery status data is missing.
[0066] Specifically, the target battery refers to the battery for which impedance spectrum data needs to be obtained. The actual state data of the battery is the incomplete state data obtained by the actual test of the target battery, which should contain three data items: the actual current data, the actual voltage data and the actual temperature data. However, in the actual test process, at least one of the three data items is missing, which causes the actual state data of the battery to be incomplete. In the embodiment of the present application, it can be a set of battery state data corresponding to a moment, and in other embodiments, it can also be multiple sets of battery state data tested within a preset time. Among them, the actual current data is the charging current actually measured for the target battery. The actual voltage data includes the charging voltage and the maximum voltage of the monomer actually measured for the target battery. The actual temperature data includes the maximum temperature of the monomer and the minimum temperature of the monomer actually measured for the target battery. In other embodiments, the actual battery data, the actual voltage data and the actual temperature data can also include other specific test data. For example, the actual voltage data can also include data such as average voltage data, open circuit voltage or minimum voltage of the monomer. In addition, the actual state data of the battery obtained can also include but is not limited to data of the three dimensions of the actual current data, the actual voltage data and the actual temperature data. In another embodiment, the actual battery status data may also include data of other dimensions such as internal resistance data and self-discharge rate.
[0067] In an achievable implementation, the charging current of the target battery can be measured by a multimeter, i.e., the actual current data. The charging voltage of the target battery can be measured by a voltmeter or a multimeter, and the maximum cell voltage of the target battery can be measured by a battery cell voltage detection instrument, i.e., the actual voltage data can be determined. Furthermore, the maximum cell temperature and the minimum cell temperature of the target battery can be measured by a temperature sensor, i.e., the actual temperature data can be determined.
[0068] S105: Input the actual battery status data into the trained encoder in the trained MAE model to obtain a latent vector corresponding to the actual battery status data. The trained MAE model is a trained MAE model that can restore missing data in the actual current data, the actual voltage data, and the actual temperature data.
[0069] Specifically, in an embodiment of the present application, the trained MAE model refers to the complete battery current, voltage and temperature sample data after random masking, and the MAE model is trained to obtain a model with the ability to reconstruct or restore missing data in the actual current data, the actual voltage data and the actual temperature data. Under normal circumstances, the encoder (Encoder) in the MAE model mainly learns how to extract meaningful information from partially masked images and encode it into a low-dimensional feature vector for subsequent image reconstruction. In an embodiment of the present application, the trained encoder in the trained MAE model mainly learns how to extract meaningful information from incomplete actual battery state numbers and encode it into a low-dimensional feature vector. In the specific process, after the actual battery state data is input into the trained encoder, the corresponding potential vector is obtained, that is, the feature vector corresponding to the incomplete battery state data is extracted.
[0070] S106: Input the potential vector into the impedance spectrum prediction model to obtain the impedance spectrum data of the target battery.
[0071] Specifically, in an embodiment of the present application, the impedance spectrum prediction model is used to predict the corresponding impedance spectrum data based on incomplete battery current, voltage and temperature data. The impedance spectrum prediction model is a trained extreme gradient boosting (eXtreme Gradient Boosting, XGBoost) model. In other embodiments, the impedance spectrum prediction model can also be a trained LightGBM model. Further, the training process of the impedance spectrum prediction model is discussed as follows: the unmasked data corresponding to each group of battery sample state data is respectively input into the trained encoder in the trained MAE model to obtain the corresponding feature vector to be processed, and then each feature vector to be processed and the corresponding impedance value sample are used as a group of training samples of the XGBoost model. Multiple groups of training samples constitute a sample data set, and this sample data set is divided into a training set and a test set in a ratio of 8:2, and the XGBoost model is trained to finally obtain an impedance spectrum prediction model. In other embodiments, the sample data set can also be divided into a training set and a test set in a ratio of 4:1. This process is a prior art and will not be repeated here.
[0072] Furthermore, the potential vector corresponding to the actual state data of the battery is input as input data into this impedance spectrum prediction model, and the impedance values at different frequencies are predicted by the impedance spectrum prediction model, and finally the impedance spectrum data of the target battery is obtained. There is no need to directly test it through an impedance spectrum test instrument. It is only necessary to obtain the general attribute data of the target battery, such as current, voltage and temperature, which are related to the impedance spectrum data. Based on these general attribute data, the impedance spectrum data is indirectly obtained through the impedance spectrum prediction model, and even when the general attribute data is incomplete, the impedance spectrum data of the target battery can be accurately obtained.
[0073] See also Figure 2 , the present application embodiment discloses a flowchart of another method for predicting battery impedance spectrum based on MAE model, which can be implemented by computer program, or can be run on a battery impedance spectrum prediction device based on MAE model based on von Neumann system. The computer program can be integrated into the application, or can be run as an independent tool application, specifically including:
[0074] S201: Acquire multiple groups of battery sample status data, where the battery sample status data includes complete current sample data, voltage sample data, and temperature sample data.
[0075] For details, please refer to step S101, which will not be described in detail here.
[0076] S202: Determine a first shielding ratio interval corresponding to each group of battery sample status data, and randomly select a first shielding ratio from the first shielding ratio interval.
[0077] S203: randomly selecting a shielding object from the current sample data, the voltage sample data and the temperature sample data in the corresponding battery state sample data according to the first shielding ratio.
[0078] S204: Determine a corresponding second masking ratio interval according to the mutual correlation and quantity of all sub-sample data in each masking object.
[0079] S205: randomly select a second masking ratio from the second masking ratio interval, randomly select target sub-sample data from the sub-sample data in the corresponding masking object according to the second masking ratio, and perform masking processing on the target sub-sample data to obtain masked data and unmasked data corresponding to each group of battery sample status data.
[0080] Specifically, in the embodiment of the present application, each group of battery sample state data includes sample data of three dimensions: current sample data, voltage sample data, and temperature sample data, and each dimension of sample data includes at least one sub-sample data. For example, the voltage sample data includes charging voltage sample data and single cell maximum voltage sample data, both of which belong to sub-sample data of the voltage sample data. Further, according to the number of dimensions involved in the battery sample state data, the corresponding first masking ratio interval is matched from the first masking ratio matching table, so as to determine a reasonable masking ratio interval for the battery sample state data, so as to avoid the masking ratio being too small, resulting in a large amount of initial encoder calculation; the masking ratio is too large, affecting the training effect of the MAE model. The more the number of dimensions, the larger the range of the first masking ratio interval. In the embodiment of the present application, the first masking ratio interval starts from the ratio of 1 to the number of dimensions. Further, the first masking ratio is randomly selected from the first masking ratio interval, so as to better ensure the randomness of the size of the masked part of the battery sample state data. Then, according to the first masking ratio, the masking object is randomly selected from the sample data of each dimension of the battery sample state data. This further ensures the randomness of the masking object of the battery sample status data.
[0081] Furthermore, based on the mutual correlation and quantity of all sub-sample data in each masked object, a second masking ratio interval for the sub-sample data in the masked object is determined. A feasible approach is to match the mutual correlation between a single sub-sample data in the masked object and each remaining sub-sample data in the masked object in a correlation matching table. The higher the mutual correlation, the higher the correlation between the single sub-sample data and the corresponding remaining sub-samples, and the easier it is for the MAE model to infer one party based on the other.
[0082] For a single masked object, the first number of the mutual correlations that exceeds the correlation threshold among the corresponding mutual correlations is counted. If the first number exceeds the first number threshold, it means that this single sub-sample data has a strong correlation with other sub-sample data in the masked object, which means that it is easy to infer and restore based on other unmasked sub-sample data. Then this single sub-sample data is determined as easy-to-restore sample data. And so on, determine whether other sub-sample data are easy-to-restore sample data.
[0083] Further, the second number of the determined easy-to-restore sub-sample data is counted. If the second number exceeds the second number threshold, it means that more sub-sample data in this masked object is easy to be inferred and restored based on the unmasked sub-sample data even if it is masked, then the masking ratio of the sub-sample data in this masked object can be relatively large. Further, the second masking ratio interval corresponding to the second number is matched according to the preset second masking ratio matching table. The larger the second number, the larger the starting value and the end value of the second masking ratio interval. In other embodiments, the starting value of the second masking ratio interval can be determined according to the total number of sub-sample data in the masked object. The larger the total number, the larger the starting value.
[0084] If the second number does not exceed the second number threshold, it means that less sub-sample data in this masked object is easy to infer and restore based on the unmasked sub-sample data after being masked. It is necessary to mainly refer to the amount of data contained in the masked object to determine the masked ratio interval. Then, according to the number of sub-sample data in this masked object, determine the corresponding second masked ratio interval. The larger the number, the larger the amount of data contained in the masked object, and the larger the starting value and end value of the second masked ratio interval.
[0085] After the second masking ratio interval corresponding to the masked object is determined, a second masking ratio is randomly selected from the second masking ratio interval, and according to the second masking ratio, the target sub-sample data is randomly selected from the sub-sample data in the corresponding masked object for masking, thereby further improving the randomness of the masked part. And through the masking technology, the target sub-sample is masked to obtain the masked data and unmasked data corresponding to each group of battery sample state data. Thereby, the randomness of the input data when training the MAE model is improved, and then the robustness of the MAE model is improved, so that the prediction effect of the trained MAE model is better.
[0086] Among them, according to the second masking ratio, the target sub-sample data is randomly selected from the sub-sample data in the corresponding masked object, and the target sub-sample data is the sub-sample data that needs to be masked. A feasible implementation method is: when selecting the target sub-sample data for each masked object, the masked object that is currently selecting the sub-sample data to be masked is determined as the current masked object. When the second number of the easily restored sub-sample data in the current masked object does not exceed the second number threshold, it means that the less sub-sample data in the current masked object is easy to be inferred and restored based on the unmasked sub-sample data after being masked. Further, if the selected target sub-sample data contains all the easily restored sub-sample data and the selected ratio is less than the corresponding second masking ratio, it means that the sub-sample data with a high correlation with the other remaining sub-sample data are all determined to be masked. If the sub-sample data is continuously selected for masking, it is difficult to infer and restore based on the remaining sub-sample data (with a low correlation with the sub-sample data to be selected). Then the selection of the target sub-sample data is suspended, and the currently selected target sub-sample data is masked, so that the subsequent training effect of the MAE model is better.
[0087] If the selected target sub-sample data does not contain easily restored sub-sample data, and the selected ratio also reaches the corresponding second masking ratio, it means that after the selection is completed according to the second masking ratio, the sub-sample data selected for masking are easy to infer and restore based on the remaining unmasked sub-sample data (including easily restored sub-sample data). In this case, appropriately increasing the second masking ratio has little effect on the training effect of the MAE model, and can also reduce the calculation amount of the initial encoder to a certain extent, thereby increasing the corresponding second masking ratio to the preset masking ratio and continuing random selection. Finally, the target sub-sample data selected in each masking object is masked to obtain the masked data and unmasked data corresponding to the corresponding battery sample status data.
[0088] S206: Based on the masked data and the unmasked data, a preset MAE model is trained to obtain a trained MAE model.
[0089] S207: Acquire actual battery status data of the target battery, wherein at least one of the actual current data, the actual voltage data, and the actual temperature data in the actual battery status data is missing.
[0090] S208: Input the actual battery status data into the trained encoder in the trained MAE model to obtain a latent vector corresponding to the actual battery status data. The trained MAE model is a trained MAE model that can restore missing data in the actual current data, the actual voltage data, and the actual temperature data.
[0091] S209: Input the potential vector into the impedance spectrum prediction model to obtain the impedance spectrum data of the target battery.
[0092] For details, please refer to steps S103-S106, which will not be described in detail here.
[0093] The implementation principle of the battery impedance spectrum prediction method based on the MAE model in the embodiment of the present application is as follows: after obtaining incomplete actual battery state data of the target battery, the actual battery state data is input into the trained encoder in the trained MAE model. Since the trained MAE model can restore and reconstruct missing data, the trained encoder can accurately extract the feature vector corresponding to the incomplete actual battery state data, that is, the latent vector, so as to facilitate the subsequent input of the latent vector into the impedance spectrum prediction model. The impedance spectrum prediction model can accurately predict the impedance spectrum data associated with the actual battery state data in the target battery based on the accurate features corresponding to the actual battery state data, thereby achieving impedance spectrum data with higher accuracy even when the tested current data, voltage data and temperature data are incomplete.
[0094] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0095] See also Figure 3 , is a schematic diagram of the structure of a battery impedance spectrum prediction device based on a MAE model provided in an embodiment of the present application. The battery impedance spectrum prediction device based on a MAE model can be implemented as all or part of the device through software, hardware, or a combination of both. The device includes a data acquisition module 11, a vector determination module 12, and an impedance prediction module 13.
[0096] A data acquisition module 11 is used to acquire actual battery status data of a target battery, wherein at least one of current actual data, voltage actual data and temperature actual data in the actual battery status data is missing;
[0097] A vector determination module 12 is used to input the actual state data of the battery into a trained encoder in a trained MAE model to obtain a potential vector corresponding to the actual state data of the battery, wherein the trained MAE model is a trained MAE model that can restore missing data in the actual current data, the actual voltage data, and the actual temperature data;
[0098] The impedance prediction module 13 is used to input the potential vector into the impedance spectrum prediction model to obtain the impedance spectrum data of the target battery.
[0099] Optional, such as Figure 4 As shown, the device also includes a model training module 14, which is specifically used to:
[0100] Acquire multiple groups of battery sample status data, where the battery sample status data includes complete current sample data, voltage sample data, and temperature sample data;
[0101] Randomly mask each group of battery sample status data to obtain masked data and unmasked data;
[0102] Based on the masked data and the unmasked data, the preset MAE model is trained to obtain a trained MAE model.
[0103] Optionally, the model training module 14 is further used for:
[0104] Inputting the unmasked data corresponding to each group of battery sample state data as the first input data into the initial encoder in the preset MAE model for training to obtain an output result;
[0105] The output result is merged with the corresponding masked data to obtain the corresponding second input data;
[0106] Each second input data is input into the initial decoder in the MAE model for training to obtain a trained MAE model.
[0107] Optionally, the model training module 14 is further used for:
[0108] Randomly select one sample data from the current sample data, voltage sample data and temperature sample data in each group of battery sample status data to perform random masking to obtain corresponding masked data;
[0109] Sample data other than sample data subjected to random masking are screened from the masked data and determined as unmasked data.
[0110] Optionally, the model training module 14 is further used for:
[0111] Determine a first shielding ratio interval corresponding to each group of battery sample state data, and randomly select a first shielding ratio from the first shielding ratio interval;
[0112] According to the first shielding ratio, randomly selecting a shielding object from the current sample data, the voltage sample data and the temperature sample data in the corresponding battery sample state data;
[0113] Determine a corresponding second masking ratio interval according to the mutual correlation and quantity of all sub-sample data in each masking object;
[0114] A second masking ratio is randomly selected from the second masking ratio interval, and according to the second masking ratio, target sub-sample data is randomly selected from the sub-sample data in the corresponding masked object, and masking processing is performed on the target sub-sample data to obtain masked data and unmasked data corresponding to each group of battery sample status data.
[0115] Optionally, the model training module 14 is further used for:
[0116] Determine the correlation between the single sub-sample data and each remaining sub-sample data in each masked object;
[0117] Counting the first number of mutual correlations that exceeds the correlation threshold among the mutual correlations, and when the first number is greater than the first number threshold, determining the corresponding sub-sample data as easy-to-restore sub-sample data;
[0118] If the second number of the easily restored sub-sample data exceeds the second number threshold, determining the corresponding second masking ratio interval according to the second number;
[0119] If the second number of the easily restored sub-sample data does not exceed the second number threshold, the corresponding second masking ratio interval is determined according to the number of all sub-sample data in the corresponding masked object.
[0120] Optionally, the model training module 14 is further used for:
[0121] Determine the masking object of the sub-sample data currently selected to be masked as the current masking object;
[0122] When the second number of the easily restored sub-sample data of the current masked object does not exceed the second number threshold, if the selected target sub-sample data contains all the easily restored sub-sample data and the selected ratio is less than the corresponding second masking ratio, the selection is suspended;
[0123] If the selected target sub-sample data does not include the easily restored sub-sample data and the selected ratio reaches the corresponding second masking ratio, the corresponding second masking ratio is increased and random selection continues.
[0124] It should be noted that the battery impedance spectrum prediction device based on the MAE model provided in the above embodiment only uses the division of the above functional modules as an example when executing the battery impedance spectrum prediction method based on the MAE model. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the battery impedance spectrum prediction device based on the MAE model provided in the above embodiment and the battery impedance spectrum prediction method based on the MAE model belong to the same concept. The implementation process is detailed in the method embodiment, which will not be repeated here.
[0125] An embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a battery impedance spectrum prediction method based on a MAE model of the above embodiment is adopted.
[0126] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.
[0127] Among them, through this computer-readable storage medium, a battery impedance spectrum prediction method based on the MAE model of the above embodiment is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.
[0128] An embodiment of the present application also discloses an electronic device, in which a computer program is stored in a computer-readable storage medium. When the computer program is loaded and executed by a processor, the above-mentioned battery impedance spectrum prediction method based on the MAE model is adopted.
[0129] The electronic device may be a desktop computer, a laptop computer, a cloud server or other electronic device, and the electronic device includes but is not limited to a processor and a memory. For example, the electronic device may also include input and output devices, a network access device, and a bus.
[0130] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0131] Among them, the memory can be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device, or it can be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the electronic device. Moreover, the memory can also be a combination of an internal storage unit and an external storage device of the electronic device. The memory is used to store computer programs and other programs and data required by the electronic device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.
[0132] Among them, through this electronic device, a battery impedance spectrum prediction method based on the MAE model of the above embodiment is stored in the memory of the electronic device, and is loaded and executed on the processor of the electronic device for easy use.
[0133] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A battery impedance spectrum prediction method based on MAE model, characterized in that: The method comprises: Acquire actual battery status data of a target battery, wherein at least one of current actual data, voltage actual data, and temperature actual data in the actual battery status data is missing; Inputting the actual battery state data into a trained encoder in a trained MAE model to obtain a potential vector corresponding to the actual battery state data, wherein the trained MAE model is a trained MAE model capable of restoring missing data in the actual current data, the actual voltage data, and the actual temperature data; The potential vector is input into an impedance spectrum prediction model to obtain impedance spectrum data of the target battery; before the actual state data of the battery is input into a trained encoder in a trained MAE model, the method further includes: Acquire multiple groups of battery sample status data, wherein the battery sample status data includes complete current sample data, voltage sample data and temperature sample data; Randomly masking each group of battery sample status data to obtain masked data and unmasked data; Based on the masked data and the unmasked data, a preset MAE model is trained to obtain a trained MAE model; wherein, randomly masking each group of the battery sample state data to obtain the masked data and the unmasked data specifically includes: Determine a first shielding ratio interval corresponding to each group of the battery sample status data, and randomly select a first shielding ratio from the first shielding ratio interval; the current sample data, the voltage sample data, and the temperature sample data in the battery sample status data each contain at least one sub-sample data; According to the first shielding ratio, randomly selecting a shielding object from the current sample data, the voltage sample data and the temperature sample data in the corresponding battery sample state data; Determining a corresponding second masking ratio interval according to the mutual correlation and quantity of all sub-sample data in each of the masked objects; A second masking ratio is randomly selected from the second masking ratio interval, and according to the second masking ratio, target sub-sample data is randomly selected from the sub-sample data in the corresponding masked object, and masking processing is performed on the target sub-sample data to obtain masked data and unmasked data corresponding to each group of the battery sample status data.
2. The battery impedance spectrum prediction method based on the MAE model according to claim 1, characterized in that: The step of training a preset MAE model based on the masked data and the unmasked data to obtain a trained MAE model specifically includes: Inputting the unmasked data corresponding to each group of the battery sample state data as the first input data into the initial encoder in the preset MAE model for training to obtain an output result; Fusing the output result with the corresponding masked data to obtain corresponding second input data; Each of the second input data is input into the initial decoder in the MAE model for training to obtain a trained MAE model.
3. The battery impedance spectrum prediction method based on the MAE model according to claim 1, characterized in that: The randomly masking each group of battery sample status data to obtain masked data and unmasked data specifically includes: Randomly select one sample data from the current sample data, voltage sample data and temperature sample data in each group of the battery sample state data to perform random masking to obtain corresponding masked data; Sample data other than sample data subjected to random masking are screened from the masked data and determined as unmasked data.
4. The battery impedance spectrum prediction method based on the MAE model according to claim 1, characterized in that: The determining, according to the mutual correlation and quantity of all sub-sample data in each of the masked objects, the corresponding second masking ratio interval specifically includes: Determine the mutual correlation between the single sub-sample data and each remaining sub-sample data in each of the masked objects; Counting the first number of mutual correlations exceeding the correlation threshold among the mutual correlations, and when the first number is greater than the first number threshold, determining the corresponding sub-sample data as easy-to-restore sub-sample data; If the second number of the easily restored sub-sample data exceeds the second number threshold, determining a corresponding second masking ratio interval according to the second number; If the second number of the easily restored sub-sample data does not exceed the second number threshold, a corresponding second masking ratio interval is determined according to the number of all sub-sample data in the corresponding masked object.
5. The battery impedance spectrum prediction method based on the MAE model according to claim 4, characterized in that: The randomly selecting target sub-sample data from the sub-sample data in the corresponding masked object according to the second masking ratio specifically includes: Determine the masking object of the sub-sample data currently selected to be masked as the current masking object; When the second number of the easily restored sub-sample data of the currently masked object does not exceed the second number threshold, if the selected target sub-sample data includes all the easily restored sub-sample data and the selected ratio is less than the corresponding second masking ratio, suspending the selection; If the selected target sub-sample data does not include the easily restored sub-sample data and the selected ratio reaches the corresponding second masking ratio, the corresponding second masking ratio is increased and random selection continues.
6. A battery impedance spectrum prediction device based on a MAE model, used to implement the battery impedance spectrum prediction method based on a MAE model as described in any one of claims 1 to 5, characterized in that: include: A data acquisition module (11) is used to acquire actual battery status data of a target battery, wherein at least one of the actual current data, the actual voltage data and the actual temperature data in the actual battery status data is missing; A vector determination module (12) is used to input the actual battery state data into a trained encoder in a trained MAE model to obtain a potential vector corresponding to the actual battery state data, wherein the trained MAE model is a trained MAE model capable of restoring missing data in the actual current data, the actual voltage data and the actual temperature data; An impedance prediction module (13) is used to input the potential vector into an impedance spectrum prediction model to obtain impedance spectrum data of the target battery.
7. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is loaded and executed by a processor, the method according to any one of claims 1 to 5 is adopted.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor loads and executes the computer program, the method according to any one of claims 1 to 5 is adopted.
Citation Information
Patent Citations
Method for predicting impedance spectrum of battery based on current, voltage and temperature of battery
CN116520174A
Traffic network data restoration method based on MAE
CN116680525A
Dense restoration method for sparse big data of power battery
CN117473236A