Fault Diagnosis of Hydropower Units Based on Gramian Angular Summation Field and Parallel CNN

: To enhance the operational e ﬃ ciency and fault detection accuracy of hydroelectric units, this paper proposes a parallel convolutional neural network model that integrates the Gramian angular summation ﬁ eld (GASF) with an Improved coati optimization algorithm–parallel convolutional neural network (ICOA-PCNN). Additionally, to further improve the model’s accuracy in fault identi ﬁ cation, a multi-head self-a tt ention mechanism (MSA) and support vector machine (SVM) are introduced for a secondary optimization of the model. Initially, the GASF technique converts one-dimensional time series signals into two-dimensional images, and a COA-CNN dual-branch model is established for feature extraction. To address the issues of uneven population distribution and susceptibility to local optima in the COA algorithm, various optimization strategies are implemented to improve its global search capability. Experimental results indicate that the accuracy of this model reaches 100%, signi ﬁ cantly surpassing other nonoptimized models. This research provides a valuable addition to fault diagnosis technology for modern hydroelectric units


Introduction
With the optimization of the global energy structure and the vigorous development of clean energy, hydropower units are becoming increasingly prominent as efficient and clean renewable energy generation [1][2][3].Especially in recent years, the development and utilization of hydropower resources in China has entered a new climax, and the installed capacity and power generation of hydropower units have maintained a rapid growth trend.However, hydropower units inevitably suffer from various faults during long periods of high-load operation, which not only affects the power generation efficiency of the units but also may pose a threat to the operational safety of the units.Therefore, it is of great practical significance and application value to research the fault diagnosis of hydropower units to realize the accurate identification and timely warning of faults in order to safeguard the stable operation of hydropower units, improve the power generation efficiency, and prolong the life of the units [4][5][6].
The traditional fault diagnosis method often relies on manual inspection and empirical judgment, which could be more efficient and susceptible to the influence of human factors, resulting in the accuracy and timeliness of fault diagnosis not being guaranteed.Therefore, the research and development of intelligent fault diagnosis technology for hydropower units has become an important issue that needs to be solved in the field of hydropower.As a complex electromechanical system, the fault diagnosis of hydropower units is designed to the knowledge and technology of multiple disciplines.Currently, fault diagnosis technology mainly develops in the direction of intelligence and automation [7][8][9].Fault diagnosis mainly comprises three parts: signal processing, feature extraction, and classification recognition.Signal processing methods mainly include Variational Mode Decomposition (VMD), Empirical Mode Decomposition (EMD), and variants.Zheng Yuan [10] and others have achieved good results in noise reduction of hidden touch-wear signals of hydraulic turbine units using EMD-ICA.Hu Xiao et al. [11] performed VMD decomposition of the vibration signal of the hydroelectric unit and reconstructed the obtained components to construct the timing diagram.Fu Qixin [12] and others designed a model based on EEMD and LSTM for the prediction of the degradation degree of hydropower units, and the degradation degree time series, which was initially non-smooth, was decomposed into several smooth component sequences by EEMD to improve the prediction accuracy.All these signal-processing approaches are to decompose the original signal and then select the components through the decomposition.However, no matter what approach is utilized, the decomposition will cause the loss of valuable signals in the signal.Based on this, Chen Fei [13,14] and others proposed a method that does not decompose but uses the values of time-shifted multiscale attentional entropy and improved symbolic dynamic entropy as the eigenvalues, and it has good application in the field of hydropower unit fault diagnosis.This method can reduce signal loss to a great extent.However, this method depends more on parameters such as scale value, embedding dimension, number of categories, and time delay.The primary role played by hydroelectric power in the grid is peak shifting and frequency regulation, and its working conditions change frequently, which has high requirements on the parameter setting of entropy.The literature [15] uses a Markov variation field to convert a one-dimensional time series signal into a two-dimensional feature image, and this method can reach a more than 98% correct diagnosis rate for all kinds of gear faults.However, the vibration signals of hydropower units are often unstable and nonlinear, and the Markov shift field focuses on describing the transfer probability between states in the Markov chain, which is more suitable for mining the features in the stable type signals.Gramian angular summation field (GASF) is a visualization method based on time series data, which can extract the structural features and dynamic behaviors hidden in the data by analyzing the angle information between data points.In recent years, the application of Gram's angle field in mechanical fault diagnosis has gradually attracted attention.Its advantage is that it can intuitively display the operating state of mechanical systems, reveal the fault occurrence and development process, and provide adequate visualization support for fault diagnosis.Combined with machine learning algorithms, the Gram angle field can play a more significant role in feature extraction and classification identification of fault data, thus improving the accuracy and efficiency of fault diagnosis [16][17][18].
Convolutional neural network (CNN) is a deep learning algorithm especially suitable for processing data with grid structures such as images and videos.In hydropower unit fault diagnosis, the convolutional neural network can realize automatic fault identification and classification by learning the deep features of fault data [19].Support vector machine (SVM), on the other hand, is a classifier based on statistical learning theory, which can find the optimal classification hyperplane in high-dimensional space, thus realizing the accurate classification of fault data [20].The combination of convolutional neural networks and support vector machines can give full play to feature learning and classification recognition advantages to further improve the accuracy and robustness of fault diagnosis of hydropower units.In order to improve the parameters such as learning rate and convolutional kernel size, which are difficult to determine in the CNN, the long-nosed raccoon optimization algorithm (COA) is introduced to find the optimization of the parameters, which makes the structure of the model more reasonable and improves fault recognition accuracy.At the same time, to improve the optimization ability of COA, multiple optimization strategies are introduced to solve the problems of uneven population distribution, making it easy to fall into the local optimum of COA and improving the algorithm's global search ability.Finally, the multi-headed self-attention (MSA) mechanism adopted in the literature [21] focuses on the features to strengthen them and improve the accuracy of fault recognition.
This study investigates a new method for rotor fault diagnosis of hydroelectric units combining GASF, ICOA-optimized parallel CNN (PCNN), and MSA-SVM.The effectiveness and accuracy of the method are evaluated by visualizing the data and extracting the features through GASF, employing the optimized two-branch CNN structure and MSA to strengthen the features, and utilizing support vector machines (SVMs) for efficient classification to provide an innovative solution strategy for the diagnosis of hydroelectric unit faults.
The paper is organized as follows: Section 2 focuses on how the optimization algorithm is varied and the essential theoretical background.In Section 3, a sediment abrasion experiment is designed, which mainly simulates the effect of sediment on the overflow components encountered during the actual operation of the unit.The simulation experiments are shown in Section 4, using four working conditions to simulate typical failures of hydropower units, and Section 5 concludes the whole paper.

GASF Algorithm
Gramian angular field (GAF) is a coding method that combines co-ordinate transformations and Gramian matrices to transform a time series into an image.Gramian matrix is the inner product of two vectors, which preserves the temporal dependence of the time series but does not effectively differentiate between value information and Gaussian noise.Therefore, the time series needs to be spatially transformed before the Gramian matrix transformation is performed, and a common method is to convert the Cartesian co-ordinate system into a polar co-ordinate system (radius, angle).The time series is defined as = , , ⋯ , ⋯ , where N is the total number of time points; is a time point, ∈ [1, ].The GAF transformation process to transform is shown below [22]: The original time series is normalized: II.The data obtained in the first step are transformed into a polar co-ordinate system to obtain the radius and angle corresponding to each data point: where is the Gram matrix; • is the inner product operation.Time-series vibration data are converted into vectors.

(
) where is the radius in polar co-ordinates and is the angle.III.Using the Gram matrix, a two-dimensional image of the time series is obtained: where GASF is the Gramian angular summation field and GADF is the Gramian angular difference field.
Because of the many types of fault signals and complex working conditions of hydropower units, GASF can combine a variety of their multiple information for more accurate fault identification, thus reducing the false alarm rate and improving the accuracy of fault diagnosis.Therefore, this paper adopts GASF as the means and method of time sequence signal conversion.

ICOA Algorithm
The COA algorithm was proposed by Dehghani et al. in 2023, which simulates the behavior of the North American long-nosed raccoon when it co-operatively attacks an iguana (exploration) and when it disperses to escape from a predator (exploitation), and has the advantages of no need to set up the control parameter, high efficiency, and strong balancing ability (exploration/exploitation).The principle is as follows [23].

Exploration-Co-operative Iguana Hunting
In this phase, half of the long-nosed raccoons climb a tree to approach the iguana for hunting, while the other half of the long-nosed raccoons will gather under the tree and swim around to wait for the iguana to land; when the iguana lands, the long-nosed raccoons will hunt it and the iguana represents the global optimal position, and this solution process demonstrates the COA's ability to explore the whole world.The mathematical model of tree-climbing long-nosed raccoon behavior is: The iguana lands in a random position and the ground long-nosed raccoon will move randomly accordingly, which is modeled mathematically: where is a random integer; Iguana ground is the iguana position; ( ) is the post-update position; best ( ) is the optimal position before updating; is the population size; and are the upper and lower boundaries, respectively; is a random number from 0 to 1; and denote the different individuals of different dimensions; and () denotes the fitness value.

Development-Decentralized Escape from Predators
In the event of a predator attack on a long-nosed raccoon, the long-nosed raccoon will flee its original location and seek refuge in a nearby safe location.This reflects the performance of COA in a localized search, which is mathematically modeled as:

r lb r ub lb
After each move, the position will be updated using a greedy strategy, i.e.: ( ) ( ) ( ) ( )

ICOA Algorithm Principle
A. Improvements in initialized populations.
COA by randomly generating the initial population is prone to uneven distribution of the population, which can lead to a reduction in the diversity of the population, poor quality of the population, and affect the convergence speed of the algorithm.Good point set is an effective method of uniform point selection.The theory was proposed by Mr. Hua Luogeng and has been applied in many swarm intelligent optimization algorithms.By the definition of the good point set, let be a unit cube in a -dimensional Euclidean space and, if ∈ , the shape is: where ( ) is the set of good points, is the good points, and is the number of samples.
Its deviation is satisfied as follows: where ( , ) is a constant, related only to , .It has been shown theoretically that a weighted sum composed of good points has a smaller error than that obtained by employing any other points and is particularly suitable for approximate computations in high-dimensional spaces.As an example, in a two-dimensional unit search space, the comparison between random point taking and point taking by the good point set method is as follows.
Figure 1a shows the distribution of points in a two-dimensional unit search space (0 ≤ ≤ 1 and 0 ≤ ≤ 1).The points are uniformly and densely distributed, indicating an optimal sampling method called the good point set, whereas Figure 1b points are randomly scattered and unevenly spaced, leading to a greater potential error in the computation.Therefore, the good point set method is particularly suitable for approximate computations in high dimensional spaces, as it can effectively cover the search space and reduce the potential errors in the computation.B. A dynamic reverse learning strategy is introduced to improve the quality of the initial population again: where d is the individual after reverse learning, * is the current individual, and and are random numbers from 0 to 1. C. The golden sine strategy is incorporated in the exploration phase of COA to enhance the global search capability of the algorithm; then, the mathematical model of treeclimbing long-nosed raccoon behavior is: As above, the ground long-nosed raccoon moves randomly according to the iguana's landing position, which is mathematically modeled as: where ground ( ) is the iguana position, is a random number from 0 to 1, and is a random integer.( * ) denotes the fitness value.
D. In the development stage, four strategies, namely, soft encirclement of Harris Hawk, hard encirclement, soft encirclement of progressive fast dive, and hard encirclement of progressive fast dive, are fused, assuming that is the probability of escape of the prey, ∈ (0,1), and that it can be escaped if < 0.5, and a random number E is also introduced: • ≥ 0.5, 0.5 ≤ ≤ 1; at this time, the soft envelope is implemented, and its position update formula is: where Δ is the difference between the prey position and the individual position, ~ (0,2), ( ) is the original position, and ( + 1) is the updated position.• ≥ 0.5 and < 0.5, at which point hard bracketing is implemented with the position update formula: • 0.5 ≤ ≤ 1 and < 0.5 , at which time the soft envelopment of progressive fast swooping is implemented with the position update equation: • < 0.5 and < 0.5; at this point in the hard envelope of real-time progressive fast swooping, the position update equation is: E. In the late iteration, in order to avoid the algorithm falling into the local optimum dilemma, this paper utilizes the vertical and horizontal crossover strategy to correct the individuals, the horizontal crossover to cross-search the population to reduce the search blind spots, and the vertical crossover to increase the diversity of the population while reducing the probability of the algorithm falling into the local optimum.However, although the vertical and horizontal crossover strategy has excellent search performance, the full-dimensional crossover operation will significantly increase the computational burden.In the face of high-dimensional problems, its computational cost will increase geometrically.Therefore, this paper adopts an unordered dimensional sampling method, which reduces the computational cost and also prevents the reduction in overall sparsity due to the reduction in the number of dimensions of the near-optimal individuals.

•
The sampling rate determines the number of dimensions involved in the longitudinal crossover, and the dimensions involved are selected by the sampling rate, which is defined as follows: • Horizontal crossover is the process of selecting two individuals from the same dimension of the population and exchanging individual information at a certain randomized rate: 1 where , and , are the ℎ dimension of the offspring individuals and obtained after crossover, , and , are the dth dimensions of the parent individuals and , and and are random numbers between -1 and 1, where the number of crossover dimensions is determined by the sampling rate.

•
Longitudinal crossover refers to the exchange of dimensional information between different dimensions of the best individuals in the population according to a certain longitudinal crossover probability, thus generating a new generation of the best individuals to compete with their parents, which is conducive to the learning of different dimensions from each other and avoids the premature convergence of a certain dimension: ( ) where best, is the child obtained after crossover of the parent; again, the crossover dimension is determined by the sampling rate. is a random number from 0 to 1.
In order to reflect the practicality of the ICOA optimization algorithm designed in this paper, the test set function of the literature [24] is used for validation and the unoptimized COA is introduced to compare with the more mainstream DBO, GWO, WOA, and PSO optimization algorithms in recent years.The results are shown in Figure 2. From the Figure, it can be seen that the comprehensive performance of ICOA is better than other algorithms on all the test functions.This shows that ICOA is adaptable and superior in handling many optimization problems.Based on this, the parameters of ICOA in this paper are set as follows: the number of initialized populations is 20 and the maximum number of iterations is 10.

CNN Algorithm
Convolutional neural network (CNN) is a deep learning algorithm that is capable of taking an input image, assigning learnable weights and biases to different parts of the image, and being able to differentiate between them.The core foundation of the CNN is the convolutional layer, which, by applying a series of learnable filters to the input image, creates a feature map that summarizes the presence of the features detected in the input.Its mathematical expression is as follows [25].
Given an input image matrix and a filter matrix (also called a kernel), , the convolution operation consists of sliding the filter across the input image.At each position, a matrix multiplication is performed, and the sum output of this multiplication forms a new matrix called the feature map .This process can be represented as: where ( , ) is the value of the feature map at position ( , ); ( * ) denotes the convolution of with ; and ( , ) represents the filter matrix with dimensions × , which denotes the size of the filter.( + , + ) represents the portion of the input image matrix currently covered by the filter.
Convolutional layers are usually followed by connecting pooling layers, which reduce computational complexity and overfitting by reducing the dimensionality of the feature map.After several convolutional kernel pooling layers, the probability distributions of different classes in the classification task are then obtained by passing through the fully connected layer kernel Softmax function.In this paper, the original Softmax layer is improved to SVM; Softmax, as a probabilistic method, is affected by outliers, whereas SVM uses the edges of the sample distribution to classify faulty samples within a certain distance and is more robust to outliers.

MSA Algorithm
MSA plays a central role in the Transformer model.It improves the model's ability to process information about different locations by parallelizing the attention mechanism.The basic idea of MSA is to process the three matrices of query ( ), key ( ), and value ( ) not only in a single attention space but separately in multiple parallel subspaces.Specifically, for each steal, there will be a different set of linear transformations of , , and .This can be realized by the weight matrices , , and , where ℎ denotes the index of the header.The output of the MSA is a splice of the results of these different processings, which are then subjected to a linear transformation.Mathematically, the MSA can be represented as [26]: , , , , , where the formula for each head, ℎ , is: And the computation of a single attention head can be expressed as:

( )
, , max where is the dimension of the key vector; this division operation is performed in order to scale the size of the dot product to prevent the gradient vanishing problem., , , and are learnable parameter matrices used to transform the inputs to the appropriate space.

Rotor Fault Diagnosis Model Based on GASF and ICOA-PCNN-MSA-SVM
In this paper, GASF and ICOA-PCNN-MSA-SVM models are applied to the fault diagnosis of vibration signals of hydropower units.The original one-dimensional time series signal is converted into a two-dimensional image, and the image is input to the twobranch model at the same time, and the hyperparameters in the model are optimized by COA.In order to solve the problems of slow convergence and easily falling into the local optimal solution of COA, various strategies are used to optimize COA.Finally, the identification and classification of fault data are realized, and the flow chart of the model is shown in Figure 3.

Simulation Verification 1
In this study, a hydraulic turbine failure analysis test platform was developed and constructed.As demonstrated in Figure 4, the platform consists of four key components: a water storage system, a water supply system, a test cell, and a water return system.The water storage system utilizes a tank to store water.The water supply system provides water through a pressure pump and several pipes.The test cell consists of a hydroelectric generator set.
On the other hand, the return system consists of a submersible pump and its pipes.The experiment aims to measure the acoustic vibration signals generated by the flow of sandy water through the turbine generator.The pre-experiment steps include filling the water tank and trough with water.When the experiment is started, the pressure pump and the submersible pump are activated simultaneously and the pressure pump pushes the water in the tank to flow through the pipes and impact the rotor blades inside the turbine.After the water flows through the turbine, it will flow back to the tank.Then, the submersible pump is responsible for pumping the water back into the water tank to ensure the continuity of the water cycle.Sediment is added to the tank to simulate conditions in the natural environment during the experiment.When the equipment was operated for a predetermined period, it was observed that the amplitude of the real-time signal collected by the sensors stabilized within a specific range and did not show any further increase.This phenomenon indicates that the sediment and water in the tank have reached an utterly homogeneous mixing state, allowing the collection and recording of signal data to begin.The hydraulic turbine fault diagnosis experimental bench constructed in this paper is displayed in Figure 5, and the specific parameters of the hydraulic turbine generator set used are detailed in reference [27].Meanwhile, this paper uses a noise sensor (model CRY2301) for signal acquisition, which is a miniaturized industrial-grade real-time spectrum analyzer equipped with an advanced digital signal processing (DSP) processor.It integrates a microphone, preamplifier, and data acquisition card to ensure accurate and efficient data processing while maintaining a compact design.Specific parameters regarding the noise sensor are detailed in Table 1.A total of 100 samples were measured in this experiment, which was divided into two kinds of working conditions, the healthy and sediment states, and the length of each sample was 2048.The specific waveforms are shown in Figure 6.The spectrum in Figure 6 shows that the eigenvalues of the two working conditions have apparent differences; the healthy state has low-frequency primary signals, while the sediment state has high-frequency primary signals.The original waveform is subjected to GASF transformation, and the result is shown in Figure 7. Accuracy is a measure of the number of samples predicted correctly by the model as a proportion of the total number of samples.It is a commonly used performance metric in classification tasks and is defined as follows:

Number of correctly predicted samples Accuracy
Total number of samples = (30) Loss value is a performance metric of a model during training or testing that measures the difference between the model prediction and the true value.Common loss functions are mean square error (MSE), cross entropy loss, etc.The smaller the loss value, the more accurate the model prediction.In this paper, MSE is used as the loss value, which is set as follows: ( ) where is the true value of the ℎ sample, ˆi y is the predicted value of the ℎ sample, and is the total number of samples.Figure 9 shows the iteration curves of the training set; with the increase in the number of iterations, the accuracy shows an overall increasing trend, indicating that the performance of the model is improving.The loss value, on the other hand, shows a de-creasing trend, which indicates that the model's fit to the data is improving during the training process.Although the highest accuracy rate is about 90% after 240 iterations, the accuracy rate is further improved by the introduction of SVM, which can be the dataset to realize self-comparison and validation.In order to reflect the effectiveness and efficiency of the constructed model, two sets of models, ICOA-PCNN-SVM and ICOA-PCNN, are introduced for comparison.Their classification and identification are shown in Figure 10, where 1 and 2 in the vertical co-ordinates represent normal and sediment condition categories, respectively.Among them, the accuracy of the model designed in this paper reaches 100%, while the accuracy of ICOA-PCNN-SVM is 90% and that of ICOA-PCNN is 70%.Obviously, feature enhancement of MSA and self-validation of SVM play an important role in improving the accuracy.

Simulation Verification 2
The literature [14] used a specially designed rotor failure test device to simulate and generate vibration data of a hydroelectric generating unit under four typical operating conditions: normal operation, wear and tear, rotor unbalance, and axial misalignment.To ensure the high quality and resolution of the data, the sampling rate of the vibration signals was set to 2048 Hz.A total of 360 samples of vibration signals under different conditions were recorded through this test facility.The waveforms are shown in Figure 11.The original waveform is subjected to GASF transformation and the results are shown in Figure 12. Figure 12a shows the normal (NOR) waveform; Figure 12b shows the wear friction (FRI); Figure 12c shows the imbalance (IMB); and Figure 12d shows the misalignment (MSI).Comparing the four figures, it can be seen that the characteristic 2D images of different working conditions are all significantly different.As seen from the above graph, the accuracy rate rises rapidly from a low point at the beginning, then reaches its first peak at about 10 iterations, gradually stabilizing and remaining at a high level.After about the first 10 iterations, there is a significant drop in accuracy, but it rebounds and stabilizes.The fluctuations in accuracy indicate that the model undergoes some adjustments during the early training phase.However, as learning progresses, the model stabilizes and reaches equilibrium at high accuracy.The loss value drops sharply in the early training period, showing that the model learns quickly in the first few iterations.Then, after about 10 iterations, the loss values level off and remain low, indicating that the model has a relatively small error after this point and that the training process is more stable.The remaining nine samples from the four operating conditions are put into the trained model as a test set for validation, and the results are shown in Figure 15.In comparing model performance, the ICOA-PCNN-MSA-SVM model proposed in this paper performs consistently with the model in Simulation 1.The identification results of state classification are displayed in Figure 15. 1, 2, 3, and 4 are labeled in the horizontal co-ordinates of Figure 15, each representing one category of working conditions: NOR, FRI, IMB, and MSI.The accuracy rate of the ICOA-PCNN-MSA-SVM model under these four types of working conditions reaches the standard of 100%.In comparison, the accuracy of the compared models is 94.44% and 88.89% for these four conditions, respectively.This experimental result highlights the advantages of the two-branch design, which has a broader application potential and demonstrates higher performance.Especially when processing and analyzing complex data, this model design can capture the complexity and diversity of the data more effectively, thus enhancing the generalization of the model and data processing capability.

Conclusions
This paper proposes a hydroelectric unit fault diagnosis method based on the Gram summation field and ICOA-PCNN-MSA-SVM.Using the real machine test bed, the sound pattern data of runner wear and rotor fault platform data are obtained by dumping sediment for verification.The one-dimensional data are firstly converted into two-dimensional images using a Gram summation field.Then, the images are imported into a twobranch CNN network and, after merging, the feature images are classified using MSA and SVM.The experimental results show that the accuracy of the model faults designed in this paper is 100%.Through the above methods, the following conclusions are obtained: The method proposed in this paper performs well regarding diagnostic efficiency and robustness.It can serve as a valuable supplement to the hydropower unit's fault detection techniques.This study provides critical technical support for the fault diagnosis of hydropower units and demonstrates its high value in engineering applications.

Figure 1 .
Figure 1.Comparison of random sampling and optimal sampling method.

Figure 4 .
Figure 4. Operational process of the hydro turbine fault test bench.

Figure 12 .Figure 13 .
Figure 12.GASF images of original waveform in healthy, wear, imbalance, and misalignment conditions.(a) GASF image of NOR.(b) GASF image of FRI.(c) GSAF image of IMB.(d) GASF image of MSI The 180 sets of samples are divided into test set and training set according to 2:8, where the test set samples are 9 sets for each working condition and the training set samples are 36 sets for each working condition.Separately, the GASF images are fed into each branch for CNN feature extraction, and the extracted feature maps are shown in Figure 13.

( 1 )
Converting one-dimensional time series signals into two-dimensional images helps extract richer and more distinguishable features.(2) ICOA can optimize the learning rate, convolution kernel size, and other parameters in the model, which makes the model more reasonable and effectively improves the fault recognition accuracy.(3) A double-branching design can make the CNN learn different weight values.The two branching high-dimensional features complement each other, which significantly enhances the deep spatial features.Replacing the SVM with the Softmax layer in the CNN and introducing the MSA to focus on feature reinforcement makes the model more robust to outliers and improves the accuracy of fault recognition.