Domain adversarial network mechanical equipment RUL prediction method and system under the guidance of difference alignment
Through the domain adversarial network method guided by differential alignment, the problems of model complexity, data dependence and domain offset in the existing RUL prediction technology are solved, and more accurate RUL prediction of cross-working mechanical equipment is achieved, improving the robustness and adaptability of the model.
Patent Information
- Application Number
- CN202410685948.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-05-30
AI Technical Summary
The existing RUL prediction technology is limited by the problem of model complexity, data dependence and domain offset, making it difficult to accurately predict the remaining life of complex systems under different operating conditions.
A domain adversarial network method guided by differential alignment is adopted to learn cross-domain invariant features through the collaborative work of feature extractors, domain discriminators and differential extractors, and optimize the decision boundary between target domain samples and source domain samples.
The RUL prediction performance of mechanical equipment across operating conditions is improved, the robustness and adaptability of the model is enhanced, and the true distribution and characteristics of the data are more accurately reflected.
Smart Images

Figure CN118468724B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mechanical remaining useful life (RUL) prediction and machine learning technology, and in particular to a method and system for predicting the RUL of mechanical equipment in a domain adversarial network under the guidance of differential alignment. Background Art
[0002] Transportation is an important support area for the development of modern society, covering the design, manufacturing, operation, maintenance and management of various vehicles such as vehicles, ships and aircraft. Modern vehicles often serve at high speeds, heavy loads, high temperatures or extreme cold, and their engines are bound to fail, which may not only cause significant economic losses, but also damage people's life safety, health and ecological environment. Generally, fixed-point maintenance based on fault strategies will have lags and regular maintenance based on time strategies will waste resources, so studying the remaining service life prediction method is of great significance for guiding predictive maintenance.
[0003] The traditional RUL prediction method based on physical models is essentially based on the internal mechanism of the degradation system, and aims to achieve high-precision remaining service life prediction by finely modeling the performance degradation principle of the target equipment. However, with the increasing complexity and scale of modern mechanical systems, coupled with the increasing diversity and uncertainty of operating environment conditions, it is facing great challenges and many practical constraints to build a physical model that fully and accurately reflects the degradation state and evolution process of the equipment in actual operation.
[0004] The common RUL prediction method based on hybrid models is essentially to train multiple prediction models and then perform fusion prediction. Multiple fused prediction models can effectively reflect the trend of equipment status changes, but it also leads to a complex model structure. Compared with other methods, it requires more historical data and computing resources, and it is also difficult to find a reasonable fusion method.
[0005] Equally common neural network methods, such as convolutional neural networks and recurrent neural networks, have shown good performance in RUL tasks for mechanical equipment under the same working conditions. However, these methods essentially meet a basic assumption that the probability distribution of training data should be highly similar to the probability distribution of test data. In actual engineering scenarios, this assumption is difficult to meet because the training machinery and the test machinery are under different operating conditions, resulting in differences in data distribution. This phenomenon is called the domain shift problem, which greatly reduces the predictive performance of traditional deep learning models across working conditions. Solving the problem of operating differences across working conditions and establishing a reliable and effective RUL model are important technical issues in actual industrial production. Summary of the invention
[0006] To this end, an embodiment of the present invention provides a method and system for RUL prediction of mechanical equipment in a domain adversarial network under the guidance of differential alignment, which is used to solve the problem that the existing RUL prediction technology in the prior art is limited by model complexity, data dependence, and domain offset, and it is difficult to accurately predict the remaining life of complex systems under different working conditions.
[0007] In order to solve the above problems, an embodiment of the present invention provides a method for predicting RUL of mechanical equipment in a domain adversarial network under the guidance of difference alignment, and the method includes:
[0008] Step S1: Use sensors to collect mechanical equipment signals of different working conditions and different fault types, and use the data collected under each working condition as a transferable domain. Various data obey different characteristic distributions and there are differences in fault types. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples;
[0009] Step S2: Randomly select a transferable domain as the source domain and another transferable domain as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. The parameters of the feature extractor, domain discriminator, and difference extractor are randomly initialized.
[0010] The feature extractor is used to extract hidden features of source domain samples and target domain samples, the domain discriminator is used to predict labels based on the extracted hidden features, so as to discriminate source domain samples and target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label;
[0011] Step S3: Input the labeled source domain samples into the feature extractor to obtain the hidden features of the samples; the domain discriminator predicts the sample labels based on the extracted hidden features of the samples to obtain the pre-trained feature extractor and domain discriminator;
[0012] Step S4: Initialize the prediction network model using the pre-trained feature extractor and domain discriminator; in the prediction network model training phase, input the source domain samples and the target domain samples into the feature extractor at the same time to obtain hidden features, and then input the hidden features of samples from different domains into the domain discriminator and the difference extractor to obtain the target domain pseudo label, and generate a loss weight based on the difference between the source domain label and the target domain pseudo label;
[0013] Wherein, the prediction network model includes a feature extractor, a domain discriminator and a difference extractor;
[0014] Step S5: Add the loss weight to the adversarial loss to form a differential alignment loss, ensuring that the prediction network model learns cross-domain invariant features and optimizes the decision boundary between the target domain samples and the source domain samples;
[0015] Step S6: Execute step S4 until the model converges to obtain a trained prediction network model, and use the trained prediction network model to predict the test sample to obtain the test performance of the model.
[0016] Preferably, the step S1 specifically includes the following steps:
[0017] Step S11: using sensors to collect time series signals of mechanical equipment under different working conditions and different fault types, taking the data collected under each working condition as a transferable domain, the data in each domain obeys different characteristic distributions and the fault types are different; taking the collected sequence signals of all sensors as a sample, obtaining sensor data samples;
[0018] Step S12: The obtained sensor data samples are combined with different operating condition data, mechanical equipment number, current remaining life, total remaining life and remaining service life to form input samples, which helps the feature extractor to learn discriminative features more easily.
[0019] Preferably, in step S2, a transferable domain is randomly selected as a source domain and another transferable domain is randomly selected as a target domain, samples in the source domain have labels, and samples in the target domain do not have labels, specifically including:
[0020] Set up a source domain D S and a target domain D T , source domain D S It is a time series dataset containing a series of labels, denoted as D S ={x S ,y S}, where x S is a set of input feature sequences in the source domain, each sequence x Si ∈R q×d represents the d-dimensional sensor readings over q consecutive time steps; y S is the RUL label sequence corresponding to the input feature sequence, each y Si is a scalar representing the remaining useful life of the equipment at time step i; the target domain D T It is a time series dataset containing only unlabeled data, denoted by D T ={x T}, where x T is a distribution P(x) from a different but possibly related distribution to the source domain. T ) also satisfies x Ti ∈R q×d .
[0021] Preferably, the step S3 specifically includes the following steps:
[0022] Step S31: Input the labeled source domain sample into the feature extractor to obtain the sample hidden feature sequence. The process is as follows:
[0023]
[0024] Where G is the feature extractor; represents the jth source domain sample sequence; represents the hidden feature sequence extracted from the jth sample in the pre-training phase;
[0025] Step S32: The domain discriminator predicts sample labels based on the extracted sample hidden features, and uses the softmax function to calculate the loss of the sample's true label and predicted label. The pre-trained feature extractor and domain discriminator are obtained by minimizing the loss. The specific process is shown in the following formula:
[0026]
[0027] In the formula, Denotes the domain discriminator C in the pre-training stage st Hidden feature sequence Output.
[0028] Preferably, the step S4 specifically includes the following steps:
[0029] Step S41: Migrate the pre-trained feature extractor and domain discriminator to the training stage to start method training. In the training stage, firstly, the source domain sample and the target domain sample are simultaneously input into the feature extractor to obtain the sample hidden features. The process is shown as follows:
[0030]
[0031] In the formula, Respectively represent the hidden features extracted from the j-th sample in the source domain and the j-th sample in the target domain; denote the j-th source domain sample sequence and the j-th source domain sample sequence respectively; G is a feature extractor;
[0032] Step S42: Input the hidden features of samples in different domains into the domain discriminator to obtain the sample label prediction feature vector. The process is as follows:
[0033]
[0034] In the formula, Denotes the domain discriminator C during the training phase st right Output: Denotes the domain discriminator C during the training phase st right Output:
[0035] Step S43: The gap between the source domain sample label and the target domain pseudo label is determined by the absolute value of the difference between them, and a variable α is designed, which is not only positively correlated with the gap d, but also its curve change should be gentle, and it is required to satisfy that when the gap d is 0, the variable α is 1, and when the gap d is 1, the variable α is not less than 0.1; the process is as follows:
[0036]
[0037] In the formula, y s is the source domain sample label; y t is the target domain pseudo label; e represents a natural constant; α is the loss weight.
[0038] Preferably, the step S5 specifically includes the following steps:
[0039] Step S51: Perform source domain supervised learning, the formula is as follows:
[0040]
[0041] In the formula, represents the loss of the i-th sample sequence in the source domain; Represents sample sequence loss;
[0042] Step S52: Apply the loss weight obtained in step S4 to the domain discriminator loss function to ensure that the prediction network model can learn the cross-domain invariant features of the shared category, and when calculating the adversarial loss, the true label of the source domain is recorded as 1 and the true label of the target domain is recorded as 0. The process is as follows:
[0043]
[0044] Where, L adv,d represents the difference alignment loss; N is the number of samples in each batch; β is a hyperparameter; α i is the loss weight of the i-th sample pair; is the i-th sample in the source domain; is the i-th sample in the target domain; D represents the domain discriminator; E S It means that the feature extractor extracts source domain samples; E T It means that the feature extractor extracts samples from the target domain.
[0045] Preferably, in the prediction network model training stage, the parameters of the feature extractor and the domain discriminator are updated by the gradient descent method. The specific process is as follows:
[0046]
[0047] In the formula, represents the sample sequence loss; θ c ,θ adv They represent the network parameters of the feature extractor G and the domain discriminator D respectively.
[0048] The embodiment of the present invention further provides a domain adversarial network mechanical equipment RUL prediction system under the guidance of differential alignment, which is used to implement the above-mentioned domain adversarial network mechanical equipment RUL prediction method under the guidance of differential alignment, and specifically includes:
[0049] The data acquisition and preprocessing module is used to use sensors to collect mechanical equipment signals of different working conditions and different fault types. The data collected under each working condition is used as a transferable domain. Various data obey different characteristic distributions and there are differences in fault types. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples.
[0050] The domain selection and initialization module is used to randomly select a transferable domain as the source domain and another transferable domain as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. The parameters of the feature extractor, domain discriminator, and difference extractor are randomly initialized.
[0051] The feature extractor is used to extract hidden features of source domain samples and target domain samples, the domain discriminator is used to predict labels based on the extracted hidden features, so as to discriminate source domain samples and target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label;
[0052] The pre-training module is used to input the labeled source domain samples into the feature extractor to obtain the hidden features of the samples; the domain discriminator predicts the sample labels based on the extracted hidden features of the samples to obtain the pre-trained feature extractor and domain discriminator;
[0053] The model initialization and training module is used to initialize the prediction network model using the pre-trained feature extractor and domain discriminator. In the prediction network model training phase, the source domain samples and the target domain samples are simultaneously input into the feature extractor to obtain hidden features, and then the hidden features of samples in different domains are input into the domain discriminator and the model initialization and training module difference extractor to obtain the target domain pseudo label, and a loss weight is generated based on the difference between the source domain label and the target domain pseudo label.
[0054] Wherein, the prediction network model includes a feature extractor, a domain discriminator and a difference extractor;
[0055] The loss function calculation and optimization module is used to add the loss weight to the adversarial loss to form a differential alignment loss, ensure that the prediction network model learns cross-domain invariant features, and optimize the decision boundary between the target domain samples and the source domain samples;
[0056] The model evaluation and testing module is used to execute the model initialization and training module until the model converges, obtain the trained prediction network model, and use the trained prediction network model to predict the test samples to obtain the test performance of the model.
[0057] An embodiment of the present invention also provides an electronic device, comprising a processor, a memory and a bus system, wherein the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the above-mentioned domain adversarial network mechanical device RUL prediction method under the guidance of differential alignment.
[0058] An embodiment of the present invention also provides a computer storage medium, which stores a computer software product. The computer software product includes several instructions for enabling a computer device to execute the above-mentioned domain adversarial network mechanical device RUL prediction method under the guidance of differential alignment.
[0059] It can be seen from the above technical solutions that the present invention has the following beneficial effects:
[0060] (1) Efficient cross-condition adaptability: This method designs a new domain adaptation framework that can effectively solve the problem of remaining useful life (RUL) prediction of mechanical equipment under cross-conditions. By using the information of the source domain (labeled data) to guide the learning of the target domain (unlabeled data), this method can overcome the differences in data distribution under different working conditions and improve the robustness and accuracy of the prediction model.
[0061] (2) Adaptive weight adjustment mechanism: This method introduces a difference coefficient, which can determine an adaptive weight based on the difference between the source domain label and the target domain pseudo-label. This mechanism enables the model to dynamically adjust the importance of different samples during training, thereby more accurately reflecting the true distribution and characteristics of the data.
[0062] (3) Difference-based alignment strategy: This method adopts a difference-based alignment strategy, which determines the alignment strength during migration based on the difference coefficient. Through this alignment strategy, the model can better capture the information shared between domains while ignoring the noise or interference introduced by the differences in working conditions, thereby obtaining more accurate and reliable prediction results.
[0063] (4) Optimized cross-domain invariant feature extraction: This method designs a differential alignment loss function that combines differential alignment and adversarial loss, so that the model can more effectively obtain cross-domain invariant features during training. These cross-domain invariant features not only contain key information about the operating status of mechanical equipment, but are also not affected by changes in working conditions, thus significantly improving the prediction performance of the model under cross-working conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the following is a brief description of the drawings required for use in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0065] Figure 1 It is a simplified diagram of the engine structure in the embodiment;
[0066] Figure 2 A flowchart of a method for predicting RUL of a domain adversarial network mechanical device under the guidance of differential alignment provided in an embodiment;
[0067] Figure 3 It is a structural diagram of the RUL prediction method of mechanical equipment in the embodiment;
[0068] Figure 4 The RUL diagrams of all the test engines in the embodiment (sorted from small to large according to the remaining service life of the test engines), where (a) is FD001→FD003 (RMSE mean 11.31), and (b) is FD003→FD001 (RMSE mean 14.99);
[0069] Figure 5 RMSE value diagram of all test engines in the embodiment (sorted by test engine number);
[0070] Figure 6 A block diagram of a domain adversarial network mechanical device RUL prediction system under the guidance of differential alignment provided in an embodiment. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0072] Embodiment 1
[0073] The engine data used in this example comes from the turbofan engine degradation monitoring data set proposed by NASA. The main components of the turbofan engine degradation monitoring data set proposed by NASA include fan, low-pressure compressor, high-pressure compressor, combustion chamber, high-pressure turbine, and low-pressure turbine. The details of the test bench are in Figure 1 In the description.
[0074] like Figure 2 As shown, an embodiment of the present invention proposes a method for predicting RUL of mechanical equipment in a domain adversarial network under the guidance of differential alignment, and the method includes:
[0075] Step S1: Use sensors to collect mechanical equipment signals of different working conditions and different fault types, and use the data collected under each working condition as a transferable domain. Various data obey different characteristic distributions and there are differences in fault types. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples;
[0076] Step S2: Randomly select a transferable domain as the source domain and another transferable domain as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. The parameters of the feature extractor, domain discriminator, and difference extractor are randomly initialized.
[0077] The feature extractor is used to extract hidden features of source domain samples and target domain samples, the domain discriminator is used to predict labels based on the extracted hidden features, so as to discriminate source domain samples and target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label;
[0078] Step S3: Input the labeled source domain samples into the feature extractor to obtain the hidden features of the samples; the domain discriminator predicts the sample labels based on the extracted hidden features of the samples to obtain the pre-trained feature extractor and domain discriminator;
[0079] Step S4: Initialize the prediction network model using the pre-trained feature extractor and domain discriminator; in the prediction network model training phase, input the source domain samples and the target domain samples into the feature extractor at the same time to obtain hidden features, and then input the hidden features of samples from different domains into the domain discriminator and the difference extractor to obtain the target domain pseudo label, and generate a loss weight based on the difference between the source domain label and the target domain pseudo label;
[0080] Wherein, the prediction network model includes a feature extractor, a domain discriminator and a difference extractor;
[0081] Step S5: Add the loss weight to the adversarial loss to form a differential alignment loss, ensuring that the prediction network model learns cross-domain invariant features and optimizes the decision boundary between the target domain samples and the source domain samples;
[0082] Step S6: Execute step S4 until the model converges to obtain a trained prediction network model, and use the trained prediction network model to predict the test sample to obtain the test performance of the model.
[0083] It can be seen from the above technical solution that the present invention provides a method for RUL prediction of mechanical equipment in a domain adversarial network under the guidance of differential alignment. First, by widely collecting sensor signals of different working conditions and fault types, this method can cope with complex cross-working condition challenges. Secondly, the collaborative work of the feature extractor, domain discriminator and difference extractor not only realizes the accurate identification of source domain and target domain samples, but also adaptively adjusts the alignment strength through the difference coefficient, thereby ensuring the extraction of cross-domain invariant features. More importantly, the design of the differential alignment loss effectively combines the adversarial loss and the difference coefficient, so that the model can continuously optimize the decision boundary during the training process and improve the accuracy of cross-domain RUL prediction. Therefore, the present invention not only solves the difficult problem of RUL prediction of mechanical equipment under cross-working conditions, but also has a wide range of promotion value in practical applications due to its high robustness and adaptability, and can be widely used in machinery, electricity, chemical industry, aviation and other fields.
[0084] In step S1, sensors are used to collect mechanical equipment signals of different working conditions and different fault types. The data collected under each working condition is used as a transferable domain. Various data obey different characteristic distributions and the fault types are different. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples, including:
[0085] Step S11: The present invention uses the different FD001 and FD003 subsets in the C-MAPSS data set, which are different in mechanical fault simulation characteristics. Each subset is subdivided into two parts, namely the training subset and the test subset, which are independent of each other, as shown in Table 1. In these two subsets, each data sample is essentially composed of a series of multidimensional time series, which reflect the dynamic signal data recorded by 21 sensors under different operating conditions. At the same time, each sample is accompanied by an additional 3 conditional parameters describing the operating status of the system. Each part of the C-MAPSS data set provides rich real-time monitoring data, which not only includes the time evolution process of 21 sensor signals, but also covers three dimensions of operating environment information, and ensures the distinction between the training set and the test set, so as to facilitate the effective evaluation of the model generalization ability and fault prediction performance, as shown in Table 2.
[0086] Table 1C-MAPSS data composition
[0087]
[0088] Table 2C-MAPSS sensor specific information
[0089]
[0090]
[0091] Step S21: For each numbered engine, its actual operating life (also called operating cycle) is different. For example, in the training data of the FD001 sub-dataset, the operating cycle of engine No. 1 is as long as 192 unit times, and there is a corresponding sensor status record at each moment. In order to facilitate model training, the data set calibrates each moment in chronological order. At the same time, the remaining service life at each moment is calculated by subtracting the current consumed operating cycle from the total maximum operating cycle of the engine. In this way, the data set clearly reflects the dynamic evolution of the performance status and RUL of each engine over time. The specific process is as follows:
[0092] RUL train =C max -C i
[0093] Where RUL train Indicates the remaining service life of the engine, C max Indicates the total maximum operating cycle of the engine; C i Indicates the number of operating cycles currently consumed by the engine.
[0094] In the test set of the FD001 subdataset, data recording starts at a specific moment in the engine's operating cycle and continues to a specified point in its degradation process. Therefore, for the engine data at any moment in the test set, the remaining useful life is calculated by first determining the maximum operating cycle actually recorded for the engine in the test set; secondly, adding the actual remaining useful life from that moment until the actual failure of the engine; and finally subtracting the operating cycle at the current moment from it. In this way, each data point in the test set is accompanied by an estimate of the remaining useful life of the engine under actual operating conditions, as follows:
[0095] RUL test =C max -C i +RUL i
[0096] Where RUL testRepresents the remaining useful life of the engine at any time in the test set; RUL i Indicates the true remaining service life from that moment until actual engine failure.
[0097] The dataset numbers the operating cycles of each engine and calculates the remaining service life based on the actual records, which is the difference between the current operating cycle and the maximum operating cycle. In order to eliminate the differences between sensor data, all data are normalized, so that the feature dimensions of the dataset are expanded to include 21 sensor data, 3 operating condition data, engine number, current engine operating cycle, remaining service life, and normalized operating cycle data, a total of 28 dimensions.
[0098] In step S2, a transferable domain is randomly selected as the source domain and another transferable domain is selected as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. The parameters of the feature extractor, the domain discriminator and the difference extractor are randomly initialized. Among them, the feature extractor is used to extract the hidden features of the source domain samples and the target domain samples, and the domain discriminator is used to predict the labels based on the extracted hidden features, so as to identify the source domain samples and the target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label, which specifically includes:
[0099] Step S21: Set a source domain D S and a target domain D T Source domain D S It is a time series dataset containing a series of labels, denoted as D S ={x S ,y S}, where x S is a set of input feature sequences in the source domain, each sequence x Si ∈R q×d represents the d-dimensional sensor readings over q consecutive time steps; y S is the RUL label sequence corresponding to the input feature sequence, each y Si Is a scalar representing the remaining useful life of the equipment at time step i. T It is a time series dataset containing only unlabeled data, denoted by D T ={x T}, where x T is a distribution P(x) from a different but possibly related distribution to the source domain. T ) also satisfies x Ti ∈R q×dSince there may be domain shift in practical applications, that is, the data distribution of the source domain and the target domain is different, the goal is to build a mapping function that can use labeled source domain data and unlabeled target domain data to train the model, and expect this model to have good generalization ability in the target domain, that is, f(x T )≈y T , where y T is the RUL sequence on the target domain that is to be predicted but is not provided in actual operation;
[0100] In this embodiment, two groups of migration tasks are set, namely, migration from FD001 to FD003 and migration from FD003 to FD001.
[0101] Step S22: construct a feature extractor, which essentially includes but is not limited to a Transformer network and a convolutional neural network. The present invention emphasizes the role of subsequent difference alignment, so only a simple CNN network is used here to highlight the improvement of the network performance by the invention. Its structured parameter list 3 is as follows:
[0102] Table 3 Structural parameters of feature learner
[0103]
[0104] In this embodiment, in step S3, the labeled source domain sample is input into the feature extractor to obtain the hidden features of the sample; the domain discriminator predicts the sample label based on the extracted hidden features of the sample to obtain a pre-trained feature extractor and domain discriminator, which specifically includes:
[0105] Step S31: Input the labeled source domain sample into the feature extractor to obtain the sample hidden feature sequence. The process is as follows:
[0106]
[0107] Where G is the feature extractor; represents the jth source domain sample sequence; represents the hidden feature sequence extracted from the jth sample in the pre-training phase;
[0108] Step S32: The domain discriminator predicts sample labels based on the extracted hidden features of the samples, and uses the softmax function to calculate the loss of the real sample labels and the predicted labels. The pre-trained feature extractor and domain discriminator are obtained by minimizing the loss. The specific process is shown in the following formula:
[0109]
[0110] In the formula, Denotes the domain discriminator C in the pre-training stagest Hidden feature sequence Output.
[0111] In step S4, the prediction network model is initialized using the pre-trained feature extractor and domain discriminator; in the prediction network model training stage, the source domain sample and the target domain sample are simultaneously input into the feature extractor to obtain hidden features, and then the hidden features of samples in different domains are input into the domain discriminator and the difference extractor to obtain the target domain pseudo label, and a loss weight is generated based on the difference between the source domain label and the target domain pseudo label; wherein the prediction network model includes a feature extractor, a domain discriminator and a difference extractor, specifically including:
[0112] Step S41: Migrate the pre-trained feature extractor and domain discriminator to the training stage to start method training. In the training stage, firstly, the source domain sample and the target domain sample are simultaneously input into the feature extractor to obtain the sample hidden features. The process is shown as follows:
[0113]
[0114] In the formula, Respectively represent the hidden features extracted from the j-th sample in the source domain and the j-th sample in the target domain; denote the j-th source domain sample sequence and the j-th source domain sample sequence respectively; G is a feature extractor;
[0115] Step S42: Input the hidden features of samples in different domains into the domain discriminator to obtain the sample label prediction feature vector. The process is as follows:
[0116]
[0117] In the formula, Denotes the domain discriminator C during the training phase st right Output: Denotes the domain discriminator C during the training phase st right Output:
[0118] Step S43: The gap between the source domain sample label and the target domain pseudo label is determined by the absolute value of the difference between them, and a variable α is designed, which is not only positively correlated with the gap d, but also its curve change should be gentle, and it is required to satisfy that when the gap d is 0, the variable α is 1, and when the gap d is 1, the variable α is not less than 0.1; the process is as follows:
[0119]
[0120] In the formula, y s is the source domain sample label; yt is the target domain pseudo label; e represents a natural constant; α is the loss weight.
[0121] In step S5, the loss weight is added to the adversarial loss to form a differential alignment loss, ensuring that the prediction network model learns cross-domain invariant features and optimizes the decision boundary between the target domain samples and the source domain samples, including:
[0122] Step S51: Perform source domain supervised learning, the formula is as follows:
[0123]
[0124] In the formula, represents the loss of the i-th sample sequence in the source domain; Represents sample sequence loss;
[0125] Step S52: Apply the loss weight obtained in step S4 to the domain discriminator loss function to ensure that the prediction network model can learn the cross-domain invariant features of the shared category, and when calculating the adversarial loss, the true label of the source domain is recorded as 1 and the true label of the target domain is recorded as 0. The process is as follows:
[0126]
[0127] Where, L adv,d represents the difference alignment loss; N is the number of samples in each batch; β is a hyperparameter; α i is the loss weight of the i-th sample pair; is the i-th sample in the source domain; is the i-th sample in the target domain; D represents the domain discriminator; E S It means that the feature extractor extracts source domain samples; E T It means that the feature extractor extracts samples from the target domain.
[0128] In this embodiment, in step S6, step S4 is executed until the model converges to obtain a trained prediction network model, and the trained prediction network model is used to predict the test sample to obtain the test performance of the model.
[0129] The RUL results under two different migration tasks are as follows: Figure 4 , Figure 5 As shown in the figure. From the prediction results, we can see that the average RMSE values of the prediction tasks under the two cross-working conditions reached 11.31 and 14.99, which are significantly better than the existing methods. This shows that the present invention can handle the cross-working condition migration RUL task well. RMSE is defined as the standard deviation between the true value and the predicted value, and its calculation method is as follows:
[0130]
[0131] Where n is the number of samples, y i is the true value of the i-th sample, is the predicted value of the i-th sample. RMSE represents the average error between the predicted value and the true value and has the same unit as the original data.
[0132] Embodiment 2
[0133] like Figure 6 As shown, the present invention provides a domain adversarial network mechanical equipment RUL prediction system under the guidance of differential alignment, which is used to implement the domain adversarial network mechanical equipment RUL prediction method under the guidance of differential alignment of the above embodiment 1, specifically including:
[0134] The data acquisition and preprocessing module 100 is used to use sensors to collect mechanical equipment signals of different working conditions and different fault types, and regard the data collected under each working condition as a transferable domain. Various data obey different characteristic distributions and there are differences in fault types. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples;
[0135] A domain selection and initialization module 200 is used to randomly select a transferable domain as a source domain and another transferable domain as a target domain, wherein samples in the source domain have labels and samples in the target domain do not have labels, and to randomly initialize parameters of a feature extractor, a domain discriminator, and a difference extractor;
[0136] The feature extractor is used to extract hidden features of source domain samples and target domain samples, the domain discriminator is used to predict labels based on the extracted hidden features, so as to discriminate source domain samples and target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label;
[0137] The pre-training module 300 is used to input the labeled source domain samples into the feature extractor to obtain the hidden features of the samples; the domain discriminator predicts the sample labels based on the extracted hidden features of the samples to obtain the pre-trained feature extractor and domain discriminator;
[0138] The model initialization and training module 400 is used to initialize the prediction network model using the pre-trained feature extractor and domain discriminator. In the prediction network model training stage, the source domain sample and the target domain sample are simultaneously input into the feature extractor to obtain hidden features, and then the hidden features of samples in different domains are input into the domain discriminator and the difference extractor to obtain the target domain pseudo label, and a loss weight is generated based on the difference between the source domain label and the target domain pseudo label.
[0139] Wherein, the prediction network model includes a feature extractor, a domain discriminator and a difference extractor;
[0140] A loss function calculation and optimization module 500 is used to add the loss weight to the adversarial loss to form a differential alignment loss, ensure that the prediction network model learns cross-domain invariant features, and optimize the decision boundary between the target domain samples and the source domain samples;
[0141] The model evaluation and testing module 600 is used to execute the model initialization and training module until the model converges to obtain a trained prediction network model, and use the trained prediction network model to predict the test sample to obtain the test performance of the model.
[0142] The present embodiment provides a RUL prediction system for domain adversarial network mechanical equipment under the guidance of differential alignment, which is used to implement the aforementioned RUL prediction method for domain adversarial network mechanical equipment under the guidance of differential alignment. Therefore, the specific implementation method of the RUL prediction system for domain adversarial network mechanical equipment under the guidance of differential alignment can be seen in the embodiment part of the RUL prediction method for domain adversarial network mechanical equipment under the guidance of differential alignment in the previous text, for example, the data acquisition and preprocessing module 100, the domain selection and initialization module 200, the pre-training module 300, the model initialization and training module 400, the loss function calculation and optimization module 500, the model evaluation and testing module 600, which are respectively used to implement steps S1, S2, S3, S4, S5, and S6 in the RUL prediction method for domain adversarial network mechanical equipment under the guidance of differential alignment. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part. In order to avoid redundancy, it will not be repeated here.
[0143] Embodiment 3
[0144] An embodiment of the present invention also provides an electronic device, comprising a processor, a memory and a bus system, wherein the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the above-mentioned domain adversarial network mechanical device RUL prediction method under the guidance of differential alignment.
[0145] Embodiment 4
[0146] An embodiment of the present invention also provides a computer storage medium, which stores a computer software product. The computer software product includes several instructions for enabling a computer device to execute the above-mentioned domain adversarial network mechanical device RUL prediction method under the guidance of differential alignment.
[0147] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0150] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A domain adversarial network mechanical equipment RUL prediction method under the guidance of difference alignment, characterized in that: include: Step S1: Use sensors to collect mechanical equipment signals of different working conditions and different fault types, and use the data collected under each working condition as a transferable domain. Various data obey different characteristic distributions and there are differences in fault types. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples; Step S2: Randomly select a transferable domain as the source domain and another transferable domain as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. The parameters of the feature extractor, domain discriminator, and difference extractor are randomly initialized. The feature extractor is used to extract hidden features of source domain samples and target domain samples, the domain discriminator is used to predict labels based on the extracted hidden features, so as to discriminate source domain samples and target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label; Step S3: Input the labeled source domain samples into the feature extractor to obtain the hidden features of the samples; the domain discriminator predicts the sample labels based on the extracted hidden features of the samples to obtain the pre-trained feature extractor and domain discriminator; Step S4: Initialize the prediction network model using the pre-trained feature extractor and domain discriminator; in the prediction network model training phase, input the source domain samples and the target domain samples into the feature extractor at the same time to obtain hidden features, and then input the hidden features of samples from different domains into the domain discriminator and the difference extractor to obtain the target domain pseudo label, and generate a loss weight based on the gap between the source domain label and the target domain pseudo label, including: The gap d between the source domain sample label and the target domain pseudo label is determined by the absolute value of the difference between them. The loss weight 𝛼 not only needs to be positively correlated with the gap d, but also its curve change should be gentle. At the same time, it needs to satisfy that when the gap d is 0, the loss weight 𝛼 is 1, and when the gap d is 1, the loss weight 𝛼 is not less than 0.1; Wherein, the prediction network model includes a feature extractor, a domain discriminator and a difference extractor; Step S5: Add the loss weight to the adversarial loss to form a differential alignment loss, ensuring that the prediction network model learns cross-domain invariant features and optimizes the decision boundary between the target domain samples and the source domain samples; Step S6: Execute step S4 until the model converges to obtain a trained prediction network model, and use the trained prediction network model to predict the test sample to obtain the test performance of the model.
2. According to the method for predicting RUL of mechanical equipment of domain adversarial network under the guidance of difference alignment in claim 1, it is characterized in that: The step S1 specifically includes the following steps: Step S11: using sensors to collect time series signals of mechanical equipment under different working conditions and different fault types, taking the data collected under each working condition as a transferable domain, the data in each domain obeys different characteristic distributions and the fault types are different; taking the collected sequence signals of all sensors as a sample, obtaining sensor data samples; Step S12: The obtained sensor data samples are combined with different operating condition data, mechanical equipment number, current remaining life, total remaining life and remaining service life to form input samples, which helps the feature extractor to learn discriminative features more easily.
3. The method for predicting RUL of mechanical equipment of domain adversarial network under the guidance of difference alignment according to claim 1 is characterized in that: In step S2, a transferable domain is randomly selected as the source domain and another transferable domain is randomly selected as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. Specifically, the following steps are performed: Set up a source domain D S and a target domain D T , source domain D S It is a time series dataset containing a series of labels, denoted as D S = {x S , y S }, where x S is a set of input feature sequences in the source domain, each sequence x Si ∈R q×d represents the d-dimensional sensor readings over q consecutive time steps; y S is the RUL label sequence corresponding to the input feature sequence, each y Si is a scalar representing the remaining useful life of the equipment at time step i; the target domain D T It is a time series dataset containing only unlabeled data, denoted by D T = {x T }, where x T is a distribution P(x) from a different but possibly related distribution to the source domain. T ) also satisfies x Ti ∈R q×d .
4. The method for predicting RUL of mechanical equipment of domain adversarial network under the guidance of difference alignment according to claim 1 is characterized in that: The step S3 specifically comprises the following steps: Step S31: Input the labeled source domain sample into the feature extractor to obtain the sample hidden feature sequence. The process is as follows: (1) In the formula, is a feature extractor; represents the jth source domain sample sequence; represents the hidden feature sequence extracted from the jth sample in the pre-training phase; Step S32: The domain discriminator predicts sample labels based on the extracted hidden features of the samples, and uses the softmax function to calculate the loss of the real sample labels and the predicted labels. The pre-trained feature extractor and domain discriminator are obtained by minimizing the loss. The specific process is shown in the following formula: (2) In the formula, Represents the domain discriminator in the pre-training stage Hidden feature sequence Output.
5. The method for predicting RUL of mechanical equipment in domain adversarial network under the guidance of difference alignment according to claim 1 is characterized in that: The step S4 specifically comprises the following steps: Step S41: Migrate the pre-trained feature extractor and domain discriminator to the training stage to start method training. In the training stage, first, the source domain sample and the target domain sample are simultaneously input into the feature extractor to obtain the sample hidden features. The process is shown as follows: , (3) In the formula, , Respectively represent the hidden features extracted from the j-th sample in the source domain and the j-th sample in the target domain; , They represent the j-th source domain sample sequence and the j-th source domain sample sequence respectively; is a feature extractor; Step S42: Input the hidden features of samples in different domains into the domain discriminator to obtain the sample label prediction feature vector. The process is as follows: , (4) In the formula, represents the domain discriminator during the training phase right Output: represents the domain discriminator during the training phase right Output: Step S43: Set the gap between the source domain sample label and the target domain pseudo label to be determined by the absolute value of the difference between them, and design a loss weight , not only needs to be positively correlated with the gap d, but its curve change should be gentle, and it needs to satisfy that when the gap d is 0, the loss weight is 1, when the gap d is 1, the loss weight Not less than 0.1; the process is as follows: , (5) In the formula, is the source domain sample label; is the target domain pseudo label; e represents a natural constant; is the loss weight.
6. The method for predicting RUL of mechanical equipment in domain adversarial network under the guidance of difference alignment according to claim 1, characterized in that: The step S5 specifically comprises the following steps: Step S51: Perform source domain supervised learning, the formula is as follows: (6) In the formula, represents the loss of the i-th sample sequence in the source domain; Represents sample sequence loss; Step S52: Apply the loss weight obtained in step S4 to the domain discriminator loss function to ensure that the prediction network model can learn the cross-domain invariant features of the shared category, and when calculating the adversarial loss, the true label of the source domain is recorded as 1 and the true label of the target domain is recorded as 0. The process is as follows: (7) In the formula, represents the difference alignment loss; N is the number of samples in each batch; is a hyperparameter; is the loss weight of the i-th sample pair; is the i-th sample in the source domain; is the i-th sample in the target domain; represents the domain discriminator; It means that the feature extractor extracts source domain samples; It means that the feature extractor extracts samples from the target domain.
7. The method for predicting RUL of a mechanical device in a domain adversarial network under the guidance of difference alignment according to claim 6, characterized in that: In the prediction network model training phase, the parameters of the feature extractor and domain discriminator are updated by the gradient descent method. The specific process is as follows: (8) In the formula, Represents sample sequence loss; , They represent feature extractors , network parameters of the domain discriminator D.
8. A domain adversarial network mechanical equipment RUL prediction system under the guidance of differential alignment, characterized in that: The system is used to implement the RUL prediction method for domain adversarial network mechanical equipment under the guidance of difference alignment as described in any one of claims 1 to 7, specifically comprising: The data acquisition and preprocessing module is used to use sensors to collect mechanical equipment signals of different working conditions and different fault types. The data collected under each working condition is used as a transferable domain. Various data obey different characteristic distributions and there are differences in fault types. Samples are obtained by collecting different sensor signals, and all sensor signals are regarded as input samples. The domain selection and initialization module is used to randomly select a transferable domain as the source domain and another transferable domain as the target domain. The samples in the source domain have labels, and the samples in the target domain do not have labels. The parameters of the feature extractor, domain discriminator, and difference extractor are randomly initialized. The feature extractor is used to extract hidden features of source domain samples and target domain samples, the domain discriminator is used to predict labels based on the extracted hidden features, so as to discriminate source domain samples and target domain samples; the difference extractor is used to align based on the difference between the target domain pseudo label and the source domain label; The pre-training module is used to input the labeled source domain samples into the feature extractor to obtain the hidden features of the samples; the domain discriminator predicts the sample labels based on the extracted hidden features of the samples to obtain the pre-trained feature extractor and domain discriminator; The model initialization and training module is used to initialize the prediction network model using the pre-trained feature extractor and domain discriminator. In the prediction network model training phase, the source domain samples and the target domain samples are simultaneously input into the feature extractor to obtain hidden features, and then the hidden features of samples from different domains are input into the domain discriminator and the difference extractor to obtain the target domain pseudo label, and a loss weight is generated based on the gap between the source domain label and the target domain pseudo label. Wherein, the prediction network model includes a feature extractor, a domain discriminator and a difference extractor; The loss function calculation and optimization module is used to add the loss weight to the adversarial loss to form a differential alignment loss, ensure that the prediction network model learns cross-domain invariant features, and optimize the decision boundary between the target domain samples and the source domain samples; The model evaluation and testing module is used to execute the model initialization and training module until the model converges, obtain the trained prediction network model, and use the trained prediction network model to predict the test samples to obtain the test performance of the model.
9. An electronic device, characterized in that: The electronic device includes a processor, a memory and a bus system, the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the RUL prediction method of domain adversarial network mechanical equipment under the guidance of differential alignment as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer software product, and the computer software product includes several instructions for enabling a computer device to execute the RUL prediction method for domain adversarial network mechanical equipment under the guidance of difference alignment as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Bearing fault type prediction method and system based on multi-source domain transfer learning
CN116304820A
Multi-source subdomain negative migration suppression bearing diagnosis method, system, medium and equipment
CN117591935A