Algorithm of axial compressor stall warning based on BP neural network and fuzzy logic

Stall warning of axial compressor is very challenging and the existing warning margin is not enough. A algorithm based on BP neural network fusion fuzzy logic is proposed. Firstly, BP neural network is used for training recognition, next the identification results are fused with fuzzy logic reasoning to form the result judgment of time sequence, finally the stall early warning of axial compressor is realized. The simulation results of the experimental data show that the stall data at all speeds are at least 0.1s in advance of the early warning. Compared with other methods, this method has a better surge early warning margin performance and engineering practicability.


Introduction
The rotating stall of the compressor can easily lead to surging, resulting in broken blades and damage to the internal structure of the compressor, [1] which in turn affects the safety and performance of the compressor, and even reduces the economic benefits of the compressor. Therefore, how to accurately capture the compressor instability signal and provide an effective early warning plan accordingly which has become the focus of attention of domestic and foreign researchers. [2] Many types of researches have been done on the rotating stall of the axial compressor. For example, Day [3] and McDougall [4] have found two different instability precursors through experiments, namely the tip type and the modal wave type. Thus , this provided two different stall warning methods. Tryfonidis [5] used the traveling wave energy method, Bright [6] used the correlation integration method, Hoss [7] used the wavelet transform method, Tahara [8] used the autocorrelation algorithm, and Dremin [9] used the multi-resolution wavelet transform method. The stall characteristics of the compressor are discussed, and the stall detection method is explored. However, these stall detection methods rely on the issuance of the stall signal, and the early warning margin is not enough. Domestic scholars, Li Yinghong [10] used the time-frequency characteristics variance method, Li Changzheng [11] used the short-term capability method, Liu Junjie [12] used the empty mode wave theory method, Lei Jie [13] used the pulsating pressure change rate method, Su Sanmai [12] used the amplitude and frequency method and other researches pointed out that the compressor disturbance stall precursor can be detected, but these methods are susceptible to external factors and depends on the working speed of the compressor. It is necessary to judge whether the stall is stalled according to different thresholds. Li jichao [14] used the cross-correlation analysis method to effectively warn the compressor stall, but it is susceptible to external noise. The compressor under real intake is also more complicated, and there are certain problems in practicability. Liu Zhengxian [15] used the spatial Fourier transform method to availably detect the spike-type stall precursor disturbance. Li [16] further studied the spike-type stall precursor and effectually controlled the stall actively, but the various speed models are extremely complex. Researches can detect stall signals in experiments, but these methods have not been widely used in practical engineering. Therefore, reliable and effective stall warning methods are particularly important in compressor stall warning.
Artificial neural network emerged at the end of the 19th century. After more than half a century of research on it, scholars have proposed hundreds of different neural networks, including BP Neural Network, Convolutional Neural Network, Radial basis Neural Network and Cyclic Neural Network [17] . At present, only Methling [18] discussed the possibility of using Artificial Neural Network method to identify the initial surge stall detection of compressor, but it is still difficult to meet the early warning requirements of compressor stall. Lin Peng [19] used neural network model to detect the precursor characteristics of compressor distortion stall. The biggest shortcoming of this method was that when it was used for modal type judgment. Time-domain modal matching method was needed to establish a modal library, which was not time-efficient.
The neural network has the advantage of strong characteristics learning ability, and it is seldom used in the research of compressor stall early warning. Therefore, this paper takes the experimental data of dynamic pressure stall at the output of a multi-stage high-speed compressor as an example, uses BP neural network to analyze and learn the time-frequency characteristics of compressor pressure data, then designs a BP neural network based on time-frequency characteristics learning and recognition. After that to fusion of fuzzy logic for in-depth processing of the recognition results, reducing the misjudgment of timing early warning and realizing early warning. By verifying the experimental data of different speed modes, the feasibility and practicability of the algorithm are confirmed, which is beneficial to improve the warning margin and engineering practical value.

BP neural network
The BP neural network was first proposed by two scholars Romelhart and Mc2clelland. The principle is the error backpropagation algorithm. Because it is a multi-layer feedforward neural network with strong nonlinear mapping capabilities, it has been obtained in various research fields a wide range of applications. This research constructed the BP neural network topology as shown in Figure 1. The average value, variance value, average frequency value, and center of gravity frequency value of the compressor pressure signal are x1, x2, x3, and x4. The output values of the BP neural network are the normal signal value, the predicted signal value, and the stall signal value: y1, y2, and y3. The expected output values of the BP neural network are the normal signal value, the warning signal value, and the stall signal value: y1', y2', and y3' respectively.

Fuzzy logic control
Since the output result of the BP neural network is a single quantity, misjudgment of stall warning may occur in the time series. Therefore, the output result of the BP neural network needs to be accumulated in time series, and then further processed by fuzzy logic control to reduce the misjudgment of stall warning, to improve the correct rate of compressor stall warning.
The cumulative number of normal signals, early warning signals, and stall signals output by the BP neural network is used as a control variable, and ten cumulative times are selected as a sequence for one judgment. The specific definition is shown in Table 1: The cumulative times of normal signal sequence is less than 4 times NB The cumulative number of the normal signal sequence is greater than 4 times WS The cumulative number of warning signal sequence is less than 4 times WB The cumulative number of warning signal sequence is greater than 4 times SS The cumulative number of stall signal sequence is less than 4 times SB The cumulative number of stall signal sequence is greater than 4 times Due to the complexity of the cumulative number of factors, there is no specific threshold to determine whether the factor is reasonable for compressor stall warning. So each factor is fuzzily divided into different levels. For each input factor, a fuzzy membership function is used to describe each factor, and all factors are uniformly normalized after being calculated. For each factor, input corresponds to an IF/THEN rule, the input of input1 is {NS, NB, WS, WB, SS, SB }, the input of input2 is {NS, NB, WS, WB, SS, SB }, the input of output1 The output is {Normal-signal, Early-warning-signal, Stall-signal}. The specific fuzzy rules are shown in Table 2:

BP neural network fusion fuzzy logic algorithm
BP neural network has good self-learning and self-adaptive capabilities, and it can solve many problems that are difficult or impossible to solve by conventional information processing methods. The pressure signal amplitude of the compressor at different speeds is different, and the results of the BP neural network processing are also different, hence the recognition accuracy is not enough. Fuzzy logic can better solve the problems of strong coupling, time-varying, lagging, etc. It uses the mathematical knowledge of fuzzy logic to imitate human thinking to judge the fuzzy phenomenon of experimental data and to give accurate control. In order to improve the recognition rate of the BP neural network for compressor pressure signals. Only by making use of the self-learning and recognition ability of BP neural network and combining with the idea of fuzzy logic to process the output results of the neural network in depth, which can the two advantages complement each other be realized The model of the fast warning method of BP neural network fused with fuzzy logic is shown in Figure 2:  The specific algorithm of BP neural network fusion fuzzy logic is shown in Table 3: Table 3. BP neural network fusion fuzzy logic algorithm.
Algorithm: BP neural network fusion fuzzy logic algorithm Input: Compressor pressure signal Output: normal signal, early warning signal, the stall signal Step1: 1: Initialize the algorithm parameters, set the Butterworth low-pass filter cut-off w c , the default is 200Hz, the sampling frequency is fs, the default is 6000Hz, and the number of reference points N=1024.
Step2: Low-pass filtering is performed on the first stage inlet pressure signal of the compressor sampled and measured at time t, and the filtered pressure signal x(t), t=1,2,...,+∞ is obtained.
Step3: Perform characteristics extraction on the time series discrete signal x(t) and slide the signal segmentally. The data length of the sliding time window is M and the sliding width is ∆M. The average value, variance, and center of gravity frequency are calculated for the data in the data window once sliding. , Average frequency, that is, the average sequence X mean (n), the variance sequence X var (n), the average frequency sequence X MF (n), the center of gravity frequency sequence X FC (n), n=1,2,...,+∞.
Step4: A piece of data in the time-series discrete signal x(t) is selected as the training data. The training data includes a normal signal, an early warning signal, and a stall signal, and different labels are attached to different signals.
Step5: Build a BP neural network, input the corresponding X mean (n), X var (n), X MF (n), X FC (n) into the neural network, perform supervised learning, and save the BP neural network net. Step8: If the output is a normal signal, don't care.
Step9: If the output is an early warning signal, an early warning is issued.
Step10: If the output is a stall signal, a stall alarm will be issued.
The flow chart of the stall warning method based on BP neural network and fuzzy logic is shown in Figure 3:

Characteristics analysis
Taking a certain model of the high-speed multi-stage compressor as the experimental object, the sampling rate of the experimental data is 6kHz, and the experiment selected multi-stage axial flow compressors at pressure signal data in the state. Since the pressure signals at various speeds are similar, the pressure signal at speed is selected for display, as shown in Figure4. Look at the partial enlargement in the picture. It is found that there is large fluctuations in the early warning phase and the stall phase, and the frequency slows down when the fluctuations occur, but there is no such low-frequency fluctuation in the normal pressure signal. To study the frequency characteristics of the pressure signal in the early warning phase and the stall phase, the pressure signal was analyzed in the time-frequency domain, as shown in Figure 5.  Fig. 6. Characteristics curve.

Characteristics extraction
(1)The signal pressure data extracts the average and variance characteristics. For the time series discrete signal x(t), at the sampling point t, take the first N points at that time and calculate the average value and variance to form the specific formulas of the average value sequence X mean (n) and the variance sequence X var (n) as follows: In formulas (1) and (2), x(t n ) represents the signal point of the window, N m is the window size, X mean is the average value of the signal, and X var is the variance value of the signal.
(2) FFT transformation processing of signal pressure data At the time of sampling t n , take the first N m points in the window and perform FFT transformation.
The x( t n ) in equation (3) represents the window signal point, fs is the sampling frequency, the absolute value of x(f n ) is the amplitude of the corresponding frequency point f n N m /fs, and the frequency interval is fs/N m .
(3)Signal pressure data to find the average frequency and center of gravity frequency characteristics For the time-series discrete signal x(t), at the sampling point t, take the first N points at that time to obtain the average frequency and the center-of-gravity frequency to form the average frequency sequence X MF (n) and the center-of-gravity frequency sequence X FC (n), The specific formula is as follows: In formulas (4) and (5), f n is the frequency corresponding to x(f n ), X FC is the barycentric frequency value of the signal, and X MF is the average frequency value of the signal. All the points obtained by the FFT transformation are not necessarily valid. To improve the information amount of the characteristics, the first N z points obtained by the FFT transformation of the window signal segment are taken as valid data, and other points are discarded.
Taking speed pressure signal data as an example to illustrate the time-domain characteristics extraction, as shown in Figure 6. The figure contains normal signals, early warning signals, stall signals, and the characteristics values extracted from these signals. Taking into account the length of the window, to match the characteristics value of the signal, the signal is removed from the window to start the calculation.4.2.BP neural network model.

Different characteristics values
The BP network parameters are set as follows, using the elastic gradient descent method, the learning rate is 0.1, the maximum number of training times is 10,000, and the error target is 0.0000004. variance, mean value, root mean square, minimum value, maximum value, peak value, kurtosis, mean value of absolute value, standard deviation, waveform factor, peak value factor, kurtosis factor, impulse factor, margin factor, En1,En2,En3,En4,En5,En6,En7,En8 84.06 variance, mean value, root mean square, minimum value, maximum value, peak value, kurtosis, mean value of absolute value, standard deviation, waveform factor, peak value factor, kurtosis factor, impulse factor, margin factor, Average frequency, center of gravity frequency, frequency root mean square, frequency standard deviation 82.47 variance, mean value, root mean square, kurtosis, mean frequency, center of gravity frequency, root mean square of frequency, frequency standard deviation (2) Frequency-domain characteristics values Then, using the average frequency, the center of gravity frequency, the root mean square of the frequency, and the frequency standard deviation as the input of the network model , the test accuracy is 52.26%.
(3) Time-frequency characteristics values Then, the signal was decomposed by DB3 wavelet packet in three layers to obtain 8 frequency bands. The energy of corresponding frequency bands was calculated to obtain the  Table 4. That using 2 time-domain characteristics and 2 frequency-domain characteristics (variance, average, center of gravity frequency, average frequency ) are best.

Number of nodes and hidden layers
In this study, characteristics values such as variance, average, center of gravity frequency, and average frequency are selected as the input of the network model, and the normal signal, early warning signal, and stall signal are the output of the network model. Three different types of experimental strategies are used to select the neural network structure that best fits the model. The following analysis and discussion are carried out.
(1).Number of different nodes However, from table 5 it can see that suing 8nodes is better ,it also tried some other number of hidden nodes, like 2000,1000,500,40,1and so on, but 8 is the best when using three hidden layers..
(2) Different hidden layers In the next stage, the experiment used same nodes, but different number of layers. In Table 5, using three layers is best, however, the result of using six layers is worse than the others.
(3) The number of different nodes and the number of hidden layers On the other hand, another experiment using 8 nodes with 3 hidden layers, 8 nodes with 6 hidden layers, 40 nodes with 3 layers, and 40 nodes with 6 layers. In this experiment, it can be found that the experimental result of 8 nodes and 3 hidden layers is the best.
Taking into account the coupling of the experiment, the data in Table 5 are the average of 20 sets of data, and the best BP neural network structure for this experiment is obtained through the experiment is 4 input layers, 8 nodes and 3 hidden layers. 3 output layers.

Verification results
That selecting rotation speed pressure signal data for verification. Due to the limited length of the paper, only selecting rotation speed pressure signal data as an example for display, see Figure 7(a),(b). The blue curve in the figure is the prediction result of the neural network, the black curve is the first stage inlet pressure signal of the compressor, the orange curve is the compressor output pressure signal, the red curve is the average value of the first stage inlet pressure signal, and the cyan curve is the variance of the first-level inlet pressure signal. The green curve is the average frequency of the first-level inlet pressure signal, and the purple is the center-of-gravity frequency of the first-level inlet pressure signal. The speed is an early warning by 0.1s speed. And the speed of is affected by the small convex hull signal, so the speed of is the early warning by 0.39s.  Table 5 that the BP neural network fusion fuzzy logic method is earlier than the BP neural network method at different speeds, and the early warning time is more accurate. The stall warning time at each speed is shown in Table 6, and the stall warning calculation is compared with other methods. From the data in the table, it can be seen that the BP neural network fusion fuzzy logic method is earlier than the frequency band energy method, short-term energy method, variance method, and pulsation change rate method at the early warning time of each speed mode, and has better stall warning margin. It proves that the proposed method is very effective. The time-frequency characteristics of compressor pressure signals can be analyzed through BP neural network, which can identify different stall modes and carry out stall warnings. Short-term energy method [11] 7.833s 7.650s 7.733s 8.700s 7.183s 8.608s Variance method [10] 7.858s 7.675s 7.750s 8.709s 7.192s 8.617s Pulsation rate of change method [13] 7.842s 7.666s 7.750s 8.708s 7.183s 8.617s

Conclusion
The characteristics of the average value, variance, average frequency, center of gravity frequency, and other characteristics of the pressure signal of the axial compressor are studied, and a stall warning algorithm based on BP neural network and fuzzy logic is proposed. Experimental results show: using this method which the stall disturbance can be detected at least 0.1 seconds in advance and effective early warning. And this stall early warning method is simple, high recognition rate, low alarm hysteresis, and reliable results; this algorithm is proved to be a useful method for early warning of the stall at different speeds of the compressor. This method is more effective early warning in the stall warning of modal pressure signal. The model trained by this method is suitable for other different speed stall warnings, which greatly reduces the training time.