A Fault Diagnosis Method and System for Hydropower Units Based on Joint Domain Adaptive Transfer Learning
By constructing a shared temporal convolutional feature extraction network and combining edge distribution adaptive and conditional distribution adaptive losses, the problem of cross-measuring point and cross-operating condition diagnostic accuracy of hydropower units in complex environments was solved, and high-precision fault identification was achieved.
Patent Information
- Application Number
- CN202611314639.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional fault diagnosis methods for hydropower units struggle to achieve stable diagnosis across measurement points and operating conditions when faced with complex hydraulic, mechanical, and electromagnetic coupling effects. Furthermore, conventional deep learning models suffer from decreased diagnostic accuracy and insufficient generalization ability when the distribution is inconsistent.
We employ a joint domain adaptive transfer learning approach, which constructs a shared temporal convolutional feature extraction network and combines edge distribution adaptive loss and conditional distribution adaptive loss to align the overall distribution and category distribution of the source and target domains, thereby improving diagnostic accuracy.
It significantly improved diagnostic accuracy across multiple measurement points and operating conditions, achieving an average diagnostic accuracy rate of 96.6%, and overcame the problems of insufficient generalization ability and blurred inter-class boundaries caused by inconsistent distribution.
Smart Images

Figure CN123069155A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hydropower unit condition monitoring and fault diagnosis technology, specifically relating to a hydropower unit fault diagnosis method and system based on joint domain adaptive transfer learning. Background Technology
[0002] In addition to its traditional power generation function, hydropower stations also need to serve the consumption of new energy sources such as wind power and solar power. As the core equipment of hydropower stations, turbine generator units need to face more complex coupled effects of hydraulic, mechanical and electromagnetic factors in the context of the new era of development. Therefore, the vibration problem of the units is becoming increasingly prominent.
[0003] Traditional fault diagnosis methods for hydropower units often rely on expert experience, mechanistic models, or manual extraction of time-domain, frequency-domain, and time-frequency-domain features. These methods are effective when the mechanism is clear, the operating condition is simple, and there are sufficient samples. However, in actual engineering projects, the unit structure is complex, the measurement point layout varies significantly, and the operating conditions change frequently. The vibration amplitude, frequency components, and phase characteristics exhibited by the same fault at different measurement point locations are not entirely consistent. Relying solely on manual features and fixed thresholds makes stable diagnosis difficult.
[0004] In recent years, deep learning models such as convolutional neural networks have been introduced into the field of fault diagnosis for rotating machinery and hydropower units. Deep models can automatically extract high-dimensional abstract features from raw vibration signals, reducing reliance on manual feature design. However, conventional deep learning models typically assume that training samples and test samples follow the same or approximately the same data distribution. In actual monitoring scenarios, there are often significant differences in probability distribution between source and target measuring points, and between source and target operating conditions. Directly applying models trained in the source domain to the target domain can easily lead to decreased diagnostic accuracy, insufficient generalization ability, or even misclassification of fault categories.
[0005] To address the aforementioned distribution inconsistency issue, transfer learning and domain adaptation methods have been increasingly applied to fault diagnosis. However, when only edge distribution adaptation is performed, the model primarily focuses on aligning the overall feature distributions of the source and target domains, which may force samples from different fault categories to be closer together, resulting in blurred inter-class boundaries and negative transfer. On the other hand, when only conditional distribution adaptation is performed, it relies on pseudo-labels in the target domain. In the early stages of training, when the prediction results in the target domain are unstable, erroneous pseudo-labels can cause error accumulation, leading the model into local optima.
[0006] Therefore, it is necessary to propose a hydropower unit migration diagnosis method that simultaneously considers global distribution alignment and fine alignment of similar features, so that the model can still effectively learn domain-invariant features and category discrimination features even when the target domain fault samples are limited or the target domain labels are insufficient, thereby improving the accuracy and robustness of fault diagnosis across measurement points and operating conditions. Summary of the Invention
[0007] To address the aforementioned issues, this invention provides a hydropower unit fault diagnosis method based on joint domain adaptive transfer learning. This method constructs a temporal convolutional feature extraction network shared by the source and target domains. Based on source domain classification supervision, it simultaneously introduces edge distribution adaptive loss and conditional distribution adaptive loss, enabling effective alignment between the source and target domains at both the overall distribution level and the category distribution level.
[0008] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning includes the following steps: S1: Collect vibration signals from hydropower units, and use vibration signals with fault category labels as source domain samples and vibration signals to be diagnosed as target domain samples. S2: Perform data preprocessing on the source domain samples and the target domain samples. The data preprocessing includes at least sample segmentation and normalization or standardization of the segmented samples to form a source domain training sample set and a target domain adaptive sample set. S3: Construct a joint domain adaptive transfer learning network, which includes a shared temporal convolutional feature extraction module, an adaptive pooling module, and a shared classifier; S4: Input the source domain samples and target domain samples in parallel into the joint domain adaptive transfer learning network, and extract the deep features of the source domain and the target domain through the shared temporal convolutional feature extraction module; S5: Calculate the source domain classification loss based on the true labels of the source domain samples, and calculate the marginal distribution adaptive loss between the deep features of the source domain and the deep features of the target domain based on the maximum mean difference; S6: Use a shared classifier to output predicted probabilities for target domain samples and generate target domain pseudo-labels. Calculate the conditional distribution adaptive loss between samples of the same type based on the source domain true label and the target domain pseudo-label. S7: Combine the source domain classification loss, target domain pseudo-label classification loss, marginal distribution adaptive loss, and conditional distribution adaptive loss into a total loss function according to weights, and update the parameters of the joint domain adaptive transfer learning network through backpropagation. S8: The trained joint domain adaptive transfer learning network is used for fault category identification of vibration signals in the target domain, and the fault diagnosis results of the unit are output.
[0009] In S1, vibration signals of the hydropower unit are collected, specifically: vibration signals at different measuring points are collected under the same operating conditions, or vibration signals at different operating conditions are collected at the same measuring point. The different measuring point locations include at least two of the following: the upper guide bearing X-axis measuring point, the upper guide bearing Y-axis measuring point, the upper frame X-axis measuring point, and the upper frame Y-axis measuring point; The different operating conditions include at least one of the following: different loads, different speeds, and different head conditions.
[0010] In S2, the sample segmentation adopts a fixed-length sliding window method. The window length is set according to the actual sampling frequency and frequency conversion characteristics. A preset overlap rate is set between phase windows to increase the number of training samples and maintain the continuity of fault impact information. The standardization process uses Z-score standardization, whose expression is: x′=(x μ) / σ; In the formula: x is the original vibration signal sample point, μ is the sample mean, σ is the sample standard deviation, and x′ is the standardized sample point.
[0011] In S3, the temporal convolutional feature extraction module includes multiple sets of one-dimensional convolutional layers, batch normalization layers, nonlinear activation layers, and max pooling layers; The first one-dimensional convolutional layer uses a large convolutional kernel to extract the low-frequency envelope and macroscopic trend features of the vibration signal, while subsequent one-dimensional convolutional layers use a small convolutional kernel to extract local impact, harmonic and nonlinear fault features. The calculation process of the one-dimensional convolutional layer is expressed as follows: ; In the formula: These are the input features for the previous layer. For the i-th layer convolution kernel, The term represents the bias term, * indicates a one-dimensional convolution operation, BN indicates batch normalization, and φ indicates ReLU or other non-linear activation functions. This is the output feature of this layer; The max-pooling layer retains the maximum response within the sliding window, and its calculation process can be expressed as follows: ; In the formula: k is the pooling window length, This is the output feature after pooling.
[0012] In S3, the adaptive pooling module is an adaptive average pooling layer that maps multi-channel feature maps of different lengths extracted by the temporal convolution feature extraction module into fixed-dimensional feature vectors. The calculation process can be represented as follows: ; In the formula: x is the input vibration sample, This is a temporal convolution feature extraction function. is an adaptive pooling function, and z is a fixed-dimensional deep feature vector.
[0013] In S3, the shared classifier module consists of a fully connected layer and a Softmax output layer. The input of the shared classifier is the feature vector z output by the adaptive pooling module, and the output of the shared classifier is the fault category probability, expressed as follows: ; In the formula: C is the number of fault categories, Let be the probability that the sample belongs to the first, second, ..., c type of fault.
[0014] In S5, the adaptive loss of the marginal distribution is calculated by the maximum mean difference. The maximum mean difference is constructed by using a single radial basis kernel function or a linear combination of multiple radial basis kernel functions to construct a kernel matrix to measure the distance between the feature distribution of the source domain and the feature distribution of the target domain in the regenerating kernel Hilbert space. The adaptive loss for edge distribution is expressed as: ; In the formula: For the i-th type of source domain features, For the j-th type of target domain features, Let H be the kernel mapping function, and H be the reproducing kernel Hilbert space. denoted as the number of samples in the target domain batch; S and T represent the deep feature sets of the source domain and the target domain, respectively.
[0015] In S5, the source domain classification loss uses the cross-entropy loss function, which is calculated as follows: ; In the formula: The number of samples in the source domain batch. Let i be the true label of the i-th source domain sample. Let be the probability that the i-th source domain sample is predicted to be of class c. is the indicator function; C represents the total number of categories.
[0016] In S6, the conditional distribution adaptive loss is calculated according to the fault category. For each fault category, the maximum mean difference constraint is applied between the sample features in the source domain belonging to that fault category and the sample features in the target domain whose pseudo-labels belong to that fault category. The specific expression is as follows: ; In the formula: This represents the conditional distribution adaptive loss function; C represents the total number of categories; c represents the index of the category being traversed. H represents the square norm in the reproducing kernel Hilbert space; H represents the reproducing kernel Hilbert space, i.e., the eigenmap. The target space; (·) represents a nonlinear feature mapping function that maps the original feature z to a high-dimensional space H; This represents the total number of samples belonging to class c in the source domain; This represents the feature vector of the i-th sample in the source domain; This represents the set of feature vectors of all samples belonging to class c in the source domain; This represents the mean vector of all samples of category c in the source domain after feature mapping in the H space; This represents the total number of samples belonging to category c in the target domain; This represents the feature vector of the j-th sample in the target domain; This represents the set of feature vectors of all samples belonging to class c in the target domain; It represents the mean vector of all samples of category c in the target domain after feature mapping in the H space.
[0017] In S6, the target domain pseudo-label is determined by the maximum prediction probability of the shared classifier, and a confidence threshold is set. The target domain pseudo-label expression is: ; In the formula: The pseudo-label represents the j-th target domain sample; Let be the probability that the j-th target domain sample is predicted to be of class c; c represents the class index; C represents the total number of fault classes; This indicates the value of c that makes the following expression reach its maximum value; Based on target domain pseudo-labels, pseudo-label classification loss for: ; In the formula: Let be the probability that the j-th target domain sample is predicted to be of class c; This represents the weighted classification loss value over the target domain; It is the total number of samples in the target domain; This indicates summation of the outermost element, iterating from the first to the last element. All target domain samples; This indicates that the inner summation iterates through all fault categories; Indicates an indicator function; As the parameters of the joint domain adaptive transfer learning network are updated, the target domain pseudo-label is regenerated in each iteration and is not saved as a fixed label; when the maximum predicted probability of the target domain sample is lower than the confidence threshold, the target domain sample is not included in the calculation of the conditional distribution adaptive loss.
[0018] In S7, the total loss function is: ; In the formula: For total classification loss, For edge distribution adaptive loss, For conditional distribution adaptive loss, Calculate the loss for each category; These are preset weighting coefficients used to adjust the contribution ratios of marginal distribution adaptive loss, conditional distribution adaptive loss, and classification loss to the total loss function. The classification loss calculation includes source domain classification loss and target domain pseudo-label classification loss.
[0019] In S7, the Adam optimizer or a stochastic gradient descent optimizer with momentum is used to update the model parameters. During training, the target domain validation loss, target domain diagnostic accuracy, or feature distance between the source domain and the target domain are monitored. When the comprehensive performance index, i.e. the total loss function, reaches the preset convergence condition, the optimal diagnostic model is saved.
[0020] A hydropower unit fault diagnosis system based on joint domain adaptive transfer learning includes a data acquisition module, a data preprocessing module, a transfer diagnosis model construction module, a joint domain adaptive training module, a fault diagnosis module, and a result display and early warning module. The data acquisition module is used to collect vibration signals from the unit and output the collected vibration signals to the data preprocessing module. The data preprocessing module is used to receive the vibration signal, perform sample segmentation, normalization or standardization on the vibration signal, construct source domain samples and target domain samples, and output the source domain samples and the target domain samples to the transfer diagnostic model construction module and the joint domain adaptive training module, respectively. The transfer diagnostic model construction module is used to receive the sample dimension information of the source domain samples and the target domain samples, and construct a joint domain adaptive transfer learning network including a shared temporal convolution feature extraction module, an adaptive pooling module and a shared classifier; The joint domain adaptive training module is used to calculate the source domain classification loss, the target domain pseudo-label classification loss, the marginal distribution adaptive loss, and the conditional distribution adaptive loss, and to train the joint domain adaptive transfer learning network based on the total loss function. The fault diagnosis module is used to input the target domain samples output in real time by the data preprocessing module into the optimal migration diagnosis model and output the fault category and corresponding confidence to the result display and early warning module. The results display and early warning module is used to display fault diagnosis results, model accuracy, confusion matrix or feature visualization results, and output early warning information when abnormal states are identified.
[0021] The hydropower unit fault diagnosis system based on joint domain adaptive transfer learning also includes a model storage module and a fault case library; The model storage module is used to store the optimal diagnostic model and its parameters after training; The fault case library is used to store unit vibration signals, measuring point information, operating condition information, fault categories, model prediction results, and corresponding feature distribution information.
[0022] The main beneficial effects of this invention are as follows: (1) It effectively solves the problem of decreased diagnostic accuracy of traditional fault diagnosis methods in scenarios involving multiple measurement points and multiple operating conditions: This invention constructs a temporal convolutional feature extraction network that shares the source and target domains, and automatically extracts deep fault features directly from the original vibration signal, avoiding the subjectivity and limitations of manual feature design. At the same time, through joint domain adaptive training, the model can maintain high diagnostic accuracy in cross-measurement point and cross-operating condition migration scenarios. The embodiments verify that the average diagnostic accuracy of this invention reaches 96.6% in 6 sets of cross-measurement point migration tasks, which is significantly better than conventional deep models.
[0023] (2) It overcomes the deficiency of conventional deep learning models in terms of insufficient generalization ability when the distributions of training samples and test samples are inconsistent: This invention measures the distribution distance between the source domain and the target domain in the regenerating kernel Hilbert space by using the maximum mean difference, and uses this distance as the marginal distribution adaptive loss to participate in network training. This forces the network to learn domain-invariant feature representations, effectively reducing the distribution difference between the source domain and the target domain and improving the model's generalization performance on the target domain.
[0024] (3) It solves the problem that edge distribution adaptation in the single distribution adaptive method easily leads to blurred inter-class boundaries: Based on edge distribution adaptation, this invention further introduces conditional distribution adaptation loss. For each fault category, the features of samples belonging to that category in the source domain and the features of samples with pseudo-labels belonging to that category in the target domain are subject to the same type constraint. This enables fine-grained alignment of feature distributions of the same fault category in the source and target domains, thereby reducing the overall difference between domains while maintaining clear category discrimination boundaries and effectively suppressing negative migration.
[0025] (4) It solves the problem of error accumulation caused by inaccurate pseudo-labels in the target domain during the early stage of training in conditional distribution adaptation: This invention effectively suppresses noise introduced by low-confidence pseudo-labels by setting a confidence threshold and only including target domain samples in the conditional distribution adaptive loss calculation when the maximum predicted probability of the target domain sample is higher than the threshold. At the same time, by jointly constraining the network training direction by combining the source domain classification loss, the network can still maintain the correct classification and discrimination ability in the early stage of training when the target domain pseudo-labels are unstable, thus avoiding model degradation caused by error accumulation.
[0026] (5) It achieves collaborative optimization of edge distribution adaptation and conditional distribution adaptation, taking into account both global alignment between domains and local alignment within categories.
[0027] This invention combines the source domain classification loss, target domain pseudo-label classification loss, edge distribution adaptive loss, and conditional distribution adaptive loss into a total loss function by weighting them. Through backpropagation and joint optimization, the network simultaneously achieves the following objectives during training: maintaining source domain classification accuracy, reducing the overall distribution difference between the source and target domains, and achieving fine-grained alignment of similar fault features between domains. This results in effective alignment at both the overall distribution level and the category distribution level, significantly improving diagnostic performance in cross-test point and cross-operating condition migration scenarios. Attached Figure Description
[0028] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0029] Figure 1 This is a schematic diagram of the hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to the present invention. Figure 2 This is a schematic diagram illustrating the principles of edge distribution adaptation and conditional distribution adaptation in this invention. Figure 3 This is a schematic diagram of t-SNE visualization of source and target domain features in an embodiment of the present invention; Figure 4 This is a schematic diagram comparing the migration diagnosis results of different diagnostic models in an embodiment of the present invention. Detailed Implementation
[0030] Example 1: As Figure 1 As shown in the figure, this embodiment provides a hydropower unit fault diagnosis method based on joint domain adaptive transfer learning: In this embodiment, the unit vibration signal can be obtained by vibration sensors arranged in positions such as the upper guide bearing, the upper frame, and the water guide bearing. For ease of explanation, the upper guide X-direction measuring point is denoted as SX, the upper guide Y-direction measuring point is denoted as SY, the upper frame X-direction measuring point is denoted as JX, and the upper frame Y-direction measuring point is denoted as JY. The above measuring point names are only examples. In actual engineering, the source domain and target domain can be set according to the sensor arrangement. S1: Collect vibration signals from hydropower units, and use vibration signals with fault category labels as source domain samples and vibration signals to be diagnosed as target domain samples. Preferably, vibration signals of the hydropower unit are collected at different measuring points or under different operating conditions; The fault categories include normal state, rotor imbalance, unit rubbing, shaft misalignment, support looseness, guide bearing abnormality, and vibration abnormality caused by stator stiffness change. In the embodiment, the state can also be simplified into two categories: normal state and fault state. In this embodiment, for any migration diagnosis task, a vibration signal with a fault category label at a measurement point location is selected as the source domain sample, and the vibration signal to be diagnosed is selected as the target domain sample. S2: Perform data preprocessing on the source domain samples and the target domain samples. The data preprocessing includes at least sample segmentation and normalization or standardization of the segmented samples to form a source domain training sample set and a target domain adaptive sample set. Preferably, if the original signal length is long, a fixed-length sliding window method is used to truncate the acquired continuous vibration signal according to a fixed window length, that is, to segment the sample so that each sample has the same number of sampling points; Let the continuous vibration signal be X = {x1, x2, ..., x...} N If the window length is L and the overlap rate is ρ, then the sliding step size is s = L(1-ρ). The number of available samples is: (1); In equation (1): N is the length of the original vibration signal, and L is the window length; The window length is set according to the actual sampling frequency and frequency conversion characteristics, and a preset overlap rate is set between adjacent windows to increase the number of training samples and maintain the continuity of fault impact information. In this embodiment, the window length is set to 2048 and the sampling frequency is 458Hz. If the original signal length is insufficient, the length can be unified by discarding, padding with zeros, or interpolation. The standardization process employs Z-score standardization to mitigate the impact of different measurement point installation methods, sensor sensitivity, and amplitude dimension differences on model training. Its expression is: x′=(x μ) / σ(2; In equation (2): x is the original vibration signal sample point, μ is the sample mean, σ is the sample standard deviation, and x′ is the standardized sample point.
[0031] S3: Construct a joint domain adaptive transfer learning network, which includes a source domain input branch and a target domain input branch. The two branches share the same temporal convolutional feature extractor F, the same adaptive pooler G, and the same classifier C. The temporal convolutional feature extractor F includes multiple sets of one-dimensional convolutional layers, batch normalization layers, nonlinear activation layers, and max pooling layers; Among them, the first one-dimensional convolutional layer uses a large convolutional kernel to extract the low-frequency envelope and macro-trend features of the vibration signal. The low-frequency envelope features are used to characterize the low-frequency amplitude change information generated by fault modulation in the vibration signal, and the macro-trend features are used to reflect the overall evolution trend of the equipment operating status over time. Subsequent one-dimensional convolutional layers use small convolutional kernels to extract local shock, harmonic, and nonlinear fault features; The calculation process of the one-dimensional convolutional layer is expressed as follows: (3); In formula (3): These are the input features for the previous layer. For the i-th layer convolution kernel, The term represents the bias term, * indicates a one-dimensional convolution operation, BN indicates batch normalization, and φ indicates ReLU or other non-linear activation functions. This is the output feature of this layer; The max-pooling layer retains the maximum response within the sliding window, and its calculation process can be expressed as follows: (4); In equation (4): k is the pooling window length, The output features are those obtained after pooling. Pooling operations can reduce feature length and network computation while preserving significant responses in vibration signals related to fault impacts.
[0032] The adaptive pooling module is an adaptive average pooling layer that maps multi-channel feature maps of different lengths extracted by the temporal convolutional feature extractor F into fixed-dimensional feature vectors. This enables the joint domain adaptive transfer learning network to be compatible with vibration signal samples of different sampling lengths. The calculation process is expressed as follows: (5); In equation (5): x is the input vibration sample, This is a temporal convolution feature extraction function. is an adaptive pooling function, and z is a fixed-dimensional deep feature vector.
[0033] The classifier C consists of a fully connected layer and a Softmax output layer. The input to the shared classifier is the feature vector z output by the adaptive pooling module, and the output of the shared classifier is the fault category probability, as expressed below: (6); In equation (6): C is the number of fault categories, Let be the probability that the sample belongs to the first, second, ..., c type of fault.
[0034] S4: Input the source domain samples and target domain samples in parallel into the joint domain adaptive transfer learning network, and extract the deep features of the source domain and the deep features of the target domain through the shared temporal convolutional feature extraction module; S5: Calculate the source domain classification loss based on the true labels of the source domain samples, and calculate the marginal distribution adaptive loss between the deep features of the source domain and the deep features of the target domain based on the maximum mean difference; The marginal distribution adaptive loss is calculated by the maximum mean difference, which is constructed by using a single radial basis kernel function or a linear combination of multiple radial basis kernel functions to construct a kernel matrix to measure the distance between the source domain feature distribution and the target domain feature distribution in the regenerating kernel Hilbert space. The marginal distribution adaptive loss is calculated by the maximum mean difference, which is constructed by using a single radial basis kernel function or a linear combination of multiple radial basis kernel functions to construct a kernel matrix to measure the distance between the source domain feature distribution and the target domain feature distribution in the regenerating kernel Hilbert space. The adaptive loss for edge distribution is expressed as: (7); In equation (7): For the i-th type of source domain features, For the j-th type of target domain features, Let H be the kernel mapping function, and H be the reproducing kernel Hilbert space. denoted as the number of samples in the target domain batch; S and T represent the deep feature sets of the source domain and the target domain, respectively.
[0035] The source domain classification loss uses the cross-entropy loss function, which is calculated as follows: (8); In equation (8): The number of samples in the source domain batch. Let i be the true label of the i-th source domain sample. Let be the probability that the i-th source domain sample is predicted to be of class c. is the indicator function; C represents the total number of categories.
[0036] S6: Use a shared classifier to output predicted probabilities for target domain samples and generate target domain pseudo-labels. Calculate the conditional distribution adaptive loss between samples of the same type based on the source domain true label and the target domain pseudo-label. The conditional distribution adaptive loss is calculated according to the fault category. For each fault category, the maximum mean difference constraint is applied to the sample features in the source domain that belong to that fault category and the sample features in the target domain whose pseudo-labels belong to that fault category, thereby achieving fine-grained alignment of similar fault features. The specific expression is as follows: (9); In equation (9): This represents the conditional distribution adaptive loss function; C represents the total number of categories; c represents the index of the category being traversed. H represents the square norm in the reproducing kernel Hilbert space; H represents the reproducing kernel Hilbert space, i.e., the eigenmap. The target space; (·) represents a nonlinear feature mapping function that maps the original feature z to a high-dimensional space H; This represents the total number of samples belonging to class c in the source domain; This represents the feature vector of the i-th sample in the source domain; This represents the set of feature vectors of all samples belonging to class c in the source domain; This represents the mean vector of all samples of category c in the source domain after feature mapping in the H space; This represents the total number of samples belonging to category c in the target domain; This represents the feature vector of the j-th sample in the target domain; This represents the set of feature vectors of all samples belonging to class c in the target domain; This represents the mean vector of all samples of category c in the target domain after feature mapping in the H space; The target domain pseudo-label is determined by the maximum predicted probability of the shared classifier, and a confidence threshold is set. The target domain pseudo-label expression is: (10); In formula (10): The pseudo-label represents the j-th target domain sample; Let be the probability that the j-th target domain sample is predicted to be of class c; c represents the class index; C represents the total number of fault classes; This indicates the value of c that makes the following expression reach its maximum value; Based on target domain pseudo-labels, pseudo-label classification loss for: (11); In equation (11): Let be the probability that the j-th target domain sample is predicted to be of class c; This represents the weighted classification loss value over the target domain; It is the total number of samples in the target domain; This indicates summation of the outermost element, iterating from the first to the last element. All target domain samples; This indicates that the inner summation iterates through all fault categories; Indicates an indicator function; As the parameters of the joint domain adaptive transfer learning network are updated, the target domain pseudo-label is regenerated in each iteration and is not saved as a fixed label; when the maximum predicted probability of the target domain sample is lower than the confidence threshold, the target domain sample is not included in the calculation of the conditional distribution adaptive loss.
[0037] S7: Combine the source domain classification loss, target domain pseudo-label classification loss, marginal distribution adaptive loss, and conditional distribution adaptive loss into a total loss function according to weights, and update the parameters of the joint domain adaptive transfer learning network through backpropagation. The total loss function is: (12); In equation (12): For total classification loss, For edge distribution adaptive loss, For conditional distribution adaptive loss, The loss is calculated for classification; the classification loss includes source domain classification loss and target domain pseudo-label classification loss; These are preset weight coefficients used to adjust the contribution ratios of marginal distribution adaptive loss, conditional distribution adaptive loss, and classification loss to the total loss function. Their specific values can be adjusted based on the characteristics of the training data and the model's convergence.
[0038] The alignment principle of adaptive marginal distribution and adaptive conditional distribution is as follows: Figure 2 As shown. Figure 2 In the middle, the left side shows that the overall feature distribution of the source domain and the target domain gradually approaches each other under adversarial training or MMD constraints, achieving global edge distribution alignment; the right side shows that within each fault category, the feature centers of similar samples in the source domain and the target domain are constrained to similar positions in the regeneration kernel Hilbert space, achieving similar conditional distribution alignment. Through the joint optimization of the above two alignment mechanisms, the network can simultaneously reduce the overall distribution difference between domains and maintain clear category discrimination boundaries.
[0039] In S7, the Adam optimizer or a stochastic gradient descent optimizer with momentum is used to update the model parameters. During training, the target domain validation loss, target domain diagnostic accuracy, or feature distance between the source domain and the target domain are monitored. When the comprehensive performance index, i.e. the total loss function, reaches the preset convergence condition, the optimal diagnostic model is saved.
[0040] Preferably, the training of the joint domain adaptive transfer learning network uses the Adam optimizer, the initial learning rate can be set to 0.001 or 0.0001, the batch sample size can be set to 16, 32 or 64, and the maximum number of training rounds can be set to 100 to 300 rounds. The preset convergence condition refers to the rate of change of the comprehensive performance index between the current training round and the previous training round being less than a preset threshold. α If the condition is met several times consecutively, the model is considered to have reached convergence, and the current optimal diagnostic model is saved. The edge distribution adaptive loss weights and conditional distribution adaptive loss weights are set according to the distribution differences between the source domain and the target domain to avoid the source domain classification ability decreasing or the target domain pseudo-label error accumulating due to excessive alignment weights. Preferably, the conditional distribution adaptive loss weights can be reduced in the early stage of training to avoid negative transfer caused by inaccurate pseudo-labels; in the later stage of training, as the model prediction stabilizes, the conditional distribution adaptive loss weights can be gradually increased to make similar fault features more fully aligned.
[0041] S8: The trained joint domain adaptive transfer learning network is used for fault category identification of vibration signals in the target domain, and the fault diagnosis results of the unit are output.
[0042] Specifically, the vibration samples to be diagnosed in the target domain are input into a trained joint domain adaptive transfer learning network to obtain the probabilities of each fault category; If the maximum probability is greater than the preset diagnostic confidence threshold, the corresponding fault category is output; if the maximum probability is lower than the preset threshold, an uncertain state is output and a prompt is made for manual review or continued sampling. The diagnostic results in the target domain are used to generate a confusion matrix, accuracy, recall, F1 score, and t-SNE feature visualization to evaluate the diagnostic performance of the joint domain adaptive transfer learning network in the target domain.
[0043] Example 2: Figure 1 As shown, this embodiment provides a hydropower unit fault diagnosis system based on joint domain adaptive transfer learning, including a data acquisition module, a data preprocessing module, a transfer diagnosis model construction module, a joint domain adaptive training module, a fault diagnosis module, a result display and early warning module, a model storage module, and a fault case library; The data acquisition module is used to collect vibration signals from different measuring points or under different operating conditions of the unit, and output the collected vibration signals to the data preprocessing module. The data preprocessing module is used to receive the vibration signal, perform sample segmentation, normalization or standardization on the vibration signal, construct source domain samples and target domain samples, and output the source domain samples and the target domain samples to the transfer diagnostic model construction module and the joint domain adaptive training module, respectively. The transfer diagnostic model construction module is used to receive the sample dimension information of the source domain samples and the target domain samples, and construct a joint domain adaptive transfer learning network including a shared temporal convolution feature extraction module, an adaptive pooling module and a shared classifier; The joint domain adaptive training module is used to calculate the source domain classification loss, the target domain pseudo-label classification loss, the marginal distribution adaptive loss, and the conditional distribution adaptive loss, and to train the joint domain adaptive transfer learning network based on the total loss function. The fault diagnosis module is used to input the target domain samples output in real time by the data preprocessing module into the optimal migration diagnosis model and output the fault category and corresponding confidence to the result display and early warning module. The results display and early warning module is used to display fault diagnosis results, model accuracy, confusion matrix or feature visualization results, and output early warning information when abnormal states are identified. Preferably, for an online monitoring system, if multiple consecutive samples are determined to be in the same fault state, or if the fault probability continues to exceed a preset threshold, a fault warning signal is generated. The model storage module is used to store the optimal diagnostic model and its parameters after training. The fault case library is used to store unit vibration signals, measuring point information, operating condition information, fault categories, model prediction results, and corresponding feature distribution information.
[0044] Example 3: This example applies the joint domain adaptive transfer learning network proposed in Example 1 to 6 groups of cross-measure point transfer tasks, and compares it with conventional CNN, deep sub-domain adaptive network DSAN and domain adversarial graph convolutional network DAGCN; In this embodiment, the rated speed of the hydropower station unit is 600 r / min; vibration monitoring data of the upper guide X direction, upper guide Y direction, upper frame X direction and upper frame Y direction are acquired within the same operating condition range. There are 400 samples at each measuring point, including 200 normal samples and 200 fault samples. The length of each sample is 2048 points, and the sampling frequency is 458 Hz. The sample composition is shown in Table 1.
[0045] Table 1. Data Sample Composition
[0046] Each experiment was repeated 10 times, and the average value was taken. The results are shown in Table 2. The comparison of the diagnostic accuracy of each model on the 6 transfer tasks is shown in Table 2. Figure 4 .
[0047] Table 2 Comparison of transfer diagnosis results for each model
[0048] As shown in Table 2, the average diagnostic accuracy of the CNN model without transfer learning is low, indicating that there are significant differences in the distribution of vibration signals between different measuring points, and direct transfer leads to a decrease in the model's generalization ability. After introducing domain adaptation, DSAN and DAGCN significantly improved diagnostic accuracy. In contrast, this invention, which combines marginal distribution adaptation and conditional distribution adaptation, achieved high accuracy in all six transfer tasks, with an average diagnostic accuracy of 96.6%, demonstrating that this invention can effectively improve the cross-measuring point transfer diagnostic performance of hydropower units.
[0049] Figure 3 This paper presents a visual distribution of t-SNE of source and target domain features before and after alignment in the method of this invention. Figure 3 It can be seen that before alignment, the features of the same type of fault samples in the source and target domains exhibit obvious distribution shifts and inter-class aliasing in the low-dimensional embedding space. After joint domain adaptive training according to the present invention, the features of the same type in the source and target domains achieve good clustering, and the discrimination boundaries between different fault categories are clear. This further verifies that the joint constraints of edge distribution adaptation and conditional distribution adaptation can effectively guide the network to learn deep feature representations that are domain-invariant and class-distinguishable.
Claims
1. A fault diagnosis method for hydropower units based on joint domain adaptive transfer learning, characterized in that, Includes the following steps: S1: Collect vibration signals from hydropower units, and use vibration signals with fault category labels as source domain samples and vibration signals to be diagnosed as target domain samples. S2: Perform data preprocessing on the source domain samples and the target domain samples. The data preprocessing includes at least sample segmentation and normalization or standardization of the segmented samples to form a source domain training sample set and a target domain adaptive sample set. S3: Construct a joint domain adaptive transfer learning network, which includes a shared temporal convolutional feature extraction module, an adaptive pooling module, and a shared classifier; S4: Input the source domain samples and target domain samples in parallel into the joint domain adaptive transfer learning network, and extract the deep features of the source domain and the target domain through the shared temporal convolutional feature extraction module; S5: Calculate the source domain classification loss based on the true labels of the source domain samples, and calculate the marginal distribution adaptive loss between the deep features of the source domain and the deep features of the target domain based on the maximum mean difference; S6: Use a shared classifier to output predicted probabilities for target domain samples and generate target domain pseudo-labels. Calculate the conditional distribution adaptive loss between samples of the same type based on the source domain true label and the target domain pseudo-label. S7: Combine the source domain classification loss, target domain pseudo-label classification loss, marginal distribution adaptive loss, and conditional distribution adaptive loss into a total loss function according to weights, and update the parameters of the joint domain adaptive transfer learning network through backpropagation. S8: The trained joint domain adaptive transfer learning network is used for fault category identification of vibration signals in the target domain, and the fault diagnosis results of the unit are output.
2. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S1, vibration signals of the hydropower unit are collected, specifically: vibration signals at different measuring points are collected under the same operating conditions, or vibration signals at different operating conditions are collected at the same measuring point. The different measuring point locations include at least two of the following: the upper guide bearing X-axis measuring point, the upper guide bearing Y-axis measuring point, the upper frame X-axis measuring point, and the upper frame Y-axis measuring point; The different operating conditions include at least one of the following: different loads, different speeds, and different head conditions.
3. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S2, the sample segmentation adopts a fixed-length sliding window method. The window length is set according to the actual sampling frequency and frequency conversion characteristics. A preset overlap rate is set between phase windows to increase the number of training samples and maintain the continuity of fault impact information. The standardization process uses Z-score standardization, whose expression is: x′=(x m) / s; In the formula: x is the original vibration signal sample point, μ is the sample mean, σ is the sample standard deviation, and x′ is the standardized sample point.
4. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S3, the temporal convolutional feature extraction module includes multiple sets of one-dimensional convolutional layers, batch normalization layers, nonlinear activation layers, and max pooling layers; The first one-dimensional convolutional layer uses a large convolutional kernel to extract the low-frequency envelope and macroscopic trend features of the vibration signal, while subsequent one-dimensional convolutional layers use a small convolutional kernel to extract local impact, harmonic and nonlinear fault features. The calculation process of the one-dimensional convolutional layer is expressed as follows: ; In the formula: These are the input features for the previous layer. For the i-th layer convolution kernel, The term represents the bias term, * indicates a one-dimensional convolution operation, BN indicates batch normalization, and φ indicates ReLU or other non-linear activation functions. This is the output feature of this layer; The max-pooling layer retains the maximum response within the sliding window, and its calculation process can be expressed as follows: ; In the formula: k is the pooling window length, This is the output feature after pooling.
5. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S3, the adaptive pooling module is an adaptive average pooling layer that maps multi-channel feature maps of different lengths extracted by the temporal convolution feature extraction module into fixed-dimensional feature vectors. The calculation process can be represented as follows: ; In the formula: x is the input vibration sample, This is a temporal convolution feature extraction function. is an adaptive pooling function, and z is a fixed-dimensional deep feature vector.
6. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S3, the shared classifier module consists of a fully connected layer and a Softmax output layer. The input of the shared classifier is the feature vector z output by the adaptive pooling module, and the output of the shared classifier is the fault category probability, expressed as follows: In the formula: C is the number of fault categories, Let be the probability that the sample belongs to the first, second, ..., c type of fault.
7. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S5, the adaptive loss of the marginal distribution is calculated by the maximum mean difference. The maximum mean difference is constructed by using a single radial basis kernel function or a linear combination of multiple radial basis kernel functions to construct a kernel matrix to measure the distance between the feature distribution of the source domain and the feature distribution of the target domain in the regenerating kernel Hilbert space. The adaptive loss for edge distribution is expressed as: In the formula: For the i-th type of source domain features, For the j-th type of target domain features, Let H be the kernel mapping function, and H be the reproducing kernel Hilbert space. denoted as the number of samples in the target domain batch; S and T represent the deep feature sets of the source domain and the target domain, respectively.
8. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S5, the source domain classification loss uses the cross-entropy loss function, which is calculated as follows: ; In the formula: The number of samples in the source domain batch. Let i be the true label of the i-th source domain sample. Let be the probability that the i-th source domain sample is predicted to be of class c. is the indicator function; C represents the total number of categories.
9. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S6, the conditional distribution adaptive loss is calculated according to the fault category. For each fault category, the maximum mean difference constraint is applied between the sample features in the source domain belonging to that fault category and the sample features in the target domain whose pseudo-labels belong to that fault category. The specific expression is as follows: In the formula: This represents the conditional distribution adaptive loss function; C represents the total number of categories; c represents the index of the category being traversed. H represents the square norm in the reproducing kernel Hilbert space; H represents the reproducing kernel Hilbert space, i.e., the eigenmap. The target space; (·) represents a nonlinear feature mapping function that maps the original feature z to a high-dimensional space H; This represents the total number of samples belonging to class c in the source domain; This represents the feature vector of the i-th sample in the source domain; This represents the set of feature vectors of all samples belonging to class c in the source domain; This represents the mean vector of all samples of category c in the source domain after feature mapping in the H space; This represents the total number of samples belonging to category c in the target domain; This represents the feature vector of the j-th sample in the target domain; This represents the set of feature vectors of all samples belonging to class c in the target domain; It represents the mean vector of all samples of category c in the target domain after feature mapping in the H space.
10. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S6, the target domain pseudo-label is determined by the maximum prediction probability of the shared classifier, and a confidence threshold is set. The target domain pseudo-label expression is: ; In the formula: The pseudo-label represents the j-th target domain sample; Let be the probability that the j-th target domain sample is predicted to be of class c; c represents the class index; C represents the total number of fault classes; This indicates the value of c that makes the following expression reach its maximum value; Based on target domain pseudo-labels, pseudo-label classification loss for: ; In the formula: Let be the probability that the j-th target domain sample is predicted to be of class c; This represents the weighted classification loss value over the target domain; It is the total number of samples in the target domain; This indicates summation of the outermost element, iterating from the first to the last element. All target domain samples; This indicates that the inner summation iterates through all fault categories; Indicates an indicator function; As the parameters of the joint domain adaptive transfer learning network are updated, the target domain pseudo-label is regenerated in each iteration and is not saved as a fixed label; when the maximum predicted probability of the target domain sample is lower than the confidence threshold, the target domain sample is not included in the calculation of the conditional distribution adaptive loss.
11. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S7, the total loss function is: ; In the formula: For total classification loss, For edge distribution adaptive loss, For conditional distribution adaptive loss, Calculate the loss for each category; These are preset weighting coefficients used to adjust the contribution ratios of marginal distribution adaptive loss, conditional distribution adaptive loss, and classification loss to the total loss function. The classification loss calculation includes source domain classification loss and target domain pseudo-label classification loss.
12. The hydropower unit fault diagnosis method based on joint domain adaptive transfer learning according to claim 1, characterized in that: In S7, the Adam optimizer or a stochastic gradient descent optimizer with momentum is used to update the model parameters. During training, the target domain validation loss, target domain diagnostic accuracy, or feature distance between the source domain and the target domain are monitored. When the comprehensive performance index, i.e. the total loss function, reaches the preset convergence condition, the optimal diagnostic model is saved.
13. A hydropower unit fault diagnosis system based on joint domain adaptive transfer learning, characterized in that: It includes a data acquisition module, a data preprocessing module, a transfer diagnostic model construction module, a joint domain adaptive training module, a fault diagnosis module, and a results display and early warning module; The data acquisition module is used to collect vibration signals from the unit and output the collected vibration signals to the data preprocessing module. The data preprocessing module is used to receive the vibration signal, perform sample segmentation, normalization or standardization on the vibration signal, construct source domain samples and target domain samples, and output the source domain samples and the target domain samples to the transfer diagnostic model construction module and the joint domain adaptive training module, respectively. The transfer diagnostic model construction module is used to receive the sample dimension information of the source domain samples and the target domain samples, and construct a joint domain adaptive transfer learning network including a shared temporal convolution feature extraction module, an adaptive pooling module and a shared classifier; The joint domain adaptive training module is used to calculate the source domain classification loss, the target domain pseudo-label classification loss, the marginal distribution adaptive loss, and the conditional distribution adaptive loss, and to train the joint domain adaptive transfer learning network based on the total loss function. The fault diagnosis module is used to input the target domain samples output in real time by the data preprocessing module into the optimal migration diagnosis model and output the fault category and corresponding confidence to the result display and early warning module. The results display and early warning module is used to display fault diagnosis results, model accuracy, confusion matrix or feature visualization results, and output early warning information when abnormal states are identified.
14. The hydropower unit fault diagnosis system based on joint domain adaptive transfer learning according to claim 13, characterized in that: It also includes a model storage module and a fault case library; The model storage module is used to store the optimal diagnostic model and its parameters after training; The fault case library is used to store unit vibration signals, measuring point information, operating condition information, fault categories, model prediction results, and corresponding feature distribution information.
