Disclosure of Invention
Aiming at the problem of data distribution difference in electromechanical equipment cross-domain residual life prediction in the prior art, the invention provides a method and a system for electromechanical equipment cross-domain residual life prediction based on dynamic parameter learning, and aims to balance the distribution difference between a source domain and a target domain by adaptively adjusting parameters so as to improve the generalization capability of a model in the target domain. The method is particularly suitable for cross-domain residual life prediction of the electromechanical equipment.
In order to achieve the above object, the present invention provides the following solutions:
An electromechanical device cross-domain residual life prediction method based on dynamic parameter learning comprises the following steps:
acquiring source domain data and target domain data of electromechanical equipment, and preprocessing the source domain data and the target domain data;
The feature extractor is used for pre-training on the labeled source domain data independently, so that the feature extractor has feature extraction capability on the source domain data;
Training a feature extractor by using a field self-adaption method to enable the feature extractor to extract effective high-dimensional data features from both the preprocessed source domain data and the preprocessed target domain data;
In the reasoning phase, only the feature extractor and classifier are applied to predict the remaining lifetime of the electromechanical device.
Preferably, training the feature extractor using a domain adaptive method to enable the feature extractor to extract valid high-dimensional data features from both the preprocessed source domain data and the preprocessed target domain data includes:
adopting an countermeasure network structure, and judging whether the high-dimensional data features are derived from a source domain or a target domain through a feature discriminator;
classifying the high-dimensional data features extracted on the source domain by a classifier, and judging the error of the classification result by a classification discriminator;
The feature discriminator introduces a dynamic parameter lambda and an influence factor kappa through a dynamic parameter learning mechanism, and dynamically adjusts the weight between the feature discriminator and the classifier, so that the feature extractor can extract high-dimensional data features in both a source domain and a target domain.
Preferably, the feature identifier introduces a dynamic parameter λ and an influence factor κ through a dynamic parameter learning mechanism, and dynamically adjusts weights between the feature identifier and the classifier, so that the feature extractor can extract high-dimensional data features in both a source domain and a target domain, including:
calculating a condition distribution distance D c;
Calculating a marginal distribution distance D m;
Calculating a dynamic parameter lambda based on the conditional distribution distance D c and the marginal distribution distance D m;
Calculating an influence factor kappa;
based on the dynamic parameter lambda and the influence factor kappa, a comprehensive loss function is constructed.
Preferably, calculating the conditional distribution distance D c includes:
Where C represents the total number of categories, P s (x|y=c) and P t (x|y=c) represent the conditional distributions of the source and target domains under category C, respectively, and the weight w c is defined as: Where N c is the number of samples of category c, N total is the total number of samples of all categories, X represents the feature space, and Y represents the tag space.
Preferably, calculating the marginal distribution distance D m includes:
where L represents the number of layers, α l is the weight of each layer, typically determined by rule of thumb or automatic learning, and P s (X) and P t (X) represent the marginal distributions of the source and target domains, respectively.
Preferably, calculating the dynamic parameter λ based on the conditional distribution distance D c and the marginal distribution distance D m includes:
wherein, alpha and beta are weight parameters for controlling the adjustment proportion of the early stage lambda and the later stage lambda, T is the total training wheel number, and T is each wheel.
Preferably, calculating the influence factor κ includes:
Wherein, gamma and delta are weight parameters for controlling the adjustment proportion of early and later kappa.
Preferably, constructing the integrated loss function based on the dynamic parameter λ and the influence factor κ includes:
L=LCls+(1-κλ)·LDism+λ·LDisc
Where L Cls is the classification loss, L Dism is the feature discriminator alignment loss for marginal distribution, and L Disc is the feature discriminator alignment loss for conditional distribution.
The invention also provides a system for predicting the residual life of the electromechanical equipment across domains based on dynamic parameter learning, which comprises a data collection and preprocessing module, a feature extraction module, a domain adaptation flow module and a residual life prediction module;
the data collection and preprocessing module is used for acquiring source domain data and target domain data of the electromechanical device and preprocessing the source domain data and the target domain data;
The feature extraction module is used for pre-training on the labeled source domain data by utilizing the feature extractor, so that the feature extractor has feature extraction capability on the source domain data;
The domain adaptation flow module is used for training a feature extractor by using a domain adaptation method, so that the feature extractor can extract effective high-dimensional data features from both the preprocessed source domain data and the preprocessed target domain data;
The residual life prediction module is used for predicting the residual life of the electromechanical device by only applying the feature extractor and the classifier in the reasoning stage.
Compared with the prior art, the invention has the beneficial effects that:
The invention provides a method for predicting the cross-domain residual life of electromechanical equipment based on dynamic parameter learning, which remarkably improves the level of intellectualization and precision of equipment maintenance management. By adopting the anti-migration algorithm, the method effectively reduces the data distribution difference between the source domain and the target domain, and remarkably improves the generalization capability and the prediction accuracy of the model in different fields. The introduction of a dynamic parameter learning mechanism enables the model to adaptively balance the alignment strength of marginal distribution and conditional distribution, ensures that the distribution difference is reduced in the cross-domain migration process, and maintains the classification performance of the source domain. The modularized design ensures that each component characteristic discriminator has high flexibility and expandability, and is convenient for optimization and upgrading according to actual requirements. Through the residual life prediction, enterprises can make preventive maintenance plans in advance, prolong the service life of equipment, reduce the failure rate and the maintenance cost, and improve the overall operation efficiency and the equipment reliability.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Example 1
Aiming at the problem of data distribution difference in the electromechanical equipment cross-domain residual life prediction in the prior art, the invention provides a multi-domain self-adaptive method based on dynamic parameter learning, and aims to balance the distribution difference between a source domain and a target domain by self-adaptively adjusting parameters, so that the generalization capability of a model in the target domain is improved. The method is particularly suitable for cross-domain residual life prediction of electromechanical equipment, and specifically comprises the following aspects:
the field self-adaptive method model consists of a feature extractor, a feature discriminator, a classifier and a classification discriminator, and forms an countermeasure network structure.
During training, the feature extractor is responsible for extracting generalized feature representation from the data of the source domain and the target domain, the feature discriminator is used for discriminating whether the feature is derived from the source domain or the target domain, the classifier performs supervised learning on the source domain to ensure high accuracy of the model on the labeled data, and the classifier discriminator is used for discriminating whether the output result of the classifier is correct or not
At the time of reasoning, the feature extractor is responsible for extracting features from the data of the target domain, and the classifier is responsible for predicting the remaining life of the device
In order to effectively balance the distribution difference between the source domain and the target domain, the invention adopts a dynamic parameter learning mechanism, and realizes the self-adaptive adjustment of the distribution difference between the source domain and the target domain by dynamically adjusting the weight between the feature discriminator and the classifier. The mechanism dynamically updates the weight of the loss function according to the distribution difference of the source domain and the target domain by introducing the dynamic parameter lambda and the influence factor kappa, thereby ensuring that the classification performance of the source domain is not lost while reducing the distribution difference.
Specifically comprising the steps of as shown in figure 4,
Acquiring source domain data and target domain data of electromechanical equipment, and preprocessing the source domain data and the target domain data;
The feature extractor is used for pre-training on the labeled source domain data independently, so that the feature extractor has feature extraction capability on the source domain data;
Training a feature extractor by using a field self-adaption method to enable the feature extractor to extract effective high-dimensional data features from both the preprocessed source domain data and the preprocessed target domain data;
In the reasoning phase, only the feature extractor and classifier are applied to predict the remaining lifetime of the electromechanical device.
In this embodiment, the source domain data acquisition includes collecting source domains (such as operation data of a certain type of electromechanical device under a specific working condition), including time series data collected by multiple sensors and corresponding residual life labels.
Target domain data acquisition, namely collecting sensor time series data of a target domain (such as equipment of different types or operation data under different working conditions), wherein a residual life label is not needed.
And data preprocessing, namely performing preprocessing operations such as normalization, denoising, segmentation and the like on the data of the source domain and the target domain, and ensuring the quality and consistency of the data.
In this embodiment, the sign extraction module (feature extractor) is composed of a plurality of convolution layers of different sizes stacked, and extracts high-dimensional data features, denoted by feature a, from time-series data of a source domain and a target domain. In order to ensure the consistency of the source domain and target domain features in a high-dimensional space, feature extraction is performed on the source domain and target domain data by using feature extractors with the same weight. Before field adaptation is carried out, the physical sign extraction module performs pre-training on the labeled source domain data independently, so that the physical sign extraction module has better feature extraction capability on the source domain data.
In this embodiment, training the feature extractor by using the domain adaptive method, so that the feature extractor can extract effective high-dimensional data features from both the preprocessed source domain data and the preprocessed target domain data includes:
As shown in FIG. 1, in the training stage, the model training system block diagram of the embodiment of the invention trains the capability of a feature device for extracting features in a target domain, adopts an countermeasure network structure, and judges whether a feature A is derived from a source domain or the target domain through a feature discriminator;
The classifier classifies the characteristics A extracted on the source domain, and the classification discriminant judges the error of the classification result;
The feature discriminator introduces a dynamic parameter lambda and an influence factor kappa through a dynamic parameter learning mechanism, dynamically adjusts the weight between the feature discriminator and the classifier, balances the distribution difference of a source domain and a target domain, and enables the feature extractor to extract in both the source domain and the target domain. The specific process is as follows:
s1, calculating a conditional distribution distance D c
D c represents a conditional distribution distance, which is used to measure the difference in conditional distribution between the source domain and the target domain. For each class y, i.e. each remaining lifetime label, a probability of a feature distribution of the source domain and the target domain under that class is calculated. MMD (maximum mean difference) is used to measure the similarity between two probability distributions. To address the category imbalance problem, a category weight w c may be introduced such that each category's contribution to D c is proportional to its number of samples in the source and target domains.
Where C represents the total number of categories, P s (x|y=c) and P t (x|y=c) represent the conditional distributions of the source and target domains under category C, respectively, and the weight w c is defined as: Where N c is the number of samples of category c and N total is the total number of samples of all categories. X represents a feature space. In the context of predictive maintenance, X may include various sensor data, operating parameters, environmental conditions, etc., that relate to equipment status. Y represents the tag space, i.e. the predicted target. In the remaining life prediction task, Y generally represents a different remaining life class.
S2, calculating marginal distribution distance D m
D m represents a marginal distribution distance, which is used to measure the difference between the source domain and the target domain in the overall data distribution, and a hierarchical MMD method is used for calculation. The hierarchical MMD can capture the distribution difference of the source domain and the target domain on different levels and scales more carefully by calculating the MMD in a multi-level and multi-scale manner. The specific implementation is as follows:
where L represents the number of layers, α l is the weight of each layer, typically determined by rule of thumb or automatic learning, and P s (X) and P t (X) represent the marginal distributions of the source and target domains, respectively.
S3, calculating dynamic parameter lambda
The dynamic parameter lambda is used for balancing the weights of conditional distribution and marginal distribution in the loss function, setting the total training round number T, and taking the proportion of the current round number into consideration when calculating lambda in each round TSo that lambda can be adjusted stepwise with the training process. The calculation formula is as follows:
wherein, alpha and beta are weight parameters for controlling the adjustment ratio of the early and late lambda.
Lambda reflects the proportion of the conditional distribution in the total distribution difference. When the condition distribution distance D c is larger, λ increases, indicating that more alignment of the condition distribution is required, whereas λ decreases, more alignment of the marginal distribution is concerned.
S4, application of influence factor kappa
The influence factor k is used to quantify the influence of the marginal distribution distance on the conditional distribution distance, which plays a regulating role in the loss function. By adjusting kappa, the importance of the model in alignment with the edge distribution and the condition distribution at different stages can be controlled. The value of K is dynamically adjusted based on the training wheel number, the total training wheel number T is set, and the proportion of the current wheel number is considered when each wheel T calculates kappaSo that kappa can be adjusted gradually along with the training progress.
Wherein, gamma and delta are weight parameters for controlling the adjustment ratio of early and late kappa.
S5, construction of comprehensive loss function
The invention designs the following comprehensive loss function by comprehensively considering the marginal distribution and the alignment of conditional distribution:
L=LCls+(1-κλ)·LDism+λ·LDisc
Wherein:
L Cls represents classification loss, is used for supervised learning of source domain, and adopts cross entropy loss:
Where N is the number of samples, y i,c is the true label of sample i on category c, Probability predicted for the model.
L Dism represents the loss of the feature discriminator for the marginal distribution, which is used for measuring the difference of the source domain and the target domain on the marginal distribution, and adopts cross entropy loss:
where d i is the domain label for sample i (source domain 0, target domain 1), Is the predictive probability of the feature discriminators.
L Disc represents the loss of the feature discriminator for the conditional distribution, which is used to measure the difference between the source domain and the target domain in the conditional distribution, and also adopts cross entropy loss:
Wherein, A domain label representing sample i under category c,Is the predicted probability of the feature identifier under category c.
By adjusting lambda and kappa, the comprehensive loss function can adaptively balance the alignment strength of marginal distribution and conditional distribution, so that the model can realize more effective migration learning among different fields, and classification performance of source fields is not lost while distribution difference is reduced.
In this embodiment, the method for predicting the remaining lifetime of the electromechanical device in real time based on the source domain and the target domain after the distribution difference is balanced includes:
After the feature extractor is trained in the above procedure, the residual life of the device may be predicted by only applying the feature extractor and the classifier, i.e. in the reasoning stage, the output of the classifier is the prediction of the residual life of the device.
Example two
FIG. 2 is a block diagram of an inference training system in accordance with an embodiment of the present invention, wherein during inference, a feature extractor is responsible for extracting features from the data in the target domain, and a classifier is responsible for predicting the remaining lifetime of the device.
As shown in FIG. 3, an embodiment of the invention provides a training process block diagram of an electromechanical device cross-domain residual life prediction system based on dynamic parameter learning. The system mainly comprises a data collection and preprocessing module, a feature extraction module, a domain adaptation flow module, a residual life prediction module, an output and visualization module, a model training module and a feedback and update module, wherein the modules work cooperatively to realize efficient and accurate cross-domain residual life prediction.
1. Data collection and preprocessing module
The data collection and preprocessing module is responsible for collecting the operation data of the equipment in real time through various high-precision sensors installed on the electromechanical equipment. The sensor types comprise a temperature sensor, a vibration sensor, a pressure sensor, a current sensor and the like, and can acquire multi-dimensional time series data of the equipment in different running states. The collected original data is transmitted to a central data storage unit of the system through a wired or wireless network, so that the real-time performance and the integrity of the data are ensured.
The data preprocessing step comprises data normalization, denoising, outlier detection, data segmentation and the like so as to improve the data quality and consistency. Specifically, the normalization process ensures that different sensor data are within the same scale range, the denoising step eliminates noise interference in the data through a filtering algorithm, abnormal data points are identified and processed through abnormal value detection, and the continuous time series data are divided into subsequences with fixed lengths through segmentation processing so as to facilitate subsequent feature extraction.
2. Feature extraction module
The preprocessed data is input to a feature extraction module that extracts high-dimensional feature representations from the time series data using a deep learning model. The feature extractor ensures the consistency of the source domain and target domain data in the high-dimensional feature space by sharing parameters. These high-dimensional features effectively capture key information of the device operating state, providing a solid foundation for subsequent domain adaptation and residual life prediction.
3. Domain adaptation flow module
In order to realize cross-domain transfer learning, the data after feature extraction is further processed by a domain adaptation module. The domain adaptation module adopts a countering network structure, and the feature discriminator self-adaptively adjusts the weight between the feature discriminator and the classifier by introducing the dynamic parameter lambda and the influence factor kappa, so as to balance the distribution difference of the source domain and the target domain. The specific steps include calculating a conditional distribution distance Dc and a marginal distribution distance Dm, and adjusting a dynamic parameter lambda according to the proportion of the conditional distribution distance Dc and the marginal distribution distance Dm to influence the importance degree of a factor kappa control model on distribution alignment in different stages. The comprehensive loss function L realizes the self-adaptive balance of marginal distribution and conditional distribution through adjustment of lambda and kappa:
L=LCls+(1-κλ)·LDism++λ·LDisc
Where L Cls is the classification loss, L Dism is the marginal distribution alignment loss, and L Disc is the conditional distribution alignment loss.
4. Residual life prediction module
And extracting the target domain data through a feature extractor in the reasoning stage, and predicting the residual life by using a classifier. The prediction result reflects the residual service life of the equipment in the current running state and supports maintenance decision making and preventive maintenance planning.
5. Output and visualization module
The prediction result is displayed through the output and visualization module and is used for maintenance personnel to refer to. The module comprises a visual interface and a report generating tool, and can intuitively present the prediction result in the form of a chart, a report and the like. Meanwhile, the system supports the comparison analysis of the prediction result and the historical data, and helps maintenance personnel identify equipment performance trends and potential fault risks.
The prediction result is displayed through the output and visualization module and is used for maintenance personnel to refer to. The module comprises a visual interface and a report generating tool, and can intuitively present the prediction result in the form of a chart, a report and the like. Meanwhile, the system supports the comparison analysis of the prediction result and the historical data, and helps maintenance personnel identify equipment performance trends and potential fault risks.
The invention realizes an efficient and accurate electromechanical equipment cross-domain residual life prediction method based on dynamic parameter learning through the system architecture shown in figures 1-4. The method effectively reduces the distribution difference of the characteristics of the model on the extraction source domain and the target domain, and improves the generalization capability and the prediction accuracy of the model. The modularized design ensures that the system has high flexibility and expandability, can adapt to the continuously-changing running environment and actual requirements, and has remarkable industrial application value and wide market prospect.
The above embodiments are merely illustrative of the preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, but various modifications and improvements made by those skilled in the art to which the present invention pertains are made without departing from the spirit of the present invention, and all modifications and improvements fall within the scope of the present invention as defined in the appended claims.