4.1. The GAN-LSTM Fault Diagnosis Method
To test the validity of the generated fault data as well as test the fault diagnosis method under the data imbalance status and determine the relationship between its classification ability and the data imbalance status, a GAN-LSTM fault diagnosis method was used to analyze the change in diagnosis accuracy.
The LSTM neural network is a deformation of the recurrent neural network (RNN). The internal structure of the RNN is a ring-shaped circuit structure that can retain a certain degree of time information inside the network cycle.
Theoretically, it is at the point of time ti that neurons input their internal information to the neurons at the next time position ti+1 so that the input information and output information of the neurons at the time point ti can hide the impact of all time points before the previous time point, forming a feedback structure similar to a ring.
However, in the actual application scenario of the RNN, when the distance between the time point
ti and
ti+m is too large,
ti is not able to map the input and output characteristics of the point. This can lead to issues in RNNs called gradient disappearance, gradient expansion, or explosion problems, otherwise known as long-term dependencies [
42].
This problem is solved by the LSTM network algorithm proposed by Abadi [
43]. The LSTM network uses gate units. Through the door unit, they can control the transmission rate in historical information dissemination in the RNN, which solves the problem of gradient explosion caused by excessive distance. Now, this method is very popular in the fault detected field [
44,
45,
46,
47]. The mathematical expression of the LSTM model is:
In the formula, t is the time unit, xt is the input of the LSTM network, ht is the output of the hidden layer of the network structure. ct is called the unit state; it is a unique structure in the LSTM network. It is used to preserve information, forget information, or control the flow of information to pass the information to the subsequent neuron cells. The first three functions are the gate structure introduced just now, namely through the forgotten gate ft, input gate it, and output gate ot. They are used to assist ct through these three gate units, realize, delete, or add information, and control the range of output limited between 0~1 via the sigmoid layer. When the output is 0, this means that the information is abandoned. When the output is 1, this means that the information is recorded. σ is the incentive function, W is the weight value of the network, and B is the offset of the network. These two parameters are optimized during the network training process. The symbols “.” and “*” here represent matrix multiplication and point multiplication between same-dimensional matrices (corresponding point element to the product).
It can be seen from the formula that in the LSTM network, the information at a certain moment comes from the information contained in hidden layer output
ht−1 from the last moment and input
xt at this moment. Additionally, a certain unit status
ct, is controlled by the last moment unit status
ct−1 and related state
.
ct−1 is related to the forgotten gate
ft, and input gate
it. The output of the hidden layer
ht is obtained by the current status
ct and the output gate
ot. The internal unit structure of the LSTM network is shown in
Figure 9.
The LSTM classification model used in this article was based on TensorFlow deep learning architecture. During the training process, the adaptive momentum measurement method was used to optimize network parameters. Network training and testing were accelerated by the GPU. The specific network parameter settings are shown in
Table 5. The training sample of the LSTM network was chosen as a different data imbalance.
During the LSTM training for fault classification, five hundred normal samples and six fault samples were selected as the training dataset to simulate the imbalance between the samples under the normal status and fault status. The signals to be classified in the test set contained 200 samples for each type of signal. The specific parameters of the samples are shown in
Table 6.
In this situation, the accuracy of the LSTM was 16%, unable to distinguish between faults and the normal state, and it diagnosed all fault classes as the normal class. We can say that the data imbalance led to a failure of the LSTM in fault identification.
We examined whether the accuracy of fault diagnosis was affected by the data imbalance. Therefore, after the sample sets were simulated according to the settings in
Table 6, the number of available training sets was increased by gradually increasing the number of generated fault samples in the training sets, and then the increased fault dataset was used for fault diagnosis.
The data generated each time improved the balance between the normal data and fault data, defined as the balance ratio (
BR) of the dataset.
BR can be expressed as:
In Equation (11), SMaj and SMin represent the majority and minority class samples in the training set, respectively, which included the data from the normal status dataset and those related to the six types of faults of the aircraft hydraulic system from the fault status dataset.
BR was gradually improved by increasing the generated data samples to SMin. Thus, BR indicated the change in performance due to data generation. Moreover, as BR became larger, the data balance increased.
Subsequently, the relationship between the classification capabilities of the LSTM algorithm and the data imbalance was tested again based on the data in
Table 7 using the different
BR rate data sets to train the LSTM network. The confusion matrixes are shown in
Figure 10. The BR rates were 0.01, 0.04, 0.2, and 0.8.
According to
Figure 10a, when
BR = 0.01, all fault samples were discriminated as normal, and the accuracy was 14.2%, that is, the LSTM algorithm could not discriminate any fault sample and regarded all test samples, including the fault samples, as normal samples. In
Figure 10b,
BR = 0.04, and the accuracy rate was 65%. The diagnosis accuracy rate was significantly improved, indicating that with increase in the minority sets, the
BR was improved, and consequently, the accuracy was improved significantly.
However, the figure shows that many fault data were still identified as normal data. Because the 1–2, 3–4, and 5–6 faults were highly similar, the proportion of wrong discrimination was higher than that for other faults. In
Figure 10c,
BR = 0.2, and the accuracy rate was 0.89. Thus, the accuracy rate was significantly improved. The fault data were no longer recognized as normal data. Most of the recognition errors were related to the degree of different fault. When
BR = 0.8, the data in the training set reached a balanced status and were fully recognized. It is worth it to say that when
BR = 0.8, the LSTM method could completely recognize all faults, and all samples were correctly discriminated, as shown in
Figure 10d.
When BR = 0.01, the extremely imbalanced training set could not provide sufficient characteristic information of the fault classes. Hence, the LSTM diagnosis model could not discriminate the fault status from the normal status and identified all fault data as normal data. This indicates that when the normal and fault data are severely imbalanced, the LSTM algorithm cannot perform correct fault diagnosis. As the generated data were continuously added to the training set, the BR value continuously increased, and the data imbalance continuously decreased.
The LSTM diagnosis model could obtain extensive fault-related information and fault characteristics. Therefore, the diagnosis accuracy rate increased with the BR, which established the validity of the generated data. With increase in the generated fault data, the accuracy rate of the fault diagnosis continuously increased. When BR = 0.8, the datasets with seven different classifiers were completely discriminated. This shows that the GAN algorithm can effectively improve the accuracy rate of the LSTM fault diagnosis algorithm.
Thus, the GAN-LSTM method can solve the data imbalance problem in the aircraft hydraulic system. This result is of great significance in the actual fault diagnosis of aircraft hydraulic systems, because wide data imbalances exist in actual engineering scenarios.
4.3. The Quality Comparison of Different GAN Methods
In order to evaluate the condition of generating samples, in this chapter, we used three different sample generation methods to generate new samples. These three methods were the GAN network, Conditional-GAN network, and ACWGAN-gp method. For unity, the internal structure of the three GAN models was the same as the structure ACWGAN-gp in
Section 2.3, and the parameters of the three networks were the same too. The fault classification method was LSTM. We used the three different generated samples to train the LSTM classification method. The comparison of these three generated samples is shown in
Figure 12.
From
Figure 12a,b, it can be seen that when the picture of different models generates data and the GAN network enhances the data, the characteristics of the data generated are often simple and rough, and the noise is large. In the face of a large amount of complex data, due to insufficient simulation capabilities, the expanded features and the initial information gap are very large. In addition, the specific details of the data generated by the GAN model lack smoothness and have a large randomness. The overall features are relatively simple for producing samples, so there is an overfitting phenomenon.
From
Figure 12a,c, although the samples generated by Conditional-GAN can have the characteristics of the original data in terms of details, the generating data are relatively sharp and not smooth. Compared with actual data, the production of the data also lacks characteristics that can be obviously identified.
From
Figure 12a,d, the data generated by the algorithm of this article can match the category of the original data as diversified data that conform to the data distribution, and their characteristics are still prominent, the details are random, and the data types are diverse. Even when encountering complex correlation characteristics, the algorithm’s good simulation capabilities can produce new data types with more complex characteristics that do not show overfitting phenomena.
To ensure that the training of these modules achieved the best results, all the trainings models conducted 4000 Epoch for them and used RMSE as the model evaluation standard. The RMSE can be written as the function (10):
In this function, yi represents the real data, represents generated data, and m represents the sequence length of samples.
The average value of the RMSE was tested multiple times for different models as the final evaluation results.
Table 7 lists the research results of the enhancement of the network model RMSE and other GAN enhanced models. This article enhanced the RMSE column diagram of the network model and other GAN enhanced models. It can be clearly seen that the algorithm of this article is better at reducing the RMSE of generated data and real data compared to other GAN-based algorithms.
It can be seen from
Table 8 that compared with the other three models, the models proposed in this article are the highest quality, the best effect, and the lowest RMSE value. Compared with the best results of data generated using other models, the algorithm of this article reduced RMSE by 25.06% on the normal data and RMSE was reduced by 39.44% on the fault data set.
In order to verify whether the model-generated data were effective for fault diagnosis, in this section, LSTM was selected for the fault classification model. The three data generation methods GAN, Conditional-GAN, and the method in this paper were used as generators of samples.
Only changing the data set used in the training LSTM network, we performed simulations by changing the proportion of normal data and fault data. There were three different training methods to train the LSTM networks by changing the data sets under different ratios: the proportion of normal data to fault data being 2:1, the proportion of normal data to fault data being 4: 1, and the proportion being 10:1.
Then, we expanded the faulty dataset through three different data generation models until the faulty dataset was balanced with the normal dataset. Comparing the classification accuracy rates of the three methods, the relationship between the number of training times and accuracy is shown in
Figure 13.
From
Figure 12, the accuracy curve of the first 500 iterations of the model of normal samples and fault samples, it can be seen that the accuracy rate of data sets without data expansion was low after training.
Comparing the performance of the network model of original data training to the data generated using the GAN model for LSTM network training, the performance of the network model decreased, and the training process was unstable. The performance of the network model with CGAN generated data for training improved to a certain extent. However, as the proportion of fault samples decreased, model performance decreased more.The algorithm in this article is the best at training, as the training process is stable, and it has a small impact on the proportion of the data set; therefore, the effect is better.
4.4. Anti-Noise Performance Analysis of the GAN-LSTM
In the actual operating environment of the aircraft hydraulic system, there is relatively serious noise pollution. Therefore, during the research of the fault diagnosis method, whether this method had a certain anti-interference anti-noise ability was also an important indicator to measure the performance of the ACWGAN-GP method. If the generated data have anti-interference ability, this method is more suitable for the application to real scenes. The following
Figure 14 is the pump outlet pressure signal collected from the normal state collected from AMESIM. The length of the interception from the signal was 20 s, and the noise increase signal comparison chart is shown after adding 90 dB and 50 dB noise to the signal.
In order to verify the anti-noise performance of the ACWGAN-gp fault diagnosis method, multiple groups of simulation experiments were performed in the real working environment of the aircraft hydraulic system. In the simulation experiment, all datasets were collected from the AMESIM aircraft hydraulic system, and all signals added different signal–noise ratios (SNR) of white noise to imitate the environmental noise interference in the aircraft hydraulic system in the actual work. We select different SNRs in addition to the additional noise. In the environment of different SNRs, the ACWFGAN-GP was affected by the noise. Among them, the SNRs of white noise in the simulation were 90 dB, 80 dB, 70 dB, 60 dB, 50 dB, 40 dB, and 20 dB.
In this simulation, the training sample was created using the expansion training set of unbalanced training data sets. The selected expansion methods were GAN expansion and ACWGAN-GP expansion. These two methods were used to generate new fault datasets, and then the generated datasets were used to expand the imbalanced fault dataset to a balanced dataset. The comparison was a real balanced dataset using all real samples. Then, these three balanced datasets were used to train an LSTM network. The accuracy comparison results in different noise environments are shown in
Figure 15.
The accuracy of GAN was lower than using the real sample or the ACWGAN-gp. When the noise was lower, SNR was from 70 dB to 100 dB. The accuracy of GAN, ACWGAN-gp, and the real balance did not change too much. They all resisted the noise signals well, and the accuracy did not decline significantly due to the addition of noise. When the noise reached the noise environment of 60–40 dB, ACWGAN-gp generated data training networks still had better anti-noise capabilities. At this stage, there was no significant decline in accuracy. Instead, the real sample declined significantly at this stage of the network training. Therefore, in the case of a high-noise environment, ACWGAN-gp generates data networks that have better anti-noise resistance. When the environmental noise reaches 40, GAN no longer has noise resistance. The accuracy declined sharply.
From
Figure 15, the ACWGAN-gp generated signal is more suitable for an environment with higher noise, because the concentrated ACWGAN-gp training sample is itself generated from random noise, which contains a certain noise component. It can be seen that when the noise reaches a high level, such as the SNR being less than 40 dB, the classification results are unreliable. This shows that this method is suitable for the actual environment of the fault diagnosis of an aircraft hydraulic system, because in this environment, there is often high noise pollution.