An online monitoring and diagnosis system for hydropower equipment
By combining a variety of technical means in the monitoring and diagnosis system of hydropower equipment, including data acquisition, multi-source data verification, cluster analysis and deep learning feature extraction, the problem of difficulty in dealing with complex failures is solved, and more efficient and Accurate fault diagnosis.
Patent Information
- Application Number
- CN202411699589.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Traditional hydropower equipment monitoring and diagnosis methods are difficult to detect potential problems of equipment in a timely manner, and lack self-learning and adaptability, so they cannot effectively handle complex fault data.
The online monitoring and diagnosis system of hydropower equipment is adopted, combined with data acquisition, multi-source data verification, cluster analysis, deep learning feature extraction and pattern matching methods, to realize intelligent processing, abnormality detection and fault diagnosis of real-time data.
It improves the accuracy and efficiency of fault diagnosis, can identify compound faults and unknown exceptions, and provides decision-making support for the maintenance and management of hydropower equipment.
Smart Images

Figure CN119179919B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hydropower equipment monitoring and diagnosis, and in particular to an online monitoring and diagnosis system for hydropower equipment. Background Art
[0002] As a clean and renewable energy source, hydropower plays an increasingly important role in the global energy structure. With the rapid development of the hydropower industry, the construction of large hydropower stations and the widespread use of small and medium-sized hydropower stations have greatly increased the number and complexity of hydropower equipment. At the same time, the key role of hydropower in peak load regulation and frequency regulation of the power grid has also put forward higher requirements for the reliability and stability of equipment. In this context, the safe and stable operation of equipment has become a major challenge facing the hydropower industry.
[0003] Traditional regular inspection and maintenance methods can no longer meet the needs of modern hydropower plants. This method has many limitations: it is difficult to detect potential problems with equipment in a timely manner, the subjectivity and inconsistency of manual inspections affect the accuracy of diagnosis, regular maintenance may lead to unnecessary downtime, and for hydropower plants in remote areas, frequent manual inspections are costly and inconvenient. These problems not only affect the operational efficiency and economic benefits of hydropower plants, but may also endanger the stability and security of power supply.
[0004] The Chinese invention patent with application number 202310902987.5 discloses an intelligent identification system for hydropower station equipment faults based on the Datang Hydropower Cloud Platform. The system includes a data decoding function module, which is used to decode the original data into a data format readable by MATLAB; a waveform display function module, which is used to display the waveform drawn using the relevant parameters of the equipment, and in this function, the waveform can be operated accordingly to facilitate better analysis of the fault; a fault judgment function module, which can realize the recognition of abnormal waveforms and directly determine the type of fault; a report generation function module, which can realize the automatic generation of a fault analysis result report after the fault judgment analysis is completed. The fault judgment in this system mainly relies on preset pattern matching, which cannot effectively process complex fault data, and the system lacks self-learning and adaptability, and its applicability is extremely limited. Summary of the invention
[0005] In view of this, the present invention proposes an online monitoring and diagnosis system for hydropower equipment. By combining methods such as data acquisition, multi-source data verification, cluster analysis, deep learning feature extraction and pattern matching, the system can realize intelligent processing, anomaly detection and fault diagnosis of real-time data. The present invention can overcome the limitations of traditional methods, provide more accurate and timely fault identification, and can handle complex and new fault modes.
[0006] The technical solution of the present invention is implemented as follows: The present invention provides an online monitoring and diagnosis system for hydropower equipment, comprising:
[0007] Data acquisition module, used to collect real-time data of hydropower equipment;
[0008] The data processing module is used to integrate the real-time data and perform error detection on the real-time data using a verification method to obtain verified data;
[0009] The data analysis module is used to perform cluster analysis on the verified data using a clustering algorithm, mark normal data and abnormal data according to the clustering results, and obtain clustered data;
[0010] A model analysis module is used to extract features from the clustered data according to the pre-trained autoencoder, and to perform secondary clustering on the clustered data according to the features extracted by the autoencoder to obtain secondary clustering results;
[0011] The abnormal diagnosis module is used to match the results of secondary clustering based on the pattern matching algorithm, determine the diagnosis type, and output a diagnosis report.
[0012] On the basis of the above technical solution, preferably, the verification method includes:
[0013] Integrate the real-time data and record the timestamp, denoted as D(t), where t is the timestamp;
[0014] For the same data from different sources, multi-source error check is performed. If the check passes, it is marked as valid data {A(t)}, otherwise, it is marked as data to be checked {B(t)};
[0015] Divide the data to be checked according to the hydropower equipment to which it belongs, and form a data sequence based on the hydropower equipment , where n is the number of hydropower equipment, The data sequence representing the nth hydropower equipment;
[0016] Calculate the correlation coefficient between the data sequences of every two hydropower equipment, and compare the calculated correlation coefficient with a preset threshold range. If the preset threshold range is met, the data sequences of the corresponding two hydropower equipment are marked as valid data, otherwise, they are marked as erroneous data;
[0017] Repair the erroneous data, mark the repaired erroneous data as valid data, and delete the erroneous data that cannot be repaired;
[0018] Integrate all valid data as verified data.
[0019] Based on the above technical solution, preferably, the formula for multi-source error checking is as follows:
[0020] ,
[0021] In the formula, and are the same data from the ath source and the bth source at time t, V is the number of data sources, Indicates error;
[0022] The formula for the correlation coefficient is as follows:
[0023] ,
[0024] In the formula, Indicates Data series of hydropower equipment and Data series of hydropower equipment The correlation coefficient between represents the absolute difference between two data series and a reference data series, express The second-order minimum error in express The second-order maximum difference in Represents the adjustment factor.
[0025] Based on the above technical solution, preferably, the clustering algorithm includes:
[0026] Step 1: Set the number of clusters c, clustering index m, the number of intermediate iterations T1, and the maximum number of iterations T max and convergence threshold ε, randomly initialize the population , where each individual represents a possible membership matrix, and the search function C is initialized, and the search function is a function that decays over time;
[0027] Step 2: For each individual , calculate the cluster center and the objective function value , the objective function value is taken as the fitness of the individual;
[0028] Step 3: Take the minimum fitness value as the global optimal solution and record the optimal solution and the corresponding individual;
[0029] Step 4: Calculate the mass of each individual , and the attraction index between individuals ;
[0030] Step 5: Calculate the acceleration of the individual according to the attraction index, and update the speed and position of the individual according to the acceleration;
[0031] Step 6: Repeat steps 2 to 5 until the intermediate iteration number T1 is reached to obtain the final global optimal solution, i.e. the optimal individual;
[0032] Step 7: Use the optimal individual as the initial membership matrix U;
[0033] Step 8: Calculate the cluster center using the current membership matrix U;
[0034] Step 9: Update the membership of each data point to each cluster according to the new cluster center;
[0035] Step 10: Calculate the new objective function value J new ;
[0036] Step 11: If Or reach the maximum number of iterations T max , then select the cluster center for each data point according to the maximum membership principle and output the clustering result. Otherwise, update the elements of the membership matrix and return to step eight to continue iteration;
[0037] Step 12: Set a membership threshold, and mark the data points whose maximum membership in the clustering results is lower than the membership threshold as abnormal data; otherwise, mark them as normal data to obtain clustered data.
[0038] Based on the above technical solution, preferably, the cluster center The calculation formula is:
[0039] ,
[0040] In the formula, represents the jth cluster center, represents the i-th data point, It represents the membership of the i-th data point to the j-th cluster center, m is the clustering index, and c is the set number of clusters;
[0041] Objective function value The calculation formula is:
[0042] ,
[0043] In the formula, Represents an individual The objective function value of is also the fitness value. Represents data points To cluster center The Euclidean distance of .
[0044] Based on the above technical solution, preferably, the quality of the individual The calculation formula is:
[0045] ,
[0046] In the formula, Represents the worst fitness value in the current iteration population, Represents the best fitness value in the current iteration population, Represents the sum of all individual masses of the current iteration;
[0047] The attraction index between individuals The calculation formula is:
[0048] ,
[0049] In the formula, Refers to individuals For individuals The attraction index, C represents the search function, which decreases over time, For individuals Quality, For individuals Quality, Represents an individual and individuals The Euclidean distance in the solution space, is a constant, and For individuals and individuals Position in solution space;
[0050] The acceleration is calculated as:
[0051] ,
[0052] ,
[0053] In the formula, Represents an individual The acceleration of Acts on individuals The combined force of Represents a random number between 0 and 1;
[0054] The formula for updating the velocity and position of an individual is as follows:
[0055] ,
[0056] ,
[0057] In the formula, Indicates the updated speed, Represents a random number between 0 and 1. The updated position is displayed.
[0058] On the basis of the above technical solution, preferably, the model analysis module includes:
[0059] A model building unit, used to build an autoencoder, the main structure of which includes an encoder and a decoder;
[0060] A model training unit, used for jointly training the encoder and decoder of the autoencoder using the training samples until the loss function converges, thereby obtaining a pre-trained autoencoder;
[0061] A model deployment unit, used to deploy the encoder in the pre-trained autoencoder, extract features from the clustered data, and obtain deep features;
[0062] The secondary clustering unit is used to use the deep features as clustering centers, perform secondary clustering on the clustered data marked as abnormal data according to the clustering algorithm, and obtain the abnormal data and its abnormal type according to the secondary clustering results.
[0063] On the basis of the above technical solution, preferably, the structures of the encoder and the decoder are the same, both including 4 time convolution modules, each of which includes void convolution, depth-separable causal convolution, weight normalization, attention mechanism, activation function, and Dropout, wherein the attention mechanism includes K fully connected layers, Q fully connected layers, V fully connected layers, attention calculation, softmax, and residual connection.
[0064] Based on the above technical solution, preferably, when the autoencoder is trained, the loss function is as follows:
[0065] ,
[0066] Where the first part represents the reconstruction loss, For input sample And the reconstruction sample The expected error; the second part represents the time consistency loss, sg represents the stop gradient, that is, the gradient is not calculated and returned, represents the feature representation of the current time step t, is the feature representation of the previous time step t-1, is the norm; the third part represents attention regularization, Attention is the attention weight matrix, It means preventing the gradient from propagating through Attention. is the regularization parameter.
[0067] On the basis of the above technical solution, preferably, the pattern matching algorithm includes:
[0068] Extract the cluster center from the secondary clustering results as the feature to be matched;
[0069] Obtain a pattern library containing known failure modes, each failure mode including a characteristic description and a corresponding diagnosis type;
[0070] The cosine similarity method is used to calculate the similarity between the feature to be matched and each fault mode in the pattern library;
[0071] Set a similarity threshold. If the similarity exceeds the similarity threshold, the match is successful and a preliminary matching result is obtained. Otherwise, it is marked as an unknown anomaly.
[0072] In the preliminary matching results, for each feature to be matched:
[0073] If there is only one fault mode that is successfully matched, the feature to be matched is marked as the fault mode;
[0074] If there are more than or 2 successfully matched fault modes, these fault modes are sorted from high to low according to the similarity, and the difference between the highest similarity and the second highest similarity is calculated. If the difference exceeds the threshold, the fault mode with the highest similarity is selected as the fault mode of the feature to be matched; if the difference does not exceed the threshold, check whether there are multiple fault modes with similarities, if so, use weighted fusion to form a composite fault description as the fault mode of the feature to be matched, if not, the fault mode with the highest similarity is used as the main fault mode, the fault mode with the second highest similarity is used as the secondary fault mode, and the main fault mode and the secondary fault mode are combined into a fuzzy diagnosis result as the fault mode of the feature to be matched;
[0075] According to the secondary clustering results, the failure mode of the cluster center is used as the failure mode of its corresponding data;
[0076] Generates diagnostic reports based on failure modes.
[0077] Compared with the prior art, the present invention has the following beneficial effects:
[0078] (1) By integrating modules such as data acquisition, processing, analysis, model analysis and abnormality diagnosis, the system realizes the full process automation of real-time monitoring, data verification, abnormality detection and fault diagnosis of hydropower equipment. The system uses multi-source data verification, improved clustering algorithm, deep learning feature extraction and pattern matching to greatly improve the accuracy and efficiency of fault diagnosis. At the same time, it can identify complex faults and unknown abnormalities, providing decision support for the maintenance and management of hydropower equipment.
[0079] (2) The combination of multi-source error checking and correlation coefficient calculation effectively improves the reliability and accuracy of the data. By cross-validating the same data from different sources and calculating the correlation between hydropower equipment data sequences, abnormal data can be quickly identified and filtered, and the erroneous data that can be repaired can be repaired, so as to retain effective information to the maximum extent and provide a high-quality data basis for subsequent analysis;
[0080] (3) The improved clustering algorithm significantly improves the effect and efficiency of clustering. By introducing the concepts of individual quality and attraction index, the algorithm can better avoid local optimality. At the same time, it takes into account the membership of data points to the cluster center, making the clustering results more accurate and stable, and providing a reliable basis for the preliminary identification of abnormal data.
[0081] (4) Using autoencoders for feature extraction and secondary clustering improves the system's ability to identify complex fault patterns. The autoencoder uses a temporal convolution module and an attention mechanism to effectively capture the characteristics and long-term dependencies of time series data, while the secondary clustering strategy further refines the classification of abnormal data, providing a more refined feature representation for subsequent fault diagnosis;
[0082] (5) The autoencoder uses a temporal convolution module that includes components such as dilated convolution, depthwise separable causal convolution, and attention mechanism, which significantly enhances the model's ability to process time series data. This structural design can not only effectively capture features of different time scales, but also maintain causality. At the same time, it highlights important information through the attention mechanism, thereby improving the quality and efficiency of feature extraction.
[0083] (6) The pattern matching algorithm is adopted and the concepts of composite fault description and fuzzy diagnosis results are introduced to improve the flexibility and accuracy of diagnosis. By setting the similarity threshold and difference threshold, the system can effectively handle a variety of matching situations, including single faults, composite faults and unknown anomalies. At the same time, through weighted fusion and fuzzy diagnosis, complex fault conditions can be described more comprehensively. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0085] Figure 1 It is a system framework diagram of the present invention;
[0086] Figure 2 It is a flow chart of the clustering algorithm of the present invention;
[0087] Figure 3 This is a framework diagram of the model analysis module of the present invention;
[0088] Figure 4 This is a diagram of the autoencoder network structure of the present invention. DETAILED DESCRIPTION
[0089] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.
[0090] like Figure 1 As shown, the present invention provides an online monitoring and diagnosis system for hydropower equipment, comprising:
[0091] Data acquisition module, used to collect real-time data of hydropower equipment;
[0092] The data processing module is used to integrate the real-time data and perform error detection on the real-time data using a verification method to obtain verified data;
[0093] The data analysis module is used to perform cluster analysis on the verified data using a clustering algorithm, mark normal data and abnormal data according to the clustering results, and obtain clustered data;
[0094] A model analysis module is used to extract features from the clustered data according to the pre-trained autoencoder, and to perform secondary clustering on the clustered data according to the features extracted by the autoencoder to obtain secondary clustering results;
[0095] The abnormal diagnosis module is used to match the results of secondary clustering based on the pattern matching algorithm, determine the diagnosis type, and output a diagnosis report.
[0096] Specifically, in one embodiment of the present invention, the data acquisition module is responsible for acquiring real-time operating data from the hydropower equipment. The data sources include sensor networks, control systems, etc. For example, various types of sensors are installed at key locations of the hydropower equipment to directly acquire operating parameters from the control system of the hydropower equipment.
[0097] When collecting real-time operation data, different collection frequencies are set according to the importance and change speed of different parameters. After collecting real-time data, it is transmitted to the data acquisition module by wire or wireless.
[0098] Specifically, in one embodiment of the present invention, the data processing module is responsible for integrating, verifying and processing the collected real-time data to ensure the quality of the data used in subsequent analysis. The detailed execution process of this module is as follows:
[0099] Integrate real-time data from different sources to form a unified data set D(t). Each piece of data is accompanied by an accurate timestamp t to ensure the timeliness and traceability of the data.
[0100] For the same data item, compare data from different sources to detect potential collection errors. The formula for multi-source error checking is as follows:
[0101] ,
[0102] In the formula, and are the same data from the ath source and the bth source at time t, V is the number of data sources, Indicates an error.
[0103] This formula is based on the principle of data redundancy and uses multiple data sources to compare the measurement results of the same parameter. It is assumed that under ideal conditions, the measurements of the same parameter by different data sources should be consistent. By setting an acceptable error range σ, it is determined whether the measurement results of different data sources are close enough.
[0104] By checking the multi-source error, obvious acquisition errors can be quickly identified. By adjusting the σ value, the error tolerance can be changed according to actual needs.
[0105] The data that passes the inspection is marked as valid data {A(t)}, and the data that fails the inspection is marked as data to be inspected {B(t)}.
[0106] Divide the data to be checked according to the hydropower equipment to which it belongs, and form a data sequence based on the hydropower equipment , where n is the number of hydropower equipment, Represents the data sequence of the nth hydropower equipment.
[0107] Use the correlation coefficient formula to calculate the correlation between each two hydropower equipment data series:
[0108] ,
[0109] In the formula, Indicates Data series of hydropower equipment and Data series of hydropower equipment The correlation coefficient between represents the absolute difference between two data series and a reference data series, express The second-order minimum error in express The second-order maximum difference in Represents the adjustment factor.
[0110] The correlation coefficient calculation formula provided by the present invention takes into account both the overall trend and local characteristics of the data, which is more comprehensive than the traditional correlation coefficient. By introducing the second-order minimum error and maximum difference, the influence of outliers is reduced. It can capture the nonlinear relationship between data sequences, not just the linear relationship. By adjusting the β value, the weights of global and local features can be adjusted according to actual needs. The calculation results are within the range of [0,1], which is convenient for comparison and setting thresholds.
[0111] Specifically, when calculating the correlation coefficient, a reference data sequence is used, which is a data sequence used as a comparison benchmark. In the condition monitoring of hydropower station equipment, the reference sequence can be selected by: using the expected data of the equipment under ideal operating conditions as the reference sequence; or selecting the historical operating data of the equipment under known good conditions as the reference sequence.
[0112] During verification, the multi-source verification formula and the correlation coefficient formula are combined. The multi-source error verification provides rapid screening, and the correlation coefficient analysis provides in-depth verification. From single-point data comparison to the overall correlation analysis of the data sequence, multi-angle verification is used to reduce the possibility of misjudgment and is able to handle data relationships in complex systems such as hydropower equipment.
[0113] Specifically, the closer the value of R is to 1, the more correlated the two data sequences are, and the closer the value of R is to 0, the less correlated the two data sequences are. In hydropower equipment, the correlation between different devices is usually known, which is based on system design and engineering knowledge. For example, there is a strong correlation between turbines and generators, while the correlation between turbines and some auxiliary systems may be weak. Therefore, highly correlated devices should have state data with higher correlation. For data sequences with high correlation between devices, the threshold range is set to [0.7, 1], and for data sequences with weak correlation between devices, the threshold range is set to [0, 0.5].
[0114] The calculated correlation coefficient is compared with the preset threshold range. If the threshold range is met, the two related data series are marked as valid data; if the threshold range is not met, they are marked as erroneous data.
[0115] Attempts are made to repair data marked as erroneous. Repair methods include interpolation, prediction based on historical data, and estimation based on physical models. Successfully repaired data is re-marked as valid data, and data that cannot be repaired is deleted from the data set.
[0116] Integrate all validated and processed data together.
[0117] Specifically, in one embodiment of the present invention, the data analysis module is responsible for performing a first cluster analysis on the verified data using a clustering algorithm, identifying abnormal data according to the clustering results, and obtaining clustered data.
[0118] Specifically, Figure 2 As shown, the clustering algorithm includes:
[0119] Step 1: Set the number of clusters c, clustering index m, the number of intermediate iterations T1, and the maximum number of iterations T max and convergence threshold ε, randomly initialize the population , where each individual represents a possible membership matrix, and the search function C is initialized, and the search function is a function that decays over time.
[0120] Step 2: For each individual , calculate the cluster center and the objective function value , and the objective function value is taken as the fitness of the individual.
[0121] Cluster Center The calculation formula is:
[0122] ,
[0123] In the formula, represents the jth cluster center, represents the i-th data point, represents the membership of the ith data point to the jth cluster center, m is the clustering index, and c is the set number of clusters; this formula calculates the center position of each cluster, taking into account the membership and distance of each point.
[0124] Objective function value The calculation formula is:
[0125] ,
[0126] In the formula, Represents an individual The objective function value of is also the fitness value. Represents data points To cluster center The Euclidean distance of the objective function reflects the compactness and effectiveness of the current clustering, and the smaller the value, the better.
[0127] Step 3: Take the minimum fitness value as the global optimal solution and record the optimal solution and the corresponding individual.
[0128] Step 4: Calculate the mass of each individual , and the attraction index between individuals ;
[0129] The quality of the individual The calculation formula is:
[0130] ,
[0131] In the formula, Represents the worst fitness value in the current iteration population, Represents the best fitness value in the current iteration population, Represents the sum of the masses of all individuals in the current iteration; this formula measures the relative fitness of an individual, reflecting its performance in the current population.
[0132] The attraction index between individuals The calculation formula is:
[0133] ,
[0134] In the formula, Refers to individuals For individuals The attraction index, C represents the search function, which decreases over time, For individuals Quality, For individuals Quality, Represents an individual and individuals The Euclidean distance in the solution space, is a constant, and For individuals and individuals Position in the solution space; the attraction index measures the mutual attraction between individuals, taking into account the quality of individuals and their distance in the solution space.
[0135] Step 5: Calculate the acceleration of the individual according to the attraction index, and update the speed and position of the individual according to the acceleration;
[0136] The acceleration is calculated as:
[0137] ,
[0138] ,
[0139] In the formula, Represents an individual The acceleration of Acts on individuals The combined force of Represents a random number between 0 and 1; the attraction between individuals is weighted by the random number.
[0140] The formula for updating the velocity and position of an individual is as follows:
[0141] ,
[0142] ,
[0143] In the formula, Indicates the updated speed, Represents a random number between 0 and 1. Indicates the updated position.
[0144] Step 6: Repeat steps 2 to 5 until the intermediate iteration number T1 is reached to obtain the final global optimal solution, i.e. the optimal individual;
[0145] Step 7: Use the optimal individual as the initial membership matrix U;
[0146] Step 8: Calculate the cluster center using the current membership matrix U;
[0147] Step 9: Update the membership of each data point to each cluster according to the new cluster center;
[0148] Step 10: Calculate the new objective function value J new ;
[0149] Step 11: If Or reach the maximum number of iterations T max , then select the cluster center for each data point according to the maximum membership principle and output the clustering result. Otherwise, update the elements of the membership matrix and return to step eight to continue iteration;
[0150] The formula for updating the elements in U is:
[0151] ,
[0152] In the formula, Represents the data points in the membership matrix Cluster Center , c is the number of clusters, m is the clustering index, whose value is greater than 1, and K represents the RBF kernel function.
[0153] Step 12: Set a membership threshold, and mark the data points whose maximum membership in the clustering results is lower than the membership threshold as abnormal data; otherwise, mark them as normal data to obtain clustered data.
[0154] When setting the membership threshold, it is selected according to the membership distribution. For example, the threshold is set to 0.6.
[0155] The clustering algorithm provided by the present invention improves the accuracy and effectiveness of clustering by iteratively optimizing the membership matrix and cluster centers and using individual quality and attraction index to guide the search process. Finally, by setting the membership threshold, normal data and abnormal data can be effectively distinguished.
[0156] Specifically, Figure 3 As shown, in one embodiment of the present invention, the model analysis module includes:
[0157] A model building unit, used to build an autoencoder, the main structure of which includes an encoder and a decoder;
[0158] A model training unit, used for jointly training the encoder and decoder of the autoencoder using the training samples until the loss function converges, thereby obtaining a pre-trained autoencoder;
[0159] A model deployment unit, used to deploy the encoder in the pre-trained autoencoder, extract features from the clustered data, and obtain deep features;
[0160] The secondary clustering unit is used to use the deep features as clustering centers, perform secondary clustering on the clustered data marked as abnormal data according to the clustering algorithm, and obtain the abnormal data and its abnormal type according to the secondary clustering results.
[0161] See also Figure 4 The autoencoder provided by the present invention includes an encoder and a decoder. The encoder and the decoder have the same structure and both include 4 time convolution modules. Each time convolution module includes a hole convolution, a depth-separable causal convolution, a weight normalization, an attention mechanism, an activation function, and Dropout. The attention mechanism includes a K fully connected layer, a Q fully connected layer, a V fully connected layer, attention calculation, softmax, and a residual connection.
[0162] The dilated convolution consists of three layers, with dilated rates of 2, 4, and 8, a convolution kernel size of 3, and a convolution number of 64. The dilated convolution expands the receptive field by inserting "holes" between the convolution kernel elements, thereby capturing dependencies at longer distances. An activation function is applied after the dilated convolution to introduce nonlinearity.
[0163] Depthwise separable causal convolution combines depthwise convolution and pointwise convolution to reduce computational burden, while causal convolution ensures that convolution operation follows temporal causality, that is, the value of each time step is only related to the current and previous time steps. Specifically:
[0164] Depthwise convolution: The convolution kernel size is 3, a separate convolution kernel is applied to each input channel, and causal convolution is used.
[0165] Point-by-point convolution: The convolution kernel is 1*1, which is used for linear combinations across channels.
[0166] First, perform depth convolution to apply convolution to each individual channel to capture spatial features. Then combine and integrate the features of different channels through point-by-point convolution.
[0167] Weight normalization normalizes the weights of the convolution kernel to stabilize the training process and accelerate convergence.
[0168] The attention mechanism includes K fully connected layers, Q fully connected layers, and V fully connected layers, which apply linear transformations to the input feature map to generate key, query, and value vectors. Keys and queries are used to calculate attention weights, and values are used to calculate weighted feature representations. The dot product of the query and key is calculated, divided by the square root of the key dimension for scaling, and then the attention weight is calculated through the Softmax function. The values are weighted averaged using the attention weights to obtain a weighted feature representation. The weighted features are summed with the original input features to form a residual connection to enhance gradient flow and prevent gradient vanishing or exploding.
[0169] The activation function uses ReLU to increase the nonlinearity of the model, enabling it to better capture complex patterns and structures.
[0170] Dropout randomly discards the output of some neurons with a certain probability to prevent overfitting and enhance the generalization ability of the model. Dropout randomly sets the output of some neurons to zero during training, and scales the output of all neurons according to the retention probability during testing.
[0171] At the same time, the temporal convolution module also uses a residual connection at the end, using a 1D convolution to add the input to the dropout output.
[0172] Specifically, the autoencoder proposed in the present invention uses a dilated convolution to expand the receptive field of the convolution kernel, so that the network can capture long-distance temporal dependencies without increasing the size of the convolution kernel. This is very effective for processing long time series data. Depth-separable convolution decomposes the standard convolution into depth convolution and point-by-point convolution, significantly reducing the number of parameters and computational complexity. Causal convolution ensures that the output of each time step depends only on the current time step and the time step before it, avoiding future information leakage, and is suitable for processing time series data. The attention mechanism can better capture global information by calculating the correlation between each part of the input sequence. The encoder and decoder use the same structural design (both include 4 time convolution modules), making the model design more concise and unified. This symmetrical structure helps to maintain the consistency and integrity of features during encoding and decoding. The joint training of the encoder and decoder enables the autoencoder to adaptively extract effective features and maximize reconstruction accuracy.
[0173] The training process of the autoencoder is as follows:
[0174] 1. Initialize model weights.
[0175] 2. Input training samples and perform forward propagation:
[0176] The encoder encodes the input samples into hidden representations.
[0177] The decoder reconstructs the hidden representation into the original input.
[0178] 3. Calculate the loss function:
[0179] ,
[0180] In the formula, one The part represents the reconstruction loss, For input sample And the reconstruction sample The expected error; the second part represents the time consistency loss, sg represents the stop gradient, that is, the gradient is not calculated and returned, represents the feature representation of the current time step t, is the feature representation of the previous time step t-1, is the norm; the third part represents attention regularization, Attention is the attention weight matrix, It means preventing the gradient from propagating through Attention. is a regularization parameter. Specifically, the expected error can be one of the mean square error and the mean absolute error.
[0181] 4. Back propagation and parameter update.
[0182] 5. Repeat the above steps until the loss function converges.
[0183] After training, only the encoder is deployed in the model deployment unit to extract deep features of the data.
[0184] Specifically, in the system of the present invention, real-time monitoring of equipment failures requires the system to respond quickly. Deploying only encoders can speed up feature extraction, improve system response speed, and meet the needs of real-time monitoring. The extracted deep features are used for subsequent clustering and anomaly detection. After the first clustering, the abnormal data is clustered again using the features extracted by the encoder, which can effectively identify and classify different types of anomalies. Online monitoring systems generally run for a long time and have limited resources. Deploying only encoders reduces the consumption of computing and storage resources and ensures the stability and efficient operation of the system.
[0185] The execution process of the secondary clustering unit is as follows:
[0186] The extracted deep features are used to perform secondary clustering on the abnormal data. The clustering algorithm used for this clustering is still the improved clustering algorithm in the data analysis module. According to the results of the secondary clustering, different types of abnormal data are obtained. By analyzing the cluster center and the data in each cluster, different types of anomalies and their characteristics can be identified.
[0187] Specifically, in one embodiment of the present invention, the abnormality diagnosis module uses a pattern matching algorithm to calculate the similarity between the cluster center features extracted from the secondary clustering results and the known fault pattern library, thereby achieving accurate diagnosis of different types of abnormalities and generating a detailed diagnosis report.
[0188] Among them, the pattern matching algorithm includes:
[0189] Extract the cluster center from the secondary clustering results as the feature to be matched;
[0190] Obtain a pattern library containing known failure modes, each failure mode including a characteristic description and a corresponding diagnosis type;
[0191] The cosine similarity method is used to calculate the similarity between the feature to be matched and each fault mode in the pattern library;
[0192] Set a similarity threshold. If the similarity exceeds the similarity threshold, the match is successful and a preliminary matching result is obtained. Otherwise, it is marked as an unknown anomaly.
[0193] In the preliminary matching results, for each feature to be matched:
[0194] If there is only one fault mode that is successfully matched, the feature to be matched is marked as the fault mode;
[0195] If there are more than or 2 successfully matched fault modes, these fault modes are sorted from high to low according to the similarity, and the difference between the highest similarity and the second highest similarity is calculated. If the difference exceeds the threshold, the fault mode with the highest similarity is selected as the fault mode of the feature to be matched; if the difference does not exceed the threshold, check whether there are multiple fault modes with similarities, if so, use weighted fusion to form a composite fault description as the fault mode of the feature to be matched, if not, the fault mode with the highest similarity is used as the main fault mode, the fault mode with the second highest similarity is used as the secondary fault mode, and the main fault mode and the secondary fault mode are combined into a fuzzy diagnosis result as the fault mode of the feature to be matched;
[0196] According to the secondary clustering results, the failure mode of the cluster center is used as the failure mode of its corresponding data;
[0197] Generates diagnostic reports based on failure modes.
[0198] Specifically, the diagnostic report template is constructed through the generate_diagnostic_report function, including cluster ID, failure mode, diagnostic type description, data sample statistics and examples, and similarity analysis. Each cluster is looped through and the report template is applied to generate a structured text report.
[0199] Specifically, the similarity threshold may be set to 0.8, and the difference threshold may be set to 0.1.
[0200] In the present invention, the deep features in the secondary clustering results are extracted through the pattern matching algorithm, and the similarity is calculated between them and the features in the known fault pattern library, the abnormal type is diagnosed in detail, and a diagnosis report is generated. This method can help achieve accurate abnormality identification and classification, and is an effective means to improve the accuracy of system diagnosis.
[0201] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An online monitoring and diagnosis system for hydropower equipment, characterized in that: include: Data acquisition module, used to collect real-time data of hydropower equipment; The data processing module is used to integrate the real-time data and perform error detection on the real-time data using a verification method to obtain verified data; The data analysis module is used to perform cluster analysis on the verified data using a clustering algorithm, mark normal data and abnormal data according to the clustering results, and obtain clustered data; A model analysis module is used to extract features from the clustered data according to the pre-trained autoencoder, and to perform secondary clustering on the clustered data according to the features extracted by the autoencoder to obtain secondary clustering results; The abnormal diagnosis module is used to match the results of secondary clustering based on the pattern matching algorithm, determine the diagnosis type, and output a diagnosis report; Pattern matching algorithms include: Extract the cluster center from the secondary clustering results as the feature to be matched; Obtain a pattern library containing known failure modes, each failure mode including a characteristic description and a corresponding diagnosis type; The cosine similarity method is used to calculate the similarity between the feature to be matched and each fault mode in the pattern library; Set a similarity threshold. If the similarity exceeds the similarity threshold, the match is successful and a preliminary matching result is obtained. Otherwise, it is marked as an unknown anomaly. In the preliminary matching results, for each feature to be matched: If there is only one fault mode that is successfully matched, the feature to be matched is marked as the fault mode; If there are more than or 2 successfully matched fault modes, these fault modes are sorted from high to low according to the similarity, and the difference between the highest similarity and the second highest similarity is calculated. If the difference exceeds the threshold, the fault mode with the highest similarity is selected as the fault mode of the feature to be matched; if the difference does not exceed the threshold, check whether there are multiple fault modes with similarities, if so, use weighted fusion to form a composite fault description as the fault mode of the feature to be matched, if not, the fault mode with the highest similarity is used as the main fault mode, the fault mode with the second highest similarity is used as the secondary fault mode, and the main fault mode and the secondary fault mode are combined into a fuzzy diagnosis result as the fault mode of the feature to be matched; According to the secondary clustering results, the failure mode of the cluster center is used as the failure mode of its corresponding data; Generates diagnostic reports based on failure modes.
2. The hydropower equipment online monitoring and diagnosis system according to claim 1, characterized in that: Verification methods include: Integrate the real-time data and record the timestamp, denoted as D(t), where t is the timestamp; For the same data from different sources, multi-source error check is performed. If the check passes, it is marked as valid data {A(t)}, otherwise, it is marked as data to be checked {B(t)}; Divide the data to be checked according to the hydropower equipment to which it belongs, and form a data sequence based on the hydropower equipment , where n is the number of hydropower equipment, The data sequence representing the nth hydropower equipment; Calculate the correlation coefficient between the data sequences of every two hydropower equipment, and compare the calculated correlation coefficient with a preset threshold range. If the preset threshold range is met, the data sequences of the corresponding two hydropower equipment are marked as valid data, otherwise, they are marked as erroneous data; Repair the erroneous data, mark the repaired erroneous data as valid data, and delete the erroneous data that cannot be repaired; Integrate all valid data as verified data.
3. The hydropower equipment online monitoring and diagnosis system according to claim 2, characterized in that: The formula for multi-source error checking is as follows: , In the formula, and are the same data from the ath source and the bth source at time t, V is the number of data sources, Indicates error; The formula for the correlation coefficient is as follows: , In the formula, Indicates Data series of hydropower equipment and Data series of hydropower equipment The correlation coefficient between represents the absolute difference between two data series and a reference data series, express The second-order minimum error in express The second-order maximum difference in Represents the adjustment factor.
4. The hydropower equipment online monitoring and diagnosis system according to claim 2, characterized in that: Clustering algorithms include: Step 1: Set the number of clusters c, clustering index m, the number of intermediate iterations T1, and the maximum number of iterations T max and convergence threshold ε, randomly initialize the population , where each individual represents a possible membership matrix, and the search function C is initialized, and the search function is a function that decays over time; Step 2: For each individual , calculate the cluster center and the objective function value , the objective function value is taken as the fitness of the individual; Step 3: Take the minimum fitness value as the global optimal solution and record the optimal solution and the corresponding individual; Step 4: Calculate the mass of each individual , and the attraction index between individuals ; Step 5: Calculate the acceleration of the individual according to the attraction index, and update the speed and position of the individual according to the acceleration; Step 6: Repeat steps 2 to 5 until the intermediate iteration number T1 is reached to obtain the final global optimal solution, i.e. the optimal individual; Step 7: Use the optimal individual as the initial membership matrix U; Step 8: Calculate the cluster center using the current membership matrix U; Step 9: Update the membership of each data point to each cluster according to the new cluster center; Step 10: Calculate the new objective function value J new ; Step 11: If Or reach the maximum number of iterations T max , then select the cluster center for each data point according to the maximum membership principle and output the clustering result. Otherwise, update the elements of the membership matrix and return to step eight to continue iteration; Step 12: Set a membership threshold, and mark the data points whose maximum membership in the clustering results is lower than the membership threshold as abnormal data; otherwise, mark them as normal data to obtain clustered data.
5. The hydropower equipment online monitoring and diagnosis system according to claim 4, characterized in that: Cluster Center The calculation formula is: , In the formula, represents the jth cluster center, represents the i-th data point, It represents the membership of the i-th data point to the j-th cluster center, m is the clustering index, and c is the set number of clusters; Objective function value The calculation formula is: , In the formula, Represents an individual The objective function value is also the fitness value. Represents data points To cluster center The Euclidean distance of .
6. The hydropower equipment online monitoring and diagnosis system according to claim 5, characterized in that: The quality of the individual The calculation formula is: , In the formula, Represents the worst fitness value in the current iteration population, Represents the best fitness value in the current iteration population, Represents the sum of all individual masses of the current iteration; The attraction index between individuals The calculation formula is: , In the formula, Refers to individuals For individuals The attraction index, C represents the search function, which decreases over time, For individuals Quality, For individuals Quality, Represents an individual and individuals The Euclidean distance in the solution space, is a constant, and For individuals and individuals Position in solution space; The acceleration is calculated as: , , In the formula, Represents an individual The acceleration of Acts on individuals The combined force of Represents a random number between 0 and 1; The formula for updating the velocity and position of an individual is as follows: , , In the formula, Indicates the updated speed, Represents a random number between 0 and 1. Indicates the updated position.
7. The hydropower equipment online monitoring and diagnosis system according to claim 4, characterized in that: The model analysis module includes: A model building unit, used to build an autoencoder, the main structure of which includes an encoder and a decoder; A model training unit, used for jointly training the encoder and decoder of the autoencoder using the training samples until the loss function converges, thereby obtaining a pre-trained autoencoder; A model deployment unit, used to deploy the encoder in the pre-trained autoencoder, extract features from the clustered data, and obtain deep features; The secondary clustering unit is used to use the deep features as clustering centers, perform secondary clustering on the clustered data marked as abnormal data according to the clustering algorithm, and obtain the abnormal data and its abnormal type according to the secondary clustering results.
8. The hydropower equipment online monitoring and diagnosis system according to claim 7, characterized in that: The encoder and decoder have the same structure, both including 4 temporal convolution modules. Each temporal convolution module includes void convolution, depthwise separable causal convolution, weight normalization, attention mechanism, activation function, and Dropout. The attention mechanism includes K fully connected layers, Q fully connected layers, V fully connected layers, attention calculation, softmax, and residual connection.
9. The hydropower equipment online monitoring and diagnosis system according to claim 8, characterized in that: When training the autoencoder, the loss function is as follows: , Where the first part represents the reconstruction loss, For input sample And the reconstruction sample The expected error; the second part represents the time consistency loss, sg represents the stop gradient, that is, the gradient is not calculated and returned, represents the feature representation of the current time step t, is the feature representation of the previous time step t-1, is the norm; the third part represents attention regularization, Attention is the attention weight matrix, It means preventing the gradient from propagating through Attention. is the regularization parameter.
Citation Information
Patent Citations
Hydropower station equipment fault intelligent identification system based on Tang hydropower cloud platform
CN117112990A
Auto-encoder network optimization method serving clustering task
CN110705618A
Switch machine fault diagnosis method based on segmented prior feature fusion
CN118568599A