A multi-operating condition motor fault diagnosis method and system based on adversarial transfer learning

The adversarial transfer learning method is used to align the data distribution of different working conditions and extract translation-invariant features, which solves the problem that existing motor fault diagnosis methods are difficult to apply to multiple working conditions, and improves the adaptability and health monitoring level of motor fault diagnosis.

CN115144747BActive Publication Date: 2024-09-20CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210775510.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2024-09-20
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

Existing motor fault diagnosis methods are difficult to diagnose under multiple working conditions, and ignore the differences in sensor data distribution under different working conditions, making the trained fault diagnosis model difficult to apply to other working conditions.

Method used

Adopting a method based on adversarial transfer learning, by constructing a label classifier model, a global domain discriminator model, and a local domain discriminator model, the data distribution under different working conditions is aligned, translation-invariant features are extracted, and faults suitable for multiple working conditions are constructed. Diagnostic model.

Benefits of technology

It realizes that the fault diagnosis model trained under certain working conditions can be applied to other working conditions, improving the adaptability and health monitoring level of the fault diagnosis method on actual operating motors without the need for additional hardware equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115144747B
    Figure CN115144747B
Patent Text Reader

Abstract

The present invention relates to the field of fault diagnosis technology, and discloses a multi-operating condition motor fault diagnosis method and system based on adversarial transfer learning. The method can align the data distribution under different operating conditions by constructing a label classifier model, a global domain discriminator model, and a local domain discriminator model, extract the translation invariant features of samples under different operating conditions, so that the fault diagnosis model trained under a certain operating condition can be applied to other operating conditions, so that the trained fault diagnosis model can be applied to multi-operating conditions, rather than limited to a single operating condition, and improve the adaptability of the fault diagnosis method on the actual operating motor. The method is easy to implement, does not require additional hardware equipment, and can improve the level of real-time health monitoring of motors and trains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a multi-operating-condition motor fault diagnosis method and system based on adversarial transfer learning. Background Art

[0002] In the process of modern industrial production equipment continuously developing towards structuring, automation and intelligence, motors, as the most important power and drive 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, there are many problems in fault diagnosis. On the one hand, due to the protection mechanism, it is difficult and costly to collect fault data from operating vehicles or physical tests, and it is almost impossible to collect data of different fault types under all working conditions; on the other hand, most of the existing motor intelligent fault diagnosis methods ignore the differences in sensor data distribution under different working conditions, which makes it difficult for the fault diagnosis model trained under a certain working condition to be applied to other working conditions.

[0003] It can be seen that the existing motor fault diagnosis method has the problem of difficulty in realizing fault diagnosis under multiple working conditions. Summary of the invention

[0004] The present invention provides a multi-operating condition motor fault diagnosis method and system based on adversarial transfer learning, so as to solve the problem that the existing motor fault diagnosis method is difficult to realize fault diagnosis under multiple operating conditions.

[0005] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0006] In a first aspect, the present invention provides a multi-operating-condition motor fault diagnosis method based on adversarial transfer learning, comprising:

[0007] S1: Construct training sample sets and test sample sets based on the pre-constructed source domain dataset and target domain dataset;

[0008] S2: determining source domain features of the training sample set and target domain features of the training sample set according to the training sample set;

[0009] S3: fusing and enhancing the source domain features of the training sample set and the target domain features of the training sample set to obtain fused features and enhanced features respectively;

[0010] S4: constructing a label classifier model, a global domain discriminator model, and a local domain discriminator model respectively, and constructing 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, and obtaining a fault diagnosis model loss function;

[0011] S5: constructing optimal fault diagnosis model parameters for training according to the fault diagnosis model loss function, and obtaining a target model by training according to the optimal fault diagnosis model parameters and the test sample set;

[0012] S6: Determine a diagnosis result of the motor to be tested according to the real-time sensor signal of the motor to be tested and the target model.

[0013] In the second aspect, the present application provides a multi-operating condition motor fault diagnosis system based on adversarial transfer learning, comprising a memory, a processor, and a prediction machine program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.

[0014] Beneficial effects:

[0015] The multi-operating condition motor fault diagnosis method based on adversarial transfer learning provided by the present invention can align the data distribution under different operating conditions by constructing a label classifier model, a global domain discriminator model and a local domain discriminator model, extract the translation invariant features of samples under different operating conditions, so that the fault diagnosis model trained under a certain operating condition can be applied to other operating conditions, so that the trained fault diagnosis model can be applied to multi-operating conditions, rather than limited to a single operating condition, thereby improving the adaptability of the fault diagnosis method on the actual operating motor. The method is easy to implement, does not require additional hardware equipment, and can improve the level of real-time health monitoring of motors and trains. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flow chart of a multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to an embodiment of the present invention;

[0017] Figure 2 is an architecture diagram of a multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to an embodiment of the present invention;

[0018] Figure 3 is a schematic diagram of feature enhancement in an embodiment of the present invention;

[0019] Figure 4 t-SNE is a visualization diagram of the extracted features of an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the common meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, the words "one" or "an" and similar words do not indicate a quantity limitation, but indicate the existence of at least one.

[0022] It should be understood that a motor fault diagnosis method and system in the embodiment of the present application can be applied to application scenarios such as motor control systems and rail transit, such as high-speed trains, EMUs, or subways, urban rails, etc. This is only an example and not a limitation.

[0023] See also Figure 1-Figure 2 The present application provides a multi-operating condition motor fault diagnosis method based on adversarial transfer learning, comprising:

[0024] S1: Construct training sample sets and test sample sets based on the pre-constructed source domain dataset and target domain dataset;

[0025] S2: Determine the source domain features of the training sample set and the target domain features of the training sample set according to the training sample set;

[0026] S3: Fuse and enhance the source domain features of the training sample set and the target domain features of the training sample set to obtain fused features and enhanced features respectively;

[0027] S4: constructing a label classifier model, a global domain discriminator model, and a local domain discriminator model respectively, and constructing 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, and obtaining a fault diagnosis model loss function;

[0028] S5: construct and train the optimal fault diagnosis model parameters according to the fault diagnosis model loss function, and obtain the target model according to the optimal fault diagnosis model parameters and the test sample set;

[0029] S6: Determine a diagnosis result of the motor to be tested according to the real-time sensor signal of the motor to be tested and the target model.

[0030] This embodiment takes the fault diagnosis of a certain type of permanent magnet synchronous motor as an example to further illustrate and verify the method of the present invention. The working condition described in this embodiment refers to the speed of the motor. Stator winding inter-turn short circuit fault (hereinafter referred to as "inter-turn short circuit") and permanent magnet demagnetization (hereinafter referred to as "demagnetization") fault are two common types of faults in permanent magnet synchronous motors. However, if the inter-turn short circuit and demagnetization faults are not diagnosed in time, the motor temperature will increase, the speed of motor fault evolution will be accelerated, the motor performance will deteriorate rapidly, and the stability and safety of the system will be greatly reduced. Therefore, this embodiment takes the two types of fault diagnosis of motor inter-turn short circuit and demagnetization as examples, and uses the three-phase current signal (sensor) data of the motor running in different operating states (including normal, inter-turn short circuit, demagnetization) at a certain speed to construct the source domain data set, and the three-phase current signal (sensor) data of different operating states at another speed to construct the target domain data set.

[0031] In this embodiment, when determining the source domain features of the training sample set and the target domain features of the training sample set according to the training sample set, a multi-scale convolutional neural network (M-CNN) structure can be used to construct a feature extractor model, and the number of layers of the feature extractor model and the parameters of each layer are set to obtain the source domain features of the training sample set and the target domain features of the training sample set.

[0032] Among them, the target model is a model that combines a feature extractor model, a label classifier model, a global domain discriminator model and a local domain discriminator model.

[0033] The above-mentioned multi-condition motor fault diagnosis method based on adversarial transfer learning can align the data distribution under different working conditions by constructing a label classifier model, a global domain discriminator model, and a local domain discriminator model, extract the translation-invariant features of samples under different working conditions, so that the fault diagnosis model trained under a certain working condition can be applied to other working conditions, and the trained fault diagnosis model can be applied to multiple working conditions, rather than limited to a single working condition, thereby improving the adaptability of the fault diagnosis method on the actual running motor. This method is easy to implement, does not require additional hardware equipment, and can improve the level of real-time health monitoring of motors and trains.

[0034] Optionally, the S1 includes:

[0035] S11: Collect sensor signals of the motor in normal state and type C fault operation state at the first set speed in Respectively represent the number of sampling points of sensor signals in normal, first class, …, cth class, …, Cth class fault operation states, c = 0, 1, …, C, n represents the number of sensors, and the data collected at this speed is regarded as the source domain to construct the source domain dataset Source domain dataset DS The corresponding category label is The corresponding domain label is y d =0, where y d =0 indicates the source domain, y d = 1 represents the target domain, and the labeled source domain dataset is represented as

[0036] Collect sensor signals of the motor in normal state and Class C fault operation state at the second set speed in They represent the number of sampling points of sensor signals under normal, type 1, …, type c, …, and type C fault operation respectively. 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 The corresponding domain label is y d = 1, the labeled target domain dataset is represented as

[0037] 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: in Represents the number of samples, and the calculation formula satisfies the following relationship:

[0038]

[0039] In the formula, floor means rounding down;

[0040] 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:

[0041]

[0042] Source domain sample set D s The corresponding category label is The labeled source domain sample set is denoted as

[0043] The target domain dataset D is respectively T All C+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 is , and the target domain sample set is constructed using the target domain data after sliding window l t is the number of samples in the target domain sample set, and its size can be expressed as:

[0044]

[0045] Target domain dataset D T The corresponding category label is The labeled target domain sample set is denoted as

[0046] S13: The target domain sample set D t After random shuffling, the samples are divided into a set proportion, and a part of them is used to construct the training sample set. Part of it is used to build a test sample set in and They represent the number of samples used for training and testing in the target domain sample set, respectively, and the relationship between them is:

[0047]

[0048] The source domain sample set D s The training sample set in the target domain sample set All samples are spliced ​​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:

[0049]

[0050] The labeled training sample set is denoted as It is worth noting that during training, no Only domain labels are needed.

[0051] Using the test sample set in the target domain sample set Constructing a test sample set The labeled test sample set is denoted as It is worth noting that the test does not require Domain labels for , only category labels are needed.

[0052] It should be noted that the training sample set D Tr From two parts: source domain sample set D s and the training sample set in the target domain sample set When a single sample is taken from the training sample set D Tr No. 1~1 s When , it indicates that the training samples are only taken from the source domain sample set D s ; When a single sample is taken from the training sample set D Tr No.1 s +1~l Tr When the line is run, it indicates that the training samples are only taken from the training sample set in the target domain sample set. Test sample set D Te The test sample set comes only from the target domain sample set

[0053] Optionally, the S2 includes:

[0054] S21: Use multi-scale convolutional neural network M-CNN structure to build feature extractor model G f , set the number of feature extractor layers to n f layer;

[0055] S22: Set the first layer parameters of the feature extractor model;

[0056] Among them, the first layer of the feature extractor is a convolutional layer, and the first convolution input is a training sample set D of dimension 1×Win×n Tr For single sample data, the number of convolution kernels in the first layer is , size is The step length is Fill with After processing, the output dimension is The first convolutional features of The calculation formula satisfies the following relationship:

[0057]

[0058] The processing in this embodiment refers to processing through convolution, BN (Batch Normalization) and Relu activation function operations.

[0059] The dimension is The first convolutional features of The input size is 1×P 1 The first maximum pooling layer of the convolution layer is used to obtain the first convolution output. and The relationship between them is:

[0060]

[0061] In the formula, ceil means rounding up;

[0062] S23: Set the i-th layer parameters of the feature extractor model, where i = 2, 3, ..., n f -3;

[0063] The i-th layer of the feature extractor is a convolutional layer, and the i-th convolution input is the i-1-th convolution output. The number of convolution kernels in the i-th layer is , size is The step length is Fill with After processing, the output dimension is The i-th convolutional feature The calculation formula satisfies the following relationship:

[0064]

[0065] The dimension is The i-th convolutional feature The input size is 1×P i The i-th maximum pooling layer is used to obtain the i-th convolution output and The relationship between them is:

[0066]

[0067] i=2,3,...,n f -3, when i=n f -3, get the nth f -3 layers of convolution output

[0068] S24: Set feature extractor model nth f -2 layer parameters;

[0069] Feature Extractor nth f -2 layers are convolutional layers, and the nth f -2 convolution layer input is the nth f -3 layers of convolution output No.n f -The number of convolution kernels in layer 2 is , size is 1×3, step size is 1, after processing, the output dimension is The nthf -2 layers of convolutional features The calculation formula satisfies the following relationship:

[0070]

[0071] The dimension is The nth f -2 layers of convolutional features Enter the nth f -2 adaptive maximum pooling layer, get the nth f -2 convolution layers output

[0072] S25: Set feature extractor model nth f -1 layer parameters;

[0073] Feature Extractor nth f -1 layer is the convolution layer, the nth layer f -1 convolution layer input is the nth f -3 layers of convolution output No.n f -1 layer has 1 convolution kernel, 1×3 kernel size, and 1 stride. After processing, the output dimension is The nth f -1 layer of convolutional features The calculation formula satisfies the following relationship:

[0074]

[0075] The dimension is The nth f -1 layer of convolutional features The input size is The nth f -1 maximum pooling layer, get the nth f -1 convolution output and The relationship between them is;

[0076]

[0077] S26: Set feature extractor model nth f Layer parameters;

[0078] Feature Extractor nth f The layer is a convolutional layer, the nth f The input of the layer convolution is the nth f -3 layers of convolution output No.n fThe number of convolution kernels in the layer is 1, the size is 1×5, and the step size is 1. After processing, the output dimension is The nth f Layer convolutional features The calculation formula satisfies the following relationship:

[0079]

[0080] The dimension is The nth f Layer convolutional features The input size is The nth f The maximum pooling layer gets the nth f Layer convolution output and The relationship between them is;

[0081]

[0082] S27: Obtain the output Φ of the feature extractor model f , get the characteristics of the training sample set;

[0083] The nth feature extractor f -2 convolution layers output No.n f -1 convolution output and nth f Layer convolution output Flatten and transform the dimensions respectively, and the output dimensions are: Then concatenate the three layers of output after flattening and dimension conversion into columns to get the output of the feature extractor Among them, f The size is:

[0084]

[0085] Optionally, the S3 includes:

[0086] S31: Fusing the source domain features of the training sample set with the target domain features to obtain fused features;

[0087] The source domain features of the training sample set output by the feature extractor model and target domain features Perform feature fusion to obtain fusion features The domain label of the fused feature is consistent with the domain label of the source domain sample. The calculation formula satisfies the following relationship:

[0088]

[0089] In the formula, λ′ is the fusion coefficient, and its calculation formula is:

[0090]

[0091] Where α is the hyperparameter of Beta distribution, and λ is a hyperparameter ranging from 0 to 1;

[0092] S32: Perform data enhancement on the source domain features and the target domain features of the training sample set to obtain enhanced features;

[0093] like Figure 3 As shown, first, the source domain features of the training sample set output by the feature extractor model are and target domain features Projection to latent features The projection method is:

[0094]

[0095] Where W p is the projection matrix, whose dimension is 2O f ×O f ;

[0096] Then, the splitting and splicing method is used to perform random data expansion. The random data expansion process is expressed as:

[0097]

[0098] In the formula, are the expanded features obtained after random data expansion in three ways, γ is a hyperparameter ranging from 0 to 1, Representation feature In the B:C column, when A=p, it means selecting from the potential features, and when A=t, it means selecting from the target domain features. The expression of the enhanced features is:

[0099]

[0100] In the formula, rand{A,B,C} means randomly selecting a matrix from A, B, C matrices to enhance the feature Its domain label remains consistent with the target domain.

[0101] Optionally, the S4 includes:

[0102] S41: Build label classifier model G y ;

[0103] Set the mapping function of the label classifier to f() and its initialization parameter to θy , the mapping relationship of the label classifier is expressed as:

[0104] h y =f(x y ,θ y ) (twenty one)

[0105] In the formula, x y represents the input of the label classifier model, h y ∈R 1×(C+1) Represents the output of the label classifier model; when the input is the final output of the feature extractor When , the output is:

[0106] Φ y =f(Φ f ,θ y ) (twenty two)

[0107] When the input is an enhanced feature , the corresponding output is:

[0108]

[0109] In the formula, Represents enhanced features The probability of belonging to class c;

[0110] The annealing method is used to obtain the low entropy prediction probability of the enhanced features:

[0111]

[0112] In the formula, Represents enhanced features The probability of being assigned to the c-th local domain discriminator;

[0113] S42: Constructing the global domain discriminator model G d ;

[0114] Set the mapping function of the global domain discriminator to Γ() and its initialization parameter to θ d , the mapping relationship of the global domain discriminator can be expressed as:

[0115] h d =Γ(x d ,θ d ) (25)

[0116] In the formula, x d represents the input of the global domain discriminator model, h d ∈R 1×2 represents the output of the global domain discriminator model;

[0117] The target domain features and mixed features Perform gradient reversal operation to obtain the reversed target domain features and mixed features The domain labels are y d =1 and y d = 0, the inverted target domain features and mixed features As the input of the global domain discriminator, its output Φ d ∈R 1×2 ;

[0118] S43: Build a local domain discriminator model;

[0119] For C+1 operating state categories, a total of C+1 local domain discriminators are set The mapping function of the local domain discriminator is set to Ψ(), and the initialization parameters of C+1 local domain discriminators are The mapping relationship of the cth local domain discriminator can be expressed as:

[0120]

[0121] In the formula, represents the input of the c-th local domain discriminator, Indicates the corresponding output;

[0122] The source domain features and Enhanced Features Perform gradient reversal operation to obtain the inverted source domain features and Enhanced Features The domain labels are y d =0 and y d = 1, the inverted source domain features and Enhanced Features As the input of the local domain discriminator, if the cth local domain discriminator is input, the corresponding output is

[0123] S44: construct label classifier loss function;

[0124] The loss metric for the label classifier loss is set to satisfy the following formula:

[0125]

[0126] In the formula, 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 category c when the category label of the γth sample is c;

[0127] S45: Construct global domain discriminator loss function;

[0128] The loss metric of the global discriminator loss is set to satisfy the following formula:

[0129]

[0130] In the formula, represents the one-hot vector of domain label k, is the probability that the global domain discriminator discriminates the training sample as domain k for the γth sample under the condition that the domain label is k, k = 0, 1. The global discriminator is used to align the marginal distribution between the source domain and the target domain;

[0131] S46: Construct local domain discriminator loss function;

[0132] The loss metric of the local discriminator loss is set to satisfy the following formula:

[0133]

[0134] In the formula, m c Indicates the number of cells in the batch assigned to the local domain discriminator The number of samples, is the probability that the cth local domain discriminator discriminates the training sample as domain k under the condition that the domain label is k. The local domain discriminator is used to align the conditional distribution between the source domain and the target domain;

[0135] S47: The fault diagnosis model loss function satisfies the following relationship:

[0136]

[0137] In this embodiment, the loss function of the fault diagnosis method based on the adversarial transfer network consists of three parts: label classifier loss, global domain discriminator loss and (C+1) local domain discriminator losses, and their loss functions are all represented by cross entropy.

[0138] Optionally, the S5 includes:

[0139] S51: Set the number of iterations to N, the batch size to m, the learning rate to lr, the hyperparameter in the Beta distribution to α, the degradation temperature to T, and the training set D Tr Input the fault diagnosis model framework constructed in batches, and train to obtain optimal fault diagnosis model parameters with the goal of minimizing the loss function. The optimal fault diagnosis model parameters include optimal feature extractor parameters, optimal label classifier parameters, optimal global domain discriminator parameters, and optimal local domain discriminator parameters;

[0140] S52: Get the feature extractor G of the target model f and label classifier G y Parameters, the test set D Te Input the optimal feature extractor and optimal label classifier model to get the test results Get the estimated value of the class label of the test sample, the estimated value of the class label of the xth test sample Satisfies the following relationship:

[0141]

[0142] In the formula, is the estimated value of the category label, index(·) represents the index that satisfies the condition ·, Represents the label classifier model output corresponding to the xth test sample, x = 1, 2, ..., l Te ;

[0143] The index category corresponding to the maximum estimated probability is regarded as the category label estimate.

[0144] In one example, the A and B phase current signals of the permanent magnet synchronous motor under normal, turn-to-turn short circuit and demagnetization fault conditions are sampled at 9 different speeds, namely 1000r / min, 1100r / min, 1200r / min, 1300r / min, 1400r / min, 1500r / min, 1600r / min, 1700r / min and 1800r / min. The system sampling frequency is 2.5×10 4 , the number of sampling points is 1.875×10 6 .

[0145] For example, the sensor signal collected at 1800r / min is used as the source domain, and the sensor signal collected at 1400r / min is used as the target domain to construct the source domain dataset. in Target domain dataset in Set the window size Win = 4096, the step size Stp = 500, and perform time sliding window on each running status data in the source domain and the target domain to obtain the source domain sample set in Target domain sample set in The target domain sample set D t After random shuffling, the training sample set and the test sample set are constructed in a 2:1 ratio. At the same time, the ratio of normal, turn-to-turn short circuit, and demagnetization samples in the training sample set and the test sample set is ensured to be 1:1:1. The training sample set is recorded as D Tr ∈R18500×4096×2 , the test sample set is denoted as D Te ∈R 3700 ×4096×2 .

[0146] Take the training sample set as the input of the feature extractor and set the feature extractor model G f The number of layers is 5, and the parameters of each layer and the input and output dimensions of each layer are shown in Table 1.

[0147] Table 1 Parameter set of feature extractor

[0148]

[0149] The batch size is m=32, the number of iterations is N=150, the parameter K is set to 3, the sharpening temperature T is set to 0.75, the hyperparameters α and γ in Beta are set to 0.9 and 0.75, and the number of iterations is N is set to 150. The initial learning rate is 0.01, and the calculation formula of the learning rate lr is lr n+1 =lr n / (1+10*p) β (n=1,...,N), where lr n Denotes the nth learning rate, β is set to 0.75, and p = n / N. The Adam optimization algorithm is used to minimize the loss function, and the optimal model parameters for fault diagnosis are obtained through training.

[0150] The test sample set D Te ∈R 3700×4096×2 Input the optimal feature extractor and optimal label classifier model to get the test results And further obtain the class label estimate of the test sample

[0151] In this example, a total of 18 tests (18 cases) were conducted. The source working condition, target working condition, test working condition and diagnosis results of this case are shown in Table 2. Under Case 2 in Table 2, the features of the source working condition and target working condition samples obtained by the feature extractor, and the 2D feature visualization results obtained after t-SNE dimension reduction are shown in Figure 2. Figure 4 shown.

[0152] Table 2 Experimental cases and corresponding test results

[0153]

[0154] From Table 2, we can see that after testing 18 cases, the average fault accuracy rate reached 98.66%, and in some individual cases, all the diagnoses were correct. Figure 4It can be seen that after adversarial transfer, the extracted source domain features and target domain features are distributed in a consistent manner. At the same time, there is good feature separability between different categories, which can better distinguish different operating states. In summary, this method can reduce the distribution difference between the source domain and the target domain, so that the fault diagnosis model trained under the source working condition can be applied to the target working condition, realize motor fault diagnosis under multiple working conditions, and improve the adaptability of the fault diagnosis method on the actual running motor.

[0155] An embodiment of the present application also provides a multi-operating condition motor fault diagnosis system based on adversarial transfer learning, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the corresponding steps of the above method when executing the computer program.

[0156] The above-mentioned motor fault diagnosis system can implement various embodiments of the above-mentioned motor fault diagnosis method and can achieve the same beneficial effects, which will not be described in detail here.

[0157] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A multi-operating condition motor fault diagnosis method based on adversarial transfer learning, characterized in that: include: S1: Construct training sample sets and test sample sets based on the pre-constructed source domain dataset and target domain dataset; S2: determining source domain features of the training sample set and target domain features of the training sample set according to the training sample set; S3: fusing and enhancing the source domain features of the training sample set and the target domain features of the training sample set to obtain fused features and enhanced features respectively; S4: constructing a label classifier model, a global domain discriminator model, and a local domain discriminator model respectively, and constructing 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, and obtaining a fault diagnosis model loss function; S5: constructing optimal fault diagnosis model parameters for training according to the fault diagnosis model loss function, and obtaining a target model by training according to the optimal fault diagnosis model parameters and the test sample set; S6: Determine a diagnosis result of the motor to be tested according to the real-time sensor signal of the motor to be tested and the target model.

2. The multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to claim 1 is characterized in that: The S1 includes: S11: Collect sensor signals of the motor in normal state and type C fault operation state at the first set speed in Respectively represent the number of sampling points of sensor signals in normal, first class, …, cth class, …, Cth class fault operation states, c = 0, 1, …, C, n represents the number of sensors, and the data collected at this speed is regarded as the source domain to construct the source domain dataset Source domain dataset D S The corresponding category label is The corresponding domain label is y d = 0, the labeled source domain dataset is represented as Collect sensor signals of the motor in normal state and Class C fault operation state at the second set speed in They represent the number of sampling points of sensor signals under normal, type 1, …, type c, …, and type C fault operation respectively. 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 The corresponding domain label is y d = 1, the labeled target domain dataset is represented as R represents the set of real numbers; 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: in Represents the number of samples, and the calculation formula satisfies the following relationship: In the formula, floor means rounding down; 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 is expressed as: Source domain sample set D s The corresponding category label is The labeled source domain sample set is denoted as The target domain dataset D is respectively T All C+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 is , and the target domain sample set is constructed using the target domain data after sliding window l t is the number of samples in the target domain sample set, and its size is expressed as: Target domain dataset D T The corresponding category label is The labeled target domain sample set is denoted as S13: The target domain sample set D t After random shuffling, the samples are divided into a set proportion, and a part of them is used to construct the training sample set. Part of it is used to build a test sample set in and They represent the number of samples used for training and testing in the target domain sample set, respectively, and the relationship between them is: The source domain sample set D s The training sample set in the target domain sample set All samples are spliced ​​row by row to construct a training sample set l Tr is the first dimension of the training sample, and its size is expressed as: The labeled training sample set is denoted as Using the test sample set in the target domain sample set Constructing a test sample set The labeled test sample set is denoted as 3. The multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to claim 1 is characterized in that: The S2 includes: S21: Use multi-scale convolutional neural network M-CNN structure to build feature extractor model G f , set the number of feature extractor layers to n f layer; S22: Set the first layer parameters of the feature extractor model; Among them, the first layer of the feature extractor is a convolutional layer, and the first convolution input is a training sample set D of dimension 1×Win×n Tr For single sample data, the number of convolution kernels in the first layer is , size is The step length is Fill with After processing, the output dimension is The first convolutional features of The calculation formula satisfies the following relationship: The dimension is The first convolutional features of The input size is 1×P 1 The first maximum pooling layer of the convolution layer is used to obtain the first convolution output. and The relationship between them is: In the formula, ceil means rounding up; S23: Set the i-th layer parameters of the feature extractor model, where i = 2, 3, ..., n f -3; The i-th layer of the feature extractor is a convolutional layer, and the i-th convolution input is the i-1-th convolution output. The number of convolution kernels in the i-th layer is , size is The step length is Fill with After processing, the output dimension is The i-th convolutional feature The calculation formula satisfies the following relationship: The dimension is The i-th convolutional feature The input size is 1×P i The i-th maximum pooling layer is used to obtain the i-th convolution output and The relationship between them is: i=2,3,...,n f -3, when i=n f -3, get the nth f -3 layers of convolution output S24: Set feature extractor model nth f -2 layer parameters; Feature Extractor nth f -2 layers are convolutional layers, and the nth f -2 convolution layer input is the nth f -3 layers of convolution output No.n f -The number of convolution kernels in layer 2 is , size is 1×3, step size is 1, after processing, the output dimension is The nth f -2 layers of convolutional features The calculation formula satisfies the following relationship: The dimension is The nth f -2 layers of convolutional features Enter the nth f -2 adaptive maximum pooling layer, get the nth f -2 convolution layers output S25: Set feature extractor model nth f -1 layer parameters; Feature Extractor nth f -1 layer is the convolution layer, the nth layer f -1 convolution layer input is the nth f -3 layers of convolution output No.n f -1 layer has 1 convolution kernel, 1×3 kernel size, and 1 stride. After processing, the output dimension is The nth f -1 layer of convolutional features The calculation formula satisfies the following relationship: The dimension is The nth f -1 layer of convolutional features The input size is The nth f -1 maximum pooling layer, get the nth f -1 convolution output and The relationship between them is; S26: Set feature extractor model nth f Layer parameters; Feature Extractor nth f The layer is a convolutional layer, the nth f The input of the layer convolution is the nth f -3 layers of convolution output No.n f The number of convolution kernels in the layer is 1, the size is 1×5, and the step size is 1. After processing, the output dimension is The nth f Layer convolutional features The calculation formula satisfies the following relationship: The dimension is The nth f Layer convolutional features The input size is The nth f The maximum pooling layer gets the nth f Layer convolution output and The relationship between them is; S27: Obtain the output Φ of the feature extractor model f , get the characteristics of the training sample set; The nth feature extractor f -2 convolution layers output No.n f -1 convolution output and nth f Layer convolution output Flatten and transform the dimensions respectively, and the output dimensions are: Then concatenate the three layers of output after flattening and dimension conversion into columns to get the output of the feature extractor Among them, f The size is:

4. The multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to claim 1 is characterized in that: The S3 includes: S31: Fusing the source domain features of the training sample set with the target domain features to obtain fused features; The source domain features of the training sample set output by the feature extractor model and target domain features Perform feature fusion to obtain fusion features The domain label of the fused feature is consistent with the domain label of the source domain sample. The calculation formula satisfies the following relationship: In the formula, λ′ is the fusion coefficient, and its calculation formula is: In the formula, α is the hyperparameter of Beta distribution, and λ is a hyperparameter ranging from 0 to 1; S32: Perform data enhancement on the source domain features and the target domain features of the training sample set to obtain enhanced features; First, the source domain features of the training sample set output by the feature extractor model are and target domain features Projection to latent features The projection method is: Where W p is the projection matrix, whose dimension is 2O f ×O f ; Then, the splitting and splicing method is used to perform random data expansion. The random data expansion process is expressed as: In the formula, are the expanded features obtained after random data expansion in three ways, γ is a hyperparameter ranging from 0 to 1, Representation feature In the B:C column, when A=p, it means selecting from the potential features, and when A=t, it means selecting from the target domain features. The expression of the enhanced features is: In the formula, rand{A,B,C} means randomly selecting a matrix from A, B, C matrices to enhance the feature Its domain label remains consistent with the target domain.

5. The multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to claim 1 is characterized in that: The S4 includes: S41: Build label classifier model G y ; Set the mapping function of the label classifier to f() and its initialization parameter to θ y , the mapping relationship of the label classifier is expressed as: h y =f(x y ,i y ) (21) In the formula, x y represents the input of the label classifier model, h y ∈R 1×(C+1) Represents the output of the label classifier model; when the input is the final output of the feature extractor When , the output is: F y =f(Φ f ,i y ) (22) When the input is an enhanced feature , the corresponding output is: In the formula, Represents enhanced features The probability of belonging to class c; The annealing method is used to obtain the low entropy prediction probability of the enhanced features: In the formula, Represents enhanced features The probability of being assigned to the c-th local domain discriminator; S42: Constructing the global domain discriminator model G d ; Set the mapping function of the global domain discriminator to Γ() and its initialization parameter to θ d , the mapping relationship of the global domain discriminator is expressed as: h d =Γ(x d ,i d ) (25) In the formula, x d represents the input of the global domain discriminator model, h d ∈R 1×2 represents the output of the global domain discriminator model; The target domain features and mixed features Perform gradient reversal operation to obtain the reversed target domain features and mixed features Its domain labels are y d =1 and y d = 0, the inverted target domain features and mixed features As the input of the global domain discriminator, its output Φ d ∈R 1×2 ; S43: Build a local domain discriminator model; For C+1 operating state categories, a total of C+1 local domain discriminators are set The mapping function of the local domain discriminator is set to Ψ(), and the initialization parameters of C+1 local domain discriminators are The mapping relationship of the cth local domain discriminator is expressed as: In the formula, represents the input of the c-th local domain discriminator, Indicates the corresponding output; The source domain features and Enhanced Features Perform gradient reversal operation to obtain the inverted source domain features and Enhanced Features Its domain labels are y d =0 and y d = 1, the inverted source domain features and Enhanced Features As the input of the local domain discriminator, if the cth local domain discriminator is input, the corresponding output is S44: construct label classifier loss function; The loss metric for the label classifier loss is set to satisfy the following formula: In the formula, 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 category c when the category label of the γth sample is c; S45: Construct global domain discriminator loss function; The loss metric of the global discriminator loss is set to satisfy the following formula: In the formula, represents the one-hot vector of domain label k, is the probability that the global domain discriminator discriminates the training sample as domain k for the γth sample under the condition that the domain label is k, k = 0, 1. The global discriminator is used to align the marginal distribution between the source domain and the target domain; S46: Construct local domain discriminator loss function; The loss metric of the local discriminator loss is set to satisfy the following formula: In the formula, m c Indicates the number of cells in the batch assigned to the local domain discriminator The number of samples, is the probability that the cth local domain discriminator discriminates the training sample as domain k under the condition that the domain label is k. The local domain discriminator is used to align the conditional distribution between the source domain and the target domain; S47: The fault diagnosis model loss function satisfies the following relationship:

6. The multi-operating-condition motor fault diagnosis method based on adversarial transfer learning according to claim 1 is characterized in that: The S5 includes: S51: Set the number of iterations to N, the batch size to m, the learning rate to lr, the hyperparameter in the Beta distribution to α, the degradation temperature to T, and the training set D Tr Input the fault diagnosis model framework constructed in batches, and train to obtain optimal fault diagnosis model parameters with the goal of minimizing the loss function. The optimal fault diagnosis model parameters include optimal feature extractor parameters, optimal label classifier parameters, optimal global domain discriminator parameters, and optimal local domain discriminator parameters; S52: Get the feature extractor G of the target model f and label classifier G y Parameters, the test set D Te Input the optimal feature extractor and optimal label classifier model to get the test results Get the estimated value of the class label of the test sample, the estimated value of the class label of the xth test sample Satisfies the following relationship: In the formula, is the estimated value of the category label, index(·) represents the index that satisfies the condition ·, Represents the label classifier model output corresponding to the xth test sample, x = 1, 2, ..., l Te ; The index category corresponding to the maximum estimated probability is regarded as the category label estimate.

7. A multi-operating-condition motor fault diagnosis system based on adversarial transfer learning, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.