Traction motor cross-equipment fault diagnosis method and system based on partial adversarial domain adaptive migration
By building a high confidence pseudo-label prediction module and a domain discriminator model that dynamically adjusts the loss weight, the problem of poor adaptability of the cross-device migration model in motor fault diagnosis is solved, and the effective migration and adaptability of the motor fault diagnosis method in actual operation is achieved.
Patent Information
- Application Number
- CN202510202394.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-07-18
AI Technical Summary
Existing motor fault diagnosis methods have poor adaptability to cross-device migration models in the case of fault category label offset in the source and target domains, resulting in a degradation in fault diagnosis performance.
Using a method based on partial adversarial domain adaptive migration, a tag classifier model with high confidence pseudo-label prediction module and a global domain discriminator model with dynamic adjustment of loss weights are constructed to realize effective transfer learning when the spatial spatial inconsistency of the fault data of the source and target domains is inconsistent, and the negative transfer problem is avoided.
Improves the adaptability of fault diagnosis methods in cross-device fault diagnosis, improves the real-time operational health monitoring of motors and trains without the need for additional hardware equipment.
Smart Images

Figure CN120336946A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptive transfer. Background Art
[0002] In the process of the continuous development of modern industrial production equipment towards the direction of being structured, automated and intelligent, motors, as the most important power and driving devices, have been widely used in high-speed trains, subways and intercity rail transit equipment. However, in production practice, motors will inevitably fail due to long-term operation in harsh environments. At present, in cross-device fault diagnosis, there are many problems. For the target motor equipment to be diagnosed, it is difficult to obtain data that exactly matches the fault categories of the source-domain motor equipment used for training. And in the general case, the category space of the target motor fault data is a subset of the target category space of the source-domain motor. Then, when the fault diagnosis model performs knowledge transfer, it is very easy to learn the features and patterns of irrelevant outlier categories in the source domain, resulting in a decline in the fault recognition performance of the fault diagnosis model for the target domain during cross-device diagnosis and the occurrence of negative transfer.
[0003] It can be seen that the existing motor fault diagnosis methods face the problem of poor adaptability of the cross-device migration model in the case of label shift between the source domain and the target domain fault categories.
[0004] Therefore, the present invention aims to provide a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptive transfer to solve the above problems. Summary of the Invention
[0005] The purpose of the present invention is to solve the above problems and provide a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptive transfer to solve the problem of poor adaptability of the cross-device migration model faced by the existing motor fault diagnosis methods in the case of label shift between the source domain and the target domain fault categories.
[0006] To achieve the above purpose, the technical solution of the present invention is as follows:
[0007] The present invention provides a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptive transfer. The method includes the following steps:
[0008] S1: Construct a training sample set and a test sample set according to a pre-constructed source domain data set and a target domain data set, where the label space of the target domain data set is a subset of the source domain label space;
[0009] S2: Respectively construct a feature extractor model, a label classifier model with a high-confidence pseudo-label prediction module, a global domain discriminator model, and a local domain discriminator model;
[0010] Input the training sample set containing source domain samples and target domain samples into the feature extractor model, and respectively output the source domain features of the training sample set and the target domain features of the training sample set;
[0011] Input the source domain features of the training sample set and the target domain features of the training sample set into the label classifier model, the global domain discriminator model and the local domain discriminator model respectively, and obtain the predicted labels of the source domain samples, the high-confidence pseudo-labels of the target domain samples, the output of the global domain discriminator model and the output of the local domain discriminator model;
[0012] S3: According to the outputs of the label classifier model, the global domain discriminator model and the local domain discriminator model, respectively construct a label classifier loss function, a global domain discriminator loss function and a local domain discriminator loss function;
[0013] According to the global domain discriminator loss function and the local domain discriminator loss function, construct a weight dynamic adjustment module. Under the action of the weight dynamic adjustment module, dynamically adjust the loss weights of the global domain discriminator model and the local domain discriminator model; Use the weight dynamic adjustment module to comprehensively obtain a cross-device fault diagnosis model loss function from the label classifier loss function, the global domain discriminator loss function and the local domain discriminator loss function;
[0014] S4: Construct the optimal training parameters of the cross-device fault diagnosis model according to the cross-device fault diagnosis model loss function, and use this optimal cross-device fault diagnosis model parameter as the target model; Determine the fault diagnosis result of the motor to be tested according to the real-time sensor signal of the motor to be tested in the target domain and the target model.
[0015] Compared with the prior art, the beneficial effects of this solution:
[0016] The present invention provides a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptive transfer. This method constructs a label classifier model with a high-confidence pseudo-label prediction module, and a global domain discriminator model and a local domain discriminator model with dynamically adjustable loss weights. When the source domain motor and the target domain motor face inconsistent fault data category spaces, the transfer learning model can accurately select the samples in the source domain related to the target domain fault categories to avoid the negative transfer problem caused by focusing on irrelevant outlier categories, and realize the effective transfer of fault diagnosis knowledge between the two domains under label shift, improving the adaptability of the fault diagnosis method in cross-device fault diagnosis of actual running motors. This method is easy to implement and does not require additional hardware devices, and can improve the real-time operation health monitoring level of motors and trains. Brief Description of the Drawings
[0017] Figure 1It is the flowchart of a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptation transfer in an embodiment of the present invention;
[0018] Figure 2 It is the architecture diagram of a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptation transfer in an embodiment of the present invention;
[0019] Figure 3 It is the confusion matrix of a traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer in an embodiment of the present invention;
[0020] Figure 4 It is the visualization diagram of the source domain and target domain t-SNE features of a traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer in an embodiment of the present invention. Detailed implementation manners
[0021] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be further described in detail below in conjunction with the embodiments and drawings of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0022] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below in conjunction with the embodiments.
[0023] Embodiment:
[0024] The solution provided in the embodiment of the present invention is as described in the above invention content, and provides a traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptation transfer, including:
[0025] S1: Construct a training sample set and a test sample set according to a pre-constructed source domain data set and a target domain data set, where the label space of the target domain data set is a subset of the source domain label space;
[0026] S2: Respectively construct a feature extractor model, a label classifier model with a high-confidence pseudo-label prediction module, a global domain discriminator model, and a local domain discriminator model; input the training sample set containing source domain samples and target domain samples into the feature extractor model, and respectively output the source domain features of the training sample set and the target domain features of the training sample set; input the source domain features and target domain features of the training sample set into the label classifier model, the global domain discriminant model, and the local domain discriminant model respectively to obtain the predicted labels of the source domain samples, the high-confidence pseudo-labels of the target domain samples, the output of the global domain discriminator model, and the output of the local domain discriminator model.
[0027] S3: Respectively construct a label classifier loss function, a global domain discriminator loss function, and a local domain discriminator loss function according to the outputs of the label classifier model, the global domain discriminator model, and the local domain discriminator model; construct a weight dynamic adjustment module according to the global domain discriminator loss function and the local domain discriminator loss function, and under the action of the weight dynamic adjustment module, dynamically adjust the loss weights of the global domain discriminator model and the local domain discriminator model; use the weight dynamic adjustment module to comprehensively obtain a cross-device fault diagnosis model loss function from the label classifier loss function, the global domain discriminator loss function, and the local domain discriminator loss function.
[0028] S4: Construct the optimal training parameters of the cross-device fault diagnosis model according to the cross-device fault diagnosis model loss function, and use this optimal cross-device fault diagnosis model parameter as the target model; determine the fault diagnosis result of the motor to be tested according to the real-time sensor signal of the target domain motor to be tested and the target model.
[0029] The "cross-device" in this embodiment refers to traction motors of different types and models, which are under different control circuits and control strategies. This embodiment takes the cross-device migration fault diagnosis of three traction motors of different types, models, and under different control circuits and control strategies, namely, the CRH2 type traction motor (three-phase asynchronous motor), a certain type of permanent magnet synchronous motor, and the Fuxinghao traction motor, as an example to further illustrate and verify the method of the present invention. Stator winding inter-turn short circuit fault (hereinafter referred to as "inter-turn short circuit"), air gap eccentricity, and rotor broken bar fault are several common faults of traction motors. However, if the inter-turn short circuit, air gap eccentricity, and rotor broken bar faults are not diagnosed in time, it will cause the motor temperature to rise, accelerate the evolution speed of the motor fault, cause the motor performance to deteriorate rapidly, and greatly reduce the stability and safety of the system. Therefore, this embodiment takes the diagnosis of these three types of faults, namely, motor inter-turn short circuit, air gap eccentricity, and rotor broken bar, as an example, and uses the three-phase current signal (sensor) data of the motor in different operating states (including normal, inter-turn short circuit, air gap eccentricity, and rotor broken bar) at a certain rotational speed to construct the source domain data set, and uses the three-phase current signal (sensor) data of different operating states at another rotational speed to construct the target domain data set.
[0030] In this embodiment, when determining the source domain features and target domain features of the training sample set based on the training sample set, a feature extractor model can be constructed using a Convolutional Neural Networks (CNN) structure, the number of layers and parameters of each layer of the feature extractor model are set, and the source domain features and target domain features of the training sample set are obtained. In this embodiment, the label classifier model, the global domain discriminator model, and the local domain discriminator model can adopt multi-layer fully connected layers. Among them, the target model is a combined model of the feature extractor model, the label classifier model, the global domain discriminator model, and the local domain discriminator model.
[0031] For the above traction motor cross-device fault diagnosis method and system based on partial adversarial domain adaptation transfer, by constructing a label classifier model with a high-confidence pseudo-label prediction module, and a global domain discriminator model and a local domain discriminator model with dynamically adjustable loss weights, when the source domain motor and the target domain motor face inconsistent fault data category spaces, the transfer learning model can accurately select samples of relevant fault categories in the source domain to avoid the negative transfer problem caused by focusing on irrelevant outlier categories, realize the effective transfer of fault diagnosis knowledge between the two domains under label shift, and improve the adaptability of the fault diagnosis method in cross-device fault diagnosis of actual operating motors. This method is easy to implement, does not require additional hardware devices, and can improve the real-time operation health monitoring level of motors and trains.
[0032] Optionally, the S1 includes:
[0033] S11: Collect the sensor signals of the source domain motor in the normal state and the C-class fault operating state where R represents the set of real numbers, respectively represent the number of sampling points of the sensor signals in the normal state, the first class,..., the c-th class,..., the C-th class of fault operating states, c = 0, 1,...,.,..., C, n represents the number of sensors, and the data collected at this rotational speed is regarded as the source domain to construct the source domain dataset The source domain dataset D S The corresponding class label is The corresponding domain label is y d = 0, where, y d = 0 represents the source domain, y d = 1 represents the target domain, and the labeled source domain dataset is denoted as
[0034] Collect the sensor signals of the target domain motor in the normal state and the E-class fault operating state where They represent the number of sampling points of sensor signals under normal, first type, …, eth type, …, Eth type fault operation respectively, e = 0, 1, …,, …, E. The data collected at this speed is regarded as the target domain, and the target domain dataset is constructed. Target domain dataset D T The corresponding category label is And the target domain label space is a subset of the source domain label space, satisfying The corresponding domain label is y d = 1, the labeled target domain dataset is represented as
[0035] S12: The source domain dataset D is processed with a window size of Win and a step size of Stp. S In The data is windowed in time, and the data set is constructed after the time window is: Represents the number of samples, and the calculation formula satisfies the following relationship:
[0036]
[0037] In the formula, floor means rounding down;
[0038] The source domain dataset D is respectively S All C+1 operating conditions The data is windowed in time, and the data set is constructed after the time window is: Respectively represent the data set constructed after time sliding window The source domain sample set is constructed by using the source domain data after the time sliding window l s is the number of samples in the source domain sample set, and its size can be expressed as:
[0039]
[0040] The category label corresponding to the source domain sample set Ds is The labeled source domain sample set is denoted as
[0041] The target domain dataset D is respectively T All E+1 operating conditions The data are time-windowed, and the data set is constructed after time-windowing. Respectively represent the data set constructed after time sliding window The number of samples, and use the target domain data after sliding window to construct the target domain sample set l t is the number of samples in the target domain sample set, and its size can be expressed as:
[0042]
[0043] The target domain dataset D T The corresponding class label is The labeled target domain sample set is denoted as
[0044] S13: Randomly shuffle the source domain sample set D s and divide it in a set ratio. One part is used to construct the training sample set One part is used to construct the test sample set Where and respectively represent the number of samples in the source domain sample set used for training and testing, and the relationship between them is:
[0045]
[0046] Randomly shuffle the target domain sample set D t and divide it in a set ratio. One part is used to construct the training sample set One part is used to construct the test sample set Where and respectively represent the number of samples in the target domain sample set used for training and testing, and the relationship between them is:
[0047]
[0048] Concatenate all the samples in the training sample set in the source domain sample set with the training sample set in the target domain sample set by rows to construct the training sample set l Tr is the first dimension of the training sample, and its size can be expressed as:
[0049]
[0050] The labeled training sample set is denoted as It should be noted that during the training process, the class labels are not required, only the domain labels are needed.
[0051] The test samples in the source domain sample set with the test sample set in the target domain sample set All samples are concatenated by row to construct a test sample set l Te is the first dimension of the training samples, and its size can be expressed as:
[0052]
[0053] The labeled test sample set is denoted as It should be noted that during the testing process, the domain label is not required, only the class label is needed.
[0054] Optionally, the S2 includes:
[0055] S21: Construct a feature extractor model G f ;
[0056] Set the mapping function of the feature extractor as g(), and its initial parameters are θ f , and the mapping relationship of the feature extractor is expressed as:
[0057] h f = g(x f , θ f )(8)
[0058] In the formula, x f represents the input of the feature extractor model, represents the output of the label classifier model, and O f 's size is determined by the parameters θ f set by the feature extractor model;
[0059] When the input is the source domain sample in the training sample set, the output is the source domain feature
[0060]
[0061] When the input is the target domain sample in the training sample set, the output is the target domain feature
[0062]
[0063] S22: Construct a label classifier model G y , to achieve high-confidence pseudo-label prediction;
[0064] Set the mapping function of the label classifier as f(), and its initial parameters are θ y , and the mapping relationship of the label classifier is expressed as:
[0065] h y = f(x y , θ y )(11)
[0066] Wherein, x y represents the input of the label classifier model, and h y ∈R 1×(C+1) represents the output of the label classifier model; when the input is the source domain feature output by the feature extractor its output is:
[0067]
[0068] When the input is the target domain feature output by the feature extractor its corresponding output is:
[0069]
[0070] Wherein, represents the probability that the target domain feature belongs to the c-th category;
[0071] The low-entropy prediction probability of the target domain feature is obtained by using the annealing method:
[0072]
[0073] Wherein, represents the probability that the target domain feature is assigned to the c-th local domain discriminator;
[0074] Using the low-entropy prediction probability of the target domain sample, the corresponding pseudo-label and complementary label
[0075]
[0076] Wherein, arg max() and arg min() respectively represent taking the maximum index and the minimum index.
[0077] In order to reflect the confidence of the target domain pseudo-label, a weight w t ∈[0,1] is assigned to the sample corresponding to the target domain feature:
[0078]
[0079] Wherein is the low-entropy prediction probability of the target domain feature and its entropy value is calculated as follows:
[0080]
[0081] S23: Construct the global domain discriminator model G d ;
[0082] Set the mapping function of the global domain discriminator to Γ(), and its initial parameters to θ d , and the mapping relationship of the global domain discriminator can be expressed as:
[0083] Φ d = Γ(x d , θ d ) (18)
[0084] In the formula, x d represents the input of the global domain discriminator model, and Φ d ∈ R 1×2 represents the output of the global domain discriminator model;
[0085] Perform a gradient reversal operation on the source domain features and the target domain features to obtain the reversed source domain features and the target domain features whose domain labels are y d = 0 and y d = 1 respectively. Use the reversed source domain features and the target domain features as the input of the global domain discriminator, and its output Φ d ∈ R 1×2 ;
[0086] S24: Construct the local domain discriminator model;
[0087] For C + 1 operating state categories, a total of C + 1 local domain discriminators are set Set the mapping function of the local domain discriminator to Ψ(), and the initial parameters of the C + 1 local domain discriminators are respectively The mapping relationship of the c-th local domain discriminator can be expressed as:
[0088]
[0089] In the formula, represents the input of the c-th local domain discriminator, represents the corresponding output;
[0090] Use the reversed source domain features and the target domain features as the input of the local domain discriminator. If the input is the c-th local domain discriminator, the corresponding output is
[0091] Optionally, the S3 includes:
[0092] S31: Construct the loss function of the label classifier;
[0093] For source domain samples, set the loss metric for the predicted labels of the source domain samples of the label classifier to satisfy the following formula:
[0094]
[0095] In the formula, m represents the batch size of model training, represents the one-hot vector of class label c, is the probability that the label classifier diagnoses the training sample as class c under the condition that the class label of the γ-th sample is c;
[0096] For target domain samples, set the positive loss metric for the pseudo-labels of the target domain samples of the label classifier to satisfy the following formula:
[0097]
[0098] For target domain samples, set the negative loss metric for the complementary labels of the target domain samples of the label classifier to satisfy the following formula:
[0099]
[0100] Combining the positive loss and negative loss of the pseudo-labels of the target domain samples, the total loss metric for the pseudo-label loss of the target domain samples of the label classifier satisfies the following formula:
[0101]
[0102] Set the total loss metric for the label classifier loss to satisfy the following formula:
[0103] ζ y′ = ζ y = +λ pl ζ pl (24)
[0104] In the formula, λ pl is the weight of the pseudo-label loss in the total loss of the label classifier.
[0105] S32: Construct the loss function of the global domain discriminator;
[0106] Set the loss metric for the global discriminator loss to satisfy the following formula:
[0107]
[0108] In the formula, represents the one-hot vector of domain label k, For the probability that the global domain discriminator classifies the training sample as the k domain under the condition that the domain label of the γ-th sample is k (k = 0, 1), the global discriminator is used to align the marginal distributions between the source domain and the target domain;
[0109] S33: Construct the local domain discriminator loss function;
[0110] Set the loss metric method of the local discriminator loss to satisfy the following formula:
[0111]
[0112] In the formula, m c represents the number of samples assigned to the local domain discriminator in this batch , is the probability that the c-th local domain discriminator classifies the training sample as the k domain under the condition that the domain label of the γ-th sample is k. The local domain discriminator is used to align the conditional distributions between the source domain and the target domain;
[0113] S34: Construct a weight dynamic adjustment module to dynamically adjust the importance of the marginal distribution and the conditional distribution between the source domain and the target domain;
[0114] Calculate the global A-distance A and the local A-distance B of the source domain sample set and the target domain sample set respectively. The formula is:
[0115] A = d A,g (D s , D t ) = 2(1 - 2(ζ gd )) (27)
[0116]
[0117] Set the dynamic weight μ to automatically adjust the importance of the marginal distribution and the conditional distribution between the source domain and the target domain, which satisfies:
[0118]
[0119] where n is the n-th epoch number run, and N is the total number of epochs.
[0120] Set the loss metric method of the total discriminator loss to satisfy the following formula:
[0121]
[0122] S35: Then the loss function of the fault diagnosis model satisfies the following relationship:
[0123] ζ = ζ y' + ζ d (31)
[0124] Optionally, S4 includes:
[0125] S41: Set the number of iterations to N, the batch size to m, the learning rate to lr, the degradation temperature to T, and the weight λ of the pseudo-label loss in the total loss of the label classifier pl , and input the training set D containing the training samples of the source-domain motor and the target-domain motor Tr in batches into the constructed cross-device fault diagnosis model framework, and train to obtain the optimal cross-device fault diagnosis model parameters with the goal of minimizing the loss function. The optimal cross-device fault diagnosis model parameters include the optimal feature extractor parameters, the optimal label classifier parameters, the optimal global domain discriminator parameters, and the optimal local domain discriminator parameters;
[0126] S42: Obtain the feature extractor G of the target model f and the label classifier G y parameters, and input the test set D containing the test samples of the source-domain motor and the target-domain motor Te into the optimal feature extractor and the optimal label classifier models to obtain the test results Obtain the class label estimated value of the test sample. The class label estimated value of the χ-th test sample satisfies the following relational expression:
[0127]
[0128] where is the class label estimated value, represents the output of the label classifier model corresponding to the χ-th test sample, χ = 1, 2, …, l Te ;
[0129] And regard the index category corresponding to the maximum estimated probability as the class label estimated value.
[0130] In an example, taking the cross-device migration fault diagnosis from a CRH2 type traction motor (three-phase asynchronous motor) to a certain type of permanent magnet synchronous motor as an example, in this example, under four operating conditions of 2400 r / min, 2800 r / min, 3200 r / min, and 3600 r / min, data of different operating states (normal, inter-turn short circuit, air-gap eccentricity, rotor broken bar, etc.) of the CRH2 type traction motor and A and B phase current sensor data of different operating states (normal, inter-turn short circuit, air-gap eccentricity, etc.) of a certain type of permanent magnet synchronous motor are collected respectively. The sampling frequency of the data is 2500 Hz, and the sampling duration of the data under each operating state is 30 s. According to the data of different operating states under different operating conditions collected, 8 diagnostic tasks as shown in Table 1 are set. In these 8 tasks, the target-domain motor fault categories are a subset of the source-domain motor fault categories, that is, there is a label shift between the source domain and the target domain.
[0131] Fault diagnosis task under label offset in Table 1
[0132]
[0133]
[0134] For illustration purposes, taking the first task, task1, as an example, collect the A and B phase current sensor signals of a CRH2 type traction motor with a rotational speed of 2400 r / min in normal, inter-turn short circuit, and air-gap eccentricity conditions, and use them as the source domain to construct a source domain dataset Among them Collect the normal and inter-turn short circuit conditions of a certain type of permanent magnet synchronous motor with a rotational speed of 2800 r / min, and use them as the target domain, the target domain dataset Among them Set the window size Win = 1024 and the step size Stp = 80, and perform time sliding windows on the data of each operating state in the source domain and the target domain respectively to obtain the source domain sample set Among them Target domain sample set Among them The source domain sample set, the target domain sample set D t After randomly shuffling, construct a training sample set and a test sample set in a 2:1 ratio. The training sample set is denoted as D Tr ∈R 3083×1024×2 , and the test sample set is denoted as D Te ∈R 1542×1024×2 .
[0135] The parameter settings for training the partial adversarial domain adaptation transfer model in this embodiment are as follows: the batch size is m = 32, the number of iterations N = 150, the sharpening temperature T is set to 0.75, and the weight λ of the pseudo-label loss in the total loss of the label classifier pl = 1.25. The initial learning rate value is 0.01, and the learning rate l r The calculation formula is lr n+1 = lr n / (1 + 10 * p) β (n = 1,..., N), where lr n represents the nth learning rate, β is set to 0.75, and p = n / N. Use the Adam optimization algorithm to minimize the loss function as the goal, and train to obtain the optimal model parameters for fault diagnosis
[0136] Input the test sample set D Te ∈R 1542×1024×2 into the optimal feature extractor and the optimal label classifier model to obtain the test results and further obtain the estimated class label of the test sample
[0137] In this example, a total of 8 groups of tests were conducted on the case. The source domain and target domain diagnosis results of this case are shown in Table 2. The confusion matrix under task1 in Table 2 is as Figure 3 shown. The visualization result of the 2D features obtained after the features of the source domain and target domain samples are dimensionally reduced by t-SNE after passing through the feature extractor is as Figure 4 shown.
[0138] Table 2 Fault diagnosis results under label shift
[0139]
[0140]
[0141] From Table 2 and Figure 3 it can be seen that after testing 8 cases, the average fault correct rate on the source domain reaches 92.05%, and the average fault correct rate on the target domain reaches 78.07%. From Figure 4 it can be seen that after the partial adversarial domain adaptation transfer method, the features of the two classes in the target domain are aligned with the corresponding features in the source domain respectively, rather than approaching the outlier classes. The distributions of the features extracted from the source domain and the target domain tend to be consistent. At the same time, between different classes, there is good feature separability, and different operating states can be well distinguished. To sum up, this method can accurately select the samples of the fault classes related to the target domain in the source domain, avoid the negative transfer problem caused by paying attention to the irrelevant outlier classes, realize the effective transfer of fault diagnosis knowledge between the two domains under label shift, and improve the adaptability of the fault diagnosis method in cross-device fault diagnosis of actual operating motors.
[0142] The embodiment of the present application also provides a traction motor cross-device fault diagnosis system based on partial adversarial domain adaptation transfer, including a memory, a processor, and a prediction machine program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the corresponding steps of the above method.
[0143] The above-mentioned motor fault diagnosis system can implement each embodiment of the above-mentioned motor fault diagnosis method and achieve the same beneficial effects.
[0144] The above specific embodiments are only explanations of the present invention, and they are not limitations of the present invention. Those skilled in the art can make modifications to the embodiments without creative contributions according to needs after reading this specification, but as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. A traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer, characterized in that: The method includes the following steps: S1: Construct a training sample set and a test sample set based on a pre - constructed source - domain data set and a target - domain data set, where the label space of the target - domain data set is a subset of the source - domain label space; S2: Construct a feature extractor model, a label classifier model with a high - confidence pseudo - label prediction module, a global - domain discriminator model, and a local - domain discriminator model respectively; Input the training sample set containing source - domain samples and target - domain samples into the feature extractor model, and output the source - domain features of the training sample set and the target - domain features of the training sample set respectively; Input the source - domain features of the training sample set and the target - domain features of the training sample set into the label classifier model, the global - domain discriminant model, and the local - domain discriminant model respectively, to obtain the predicted labels of the source - domain samples, the high - confidence pseudo - labels of the target - domain samples, the output of the global - domain discriminator model, and the output of the local - domain discriminator model; S3: Construct a label classifier loss function, a global - domain discriminator loss function, and a local - domain discriminator loss function respectively according to the outputs of the label classifier model, the global - domain discriminator model, and the local - domain discriminator model; Construct a weight dynamic adjustment module according to the global - domain discriminator loss function and the local - domain discriminator loss function. Under the action of the weight dynamic adjustment module, dynamically adjust the loss weights of the global - domain discriminator model and the local - domain discriminator model; Use the weight dynamic adjustment module to comprehensively obtain a cross - device fault diagnosis model loss function from the label classifier loss function, the global - domain discriminator loss function, and the local - domain discriminator loss function; S4: Construct training optimal cross - device fault diagnosis model parameters according to the cross - device fault diagnosis model loss function, and use this optimal cross - device fault diagnosis model parameter as the target model; Determine the fault diagnosis result of the motor to be tested in the target domain according to the real - time sensor signals of the motor to be tested in the target domain and the target model.
2. The traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer according to claim 1, characterized in that: The S1 includes: S11: Collect the sensor signals of the source domain motor in the normal state and the C - type fault operation state where \(R\) represents the set of real numbers, respectively represent the number of sampling points of the sensor signals in the normal, the 1st type, …, the c - th type, …, the C - th type fault operation states, \(c = 0,1,\cdots,c,\cdots,C\), \(n\) represents the number of sensors. Consider the data collected at the rotational speed of the source domain motor as the source domain, and construct the source domain dataset Source domain dataset \(D\) S The corresponding class label is y cS \(\in\{0,1,\cdots,c,\cdots,C\}\), and the corresponding domain label is \(y\) d \(= 0\), and the labeled source domain dataset is denoted as Collect sensor signals of the target domain motor under normal conditions and Class-E fault operating conditions wherein respectively represent the number of sampling points of the sensor signals under normal, Class-1,..., Class-e,..., Class-E fault operations, e = 0, 1,..., e,..., E. The data collected at this rotational speed is regarded as the target domain, and a target domain dataset is constructed Target domain dataset D T The corresponding class label is and the target domain label space is a subset of the source domain label space, satisfying The corresponding domain label is y d = 1, and the labeled target domain dataset is denoted as S12: Perform a time sliding window on the data D in the source domain dataset D with a window size of Win and a step size of Stp. After the time sliding window, the constructed dataset is S where D S c in the dataset. Let represent the number of samples, and the calculation formula satisfies the following relationship: In the formula, floor represents rounding down; With a window size of Win and a step size of Stp, perform a time sliding window on all D in all C + 1 class running states in the source domain dataset D S in the source domain dataset D S c The data is processed by the time sliding window, and the dataset constructed after the time sliding window is which respectively represent the dataset constructed after the time sliding window The number of samples. Use the source domain data after the time sliding window to construct the source domain sample set l s is the number of samples in the source domain sample set, and its size can be expressed as: The class labels corresponding to the source domain sample set Ds are The labeled source domain sample set is denoted as For the target domain dataset D, perform time sliding windows on all data in all E+1 types of operating states with a window size of Win and a step size of Stp respectively. After the time sliding window, the constructed dataset is T All data respectively. After the time sliding window, the constructed dataset is respectively represent the number of samples in the dataset constructed after the time sliding window. Use the target domain data after the sliding window to construct the target domain sample set The number of samples in the target domain sample set is l l t is the number of samples in the target domain sample set, and its size can be expressed as: Target domain data D T The corresponding class label is The labeled target domain sample set is denoted as S13: Randomly shuffle the source domain sample set D s and divide it according to a set ratio. One part is used to construct the training sample set and the other part is used to construct the test sample set where and represent the number of samples for training and testing in the source domain sample set respectively, and their relationship is: After randomly shuffling the target domain sample set D t and dividing it according to a set ratio, a part is used to construct the training sample set and a part is used to construct the test sample set Among them and respectively represent the number of samples used for training and testing in the target domain sample set, and their relationship is: The training sample set in the source domain sample set and the training sample set in the target domain sample set All samples are concatenated row by row to construct a training sample set l Tr is the first dimension of the training sample, and its size can be expressed as: The labeled training sample set is denoted as The test samples in the source domain sample set and the test sample set in the target domain sample set All samples are concatenated row by row to construct a test sample set l Te is the first dimension of the training samples, and its size can be expressed as: The labeled test sample set is denoted as 3. The traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer as claimed in claim 1, characterized in that: The S2 includes: S21: Construct the feature extractor model G f ; Set the mapping function of the feature extractor as g(), and its initial parameter is θ f , and the mapping relationship of the feature extractor is expressed as: h f = g(x f , θ f ) (8) where x f represents the input of the feature extractor model, represents the output of the label classifier model, O f whose size is determined by the parameter θ f set by the feature extractor model; When the input is a source domain sample in the training sample set, the output is the source domain feature When the input is a target domain sample in the training sample set, the output is the target domain feature S22: Construct the label classifier model G y to achieve high-confidence pseudo-label prediction; Set the mapping function of the label classifier as f(), and its initial parameter is θ y , and the mapping relationship of the label classifier is expressed as: h y = f(x y , θ y ) (11) where x y represents the input of the label classifier model, and h y ∈R 1×(C+1) represents the output of the label classifier model; when the input is the source domain feature output by the feature extractor its output is: When the input is the target domain features output by the feature extractor the corresponding output is: wherein, represents the probability of the target domain feature belonging to the c-th category; Adopt an annealing method to obtain the low - entropy prediction probability of the target - domain features: In the formula, represents the target domain feature and the probability assigned to the c-th local domain discriminator; Obtain the corresponding pseudo-label of the sample using the low-entropy prediction probability of the target domain sample and complementary labels where argmax() and argmin() respectively represent taking the maximum index and the minimum index; To reflect the confidence of the pseudo-labels in the target domain, assign a weight w to the samples corresponding to the target domain features t ∈[0,1]: where is the target domain feature is the low-entropy prediction probability is the entropy value, and the calculation formula is as follows: S23: Construct the global domain discriminator model G d ; Set the mapping function of the global domain discriminator as Γ(), and its initial parameter is θ d , and the mapping relationship of the global domain discriminator can be expressed as: Φ d = Γ(x d , θ d ) (18) where \(x\) d represents the input of the global domain discriminator model, and \(\varPhi\) d \(\in\mathbb{R}\) 1×2 represents the output of the global domain discriminator model; Perform gradient reversal operations on the source domain features and the target domain features to respectively obtain the reversed source domain features and the target domain features whose domain labels are y d = 0 and y d = 1. Use the reversed source domain features and the target domain features as the input to the global domain discriminator, and its output Φ d ∈R 1×2 ; S24: Construct a local - domain discriminator model; For C + 1 running state categories, a total of C + 1 local domain discriminators are set Set the mapping function of the local domain discriminator as Ψ(), and the initialization parameters of the C + 1 local domain discriminators are respectively The mapping relationship of the c-th local domain discriminator can be expressed as: wherein, represents the input of the c-th local domain discriminator, represents the corresponding output; The reversed source domain features and the target domain features are used as the inputs of the local domain discriminator. If the c-th local domain discriminator is input, the corresponding output is 4. A traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer as claimed in claim 1, characterized in that: The S3 includes: S31: Construct a label classifier loss function; For source - domain samples, set the loss measurement method of the predicted label loss of the label classifier for source - domain samples to satisfy the following formula: where m represents the batch size of model training, represents the one-hot vector of the class label c, is the probability that the label classifier diagnoses the training sample as class c under the condition that the class label of the γ-th sample is c; For target - domain samples, set the positive loss measurement method of the pseudo - label of the label classifier for target - domain samples to satisfy the following formula: For target - domain samples, set the negative loss measurement method of the complementary label of the label classifier for target - domain samples to satisfy the following formula: Combining the positive loss and the negative loss of the pseudo - label of the target - domain samples, the total loss measurement method of the pseudo - label loss of the label classifier for target - domain samples satisfies the following formula: Set the total loss measurement method of the label classifier loss to satisfy the following formula: ζ y′ = ζ y = + λ pl ζ pl (24) where λ pl is the weight of the pseudo-label loss in the total loss of the label classifier; S32: Construct a global - domain discriminator loss function; Set the loss measurement method of the global discriminator loss to satisfy the following formula: In the formula, represents the one-hot vector of the domain label k, is the probability that the global domain discriminator classifies the training sample as the k domain under the condition that the γ-th sample has the domain label k (k = 0, 1). The global discriminator is used to align the marginal distributions between the source domain and the target domain; S33: Construct a local - domain discriminator loss function; Set the loss measurement method of the local discriminator loss to satisfy the following formula: where m c represents the number of samples allocated to the local domain discriminator in this batch, is the probability that the c-th local domain discriminator classifies the training sample as the k-th domain given that the γ-th sample has the domain label k. The local domain discriminator is used to align the conditional distributions between the source domain and the target domain; S34: Construct a weight dynamic adjustment module to dynamically adjust the importance of the marginal distribution and the conditional distribution between the source domain and the target domain; Calculate the global A-distance A and the local A-distance B of the source domain sample set and the target domain sample set respectively. The formulas are as follows: A = d A,g (D s , D t ) = 2(1 - 2(ζ gd ))(27) Set the dynamic weight μ to automatically adjust the importance of the marginal distribution and the conditional distribution between the source domain and the target domain, which satisfies: where n is the nth epoch number reached, and N is the total number of epochs; Set the loss metric method of the total discriminator loss to satisfy the following formula: S35: Then the loss function of the fault diagnosis model satisfies the following relational expression: ζ = ζ y' + ζ d (31).
5. The traction motor cross-device fault diagnosis method based on partial adversarial domain adaptation transfer as claimed in claim 1, wherein: The S4 includes: S41: Set the number of iterations as N, the batch size as m, the learning rate as lr, the degradation temperature as T, and the weight λ of the pseudo-label loss in the total loss of the label classifier. pl , and input the training set D containing the training samples of the source domain motor and the target domain motor Tr batch by batch into the constructed cross-device fault diagnosis model framework, and train to obtain the optimal cross-device fault diagnosis model parameters with the goal of minimizing the loss function. The optimal cross-device fault diagnosis model parameters include the optimal feature extractor parameters, the optimal label classifier parameters, the optimal global domain discriminator parameters, and the optimal local domain discriminator parameters; S42: Obtain the feature extractor G of the target model f and the label classifier G y parameters, and input the test set D containing the source domain motor and target domain motor test samples Te into the optimal feature extractor and optimal label classifier models to obtain the test results Obtain the class label estimated value of the test sample. The class label estimated value of the χ-th test sample satisfies the following relationship: In the formula, is the estimated value of the class label, represents the output of the label classifier model corresponding to the χ-th test sample. χ = 1, 2, …, l Te And regard the index category corresponding to the maximum estimated probability as the class label estimated value.
6. A traction motor cross-device fault diagnosis system based on partial adversarial domain adaptation transfer, which is applied to a traction motor cross-device fault diagnosis method according to any one of claims 1-5.
7. The traction motor cross-device fault diagnosis system based on partial adversarial domain adaptation migration according to claim 1, wherein: The system includes a memory, a processor, and a predictor program stored on the memory and executable on the processor.