Generator set fault diagnosis and detection method based on deep learning
By using deep learning methods to synchronously collect and process the electrical parameters of generator sets and construct a parallel feature extraction network, the problems of low efficiency and low recognition rate of complex faults in traditional methods are solved, and high-precision fault diagnosis and detection are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING XINYANDA ELECTRICAL & MECHANICAL EQUIP CO LTD
- Filing Date
- 2026-03-13
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional generator set fault diagnosis methods are inefficient, struggle to uncover deep-seated information in signals, and lack generalization ability when faced with complex nonlinear fault coupling relationships, making it difficult to accurately identify compound faults.
A deep learning-based approach is adopted. The electrical parameters of the generator set are collected synchronously, and the data is cleaned and transformed by wavelet packet to construct an enhanced feature tensor. Features are extracted using convolutional neural networks and bidirectional long short-term memory networks, and adaptive weighted fusion is performed. Finally, a multi-layer fully connected classifier is used for fault diagnosis.
It achieves high-precision and intelligent generator set fault detection, and can accurately identify faults such as bearing failure, rotor eccentricity and electrical imbalance, significantly improving the accuracy and robustness of diagnosis.
Smart Images

Figure CN121834633B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor testing technology, and in particular to a method for fault diagnosis and detection of generator sets based on deep learning. Background Technology
[0002] As core equipment in the power system, the operating status of generator sets directly affects the stability and security of the power grid. Traditional generator set fault diagnosis methods mainly rely on threshold comparison and simple spectrum analysis. For example, monitoring the amplitude of vibration signals to determine if bearings are abnormal, or analyzing the harmonic content of voltage and current to assess the degree of electrical imbalance. However, these methods have significant limitations:
[0003] Traditional methods require engineers to manually design features (such as amplitude and kurtosis indices for specific frequency bands) based on prior knowledge, which is not only inefficient but also makes it difficult to uncover deep, hidden information in signals.
[0004] Under conditions such as start-up, shutdown, and load changes, the electrical parameters of a generator exhibit non-stationary characteristics. Traditional Fourier transforms struggle to simultaneously account for local variations in time and frequency, leading to decreased diagnostic accuracy.
[0005] Diagnostic models based on shallow machine learning (such as support vector machines) often lack generalization ability when faced with complex nonlinear fault coupling relationships, and are prone to false alarms or false negatives.
[0006] With the development of artificial intelligence technology, although some studies have attempted to introduce deep learning, most of them remain at the theoretical simulation stage, lacking an end-to-end solution that can effectively integrate multi-source electrical parameters, automatically extract spatiotemporal features, and accurately identify complex faults. Summary of the Invention
[0007] The purpose of this invention is to provide a generator set fault diagnosis and detection method based on deep learning, which can automatically learn and identify deep features that can characterize different fault types from the electrical parameters of the generator, thereby achieving high-precision and intelligent detection of production defects such as bearing failure, rotor eccentricity, and electrical imbalance.
[0008] To achieve the above objectives, this invention provides a generator set fault diagnosis and detection method based on deep learning, comprising the following steps:
[0009] Simultaneously acquire the stator three-phase voltage, stator three-phase current and rotor speed analog signals of the generator set, perform data cleaning and sliding time window segmentation on the preprocessed multi-channel digital signal sequence to obtain a multi-dimensional time series matrix;
[0010] Wavelet packet transform is performed on each column of the signal in the multidimensional time series matrix, and the reconstruction coefficients of multiple frequency bands obtained are merged with the multidimensional time series matrix in the channel dimension to construct an enhanced feature tensor.
[0011] The enhanced feature tensor is input into two parallel feature extraction branches for feature extraction to obtain local spatial feature vectors and global temporal feature vectors. The two parallel feature extraction branches are a convolutional neural network branch and a bidirectional long short-term memory network branch, respectively.
[0012] The local spatial feature vector and the global temporal feature vector are adaptively weighted and fused. The fused feature vector is then input into a multi-layer fully connected classifier, which outputs the probability distribution of fault types to complete the diagnosis and detection of generator set faults.
[0013] The extraction process of branches in a convolutional neural network specifically includes:
[0014] Multi-scale one-dimensional convolutional layers are used to perform parallel convolution operations on the enhanced feature tensor using convolutional kernels of sizes 3×1, 7×1 and 15×1 respectively, and the outputs of the three convolutions are concatenated along the channel dimension; then multiple one-dimensional convolutional layers and max pooling layers are stacked to extract deep features; finally, the feature maps are aggregated into local spatial feature vectors through a global max pooling layer.
[0015] The extraction process of bidirectional long short-term memory network branches specifically includes:
[0016] The enhanced feature tensor is treated as a time step sequence input to a bidirectional LSTM layer to obtain a hidden state sequence containing forward and backward context information; the attention weight of each time step is calculated through a time attention mechanism, and the hidden state sequence is weighted and summed to aggregate into a global temporal feature vector;
[0017] Adaptive weighted fusion of the local spatial feature vector and the global temporal feature vector includes:
[0018] The local spatial feature vector and the global temporal feature vector are respectively input into independent single-layer fully connected networks and mapped to two scalar importance scores. The two scores are concatenated and normalized by the Softmax function to obtain the fusion weight of the two features. The fusion weight is used to perform a weighted sum of the two feature vectors to obtain the fusion feature vector.
[0019] The synchronous acquisition is implemented as follows:
[0020] A multi-channel synchronous data acquisition card is adopted, with a built-in temperature-controlled crystal oscillator as the master clock, and supports the IEEE 1588 precision time protocol or external hardware triggering to ensure that the sampling time error of each channel is less than 1 microsecond, thereby obtaining three-phase voltage, three-phase current and speed signals with time axis alignment.
[0021] The process includes data cleaning and sliding time window segmentation of the preprocessed multi-channel digital signal sequence, including:
[0022] A sliding window combined with the absolute deviation of the median is used to detect and remove outliers in a digital signal sequence, and the median within the window is used instead.
[0023] Polynomial fitting or high-pass filtering is used to remove the set trend terms in the signal; an adaptive notch filter is used to filter out fixed power frequency and its harmonic interference.
[0024] The wavelet packet transform uses adaptively selected wavelet basis functions and decomposition levels. The adaptive selection includes: constructing a candidate wavelet basis library, calculating the kurtosis of the reconstructed signal in each frequency band after decomposing historical fault data by each candidate wavelet basis and the weighted comprehensive evaluation index of energy retention rate, and selecting the wavelet basis corresponding to the maximum value of the index as the optimal wavelet basis; for the selected optimal wavelet basis, incrementally increasing the decomposition level and calculating the information entropy of the energy distribution in all frequency bands of each level, and selecting the level at which the entropy growth curve first shows an inflection point as the optimal decomposition level.
[0025] The reconstruction coefficients of the multiple frequency bands are merged with the multidimensional time series matrix along the channel dimension to obtain the multidimensional time series matrix, which includes:
[0026] The 2^J frequency band reconstructed signals obtained by wavelet packet transform of each original channel signal are used as new channels. They are grouped and concatenated according to the original channels and spliced with the original multidimensional time series matrix in the channel dimension to form an enhanced feature tensor with dimension L × (7 + 7×2^J), where L is the time window length and J is the decomposition level.
[0027] Specifically, the multi-layer fully connected classifier includes:
[0028] The first fully connected hidden layer, the second fully connected hidden layer, and the output layer are connected in sequence; both the first and second fully connected hidden layers contain a ReLU activation function and a Dropout operation that follows; the number of neurons in the output layer is equal to the total number of preset fault categories, and its output is converted into the probability of each fault category by the Softmax function.
[0029] The method further includes:
[0030] A training sample set containing historical fault data is constructed, and each sample is labeled with a corresponding fault type. The fault types include normal state, bearing fault, rotor eccentricity, electrical imbalance and multiple composite faults. Multiple composite faults refer to fault modes that simultaneously contain two or more single fault types.
[0031] The training sample set is input into a deep learning network consisting of two parallel feature extraction branches and a multi-layer fully connected classifier. Backpropagation training is performed using the cross-entropy loss function and the Adam optimizer. An early stopping strategy is monitored using a validation set to prevent overfitting until the model converges.
[0032] This invention presents a deep learning-based generator set fault diagnosis and detection method. Addressing the shortcomings of existing methods, such as reliance on manual feature extraction, difficulty in handling non-stationary signals, and low recognition rates for complex faults, this method first simultaneously acquires three-phase voltage, current, and speed signals. After data cleaning and sliding window segmentation, a multi-dimensional time series matrix is constructed. Then, an adaptive wavelet packet transform is used to perform multi-scale decomposition of the matrix, merging the reconstruction coefficients of each frequency band with the original signal channels to construct an enhanced feature tensor. Next, a CNN-BiLSTM parallel network is constructed, where the CNN branch extracts local spatial features, and the BiLSTM branch, combined with an attention mechanism, extracts global temporal features. Finally, an adaptive weighted fusion strategy dynamically fuses the features from the two branches, and the result is input into a multi-layer fully connected classifier to output the fault type. This invention achieves end-to-end automatic feature extraction, effectively enhancing early weak fault features, and accurately identifying bearing faults, rotor eccentricity, electrical imbalance, and their complex faults. It significantly improves the intelligence and accuracy of generator set fault diagnosis and can be widely applied to online monitoring and health management of power system generating equipment. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0034] Figure 1 This is a schematic diagram of the steps of a generator set fault diagnosis and detection method based on deep learning according to the first embodiment of the present invention.
[0035] Figure 2 This is a flowchart illustrating a generator set fault diagnosis and detection method based on deep learning provided by the present invention.
[0036] Figure 3 This is a schematic diagram of the process of model training for a generator set fault diagnosis and detection method based on deep learning provided by the present invention. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0038] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms "a," "the," and "the" as used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0039] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0040] Please see Figures 1-3 This invention provides a method for generator set fault diagnosis and detection based on deep learning, comprising the following steps:
[0041] S101. Synchronously acquire the stator three-phase voltage, stator three-phase current and rotor speed analog signals of the generator set, perform data cleaning and sliding time window segmentation on the preprocessed multi-channel digital signal sequence to obtain a multi-dimensional time series matrix.
[0042] Specifically, to achieve precise alignment of voltage, current, and speed signals on the time axis, this invention employs a data acquisition system based on high-precision clock synchronization. Three-phase voltage transformers and current transformers are installed on the stator side of the generator set to acquire the three-phase stator voltage U. a U b U c and three-phase stator current I a I b I cA photoelectric encoder or magnetoelectric speed sensor is installed at the rotor shaft end to acquire the instantaneous rotor speed signal n. All analog signals output from the sensors are connected to a multi-channel synchronous data acquisition card. This card has a built-in high-stability temperature-controlled crystal oscillator as the master clock and supports the IEEE 1588 precise time protocol or external hardware triggering, ensuring that each channel samples the signal at the same time (with an error of less than 1 microsecond), fundamentally eliminating phase deviation and timing misalignment problems caused by asynchronous sampling. The sampling frequency is set according to the highest possible fault frequency component of the generator (such as the characteristic frequency of bearing faults), typically not lower than 10 kHz, to satisfy the Nyquist sampling theorem.
[0043] The raw analog signals output by sensors often have small amplitudes and are mixed with high-frequency noise, making direct analog-to-digital conversion impossible. Therefore, before entering the data acquisition card, they are pre-processed by a signal conditioning module, including impedance matching, differential amplification (amplifying the weak signal to the full-scale range of the ADC), and isolation protection (preventing high-voltage surges from damaging subsequent circuitry). The conditioned signal is then fed into an anti-aliasing filter, a low-pass filter with a cutoff frequency set to half the sampling frequency to filter out high-frequency noise above the Nyquist frequency and prevent spectral aliasing after sampling. The filtered analog signal is finally quantized into a discrete digital signal sequence by a high-precision analog-to-digital converter (ADC), yielding the raw sampled data points for each channel, denoted as U. a [t],U b [t],U c [t],I a [t],I b [t],I c [t], n[t], where t represents the discrete-time index.
[0044] Although out-of-band noise has been suppressed (i.e., denoising) through anti-aliasing filtering, digital signals may still contain outliers (outliers) and trend terms introduced by sensor transient interference, electromagnetic pulses, or data transmission errors. Data cleaning here is performed on digital signal sequences to remove these unwanted components and improve signal quality. The following methods are used specifically:
[0045] Outlier removal: For each channel's sampling sequence, a sliding window combined with the median absolute deviation method is used for detection. The median of the data is calculated within the window, and the standard deviation is estimated. If the amplitude of a sampling point deviates from the median by more than a preset multiple (e.g., 3 times the standard deviation), it is identified as an outlier and replaced with the median within the window to avoid interfering with subsequent analysis.
[0046] Trend removal: Due to sensor zero-point drift or changes in ambient temperature, slowly changing trend terms may be superimposed on the signal. Polynomial fitting or high-pass filtering methods are used to remove trend terms, causing the signal to fluctuate around the zero mean, thus meeting the requirements of deep learning models for the stability of input data distribution.
[0047] Power frequency notch filtering: For voltage and current signals, an adaptive notch filter is used to filter out the fixed 50 Hz (or 60 Hz) power frequency and its harmonic interference, while retaining the non-power frequency components related to the fault.
[0048] After the above cleaning process, a clean multi-channel digital signal sequence is obtained.
[0049] To construct samples suitable for training deep learning models, continuous multi-channel signals need to be segmented. A sliding time window method is used to divide long-duration sequences into multiple short segments of equal length. The choice of window length L needs to consider both the temporal persistence and frequency resolution of the fault, typically covering several power frequency cycles (e.g., 0.2 seconds, or 10 cycles) to fully capture the periodic characteristics of the fault. The window sliding step size S is generally smaller than the window length, allowing overlap between adjacent windows (the overlap rate is usually set to 50%), thereby increasing the number of samples and improving the robustness of model training. For each window's starting point, all channel data of length L are extracted from that point.
[0050] Each window captures data containing the time series of all seven channels (three-phase voltage, three-phase current, and speed) within that window. This data is organized into a two-dimensional matrix, where rows correspond to time sampling points (L rows in total), and columns correspond to different signal channels (7 columns in total). This matrix is called a multidimensional time series sample, denoted as X∈R. L×7 Each row represents the instantaneous value of all sensor measurement points at a given moment, and each column represents the trajectory of a measurement point within the entire time window. This structure fully preserves the temporal correlation of the signal and the spatial correlation between channels, laying the foundation for subsequent deep learning models to extract spatiotemporal coupling features. The samples generated by all windows together constitute the original sample set, along with corresponding operating condition labels (such as load level) and fault labels (to be annotated in subsequent steps) for use in model training.
[0051] S102. Perform wavelet packet transform on each column of the signal in the multidimensional time series matrix, and merge the reconstruction coefficients of the multiple frequency bands obtained with the multidimensional time series matrix in the channel dimension to construct an enhanced feature tensor.
[0052] Specifically, the Wavelet Packet Transform (WPT) is a generalization of the Discrete Wavelet Transform. It decomposes not only the low-frequency components of a signal but also recursively decomposes the high-frequency components, thus achieving a uniform division of the entire signal's frequency band. For a discrete signal x(t) of length L, after J layers of wavelet packet decomposition, we can obtain 2... J The signal is divided into several equal-bandwidth subspaces, each corresponding to a set of wavelet packet coefficients. By performing single-branch reconstruction on each frequency band coefficient (i.e., retaining the coefficient of that frequency band while setting other frequency band coefficients to zero, and then performing an inverse transform), a time-domain reconstructed signal of the same length as the original signal can be obtained. This reconstructed signal represents the component of the original signal within a specific frequency band. This decomposition method can separate weak local features hidden in broadband signals (such as high-frequency impacts caused by bearing failures or low-frequency fluctuations caused by rotor eccentricity) into their respective narrow frequency bands, thereby effectively enhancing the identifiability of fault features.
[0053] The choice of wavelet basis functions and the number of decomposition levels directly affects the enhancement effect of wavelet packet transform on fault features. To match the signal decomposition with the fault characteristics of the generator set, this invention introduces an adaptive selection mechanism based on the saliency of fault features.
[0054] Selection of wavelet basis functions: First, a candidate wavelet basis library is constructed, containing commonly used wavelet families with different tight supports, vanishing moments, and symmetries, such as Daubechies (dbN), Symlets (symN), and Coiflets (coifN). For each candidate wavelet basis, typical samples from historical fault data (covering bearing faults, rotor eccentricity, electrical imbalance, etc.) are used to perform J-level wavelet packet decomposition (J is temporarily set to the default value, such as 3 levels), and the fault impact index of the reconstructed signal in each frequency band is calculated—that is, the sum of the absolute values of the kurtosis of the signals in each frequency band. Kurtosis is sensitive to transient impacts in the signal and can reflect the local impact characteristics generated by bearing faults, etc.; at the same time, the ratio of the energy of each frequency band to the total energy of the original signal is calculated to evaluate the degree of retention of fault information by the decomposition. Combining the sum of kurtosis and energy retention rate of all frequency bands, a comprehensive evaluation index Q=ɑ×K is constructed. sum +β×E ratio Here, α and β are weighting coefficients, optimized through grid search combined with the validation accuracy of subsequent classification models. The wavelet basis that maximizes the Q-value is selected as the optimal wavelet basis for the current scenario. This process can be completed during the offline training phase of the model, and once selected, it is permanently used for online diagnosis.
[0055] Determining the number of decomposition layers: The number of decomposition layers J determines the fineness of the adaptive frequency band division. Too few layers make it difficult to separate different fault features into different frequency bands; too many layers result in excessively narrow bandwidths for each frequency band, easily introducing noise and drastically increasing computational complexity. This invention uses a stability criterion based on frequency band energy entropy to determine the optimal number of decomposition layers. For a selected optimal wavelet basis, the number of decomposition layers is incremented starting from J=1. Wavelet packet decomposition is performed on typical fault samples, the reconstructed signal energy of all frequency bands in each layer is calculated, and the information entropy of the energy distribution is obtained.
[0056]
[0057] in, Let J be the proportion of energy in the i-th frequency band to the total energy. As J increases, the energy distribution gradually becomes more refined, and the entropy value H(J) shows an upward trend. When J reaches a certain value, excessively fine frequency band division leads to energy dispersion, and the entropy growth tends to saturate or even fluctuate. The optimal decomposition level is selected when the entropy growth curve first reaches an inflection point (i.e., the first-order difference is less than the threshold). This ensures sufficient frequency band resolution while avoiding instability caused by over-decomposition. Similarly, this selection process is completed offline.
[0058] For a multidimensional time series matrix X∈R L×7 Their column vectors correspond to the three-phase voltages (U) a U b U c ), three-phase current (I) a I b I c There are 7 channels in total, including (n) and (n-axis rotation). For each signal, an adaptive J-level wavelet packet decomposition with a selected wavelet basis and decomposition level is performed independently. The specific operation is as follows:
[0059] Using the c-th column signal x c (t) (of length L) as an example:
[0060] For x c (t) Perform J-level wavelet packet decomposition to obtain 2 J Wavelet packet coefficients of each node.
[0061] For each node i (i=1,2,…,2J), perform single-branch reconstruction: retain the coefficients of that node, set the coefficients of the remaining nodes to zero, and then perform an inverse wavelet packet transform to obtain the coefficients of x. c (t) Time-domain reconstructed signal r of equal length c,i (t), which represents the component of the original signal within the corresponding frequency band.
[0062] Repeat the above process for all 7 channels to obtain 7×2. J Each frequency band reconstructed signal.
[0063] To simultaneously preserve the original full-band information and the detailed information of each band, this invention merges the original signal with all reconstructed band signals along the channel dimension to form an enhanced feature tensor (or enhancement tensor). The specific merging method is as follows:
[0064] The original multidimensional time series matrix X itself serves as 7 basic channels.
[0065] For the c-th original channel (c=1,2,…,7) generated 2 J One frequency band reconstructed signal r c,i (t) are considered as new independent channels and arranged in channel order to form the frequency band channel matrix R. c R c =[r c,1 r c,2 , ..., r c,2 J ].
[0066] Grouping all the new channels together according to the original channels, we finally obtain a dimension of L×(7+7×2). J The enhanced feature tensor X enhanced , that is, X enhanced =[X,R1,R2,…,R7],,R c =[r c,1 r c,2 , ..., r c,2 J [] represents the frequency band channel matrix extended from the c-th original channel, with a dimension of L×2. J .
[0067] The enhanced feature tensor X enhanced Each row still represents the observation at the same moment, but the observation dimension has been expanded from the original 7 dimensions to 7(1+2). J The multi-scale information fusion, which includes the original signal and its projections on various fine frequency bands, enables subsequent deep learning models (CNN-BiLSTM) to learn deep features of faults from both wideband contours and narrowband details, greatly improving the model's sensitivity and ability to identify weak and complex faults.
[0068] S103. The enhanced feature tensor is input into two parallel feature extraction branches for feature extraction to obtain local spatial feature vectors and global temporal feature vectors. The two parallel feature extraction branches are a convolutional neural network branch and a bidirectional long short-term memory network branch, respectively.
[0069] Specifically, the enhanced feature tensor output by the above steps is denoted as X. enhanced ∈R L×CWhere L is the time window length (number of sampling points), C = 7 × (1 + 2) J The total number of channels is denoted as , which includes the original channels and all frequency band reconstructed channels. This tensor will serve as the input to both branches. The convolutional neural network branch focuses on mining the spatial morphological features of the signal within a local time window, i.e., transient waveform distortion caused by the fault; the bidirectional long short-term memory network branch focuses on capturing the global temporal dependencies of the signal over time, i.e., the dynamic changes of the fault. The outputs of the two branches are fused through feature concatenation to form a comprehensive representation of the generator set's operating status.
[0070] First, in the convolutional neural network branch (that is, the appendix) Figure 2 In the CNN path multi-scale convolution process, local correlation patterns within each channel and across channels are extracted through one-dimensional convolution operations, similar to identifying "local shapes" in a signal. The specific structural design is as follows:
[0071] First, X enhanced The input is directly fed into the first set of parallel one-dimensional convolutional layers. To capture local features at different scales, a multi-scale convolutional kernel design is employed. Specifically, it includes three parallel convolutional operations:
[0072] Small-scale convolution kernel: The size is 3×1 (i.e., the kernel length is 3, it operates in the time dimension, the number of input channels is C, and the number of output channels is set to F1). This convolution kernel is good at extracting subtle local fluctuations, such as the high-frequency impact details caused by the initial failure of a bearing.
[0073] Mesoscale convolution kernel: 7×1 in size, with F2 output channels. Used to capture medium-length waveform patterns, such as periodic harmonic envelopes caused by electrical imbalances.
[0074] Large-scale convolution kernel: size 15×1, output channel number set to F3. Capable of covering trend features over a longer time range, such as slow drift caused by rotor eccentricity.
[0075] Each convolutional operation uses a stride of 1 and the same padding method (i.e., zero padding to maintain the output duration as L). Each convolutional layer is immediately followed by a batch normalization layer to standardize the feature map of each output channel, accelerating training convergence and mitigating overfitting. Then, a non-linearity is introduced using the ReLU activation function. Finally, the outputs of the three parallel convolutions are concatenated along the channel dimension to obtain a feature map that integrates multi-scale local features. .
[0076] To further abstract features and reduce dimensionality, several (e.g., two) one-dimensional convolutional layers are stacked after the concatenated feature maps. The kernel size of these convolutional layers can be set to a fixed size (e.g., 5×1), and the number of output channels gradually increases (e.g., from 256 to 512). Each convolutional layer is followed by batch normalization and ReLU activation. After every one or two convolutional layers, a one-dimensional max-pooling layer (pooling size 2, stride 2) is inserted to downsample the time dimension, reducing subsequent computation and enhancing the translation invariance of the features. After several pooling iterations, the time dimension is reduced to half its original size. k Let L′ be the final feature map, and M be the final feature map. cnn2 ∈R L′×512 .
[0077] To convert the variable-length spatiotemporal feature map into a fixed-length feature vector, a global max pooling layer is employed. This layer maximizes the value of each channel in the time dimension, aggregating the most representative local features to obtain the local spatial feature vector F. cnn ∈R 512 This vector encapsulates the most prominent local waveform patterns within the entire time window, providing crucial detailed evidence for fault type identification.
[0078] In bidirectional long short-term memory network branches (i.e., appendages) Figure 2 In the BiLSTM path bidirectional LSTM process, by capturing the dependence and evolution of signals over a long time scale, the BiLSTM's ability to remember forward and backward information of time series is utilized, and attention mechanism is combined to focus on key time steps.
[0079] Enhance the feature tensor X enhanced ∈R L×C Consider it as a time series of length L, where each time step t corresponds to a C-dimensional feature vector x. t That is, the input of the branch is the sequence [x1, x2, ..., x]. L ], each x t ∈R C R C The feature vector at each time step is a C-dimensional real vector, representing x. t It is a C-dimensional real vector.
[0080] The sequence is input into a bidirectional LSTM layer. This layer contains two independent LSTM sublayers:
[0081] Forward LSTM: Reads the sequence from t=1 to L in chronological order, and outputs the hidden state at each time step t. This state integrates information from the past to the present moment.
[0082] Backward LSTM: Reads the sequence from t=L to 1 in reverse time order and outputs the hidden state. It integrates information from the future to the present moment.
[0083] At each time step t, the forward and backward hidden states are concatenated to obtain the complete hidden state for that step. Its dimension is 2H (H is the hidden layer dimension of the LSTM unit). The output of the entire BiLSTM layer is a sequence of hidden states. Each h in this sequence t It encodes full-time context information centered on time step t, which can effectively capture the temporal evolution pattern of fault signals, such as periodic repetition and trend changes.
[0084] Not all time steps contribute equally to fault diagnosis. To highlight key time segments (such as the instant of fault occurrence or the location of periodic peaks), a time attention mechanism is introduced to automatically learn the importance weight of each time step. The specific implementation is as follows:
[0085] The hidden state sequence H output by BiLSTM bilstm As input, a raw score is computed at each time step using a trainable attention scoring function. For example, additive attention can be used:
[0086] ;
[0087] Where W is the weight matrix, v is the vector, and b is the bias, all of which are learnable parameters.
[0088] The attention weights are obtained by performing Softmax normalization on the original scores.
[0089] ,satisfy .
[0090] We obtain the global temporal feature vector by weighting the hidden states using attention weights:
[0091] ;
[0092] Its dimension is 2H. This vector is a weighted aggregation of the BiLSTM output sequence, focusing on the time points that are more critical to diagnosis, thereby enhancing the discriminative power of the features.
[0093] S104. Adaptively weightedly fuse the local spatial feature vector and the global temporal feature vector, input the fused feature vector into a multilayer fully connected classifier, output the fault type probability distribution, and complete the diagnosis and detection of generator set faults.
[0094] Specifically, the features extracted from the two branches describe the generator's operating state from different perspectives: F cnn It focuses on characterizing local transient patterns in signals and is sensitive to sudden impacts and waveform distortions; F bilstm This approach focuses on capturing global temporal dependencies and is sensitive to periodic changes and trend evolution. The importance of these two features may dynamically change depending on the fault type or the different stages of the same fault's development. Therefore, simple feature concatenation or fixed weighting cannot fully leverage their complementary advantages. This invention introduces a lightweight attention mechanism that dynamically assigns fusion weights to the two features for each input sample, achieving adaptive fusion.
[0095] First, the local spatial feature vector F cnn ∈R 512 and global temporal feature vector F bilstm ∈R 2H The inputs are fed into two separate single-layer fully connected networks, each mapped to a scalar value:
[0096] ;
[0097] Among them, Linear cnn and Linear bilstm For learnable linear transformations, the output dimension is always 1. These two scalars s cnn and s bilstm These represent the original scores indicating the importance of the corresponding feature to the diagnosis of the current sample.
[0098] Next, the two scores are concatenated into a two-dimensional vector [s]. cnn ,s bilstm The fusion weights of the two features are obtained by normalizing them using the Softmax function.
[0099] ;
[0100] Weight and satisfy They adaptively adjust the contribution ratio of the two types of features based on the content of the input sample.
[0101] The two feature vectors are weighted and summed using the aforementioned weights to obtain the final fused feature vector F. fused :
[0102] ;
[0103] The fused feature vector F fused The dimension and F cnn and F bilstmThe dimensions must be consistent (therefore, 2H=512 is set in the design, or one of them is linearly transformed to align the dimensions). Through this adaptive weighted fusion, or rather, adaptive dynamic weighting process, the model can dynamically adjust its dependence on local details and global temporal information for different fault samples. For example, for early bearing faults, F might be assigned... cnn Higher weights are used to capture impact characteristics, while for rotor eccentricity, more emphasis may be placed on F. bilstm This allows for the identification of periodic changes in the data, thereby enhancing the expressive power of features and the accuracy of diagnosis.
[0104] Obtain the fused feature vector F fused Then, it is fed into a multi-layer fully connected classifier for fault type identification. The multi-layer fully connected classifier is composed of multiple stacked fully connected layers, with the following structure:
[0105] The fused feature vector is first input into the first fully connected layer, which contains 256 neurons, to further abstract and reduce the dimensionality of the features. Its calculation method is as follows:
[0106] h1=ReLU(W1×F fused +b1);
[0107] W1 and b1 are learnable parameters, and the ReLU activation function introduces nonlinearity. Subsequently, to suppress overfitting, a Dropout operation is applied to h1, randomly discarding some neuron outputs with probability p=0.5 to enhance the model's generalization ability.
[0108] The dropout-processed h1 is then fed into a second fully connected layer containing 128 neurons. This layer also uses the ReLU activation function and is followed by dropout to further refine the features.
[0109] Finally, the output of the second hidden layer is connected to the output layer, where the number of neurons equals the preset total number of fault categories K (including normal states and various single and compound faults). The output layer uses linear activation (i.e., no activation function) to obtain the raw score (logits) for each category:
[0110] z = W³ × h² + b³, z ∈ R K ;
[0111] Where K represents the total number of fault categories, W3 represents the weight matrix of the output layer; h2 represents the output of the second hidden layer, a feature vector with dimension 128; b3 represents the bias vector of the output layer; z represents the original score vector of the output layer, with each element corresponding to the unnormalized score of a category; R K Let z be a K-dimensional real vector space, where z is a K-dimensional real vector and each component corresponds to a score for a category.
[0112] To convert the score into a probability distribution, the Softmax function is applied to z:
[0113] k=1,2,…,K;
[0114] in, This represents the probability that the model predicts a sample to belong to the k-th type of fault.
[0115] The entire network (including the feature extraction network, fusion module, and multi-layer fully connected classifier) is jointly trained end-to-end. During training, the cross-entropy loss function is used to measure the predicted probability distribution. Differences between the actual label y (one-hot encoded):
[0116] ;
[0117] The optimizer used was Adam, with an initial learning rate of 0.001, and mini-batch gradient descent was employed to update the network parameters. During training, the accuracy on the validation set was monitored, and an early stopping strategy was implemented: training was stopped when the validation set performance no longer improved for several consecutive epochs to prevent overfitting. After training, the optimal model was saved for online diagnostics.
[0118] A training sample set is constructed using historical operating data or fault simulation experimental data, with each sample labeled with a corresponding fault type. The constructed CNN-BiLSTM network is trained end-to-end using the backpropagation algorithm and Adam optimizer, with the cross-entropy loss function as the objective function, until the model converges. After training, the model is embedded and deployed into the generator set online monitoring system. In actual operation, the system collects electrical parameters in real time and automatically executes steps 1 to 4, ultimately outputting the current fault diagnosis result, achieving intelligent detection of the generator set's health status.
[0119] It should be noted that the fault diagnosis and detection method of the present invention is divided into two stages: offline training and online diagnosis. For example... Figure 3 As shown in the dashed box, during the offline training phase, a training sample set containing historical fault data is first constructed. The sample input is processed by a CNN branch, a BiLSTM branch, and a multi-layer fully connected classifier. Figure 3The deep learning network, consisting of a fully connected classifier, is trained end-to-end using backpropagation until the model converges and the optimal trained model is saved. In the online diagnostic phase, real-time collected and preprocessed data is directly input into the trained model. Through forward propagation, the diagnostic results, i.e., the probability distribution of fault types, are finally output. The "end-to-end training" box in the figure illustrates this joint optimization process, and the "trained model" represents the fixed network parameters used for online deployment.
[0120] This invention has the following beneficial effects and innovative points:
[0121] End-to-end automatic feature extraction: Without the need for manually designing complex feature extraction rules, the CNN-BiLSTM network automatically learns and mines deep fault features from the original electrical parameters, eliminating the reliance on expert experience and improving diagnostic efficiency.
[0122] Deep fusion of spatiotemporal features: An innovative parallel dual-branch network structure was constructed. The CNN branch focuses on extracting the local spatial morphological features of the signal (such as specific waveform distortions caused by faults), while the BiLSTM branch, combined with an attention mechanism, focuses on capturing the global temporal dependence features of the signal (such as the evolution of faults over time). The deep fusion of the two enables the model to more comprehensively and accurately characterize complex faults, especially the essential attributes of compound faults.
[0123] Signal enhancement and noise immunity: By preprocessing the input signal through wavelet packet transform, the time-domain signal is decomposed into different frequency bands, which effectively enhances the early weak fault characteristics and suppresses noise interference, thereby improving the robustness and early warning capability of the model under complex working conditions.
[0124] High-precision composite fault identification: By fusing local details and global time-series information, the model can distinguish composite faults with mutually coupled features, solving the problem of low recognition rate of traditional methods in the face of composite faults, and significantly improving the accuracy and reliability of generator set fault diagnosis.
[0125] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0126] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for fault diagnosis and detection of generator sets based on deep learning, characterized in that, Includes the following steps: Simultaneously acquire the stator three-phase voltage, stator three-phase current and rotor speed analog signals of the generator set, perform data cleaning and sliding time window segmentation on the preprocessed multi-channel digital signal sequence to obtain a multi-dimensional time series matrix; Wavelet packet transform is performed on each column of the signal in the multidimensional time series matrix, and the reconstruction coefficients of multiple frequency bands obtained are merged with the multidimensional time series matrix in the channel dimension to construct an enhanced feature tensor. The enhanced feature tensor is input into two parallel feature extraction branches for feature extraction to obtain local spatial feature vectors and global temporal feature vectors. The two parallel feature extraction branches are a convolutional neural network branch and a bidirectional long short-term memory network branch, respectively. The local spatial feature vector and the global temporal feature vector are adaptively weighted and fused. The fused feature vector is then input into a multi-layer fully connected classifier, which outputs the probability distribution of fault types to complete the diagnosis and detection of generator set faults. The process of extracting branches in a convolutional neural network specifically includes: Multi-scale one-dimensional convolutional layers are used to perform parallel convolution operations on the enhanced feature tensor using convolutional kernels of sizes 3×1, 7×1 and 15×1 respectively, and the outputs of the three convolutions are concatenated along the channel dimension; then multiple one-dimensional convolutional layers and max pooling layers are stacked to extract deep features; finally, the feature maps are aggregated into local spatial feature vectors through a global max pooling layer. The extraction process of bidirectional long short-term memory network branches specifically includes: The enhanced feature tensor is treated as a time step sequence input to a bidirectional LSTM layer to obtain a hidden state sequence containing forward and backward context information; the attention weight of each time step is calculated through a time attention mechanism, and the hidden state sequence is weighted and summed to aggregate into a global temporal feature vector; Adaptive weighted fusion of the local spatial feature vector and the global temporal feature vector includes: The local spatial feature vector and the global temporal feature vector are respectively input into independent single-layer fully connected networks and mapped to two scalar importance scores. The two scores are concatenated and normalized by the Softmax function to obtain the fusion weight of the two features. The fusion weight is used to perform a weighted sum of the two feature vectors to obtain the fusion feature vector.
2. The generator set fault diagnosis and detection method based on deep learning as described in claim 1, characterized in that, The synchronous acquisition is implemented as follows: A multi-channel synchronous data acquisition card is adopted, with a built-in temperature-controlled crystal oscillator as the master clock, and supports the IEEE 1588 precision time protocol or external hardware triggering to ensure that the sampling time error of each channel is less than 1 microsecond, thereby obtaining three-phase voltage, three-phase current and speed signals with time axis alignment.
3. The generator set fault diagnosis and detection method based on deep learning as described in claim 1, characterized in that, The preprocessed multi-channel digital signal sequence is subjected to data cleaning and sliding time window segmentation, including: A sliding window combined with the absolute deviation of the median is used to detect and remove outliers in a digital signal sequence, and the median within the window is used instead. Polynomial fitting or high-pass filtering is used to remove the set trend terms in the signal; an adaptive notch filter is used to filter out fixed power frequency and its harmonic interference.
4. The generator set fault diagnosis and detection method based on deep learning as described in claim 1, characterized in that, Wavelet packet transform uses adaptively selected wavelet basis functions and decomposition levels; the adaptive selection includes: constructing a candidate wavelet basis library, calculating the kurtosis of the reconstructed signal in each frequency band after decomposing historical fault data by each candidate wavelet basis and the weighted comprehensive evaluation index of energy retention rate, and selecting the wavelet basis corresponding to the maximum value of the index as the optimal wavelet basis; for the selected optimal wavelet basis, incrementally increasing the decomposition level and calculating the information entropy of the energy distribution in all frequency bands of each level, and selecting the level at which the entropy growth curve first shows an inflection point as the optimal decomposition level.
5. The generator set fault diagnosis and detection method based on deep learning as described in claim 1, characterized in that, The reconstruction coefficients of the multiple frequency bands are merged with the multidimensional time series matrix in the channel dimension to obtain a multidimensional time series matrix, including: The 2^J frequency band reconstructed signals obtained by wavelet packet transform of each original channel signal are used as new channels. They are grouped and concatenated according to the original channels and spliced with the original multidimensional time series matrix in the channel dimension to form an enhanced feature tensor with dimension L × (7 + 7×2^J), where L is the time window length and J is the decomposition level.
6. The generator set fault diagnosis and detection method based on deep learning as described in claim 1, characterized in that, Multilayer fully connected classifiers specifically include: The first fully connected hidden layer, the second fully connected hidden layer, and the output layer are connected in sequence; both the first and second fully connected hidden layers contain a ReLU activation function and a Dropout operation that follows; the number of neurons in the output layer is equal to the total number of preset fault categories, and its output is converted into the probability of each fault category by the Softmax function.
7. The generator set fault diagnosis and detection method based on deep learning as described in any one of claims 1-6, characterized in that, The method further includes: A training sample set containing historical fault data is constructed, and each sample is labeled with a corresponding fault type. The fault types include normal state, bearing fault, rotor eccentricity, electrical imbalance and multiple composite faults. Multiple composite faults refer to fault modes that simultaneously contain two or more single fault types. The training sample set is input into a deep learning network consisting of two parallel feature extraction branches and a multi-layer fully connected classifier. Backpropagation training is performed using the cross-entropy loss function and the Adam optimizer. An early stopping strategy is monitored using a validation set to prevent overfitting until the model converges.