A new energy vehicle battery multiple fault early warning method based on imbalance data
Through the methods of feature enhancement, sample minority hybrid enhancement and label correction, the problems of uncertainty and class imbalance in battery fault diagnosis of new energy vehicles are solved, and the accuracy and robustness of fault identification are improved.
Patent Information
- Application Number
- CN202411616382.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-08
- Filing Date
- 2024-11-13
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The prior art has uncertainty, multi-labeling, class imbalance and positive and negative imbalance in the diagnosis of battery faults of new energy vehicles, resulting in the risk of noise accumulation and reducing the effectiveness of fault identification.
The multi-failure warning method of new energy vehicle batteries based on unbalanced data is adopted, including feature enhancement module, prediction module, sample minority hybrid enhancement module, label fine-grained management module and label correction module. Through data enhancement and loss correction strategies, a Gaussian hybrid model based on Focal Loss loss function is constructed to carry out label fine-grained management and sample renovation.
It significantly enhances the robustness and accuracy of the model for battery failure labels for new energy vehicles, effectively alleviates the problem of class imbalance, and improves the effectiveness of fault identification.
Smart Images

Figure CN119511096B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data mining, and in particular relates to a new energy vehicle battery multiple fault early warning method based on unbalanced data. Background Art
[0002] With the rapid growth in production and sales of new energy vehicles in my country, quality issues have become increasingly prominent. Safety incidents such as fires and power outages have become frequent, necessitating an urgent improvement in the safety and quality of new energy vehicles. According to statistics, over 90% of new energy vehicle fires in China in recent years occurred during operation, primarily due to abnormal operating conditions of the power battery, which often exhibit mixed failure modes. Each battery failure type exhibits unique characteristics, with some patterns exhibiting overlapping features. The specific patterns are complex and varied, making them difficult to summarize.
[0003] Currently, there are three common methods for power battery fault diagnosis: physical model-based, signal processing-based, and data-driven. Data-driven fault diagnosis methods, among others, analyze and process real-time operating data from new energy vehicles, demonstrating high accuracy and reliability. However, this method's fault warning mechanism primarily relies on expert experience to design a fault identification algorithm for labeling the dataset, resulting in uncertainty and multi-label nature of the battery data. Furthermore, because fault phenomena represent a small proportion of the overall data and the proportions of various fault modes are uneven, battery data labels exhibit both class imbalance and positive-negative imbalance. This unbalanced, noisy data dominates the optimization process, increasing the risk of noise accumulation due to model miscalibration and leading to significant model overfitting. This poses a challenge to multi-label classification in automotive fault diagnosis.
[0004] Therefore, the uncertainty, multi-label nature, class imbalance, and positive-negative imbalance of battery data will bring noise accumulation risks to data-driven methods, thereby reducing the effectiveness of identifying potential battery failures. Summary of the Invention
[0005] To address the above-mentioned problems in the prior art, the present invention adopts a new energy vehicle battery multiple fault early warning method based on unbalanced data, comprising: obtaining new energy vehicle battery monitoring data to be warned, inputting the data into a trained new energy vehicle battery multiple fault early warning model, and obtaining new energy vehicle battery multiple fault identification results; the new energy vehicle battery multiple fault early warning model includes: a feature enhancement module, a prediction module, a sample minority hybrid enhancement module, a label fine-grained management module, and a label correction module;
[0006] The training process of the new energy vehicle battery multi-fault warning model includes:
[0007] S1: Obtain new energy vehicle battery monitoring data X and its fault category label Input the data X into the feature enhancement module to obtain the enhanced feature X′;
[0008] S2: Enhance the feature X′ and the fault category label Combine to get the complete data set X all ; The complete dataset X all Input the prediction module to obtain the fault category probability; complete data set X all Includes multiple samples, each sample includes enhanced features and its fault category label;
[0009] S3: The complete dataset X all and a few hybrid enhancement modules of the fault category probability input samples to obtain an enhanced dataset;
[0010] S4: Input the enhanced dataset into the label fine-grained management module to obtain the clean label probability of each sample in the enhanced dataset; divide the enhanced dataset into a non-clean label set U and a clean label set H according to the clean label probability;
[0011] S5: Input the non-clean label set U into the label correction module to obtain the refurbished label set R;
[0012] S6: Calculate the total loss function value based on the fault category probability and clean label probability of the samples in the refurbished label set R and the clean label set H, and optimize the model parameters based on the total loss function value. When the total loss function value is minimized, the trained new energy vehicle battery multi-fault warning model is obtained.
[0013] data Fault category label Where T+1 is the number of time steps, F is the number of sensor indicators at each time step, and K is the number of fault categories;
[0014] The process of processing data X by the feature enhancement module includes:
[0015] S11: Calculate the initialization query vector Q for each time step t based on the data X t and initialize the key vector K t and the initialization query vector Q for each sensor metric f f and initialize the key vector K f ;
[0016] S12: According to the query vector Q t and key vector K t Calculate the spatial attention weight matrix α according to the query vector Q f and key vector K f Calculate the channel attention weight matrix β;
[0017] S13: Perform feature fusion on the data X according to the spatial attention weight matrix α and the channel attention weight matrix β to obtain enhanced features.
[0018] Full dataset in, is the sample at time step t, x t ∈X′ is the enhanced feature at time step t, is the fault category label at time step t, T+1 is the number of time steps; the sample minority hybrid enhancement module is used to enhance the complete dataset X all The processing process includes:
[0019] S31: For the complete dataset X all The samples are randomly sampled m times with the same probability, and the samples obtained from the m sampling times are grouped into a set S;
[0020] S32: The complete data set X is analyzed based on the probability of the fault category. all Perform m minority sampling on the samples in , and form a set M of samples obtained by m samplings;
[0021] S33: Draw m random variables from the Beta distribution B(v,ν) and denote them as ν i , select v i and 1-v i The larger one is taken as the mixing ratio λ i , i∈{1,……,m};
[0022] S34: Take two corresponding samples from set S and set M respectively and samples Calculate features Fault category label Rarity score and the entropy of the fault class probability Among them, i∈{1,……,m}, represents the i-th sample in the sample set S, Represents the i-th sample in the sample set M;
[0023] S35: Score based on rarity and entropy Calculate the adjustment factor δ i , using the adjustment factor δ i Adjust the mixing ratio λ i , and obtain the new mixing ratio λ′ i ;
[0024] S36: According to λ′ i For samples and samples Perform mixed enhancement to obtain mixed enhanced samples Mixing the enhanced samples Add the full dataset X all ;
[0025] S37: Repeat steps SS34 to S36 until all samples in set S and set M are taken out to obtain an enhanced data set.
[0026] For the complete dataset X all The process of performing m minority sampling on the samples in includes:
[0027] S321: Calculate each sample separately based on the probability of the fault category The presence confidence score C(k,t) and absence prediction confidence D(k,t) for each fault category k;
[0028] S322: Setting weight w k , combined with the weight w k , score C(k,t) and score D(k,t) are calculated for the corresponding samples Weighted confidence score of
[0029] S323: Scoring based on weighted confidence Calculate the corresponding samples The resampling probability
[0030] S324: Based on resampling probability For the complete dataset X all The samples in are sampled with probability.
[0031] The formula for calculating the resampling probability is:
[0032]
[0033] Where ε1 is a very small constant to prevent the denominator from being zero, [] is the Iverson bracket used to represent the conditional expression, j is the index of the time step, k is the index of the fault category, and K is the number of fault categories.
[0034] According to λ′ i For samples and samples Performing hybrid enhancements includes:
[0035]
[0036] The samples of the enhanced dataset are represented as t′∈[0,T′], T′+1 is the number of time steps of the augmented dataset; the process of the label fine-grained management module processing each sample in the augmented dataset includes:
[0037] S41: Construct a Gaussian mixture model. The Gaussian mixture model includes multiple Gaussian distributions and sets the parameters of each Gaussian distribution. The parameters include: mixture weight, mean, and covariance.
[0038] S42: Calculate each sample Focal Loss function on fault category k Among them, Focal Loss is the focal loss function;
[0039] S43: Calculate the loss function based on the parameters of the Gaussian distribution The posterior probability under each Gaussian distribution;
[0040] S44: Update the parameters of each Gaussian distribution using the posterior probability;
[0041] S45: Repeat steps S43 to S44 until the changes in all parameters before and after the update are less than the threshold ε2, and obtain the adjusted Gaussian mixture model;
[0042] S46: Calculate each sample based on the adjusted Gaussian mixture model The probability of clean labels for each class k
[0043] In step S2, the prediction module also outputs the predicted fault category label; the label correction module processes the samples in the non-clean label set U including:
[0044] S51: Get the fault category labels predicted by the first q training times for all samples in the non-clean label set U, and calculate the fault category labels in the sample The labels of the fault category k predicted by the first q training times are consistent with the fault category labels The proportion of the same tags
[0045] S52: According to the proportion Calculate the prediction uncertainty value for each sample
[0046]
[0047] in, is the sample of time step t′ in the augmented dataset, x t′ is the enhanced feature at time step t′, is the fault category label at time step t′, For samples The set of fault category labels predicted by the first q training runs, β represents the normalization term, K is the number of fault categories, and k is the index of the fault category;
[0048] S53: Set threshold ε3 and threshold ε4, set sample The refurbished sample is like and The fault category label of the refurbished sample is The label of fault category k in otherwise
[0049] S54: The refurbished sample Classified in the refurbished label collection R.
[0050] The total loss function is:
[0051]
[0052] in, is a sample in the clean label set H, is a sample in the refurbished label set R, Represents a sample The loss function on fault category k is, Represents a sample Loss function on fault category k, K is the number of fault categories, and k is the index of the fault category.
[0053] The loss function L is:
[0054]
[0055] in, Represents a sample Focal Loss function on fault category k, Represents a sample The clean label probability on fault class k, ρ is a hyperparameter.
[0056] The beneficial effects of the present invention are:
[0057] 1. The present invention combines data enhancement and loss correction strategies to significantly enhance the robustness and accuracy of the model of the present invention to the imbalanced and noisy data of new energy vehicle battery fault labels; 2. Compared with the method of oversampling minority class labels and adjusting loss values, the present invention adopts interpolation method through random sampling and minority sampling to perform data enhancement, ensuring sample diversity while effectively alleviating the class imbalance problem; 3. Compared with the method of treating the entire sample as a noise correction object, the present invention constructs a Gaussian mixture model based on the Focal Loss loss function for fine-grained label management, which increases the reliability of the division of clean and unclean sample sets; compared with directly discarding unclean samples, the present invention selectively corrects and renovates each label in the unclean sample set, and fully explores the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A flowchart of a new energy vehicle battery multi-fault warning model training process provided by an embodiment of the present invention;
[0059] Figure 2 This is a schematic diagram of the structure of a new energy vehicle battery multi-fault warning model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0061] The present invention proposes a new energy vehicle battery multiple fault early warning method based on unbalanced data. The method comprises the following steps: obtaining new energy vehicle battery monitoring data to be warned, inputting the data into a trained new energy vehicle battery multiple fault early warning model, and obtaining new energy vehicle battery multiple fault identification results; the new energy vehicle battery multiple fault early warning model comprises: a feature enhancement module, a prediction module, a sample minority hybrid enhancement module, a label fine-grained management module, and a label correction module;
[0062] like Figure 1 、 Figure 2 As shown in Figure 1, the training process of the new energy vehicle battery multi-fault warning model includes:
[0063] S1: Obtain new energy vehicle battery monitoring data X and its fault category label Input the data X into the feature enhancement module to obtain the enhanced feature X′;
[0064] New energy vehicle battery monitoring data is collected every 10 seconds. The input data includes new energy vehicle battery monitoring data and its label New energy vehicle battery monitoring data X includes the data X of each sensor indicator f at each time step t tf , the label Y includes the fault category at each time step t T+1 is the number of time steps, accumulated from the 0th time step, corresponding to the number of data, F is the number of sensor indicators at each time step, and K is the fault category;
[0065] The feature enhancement module uses a dual attention mechanism of space and channel to process the data X. The specific process includes:
[0066] S11: Calculate the initialization query vector Q for each time step t based on the new energy vehicle battery monitoring data X t and key vector K t and the initialization query vector Q for each sensor indicator f f and key vector K f ;
[0067] According to the empirical formula Determine the initialization range and use uniform distribution to generate d from the above range k values and fill in d k ×1 matrix; where d k Is the number of features of the parameter matrix. Based on the above method, the initialization parameter matrix W is obtained q 、W k 、W v ;
[0068] Multiply the parameter matrix and the matrix items in the data X along the direction of the number of sensor indicators and time steps respectively, and get the query vector Q t , Q f and key vector K t , K f ,Right now
[0069] S12: According to the query vector Q t and key vector K t Calculate the spatial attention weight matrix α according to the query vector Q f and key vector K f Calculate the channel attention weight matrix β;
[0070] Calculate the channel attention weight score Score(f) and the spatial attention weight score Score(t). Specifically, Score(t) = Q t T ·K t , Score(f)=Q f T ·K f . Further, Score(t) and Score(f) are Softmax normalized to obtain α t and β f . Specifically, Where t′ is the index of the time step and f′ is the index of the sensor indicator.
[0071] S13: Feature fusion is performed on the new energy vehicle battery monitoring data according to the spatial attention weight matrix α and the channel attention weight matrix β to obtain enhanced features.
[0072] α T =(α0, ..., α t ,……,α T ), β=(β1,……,β f ,……,β F ), which is the spatial attention weight matrix Channel attention weight matrix Copy α F-1 times in the column direction to form a matrix A. Each column of the matrix A is in the form of α, that is Copy β T times in the row direction to form a matrix B. Each row of the matrix B is in the form of β, that is Furthermore, element-wise multiplication is used to perform feature fusion to obtain the enhanced feature X′=A⊙B⊙X.
[0073] S2: Enhance the feature X′ and the fault category label Perform horizontal splicing to obtain a complete data set; the complete data set X all Input the prediction module to obtain the probability of fault category;
[0074] Full dataset x t ∈X′ is the enhanced feature for each time step t, is the label of time step t; for each time step t, the enhanced feature x t , if there is a fault category k, then its corresponding label otherwise
[0075] The prediction module includes a fully connected layer (Linear), which transforms each sample Input the fully connected layer separately to obtain the fault category probability of each sample Specifically, the calculation formula for the fault category probability is:
[0076]
[0077] Among them, x t The shape and size are 1×F, The shape size is 1×K,W fc is the weight matrix of the fully connected layer, with a shape of F×K, b fc is the bias matrix of the fully connected layer, with a shape of 1×K.
[0078] S3: The complete dataset X all and a few hybrid enhancement modules of the fault category probability input samples to obtain an enhanced dataset;
[0079] The sample minority hybrid enhancement module combines random sampling and minority sampling based on the probability of fault categories to perform a complete dataset Xall Perform sample minority mixed enhancement to obtain an enhanced dataset; the specific steps include:
[0080] S31: For the complete dataset X all The samples are randomly sampled m times with the same probability, and the samples obtained from the m times are combined into a set S;
[0081] Among them, each sample The probability of being selected is
[0082] S32: The complete data set X is analyzed based on the probability of the fault category. all Perform m minority sampling on the samples in , and form a set M of samples obtained by m samplings;
[0083] S321: Calculate each sample separately based on the probability of the fault category The presence confidence score C(k,t) and absence prediction confidence D(k,t) for each fault category k;
[0084] Set the threshold ξ∈(0.5,0.7), if the sample Fault category probability on fault category k Then the sample A specific category k of Classified into set Φ C(k,t) Otherwise, it is considered non-existent and is included in the set Φ D(k,t) .
[0085] Specifically,
[0086] Furthermore,
[0087] in, express The fault class probability of fault class k in .
[0088] S322: Setting weight w based on the degree of class imbalance k , combined with the weight w k , confidence scores C(k,t) and D(k,t) for the corresponding samples Calculate a weighted confidence score
[0089] Add a dynamic weighting factor w k Adjust the confidence score of each fault category to ensure that categories with fewer samples receive more attention during training. Specifically, Where N is the complete dataset Xall The total number of samples in is the label of fault category k The number of samples, ε0 is a very small constant to prevent the denominator from being zero.
[0090] Furthermore, combined with w k Calculate the weighted confidence score of the sample. Specifically, the weighted confidence score Among them, [] is Iverson brackets, which are used to express conditional expressions, that is, when For true, is equal to 1;
[0091] S323: Calculate samples based on the inverted weighted confidence score The resampling probability Furthermore, based on P′ sampling Sort the samples in descending order based on the resampling probability P′ sampling For samples Perform m probability samplings from the high probability posterior.
[0092] Specifically, Resampling probability The calculation formula is:
[0093]
[0094]
[0095] Here, ε1 is a very small constant to prevent the denominator from being zero, and j is the index of the time step.
[0096] S33: Draw m random variables from the Beta distribution B(ν,ν) and denote them as v i , select v i and 1-v i The larger one is taken as the mixing ratio λ i , i∈{1,……,m};
[0097] S34: Take two corresponding samples from set S and set M respectively and samples Statistical characteristics Fault category label In the complete dataset X all Number of times it appears in And according to the number of times Calculation Tags Rarity score
[0098] Specifically, Among them, i∈{1,…,m}, represents the i-th sample in the sample set S obtained by random sampling, represents the i-th sample in the sample set M obtained by minority sampling;
[0099] S35: Calculate samples The entropy of the probability distribution of fault categories Score based on rarity and entropy Calculate the adjustment factor δ i ;
[0100] Specifically, the entropy calculation formula of probability distribution is:
[0101]
[0102] Furthermore, Among them, ω1 controls the influence of category rarity, and ω2 controls the influence of the entropy of the probability distribution.
[0103] S36: Use adjustment factor δ i Adjust the mixing ratio λ i , forming a new weight λ′ i ;
[0104] Specifically, the new weight λ′ i =λ i ×(1+δ i ).
[0105] S37: According to λ′ i By interpolation calculation of the sample and samples Perform hybrid enhancement to obtain a hybrid enhancement instance Mixed Enhanced Instances Add the full dataset X all ;
[0106] Specifically, the calculation formula for sample minority hybrid enhancement is:
[0107]
[0108] in, Indicates that in the complete dataset X all The i-th sample added later.
[0109] S38: Repeat steps SS34 to S37 until all samples in set S and set M are taken out to obtain an enhanced data set.
[0110] The samples of the enhanced dataset are represented as t′∈[0,T′], T′=T+m, T′+1 is the number of samples in the enhanced dataset.
[0111] S4: Input the enhanced dataset into the label fine-grained management module to obtain the clean label probability of each sample in the enhanced dataset; divide the enhanced dataset into a non-clean label set U and a clean label set H according to the clean label probability;
[0112] The label fine-grained management module uses a Gaussian mixture model based on the Focal Loss loss function to calculate the clean label probability of each sample in the enhanced dataset; the specific steps include:
[0113] S41: Construct a Gaussian mixture model. The Gaussian mixture model includes multiple Gaussian distributions n, and sets the same mixture weight for each Gaussian distribution on the fault category k. Randomly select a set of samples from each Gaussian distribution for fault category k in the augmented dataset Initialize the mean of Focal Loss based on the sample set Around the sample set The mean Form the initial cluster and obtain the sample set According to the sample set Get the covariance
[0114] Around the sample set The mean Forming the initial cluster includes: In the example, the Focal Loss of all samples on the fault category k is calculated, and the Focal Loss value and mean of each sample are calculated. The absolute value of the difference is arranged in ascending order, and the first The samples corresponding to the difference are included in the sample set The range can be
[0115] Specifically,
[0116] Among them, n∈{1,2}, represents the nth Gaussian distribution, the sample set and sample set The shape and size of the samples are all 1×F, Index Index For the sample set The number of samples, For the sample set The number of samples.
[0117] S42: Based on Focal Loss, Bayesian optimization technology is used to balance the weights of positive and negative samples, increase the attention level of difficult-to-classify samples, and calculate each sample Focal Loss function on fault category k
[0118] Specifically, the loss function is calculated as:
[0119]
[0120] Among them, entropy As a sample Classification criteria for difficulty level; Is the weight factor for balancing positive and negative samples, used to adjust the impact of category imbalance. The value is greater than that of negative samples. In the present invention, positive samples are samples whose corresponding label of the fault category is 1, and negative samples are samples whose corresponding label of the fault category is 0. γ is an adjustment factor used to reduce the weight of easy-to-classify samples and increase the weight of difficult-to-classify samples.
[0121] S43: Calculate the loss function based on the mixed weight, mean and covariance of Gaussian distribution n Posterior probability under the nth Gaussian distribution
[0122] Specifically, the calculation formula is:
[0123]
[0124] in, Represents a sample The Focal Loss value belongs to the probability density of the nth Gaussian distribution, z nk =1 indicates that the current consideration belongs to the fault category k under the nth Gaussian distribution, and n′ indicates the index of the Gaussian distribution.
[0125] S44: Update the mixture weight, mean, and covariance of each Gaussian distribution using the posterior probability.
[0126] The formula for updating the mixing weight is:
[0127]
[0128] The mean update formula is:
[0129]
[0130] The covariance update formula is:
[0131]
[0132] S45: Iterate S43 and S44 until the changes Δ in the mixing weight, mean, and covariance before and after the update are all less than a threshold ε2. Preferably, ε2=0.001.
[0133] S46: Sample calculation of mixture weights, mean and covariance based on the adjusted Gaussian mixture model The posterior probability of class k Sum the posterior probabilities under the two Gaussian distributions to get the clean label probability
[0134] Specifically, If exists Then the sample It is classified into the non-clean label set U, otherwise it is classified into the clean label set H.
[0135] S5: Input the non-clean label set U into the label correction module to obtain the refurbished label set R;
[0136] In step S2, the fully connected layer also outputs the predicted fault category label; the label correction module selectively modifies the label based on the low prediction uncertainty value, gradually increasing the number of valid training samples. The specific steps include:
[0137] S51: Get the fault category labels predicted by the first q training times for all samples in the non-clean label set U, and calculate the fault category labels in the sample The labels of the fault category k predicted by the first q training times are consistent with the fault category labels The proportion of the same tags
[0138] S52: According to the proportion Calculate the prediction uncertainty value for each sample
[0139]
[0140] in, is the sample of time step t′ in the augmented dataset, x t′ is the enhanced feature at time step t′, is the fault category label at time step t′, For samples The set of fault category labels predicted by the first q training times, Represents a sample The qth label prediction of fault categories 1 to K, z is the index of the first q training times, β represents a normalization term used to scale the prediction uncertainty value to [0,1], Indicated in the sample The labels of the fault category k predicted by the first q training times are consistent with the fault category labels The proportion of identical labels;
[0141] S53: Consider samples with consistent label predictions as refurbishable. Specifically, set thresholds ε3 and ε4, set sample The refurbished sample is like and The fault category label of the refurbished sample is The label of fault category k in otherwise Among them, ε3∈{0.05,0.10,0.15,0.20}, ε4∈[0.5,1);
[0142] S54: The refurbished sample Classified in the refurbished label collection R.
[0143] S6: Calculate the total loss function value based on the fault category probability and clean label probability of the samples in the refurbished label set R and the clean label set H. Perform backpropagation to optimize the model parameters based on the total loss function value. When the total loss function value is minimized, the trained new energy vehicle battery multi-fault warning model is obtained.
[0144] Total loss function L all for:
[0145]
[0146] in, is a sample in the clean label set H, is a sample in the refurbished label set R, Represents a sample The loss function on fault category k is, Represents a sample Loss function on fault class k.
[0147] The loss function L is:
[0148]
[0149] in, Represents a sample Focal Loss function on fault category k, Represents a sample The clean label probability on fault class k, ρ is a hyperparameter with a value of [0,1], which is used to control the degree of attenuation.
[0150] The back propagation calculation formula is:
[0151]
[0152] Among them, θ is the model parameter set and η is the learning rate.
[0153] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation plans of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A new energy vehicle battery multiple fault early warning method based on imbalance data, characterized in that: include: Obtain the new energy vehicle battery monitoring data to be warned, input it into the trained new energy vehicle battery multi-fault warning model, and obtain the new energy vehicle battery multi-fault identification result; The new energy vehicle battery multi-fault early warning model includes: feature enhancement module, prediction module, sample minority hybrid enhancement module, label fine-grained management module and label correction module; The training process of the new energy vehicle battery multi-fault warning model includes: S1: Obtain new energy vehicle battery monitoring data X and its fault category label Input the data X into the feature enhancement module to obtain the enhanced feature X′; S2: Enhance the feature X′ and the fault category label Combine to get the complete data set X all ; The complete dataset X all Input the prediction module to obtain the fault category probability; the complete dataset Xall includes multiple samples, each of which includes enhanced features and its fault category label; S3: The complete dataset X all and a few hybrid enhancement modules of the fault category probability input samples to obtain an enhanced dataset; S4: Input the enhanced dataset into the label fine-grained management module to obtain the clean label probability of each sample in the enhanced dataset; divide the enhanced dataset into a non-clean label set U and a clean label set H according to the clean label probability; S5: Input the non-clean label set U into the label correction module to obtain the refurbished label set R; S6: Calculate the total loss function value based on the fault category probabilities and clean label probabilities of the samples in the refurbished label set R and the clean label set H, and optimize the model parameters based on the total loss function value. When the total loss function value is minimized, the trained new energy vehicle battery multi-fault early warning model is obtained; Full dataset in, is the sample at time step t, x t ∈X′ is the enhanced feature at time step t, is the fault category label at time step t, T+1 is the number of time steps; the sample minority hybrid enhancement module is used to enhance the complete dataset X all The processing process includes: S31: For the complete dataset X all The samples are randomly sampled m times with the same probability, and the samples obtained from the m sampling times are grouped into a set S; S32: The complete data set X is analyzed based on the probability of the fault category. all Perform m minority sampling on the samples in , and form a set M of samples obtained by m samplings; S33: Draw m random variables from the Beta distribution B(ν,ν) and denote them as ν i , select ν i and 1-ν i The larger one is taken as the mixing ratio λ i , i∈{1,……,N}; S34: Take two corresponding samples from set S and set M respectively and samples Calculate features Fault category label Rarity score and the entropy of the fault class probability Among them, i∈{1,……,m}, represents the i-th sample in the sample set S, Represents the i-th sample in the sample set M; S35: Score based on rarity and entropy Calculate the adjustment factor δ i , using the adjustment factor δ i Adjust the mixing ratio λ i , and obtain the new mixing ratio λ′ i ; S36: According to λ′ i For samples and samples Perform mixed enhancement to obtain mixed enhanced samples Mixed Enhanced Samples Add the full dataset X all ; S37: Repeat steps SS34 to S36 until all samples in set S and set M are taken out to obtain an enhanced data set.
2. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 1, characterized in that: data Fault category label Where T+1 is the number of time steps, F is the number of sensor indicators at each time step, and K is the number of fault categories; The process of processing data X by the feature enhancement module includes: S11: Calculate the initialization query vector Q for each time step t based on the data X t and initialize the key vector K t and the initialization query vector Q for each sensor metric f f and initialize the key vector K f ; S12: According to the query vector Q t and key vector K t Calculate the spatial attention weight matrix α according to the query vector Q f and key vector K f Calculate the channel attention weight matrix β; S13: Perform feature fusion on the data X according to the spatial attention weight matrix α and the channel attention weight matrix β to obtain enhanced features.
3. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 1, characterized in that: For the complete dataset X all The process of performing m minority sampling on the samples in includes: S321: Calculate each sample separately based on the probability of the fault category The presence confidence score C(k,t) and absence prediction confidence D(k,t) for each fault category k; S322: Setting weight w k , combined with the weight w k , score C(k,t) and score D(k,t) are calculated for the corresponding samples Weighted confidence score of S323: Scoring based on weighted confidence Calculate the corresponding samples The resampling probability S324: Based on resampling probability For the complete dataset X all The samples in are sampled with probability.
4. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 3 is characterized in that: The formula for calculating the resampling probability is: Where ε1 is a very small constant to prevent the denominator from being zero, [] is the Iverson bracket used to represent the conditional expression, j is the index of the time step, k is the index of the fault category, and K is the number of fault categories.
5. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 1, characterized in that: According to λ′ i For samples and samples Performing hybrid enhancements includes: 。 6. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 1, characterized in that: The samples of the enhanced dataset are represented as t′∈[0,T′], T′+1 is the number of time steps of the augmented dataset; the process of the label fine-grained management module processing each sample in the augmented dataset includes: S41: Construct a Gaussian mixture model. The Gaussian mixture model includes multiple Gaussian distributions and sets the parameters of each Gaussian distribution. The parameters include: mixture weight, mean, and covariance. S42: Calculate each sample Focal Loss function on each fault category k Among them, FocalLoss is the focal loss function; S43: Calculate the loss function based on the parameters of the Gaussian distribution The posterior probability under each Gaussian distribution; S44: Update the parameters of each Gaussian distribution using the posterior probability; S45: Repeat steps S43 to S44 until the changes in all parameters before and after the update are less than the threshold ε2, and obtain the adjusted Gaussian mixture model; S46: Calculate each sample based on the adjusted Gaussian mixture model Clean label probability for each fault class k 7. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 1, characterized in that: In step S2, the prediction module also outputs the predicted fault category label; the label correction module processes the samples in the non-clean label set U including: S51: Get the fault category label set predicted by the first q training times for all samples in the non-clean label set U, and calculate the fault category label set predicted by the first q training times for all samples in the non-clean label set U. The labels of the fault category k predicted by the first q training times are consistent with the fault category labels The proportion of the same tags S52: According to the proportion Calculate the prediction uncertainty value for each sample in, is the sample of time step t′ in the augmented dataset, x t′ is the enhanced feature at time step t′, is the fault category label at time step t′, For samples The set of fault category labels predicted by the first q training runs, β represents the normalization term, K is the number of fault categories, and k is the index of the fault category; S53: Set threshold ε3 and threshold ε4, set sample The refurbished sample is like and The fault category label of the refurbished sample is The label of fault category k in otherwise S54: The refurbished sample Classified in the refurbished label collection R.
8. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 1, characterized in that: Total loss function L all for: in, is a sample in the clean label set H, is a sample in the refurbished label set R, Represents a sample The loss function on fault category k is, Represents a sample Loss function on fault category k, K is the number of fault categories, and k is the index of the fault category.
9. The method for early warning of multiple faults of new energy vehicle batteries based on imbalance data according to claim 8, characterized in that: The loss function L is: in, Represents a sample Focal Loss loss function on fault category k, FocalLoss is the focus loss function, Represents a sample The clean label probability on fault class k, ρ is a hyperparameter.
Citation Information
Patent Citations
Rotary machinery fault diagnosis method for noise label industrial scene
CN117571312A
AERO-engine fault diagnosis method based on 5g edge computing and deep learning
US20240185040A1