A battery performance prediction method and system based on metric learning

By constructing metric learning and ranking learning agent tasks, the problem of low accuracy in battery performance prediction in unsupervised learning is solved, efficient unsupervised learning of lithium battery charging data is achieved, and the accuracy of battery performance prediction is improved.

CN117250512BActive Publication Date: 2025-10-10FUJIAN NEBULA ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310901570.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-10-10
Estimated Expiration
2043-07-21

AI Technical Summary

Technical Problem

Existing unsupervised learning methods have difficulty capturing the complex relationships between lithium battery charging segment data, and traditional feature extraction methods cannot effectively extract key information from charging segment data, affecting the accuracy of battery performance prediction.

Method used

A metric learning-based method is adopted to create a pre-trained battery model through an encoder and a predictor, construct a metric learning agent task and a ranking learning agent task, and use the total loss function to train the model, extract battery features and predict battery freshness to achieve unsupervised learning.

Benefits of technology

It effectively captures the intrinsic relationship of charging data, improves the accuracy of battery performance prediction, avoids the inaccuracy and inconsistency of manual labeling, and improves the accuracy of battery performance prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117250512B_ABST
    Figure CN117250512B_ABST
Patent Text Reader

Abstract

The application provides a battery performance prediction method and system based on metric learning in the technical field of battery detection, and the method comprises the following steps: S10, creating a pre-training battery model based on an encoder and a predictor; S20, cutting charging data into equal-length charging sub-data A, B and C; S30, encoding A, B and C through the encoder to obtain battery features e_anchor, e_pos and e_neg; S40, inputting e_anchor, e_pos and e_neg into the predictor to obtain battery freshness degrees fa, fb and fc; S50, constructing a metric learning agent task based on e_anchor, e_pos and e_neg, and constructing a ranking learning agent task based on fa, fb and fc; S60, creating a total loss function, and training the pre-training battery model based on the total loss function, the metric learning agent task and the ranking learning agent task; and S70, extracting the encoder from the pre-training battery model for battery performance prediction. The application has the advantage that the battery performance prediction accuracy is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery detection, and in particular to a battery performance prediction method and system based on metric learning. Background Art

[0002] Lithium batteries, as high-performance energy storage devices, are widely used in electric vehicles, portable electronic devices, and other fields. However, the charging performance of lithium batteries is affected by many factors, such as battery health and environmental conditions during charging. To ensure efficient and safe charging of lithium batteries, it is necessary to analyze and predict the charging data of lithium batteries.

[0003] However, due to the lack of large-scale labeled charging segment data, obtaining large-scale labeled datasets is an expensive and time-consuming task. Therefore, traditional supervised learning methods are limited in pre-training on lithium battery charging segment data. The pre-training method for unlabeled charging segment data has the following disadvantages: 1. Existing unsupervised learning methods usually find it difficult to capture the complex relationship between charging segment data, which limits the performance of the pre-training model; 2. Traditional feature extraction methods cannot effectively extract key information from charging segment data, which in turn affects the accuracy of battery performance prediction.

[0004] Therefore, how to provide a battery performance prediction method and system based on metric learning to improve the accuracy of battery performance prediction has become a technical problem that needs to be solved urgently. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a battery performance prediction method and system based on metric learning to improve the accuracy of battery performance prediction.

[0006] In a first aspect, the present invention provides a battery performance prediction method based on metric learning, comprising the following steps:

[0007] Step S10: creating a pre-trained battery model based on the encoder and the predictor;

[0008] Step S20, cutting the acquired charging data into charging sub-data A, charging sub-data B, and charging sub-data C of equal length in sequence;

[0009] Step S30: Encode the charging sub-data A, charging sub-data B, and charging sub-data C respectively by the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively;

[0010] Step S40: input the e_anchor, e_pos, and e_neg into a predictor to obtain battery freshness fa, fb, and fc, respectively;

[0011] Step S50: constructing a metric learning proxy task based on the e_anchor, e_pos, and e_neg, and constructing a ranking learning proxy task based on the fa, fb, and fc;

[0012] Step S60: creating a total loss function, and training the pre-trained battery model based on the total loss function, the metric learning agent task, and the ranking learning agent task;

[0013] Step S70: extracting an encoder from the pre-trained battery model for battery performance prediction.

[0014] Furthermore, in step S20, the charging data at least includes a voltage value, a current value, a temperature value, an SOC value, and a charging time; and the charging time of the charging sub-data A, the charging sub-data B, and the charging sub-data C increases in sequence.

[0015] Furthermore, in step S50, the metric learning agent task requires that a first metric distance between e_anchor and e_neg is greater than a second metric distance between e_anchor and e_pos.

[0016] Furthermore, in step S50, the ranking learning agent task requires the three battery freshnesses predicted by the predictor to decrease in order of charging time.

[0017] Furthermore, the step S60 is specifically as follows:

[0018] Create a total loss function: L = Lmetric + λLrank;

[0019] Among them, L represents the total loss value of the total loss function; Lmetric represents the loss function of the metric learning agent task; Lrank represents the loss function of the ranking learning agent task; λ represents the weight coefficient;

[0020] The pre-trained battery model is trained using the metric learning agent task and the ranking learning agent task until the total loss value of the total loss function is less than a preset threshold.

[0021] In a second aspect, the present invention provides a battery performance prediction system based on metric learning, comprising the following modules:

[0022] A battery model creation module, configured to create a pre-trained battery model based on an encoder and a predictor;

[0023] a charging data clipping module, configured to sequentially clip the acquired charging data into charging sub-data A, charging sub-data B, and charging sub-data C of equal length;

[0024] a feature extraction module, configured to encode the charging sub-data A, charging sub-data B, and charging sub-data C respectively through the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively;

[0025] A freshness prediction module, configured to input the e_anchor, e_pos, and e_neg into a predictor to obtain battery freshness fa, fb, and fc, respectively;

[0026] A task construction module, configured to construct a metric learning agent task based on the e_anchor, e_pos, and e_neg, and to construct a ranking learning agent task based on the fa, fb, and fc;

[0027] A training module, configured to create a total loss function and train a pre-trained battery model based on the total loss function, a metric learning agent task, and a ranking learning agent task;

[0028] The battery performance prediction module is used to extract an encoder from the pre-trained battery model for battery performance prediction.

[0029] Furthermore, in the charging data clipping module, the charging data includes at least voltage value, current value, temperature value, SOC value and charging time; the charging time of the charging sub-data A, charging sub-data B and charging sub-data C increases in sequence.

[0030] Furthermore, in the task construction module, the metric learning agent task requires that the first metric distance between e_anchor and e_neg is greater than the second metric distance between e_anchor and e_pos.

[0031] Furthermore, in the task construction module, the ranking learning agent task requires that the three battery freshnesses predicted by the predictor decrease in order of charging time.

[0032] Furthermore, the training module is specifically used to:

[0033] Create a total loss function: L = Lmetric + λLrank;

[0034] Among them, L represents the total loss value of the total loss function; Lmetric represents the loss function of the metric learning agent task; Lrank represents the loss function of the ranking learning agent task; λ represents the weight coefficient;

[0035] The pre-trained battery model is trained using the metric learning agent task and the ranking learning agent task until the total loss value of the total loss function is less than a preset threshold.

[0036] The advantages of the present invention are:

[0037] Create a pre-trained battery model through the encoder and predictor, and cut the acquired charging data into charging sub-data A, B, and C of equal length in sequence. Then, encode A, B, and C respectively through the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively. Input e_anchor, e_pos, and e_neg into the predictor to obtain battery freshness fa, fb, and fc respectively. Then, construct a metric learning agent task based on e_anchor, e_pos, and e_neg, and a ranking learning agent task based on fa, fb, and fc. Then create a total loss function. The pre-trained battery model is trained based on the total loss function, metric learning agent task and ranking learning agent task, and finally the encoder is extracted from the trained pre-trained battery model for battery performance prediction; that is, by constructing metric learning agent task and ranking learning agent task to perform unsupervised learning on charging data without label information, the similarity between charging sub-data (fragment data) can be learned, thereby effectively capturing the intrinsic relationship of charging data, and making effective use of a large amount of charging data without label information, without the need for additional manual labeling, avoiding the inaccuracy and inconsistency of manual labeling, and ultimately greatly improving the accuracy of battery performance prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0039] Figure 1 This is a flow chart of a battery performance prediction method based on metric learning of the present invention.

[0040] Figure 2 It is a structural diagram of a battery performance prediction system based on metric learning of the present invention.

[0041] Figure 3 It is a flow chart of a battery performance prediction method based on metric learning according to the present invention. DETAILED DESCRIPTION

[0042] The technical solution in the embodiments of the present application has the following overall idea: constructing a metric learning agent task and a ranking learning agent task to perform unsupervised learning on charging data without label information, learning the similarities between charging sub-data to capture intrinsic relationships, without the need for additional manual labeling, avoiding the inaccuracy and inconsistency of manual labeling, and thus improving the accuracy of battery performance prediction.

[0043] Please refer to Figures 1 to 3 As shown, a preferred embodiment of a battery performance prediction method based on metric learning of the present invention includes the following steps:

[0044] Step S10: creating a pre-trained battery model based on the encoder and the predictor;

[0045] The encoder and predictor can be determined based on the amount of data and the task type, and can be selected from CNN, RNN, or transformer. The encoder is used to extract battery features (unique representations) from the input charging data (charging curve). The predictor is used for unsupervised learning to predict the freshness of the battery.

[0046] Step S20, cutting the acquired charging data into charging sub-data A, charging sub-data B, and charging sub-data C of equal length in sequence; the AC time interval is greater than the AB time interval;

[0047] Step S30: Encode the charging sub-data A, charging sub-data B, and charging sub-data C respectively by the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively;

[0048] Step S40: input the e_anchor, e_pos, and e_neg into a predictor to obtain battery freshness fa, fb, and fc, respectively;

[0049] The characteristic distance between two charging sub-data segments with similar time intervals should be smaller than the characteristic distance between two charging sub-data segments with larger time intervals. In addition, since the battery is constantly in use, the freshness of the battery decreases over time. Therefore, the freshness of the battery with earlier charging time should be greater than that of the battery with later charging time, that is, fa>fb>fc;

[0050] Step S50: constructing a metric learning proxy task based on the e_anchor, e_pos, and e_neg, and constructing a ranking learning proxy task based on the fa, fb, and fc;

[0051] Step S60: creating a total loss function, and training the pre-trained battery model based on the total loss function, the metric learning agent task, and the ranking learning agent task;

[0052] Step S70: extracting an encoder from the pre-trained battery model for battery performance prediction.

[0053] Since the metric learning agent task and ranking learning agent task constructed in the present invention are mainly to enable the encoder of the pre-trained battery model to extract high-dimensional representations, and the predictor is designed to assist the encoder learning, when migrating downstream tasks, only the encoder needs to be retained for fine-tuning. For example, if the downstream task is the SOH estimation problem, the pre-trained encoder can be connected to a linear layer, and the trained weights can be used as the initial weights to perform fine-tuning on the dataset of the downstream task.

[0054] In step S20 , the charging data at least includes a voltage value, a current value, a temperature value, an SOC value, and a charging time; and the charging time of the charging sub-data A, the charging sub-data B, and the charging sub-data C increases in sequence.

[0055] In step S50, the metric learning agent task requires that a first metric distance between e_anchor and e_neg is greater than a second metric distance between e_anchor and e_pos.

[0056] Metric learning uses the similarity between samples (charging sub-data) to learn a mapping function, mapping similar samples to close embedding spaces and keeping dissimilar samples as far away as possible in the feature space; using the metric learning method to pre-train unlabeled charging sub-data, by learning the similarity between charging sub-data to construct an effective feature representation, thereby providing strong support for subsequent analysis tasks and helping to improve the accuracy of battery performance prediction.

[0057] In step S50, the ranking learning agent task requires the three battery freshness predicted by the predictor to decrease in order of charging time.

[0058] The step S60 is specifically as follows:

[0059] Create a total loss function: L = Lmetric + λLrank;

[0060] Among them, L represents the total loss value of the total loss function; Lmetric represents the loss function of the metric learning agent task, and the cosine distance, metric distance, or Mahalanobis distance can be selected according to the actual situation; Lrank represents the loss function of the ranking learning agent task; λ represents the weight coefficient;

[0061] The pre-trained battery model is trained using the metric learning agent task and the ranking learning agent task until the total loss value of the total loss function is less than a preset threshold.

[0062] A preferred embodiment of a battery performance prediction system based on metric learning of the present invention includes the following modules:

[0063] A battery model creation module, configured to create a pre-trained battery model based on an encoder and a predictor;

[0064] The encoder and predictor can be determined based on the amount of data and the task type, and can be selected from CNN, RNN, or transformer. The encoder is used to extract battery features (unique representations) from the input charging data (charging curve). The predictor is used for unsupervised learning to predict the freshness of the battery.

[0065] A charging data clipping module is used to sequentially clip the acquired charging data into charging sub-data A, charging sub-data B, and charging sub-data C of equal length; the AC time interval is greater than the AB time interval;

[0066] a feature extraction module, configured to encode the charging sub-data A, charging sub-data B, and charging sub-data C respectively through the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively;

[0067] A freshness prediction module, configured to input the e_anchor, e_pos, and e_neg into a predictor to obtain battery freshness fa, fb, and fc, respectively;

[0068] The characteristic distance between two charging sub-data segments with similar time intervals should be smaller than the characteristic distance between two charging sub-data segments with larger time intervals. In addition, since the battery is constantly in use, the freshness of the battery decreases over time. Therefore, the freshness of the battery with earlier charging time should be greater than that of the battery with later charging time, that is, fa>fb>fc;

[0069] A task construction module, configured to construct a metric learning agent task based on the e_anchor, e_pos, and e_neg, and to construct a ranking learning agent task based on the fa, fb, and fc;

[0070] A training module, configured to create a total loss function and train a pre-trained battery model based on the total loss function, a metric learning agent task, and a ranking learning agent task;

[0071] The battery performance prediction module is used to extract an encoder from the pre-trained battery model for battery performance prediction.

[0072] Since the metric learning agent task and the ranking learning agent task constructed by the application are mainly to enable the encoder of the pre-trained battery model to extract high-dimensional representations, the predictor is designed to assist the encoder learning, so when the downstream task is transferred, only the encoder needs to be retained for fine-tuning, for example, if the downstream task is an SOH estimation problem, the pre-trained encoder can be connected with a linear layer, and the trained weight is used as the initial weight to perform fine-tuning on the dataset of the downstream task.

[0073] The charging data at least includes voltage value, current value, temperature value, SOC value and charging time; the charging time of the charging sub-data A, the charging sub-data B and the charging sub-data C is sequentially increased.

[0074] In the task construction module, the metric learning agent task requires that the first metric distance between e_anchor and e_neg is greater than the second metric distance between e_anchor and e_pos.

[0075] Metric learning uses the similarity between samples (charging sub-data) to learn a mapping function, maps similar samples to close embedding space, and tries to keep dissimilar samples far apart in feature space; the unlabelled charging sub-data is pre-trained by using the metric learning method, an effective feature representation is constructed by learning the similarity between the charging sub-data, thereby providing strong support for subsequent analysis tasks, and the battery performance prediction accuracy is improved.

[0076] In the task construction module, the ranking learning agent task requires that the three battery freshness degrees predicted by the predictor are sequentially decreased according to the charging time.

[0077] The training module is specifically used for:

[0078] A total loss function L is created: L = Lmetric + lambda Lrank.

[0079] Wherein, L represents the total loss value of the total loss function; Lmetric represents the loss function of the metric learning agent task, and cosine distance, metric distance or Mahalanobis distance can be selected according to actual conditions; Lrank represents the loss function of the ranking learning agent task; Lambda represents a weight coefficient.

[0080] The pre-trained battery model is trained by using the metric learning agent task and the ranking learning agent task until the total loss value of the total loss function is less than a preset threshold.

[0081] In summary, the application has the following advantages:

[0082] Create a pre-trained battery model through the encoder and predictor, and cut the acquired charging data into charging sub-data A, B, and C of equal length in sequence. Then, encode A, B, and C respectively through the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively. Input e_anchor, e_pos, and e_neg into the predictor to obtain battery freshness fa, fb, and fc respectively. Then, construct a metric learning agent task based on e_anchor, e_pos, and e_neg, and a ranking learning agent task based on fa, fb, and fc. Then create a total loss function. The pre-trained battery model is trained based on the total loss function, metric learning agent task and ranking learning agent task, and finally the encoder is extracted from the trained pre-trained battery model for battery performance prediction; that is, by constructing metric learning agent task and ranking learning agent task to perform unsupervised learning on charging data without label information, the similarity between charging sub-data (fragment data) can be learned, thereby effectively capturing the intrinsic relationship of charging data, and making effective use of a large amount of charging data without label information, without the need for additional manual labeling, avoiding the inaccuracy and inconsistency of manual labeling, and ultimately greatly improving the accuracy of battery performance prediction.

[0083] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A battery performance prediction method based on metric learning, characterized by: The steps include: Step S10: creating a pre-trained battery model based on the encoder and the predictor; Step S20, cutting the acquired charging data into charging sub-data A, charging sub-data B, and charging sub-data C of equal length in sequence; Step S30: Encode the charging sub-data A, charging sub-data B, and charging sub-data C respectively by the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively; Step S40: input the e_anchor, e_pos, and e_neg into a predictor to obtain battery freshness fa, fb, and fc, respectively; Step S50: constructing a metric learning agent task based on the e_anchor, e_pos, and e_neg, and constructing a ranking learning agent task based on the fa, fb, and fc; the ranking learning agent task requires that the three battery freshness predicted by the predictor decrease in order of charging time; Step S60: Create a total loss function: L=Lmetric+λLrank; Among them, L represents the total loss value of the total loss function; Lmetric represents the loss function of the metric learning agent task; Lrank represents the loss function of the ranking learning agent task; λ represents the weight coefficient; Training the pre-trained battery model using the metric learning agent task and the ranking learning agent task until the total loss value of the total loss function is less than a preset threshold; Step S70: extracting an encoder from the pre-trained battery model for battery performance prediction.

2. The battery performance prediction method based on metric learning according to claim 1, characterized in that: In step S20 , the charging data at least includes a voltage value, a current value, a temperature value, an SOC value, and a charging time; and the charging time of the charging sub-data A, the charging sub-data B, and the charging sub-data C increases in sequence.

3. The battery performance prediction method based on metric learning according to claim 1, characterized in that: In step S50, the metric learning agent task requires that a first metric distance between e_anchor and e_neg is greater than a second metric distance between e_anchor and e_pos.

4. A battery performance prediction system based on metric learning, characterized by: Includes the following modules: A battery model creation module, configured to create a pre-trained battery model based on an encoder and a predictor; a charging data clipping module, configured to sequentially clip the acquired charging data into charging sub-data A, charging sub-data B, and charging sub-data C of equal length; a feature extraction module, configured to encode the charging sub-data A, charging sub-data B, and charging sub-data C respectively through the encoder to obtain battery features e_anchor, e_pos, and e_neg respectively; A freshness prediction module, configured to input the e_anchor, e_pos, and e_neg into a predictor to obtain battery freshness fa, fb, and fc, respectively; A task construction module is configured to construct a metric learning agent task based on the e_anchor, e_pos, and e_neg, and to construct a ranking learning agent task based on the fa, fb, and fc; the ranking learning agent task requires that the three battery freshness values ​​predicted by the predictor decrease in order of charging time; Training module, used to create a total loss function: L=Lmetric+λLrank; Among them, L represents the total loss value of the total loss function; Lmetric represents the loss function of the metric learning agent task; Lrank represents the loss function of the ranking learning agent task; λ represents the weight coefficient; Training the pre-trained battery model using the metric learning agent task and the ranking learning agent task until the total loss value of the total loss function is less than a preset threshold; The battery performance prediction module is used to extract an encoder from the pre-trained battery model for battery performance prediction.

5. The battery performance prediction system based on metric learning according to claim 4, characterized in that: In the charging data trimming module, the charging data at least includes voltage value, current value, temperature value, SOC value and charging time; the charging time of the charging sub-data A, charging sub-data B and charging sub-data C increases in sequence.

6. The battery performance prediction system based on metric learning according to claim 4, characterized in that: In the task construction module, the metric learning agent task requires that a first metric distance between e_anchor and e_neg is greater than a second metric distance between e_anchor and e_pos.

Citation Information

Patent Citations

  • Electric vehicle lithium battery SOH estimation method based on deep network self-adaption

    CN113740736A

  • Lithium battery aging prediction method and system based on multi-task learning

    CN116298902A