A Data Augmentation Method for Civil Aircraft Hydraulic Systems Based on WGAN-GP and Attention Mechanism
Through the data enhancement method of WGAN-GP and attention mechanism, a gradient punishment Wastherstein generative adversarial network and self-attention mechanism are constructed, combined with instance standardization layer and independent forest filtering, high-quality fault samples are generated, which solves the problem of scarcity of hydraulic system fault samples and improves the accuracy and efficiency of fault diagnosis.
Patent Information
- Application Number
- CN202411498636.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Existing hydraulic system fault diagnosis methods are difficult to achieve rapid positioning when fault samples are scarce. Common deep learning models rely on a large number of labeled samples, resulting in low diagnostic accuracy in small samples and inability to effectively identify faults.
Using data augmentation method based on WGAN-GP and attention mechanism, a gradient punishment Wastherstan generative adversarial network and self-attention mechanism are constructed, combined with instance standardization layer and independent forest filtering method, high-quality fault samples are generated for data augmentation of civilian hydraulic systems.
It improves the generation quality and diagnostic accuracy of fault samples, adapts to neural network learning in small samples, enhances fault recognition capabilities, and improves the intelligent diagnosis efficiency of civilian hydraulic systems.
Smart Images

Figure CN119397279B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent fault diagnosis of aircraft systems, and particularly to a data augmentation method for civil aircraft hydraulic systems based on WGAN-GP and attention mechanism. Background Technique
[0002] The hydraulic system is one of the important components of the aircraft electromechanical system, including various components such as hydraulic pumps, hydraulic valves, and hydraulic cylinders. Among them, key components such as hydraulic pumps and hydraulic cylinders are prone to failures, which affect aircraft control and are likely to cause shutdown events or even casualties. As a complex non-linear system, the maintenance and troubleshooting diagnosis method based on threshold monitoring can only roughly estimate faults and cannot achieve rapid fault location. Therefore, it is urgent to introduce intelligent fault diagnosis algorithms to improve the diagnosis accuracy and efficiency.
[0003] With the rapid development of technology, the amount of aircraft on-board sensing data available has shown an explosive growth. The hydraulic system has complex cross-linking relationships, a large number of signal types and data volumes, and it is necessary to clarify aircraft fault characterization information from a large amount of high-dimensional and heterogeneous data. The data-driven deep learning method can perform deep information mining and feature dimensionality reduction extraction on high-dimensional data, and can be used for the research of civil aircraft fault feature characterization methods. Due to the characteristics of high safety, high reliability, and multi-task of aircraft, a large amount of normal operating state data can be obtained, but it is difficult to collect fault data, which leads to insufficient fault samples and makes it impossible for intelligent methods to correctly identify faults. Common deep learning models belong to supervised learning and rely on a large number of labeled samples for training to achieve classification diagnosis of faults, which has limitations for data with fewer samples. Therefore, it is necessary to introduce a data augmentation method while avoiding overfitting to solve the problem that the supervised model cannot perform intelligent diagnosis on small-sample faults. Summary of the Invention
[0004] Object of the Invention: The present invention provides a data augmentation method for civil aircraft hydraulic systems based on WGAN-GP and attention mechanism, which improves the existing data augmentation method from the perspective of data generation and can be used for data augmentation in the case of scarce fault samples of civil aircraft hydraulic systems.
[0005] Technical Solution: A data augmentation method for civil aircraft hydraulic systems based on WGAN-GP and attention mechanism described in the present invention includes the following steps:
[0006] Step 1, signal acquisition: By arranging corresponding sensors at key measuring points, one or more groups of sensing signals containing information that can reflect the fault state are obtained, and the signals are classified according to different fault modes;
[0007] Step 2, data preprocessing: The data is normalized so that features can be better learned;
[0008] Step 3: Construct a Wasserstein generative adversarial network based on a gradient penalty mechanism, where the generator consists of four layers of transposed convolution, three layers of instance normalization, and one self-attention layer, and the discriminator includes four layers of convolution, four layers of instance normalization, and one self-attention mechanism layer. The loss function uses the Wasserstein loss;
[0009] Step 4: Iteratively update the parameters. Input the processed data into the model in Step 3, randomly select a fixed number of data from the training set to participate in the training process, iteratively optimize the model parameters, and stop training and save the model when the set number of iteration steps is met or the Nash equilibrium is satisfied;
[0010] Step 5: Input random noise into the trained generator to obtain generated samples. Use the filtering method based on the isolation forest to remove the generated samples that are too different from the real samples, delete the low-quality samples mixed in the generated samples, and improve the quality of the generated samples;
[0011] Step 6: Implement fault diagnosis. Construct a training data set according to the generated data mixed with the real data, use the real data to construct a test set, use a common convolutional neural network for training to implement fault diagnosis, and test with the real data; finally, output the diagnosis result to complete the fault diagnosis process.
[0012] Further, in Step 2, the data normalization means that the original samples are scaled to the interval (-1, 1) in the way of min-max standardization (MinMaxScaler).
[0013] Further, in Step 3, constructing a Wasserstein generative adversarial network based on a gradient penalty mechanism, where the generator consists of four layers of transposed convolution, three layers of instance normalization, and one self-attention layer, and the discriminator includes four layers of convolution, four layers of instance normalization, and one self-attention mechanism layer. The specific steps of using the Wasserstein loss as the loss function are as follows:
[0014] The input of the SA layer is represented as x ∈ R C×N , where N and C represent the length of the sequence and the number of channels of the sample respectively. Subsequently, x is transformed into three different feature spaces, namely f, g, and h, which represent the query, key, and value respectively. The calculation formulas are shown as follows:
[0015] f(x) = xW f
[0016] g(x) = xW g
[0017] h(x) = xW h
[0018] where and are all continuously updated weight matrices, representing the number of channels output by the self-attention mechanism. Here, the number of channels of the sample is set to be equal to the number of channels output by the attention mechanism;
[0019] Step 32: Calculate the attention score s i,j , where the attention score is obtained by the product of f and g, and then the softmax function is used to regularize the attention score, denoted as α i,j , and the attention score and the regularized score are expressed as follows:
[0020] s i,j = f T g
[0021]
[0022] where f represents the query transformed from x, g represents the key transformed from x, T represents the transpose calculation, and the subscripts i and j represent the attention score of the model on the j-th point when synthesizing the i-th region;
[0023] Step 33: Use the obtained α i,j and h to calculate the output vector o=(o1, o2, …, o j , …, o N ) ∈ R C×N of each input vector x corresponding to the SA layer, which can be expressed as follows:
[0024] v(x i ) = W v x i
[0025]
[0026] In the formula, the subscripts i and j represent the attention score of the model on the j-th point when synthesizing the i-th region, and W v represents the weight matrix updated during the training process;
[0027] Step 34: To enable the model to learn gradually from simple to complex, further multiply the output of the self-attention layer by a constant γ and add the input, which is expressed as follows:
[0028] y i = γo i + x i
[0029] where γ is a constant, which is learnable and has an initial value of 0;
[0030] Step 35: Add an Instance Normalization (IN) layer after each layer of convolution. Most of the normalization layers used in previous GANs are Batch Normalization (BN), which is not applicable to the enhancement of faulty samples with small samples. This is because when the number of learnable samples is very scarce, the batchsize of each model training is too small, and the BN layer cannot estimate the mean and variance of the entire dataset. First, calculate the mean μ and variance σ of the data in the feature dimension of each sample as follows:
[0031]
[0032] In the formula, t represents the serial number of the feature, i represents the signal of the sample channel, N represents the feature dimension, and M represents the number of features in a batch.
[0033] Then, normalize the sample, and calculate as follows:
[0034]
[0035] Finally, add two learnable variables, scaling γ and translation β, to obtain the final output;
[0036] y i = γo i + x i
[0037] When defining the loss function of the improved GAN, the Wasserstein distance is selected to define the distance between distributions, and its calculation formula is:
[0038]
[0039] where |f| L is the Lipschitz constraint of the function f(x). The gradient penalty strategy is adopted to satisfy the Lipschitz constraint of the Wasserstein distance. P data represents the actual distribution of the data, P g represents the distribution of the generated data, k represents the constant of the normalization scale, represents finding the function that maximizes the expected difference among the functions that satisfy the K-Lipschitz condition, and E x represents the mathematical expectation;
[0040] The final loss function of the model is defined as follows:
[0041]
[0042] Among them, D(x) represents the discriminator, and λ represents the gradient penalty coefficient. Represents the gradient of the discriminator.
[0043] Furthermore, in step 4, the parameters are iteratively updated. The processed data is input into the model in step 3, and a fixed number of data in the training set are randomly selected to participate in the training process. The model parameters are iteratively optimized. When the set number of iteration steps is satisfied or the Nash equilibrium is reached, the training stops and the model is saved, which specifically includes the following steps:
[0044] Step 41: The constructed generator uses the ReLU activation function, and the constructed discriminator uses the LeakyReLU activation function. The formula of the LeakyReLU activation function is as follows:
[0045] f(x) = max{αx, x}
[0046] When x < 0, the function value is f(x) = αx; when x > 0, the function value is f(x) = x.
[0047] Step 42: During the training process, the generator is trained once, and the discriminator is trained five times. The Adam optimizer is used for training, and the learning rate is set to 0.0001. At the same time, the real sample label is -0.5, and the generated sample label is 0.5.
[0048] Furthermore, in step 5, the random noise is input into the trained generator to obtain the generated samples. The filtering method based on the isolated forest is used to remove the generated samples that are too different from the real samples, and the low-quality samples mixed in the generated samples are deleted to improve the quality of the generated samples, which specifically includes the following steps:
[0049] Step 51: For each data point, calculate its path length on all the trees in the forest. The path length is the number of split nodes passed by the path from the root node to the leaf node. The formula is as follows:
[0050]
[0051] In the formula, t is the number of trees in the forest, is the path length of point x on the i-th tree;
[0052] Step 52: Calculate the anomaly score according to the path length. The shorter the path length, the higher the score, indicating that the point is more likely to be an anomaly point. The anomaly point score formula is as follows:
[0053]
[0054] In the formula, c(n) is an adjustment factor, representing the average path length when the dataset size is n. The formula is as follows:
[0055]
[0056] Step 53: Determine abnormal points. If the abnormal score of a point is close to 1, then this point is very likely to be an abnormal point; if the abnormal score is close to 0.5, it means this point is a normal point.
[0057] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: (1) Changing the original batch normalization in the Wasserstein generative adversarial network with gradient penalty to instance normalization better adapts the neural network to data learning in the case of small fault samples, improving the quality of generated samples; (2) Adding a self-attention mechanism to the Wasserstein generative adversarial network with gradient penalty enables the network to pay more attention to features that have a greater impact on the system, improving the quality of generated samples; (3) Using the isolation forest strategy to filter a part of the generated samples and then mixing real samples into them improves the utilization rate of samples and is conducive to classification. Brief Description of the Drawings
[0058] Figure 1 It is a schematic flowchart of the method of the present invention.
[0059] Figure 2 It is a schematic diagram of the network model structure of the present invention.
[0060] Figure 3 It is a spatial distribution diagram of generated samples and real samples for a certain fault of the present invention.
[0061] Figure 4 It is a confusion matrix diagram of a certain experiment of the present invention. Detailed Embodiments
[0062] As Figure 1 and Figure 2 shown, a civil aircraft hydraulic system data enhancement method based on WGAN-GP and attention mechanism includes the following steps:
[0063] Step 1: Signal acquisition. By arranging corresponding sensors at key measurement points, one or more groups of sensing signals containing information capable of reflecting the fault state are obtained, and the signals are classified according to different fault modes.
[0064] Step 2: Data preprocessing. Normalize the data so that features can be better learned.
[0065] Step 3: Construct a Wasserstein generative adversarial network based on a gradient penalty mechanism, where the generator includes four layers of transposed convolution, three layers of instance normalization layers, and one self-attention layer, and the discriminator includes four layers of convolution, four layers of instance normalization layers, and one self-attention mechanism layer, and the loss function uses the Wasserstein loss.
[0066] Step 4: Parameter iterative update. Input the processed data into the model in Step 3, randomly select a fixed number of data from the training set to participate in the training process, iteratively optimize the model parameters, and stop training and save the model when the set number of iteration steps is met or the Nash equilibrium is satisfied.
[0067] Step 5: Input random noise into the trained generator to obtain generated samples. Use the filtering method based on the isolation forest to remove the generated samples that are too different from the real samples, delete the low-quality samples mixed in the generated samples, and improve the quality of the generated samples.
[0068] Step 6: Implement fault diagnosis. Construct a training data set according to the generated data mixed with the real data, use the real data to construct a test set, use a common convolutional neural network for training to implement fault diagnosis, and test with the real data; finally, output the diagnosis result to complete the fault diagnosis process.
[0069] The data normalization described in Step 2 means that the original samples are scaled to the interval (-1, 1) in the way of maximum-minimum standardization (MinMaxScaler).
[0070] For the self-attention mechanism layer described in Step 3, its specific calculation steps are as follows:
[0071] S1: The input of the SA layer is represented as x ∈ R C×N , where N and C represent the length of the sequence and the number of channels of the sample respectively. Subsequently, x is transformed into three different feature spaces, namely f, g, and h, which represent the query, key, and value respectively. The calculation formula is shown as follows:
[0072] f(x) = xW f
[0073] g(x) = xW g
[0074] h(x) = xW h
[0075] where and are both continuously updated weight matrices, represents the number of channels of the output of the self-attention mechanism. Here, the number of channels of the sample is set to be equal to the number of channels of the output of the attention mechanism.
[0076] S2: Calculate the attention score s i,j , the attention score is obtained by the product of f and g, and then the softmax function is used to regularize the attention score, denoted as α i,j , the attention score and the regularized score can be expressed as follows:
[0077] s i,j= f T g
[0078]
[0079] Among them, f represents the query for the x transformation, g represents the key for the x transformation, T represents the transpose calculation, and the subscripts i and j represent the attention scores of the model for the j-th point when synthesizing the i-th region;
[0080] S3: Use the obtained α i,j and h to calculate the output vector o=(o1, o2,..., o j ,..., o N )∈R C×N which can be expressed as follows:
[0081] v(x i ) = W v x i
[0082]
[0083] In the formula, the subscripts i and j represent the attention scores of the model for the j-th point when synthesizing the i-th region, and W v represents the weight matrix updated during the training process;;
[0084] S4: To enable the model to learn gradually from simple to complex, further multiply the output of the self-attention layer by a constant γ and add the input, which is expressed as follows:
[0085] y i = γo i + x i
[0086] Among them, γ is a constant, which is learnable and has an initial value of 0;
[0087] S5: Add an Instance Normalization (IN) layer after each layer of convolution. Most of the normalization layers used in previous GANs are Batch Normalization (BN), which is not applicable to the enhancement of faulty samples under small samples. This is because when the number of learnable samples is very scarce, the batchsize of each model training is too small, and the BN layer cannot estimate the mean and variance of the entire dataset. First, calculate the mean μ and variance σ of the data in the feature dimension of each sample as follows:
[0088]
[0089]
[0090] Where \(t\) represents the serial number of the feature, \(i\) represents the signal of the sample channel, \(N\) represents the feature dimension, and \(M\) represents the number of features in a batch.
[0091] Then, normalize the sample, which can be calculated as follows:
[0092]
[0093] Finally, add two learnable variables, scaling \(\gamma\) and translation \(\beta\), to obtain the final output;
[0094] \(y\) i \(=\gamma o\) i \(+x\) i
[0095] When defining the loss function of the improved GAN, the Wasserstein distance is selected to define the distance between distributions, and its calculation formula is:
[0096]
[0097] Where \(|f|\) L is the Lipschitz constraint of the function \(f(x)\). The gradient penalty strategy is adopted to satisfy the Lipschitz constraint of the Wasserstein distance, \(P\) data represents the actual data distribution, \(P\) g represents the distribution of the generated data, \(k\) represents the constant of the normalization scale, represents finding the function that maximizes the expected difference among the functions satisfying the K-Lipschitz condition, \(E\) x represents the mathematical expectation.
[0098] The final loss function of the model is defined as follows:
[0099]
[0100] Where \(D(x)\) represents the discriminator, \(\lambda\) represents the gradient penalty coefficient, represents the gradient of the discriminator.
[0101] The training of the parameter update process described in step 4 is as follows:
[0102] S1: The constructed generator uses the ReLU activation function, and the constructed discriminator uses the LeakyReLU activation function. The formula of the LeakyReLU activation function is as follows:
[0103] \(f(x)=\max\{\alpha x,x\}\)
[0104] When \(x \lt 0\), the function value is \(f(x)=\alpha x\), and when \(x \gt 0\), the function value is \(f(x)=x\);
[0105] S2: During the training process, the generator is trained once, and the discriminator is trained five times. The Adam optimizer is used for training, and the learning rate is set to 0.0001. At the same time, the real sample label is -0.5, and the generated sample label is 0.5.
[0106] The filtering strategy of the independent forest described in step 5 is as follows:
[0107] S1: For each data point, calculate its path length on all the trees in the forest. The path length is the number of split nodes passed by the path from the root node to the leaf node, and the formula is as follows:
[0108]
[0109] In the formula, t is the number of trees in the forest, is the path length of point x on the i-th tree.;
[0110] S2: Calculate the anomaly score according to the path length. The shorter the path length, the higher the score, indicating that the point is more likely to be an anomaly point. The anomaly point score formula is as follows:
[0111]
[0112] In the formula, c(n) is an adjustment factor, representing the average path length when the dataset size is n, and the formula is as follows:
[0113]
[0114] S3: Judge the anomaly point. If the anomaly score of a point is close to 1, then the point is very likely to be an anomaly point; if the anomaly score is close to 0.5, it means the point is a normal point.
[0115] Implementation case: To verify the performance of the method of the present invention, a simulation model of a certain type of aircraft hydraulic actuator system is established and fault injection is realized. The typical fault modes are shown in Table 1. Due to the complex coupling relationship of the components in the hydraulic actuator system, multiple parameter measurement points are selected to reflect the system state, and 16 characteristic parameters are shown in Table 2. Assume that the normal samples are sufficient and the fault samples are lacking. No data augmentation is performed on the normal state, and only the five fault states are data-augmented. 100 samples are randomly selected for each fault state for data expansion. Use the augmented and original data to train a basic convolutional neural network, and then use the real data for testing.
[0116] The model structure parameters and training parameters of the proposed invention method are shown in Table 3 and Table 4 respectively.
[0117] Table 1 Table of typical fault modes of the hydraulic actuator system
[0118]
[0119]
[0120] Table 2 Characteristic parameter table of aircraft hydraulic actuator system
[0121]
[0122] Table 3 Model structure parameters
[0123]
[0124]
[0125] Table 4 Model training parameter settings
[0126]
[0127] To explore the performance of the proposed inventive method, FID and MMD are used as evaluation indicators, and the lower the value, the better the quality of the generated data, as shown in Tables 5 and 6. At the same time, the generated samples of one of the fault modes and the real samples are used to generate a TSNE graph, as Figure 3 shown. It can be seen from the graph that the spatial distributions of the real data and the generated data are very similar.
[0128] Table 5 FID of generated data for each fault mode
[0129]
[0130] Table 6 MMD of generated data for each fault mode
[0131]
[0132] A convolutional neural network is used to classify the data before and after data augmentation and the data using real samples. The classification accuracy of the test set is shown in Table 7, and the confusion matrix of the classification test is as Figure 4 shown.
[0133] Table 7 Classification accuracy of the test set
[0134]
[0135] It can be seen that the quality of the data after sample augmentation basically reaches the level of real data, and the classification accuracy of the generated data after training is similar to that of the real data after training. In the confusion matrix, 0 represents normal, and 1-5 represent faults 1-5. Among them, the classification effect of fault 5 is the lowest because the signal before the occurrence of fault 5 is the same as that in the normal situation, resulting in easy misclassification.
Claims
1. A data enhancement method for civil aircraft hydraulic system based on WGAN-GP and attention mechanism, characterized in that: The steps include: Step 1: Signal acquisition: by placing corresponding sensors at key measuring points, one or more sensor signals containing information that can reflect the fault status are obtained, and the signals are classified according to different fault modes; Step 2: Data preprocessing: normalize the data so that the features can be better learned; Step 3: Construct a Wasserstein generative adversarial network based on a gradient penalty mechanism, where the generator contains four layers of deconvolution, three layers of instance normalization, and one self-attention layer, and the discriminator contains four layers of convolution, four layers of instance normalization, and one self-attention mechanism layer. The loss function uses Wasserstein loss. Step 4: Iterative parameter update: input the processed data into the model in step 3, randomly extract a fixed number of data from the training set to participate in the training process, iteratively optimize the model parameters, and stop training and save the model when the set number of iterations is met or the Nash equilibrium is met; Step 5: Input random noise into the trained generator to obtain generated samples, use the independent forest-based filtering method to remove generated samples that are too different from real samples, delete low-quality samples mixed in the generated samples, and improve the quality of generated samples; Step 6: Implement fault diagnosis. Mix the generated data with real data to build a training data set. Use real data to build a test set. Use a common convolutional neural network for training to implement fault diagnosis. Use real data for testing. Finally, output the diagnosis results to complete the fault diagnosis process.
2. The method for data enhancement of a civil aircraft hydraulic system based on WGAN-GP and attention mechanism as claimed in claim 1, characterized in that: In step 2, the data normalization refers to scaling all data to the (-1, 1) interval by using the maximum and minimum normalization method for the original samples.
3. The civil aircraft hydraulic system data enhancement method based on WGAN-GP and attention mechanism as claimed in claim 1, characterized in that: In step 3, a Wasserstein generative adversarial network based on a gradient penalty mechanism is constructed, in which the generator includes four layers of deconvolution, three layers of instance normalization, and one self-attention layer, and the discriminator includes four layers of convolution, four layers of instance normalization, and one self-attention mechanism layer. The loss function uses Wasserstein loss and specifically includes the following steps: Step 31: The input of the SA layer is represented as x∈R C×N , where N and C represent the length of the sequence and the number of channels of the sample, respectively. Subsequently, x is converted into three different feature spaces, namely f, g, and h, representing query, key, and value, respectively. The calculation formula is shown below: f(x)=xW f g(x)=xW g h(x)=xW h in and are all weight matrices that are continuously updated. Represents the number of channels output by the self-attention mechanism. Here, the number of channels of the sample is set equal to the number of channels output by the attention mechanism; Step 32: Calculate the attention score s i,j , the attention score is obtained by multiplying f and g, and then the softmax function is used to regularize the attention score, denoted as α i,j , the attention score and the regularized score are expressed as follows: s i,j =f T g Among them, f represents the query of x transformation, g represents the key of x transformation, T represents the transposition calculation, and the subscripts i and j represent the attention score of the model on the jth point when synthesizing the i-th region; Step 33: Use the obtained α i,j and h calculate the output vector o of the SA layer corresponding to each input vector x = (o1, o2, ..., o j ,…,o N )∈R C×N It is expressed as follows: v(x i )=W v x i Where, subscripts i and j represent the attention score of the model on the jth point when synthesizing the i-th region, W v Represents the weight matrix updated during the training process; Step 34. In order to make the model learn gradually from simple to complex, the output of the self-attention layer is further multiplied by a constant γ and added to the input, which is expressed as follows: y i =γo i +x i Among them, γ is a constant, which can be learned and its initial value is 0; Step 35. Add an instance normalization IN layer after each convolution layer, and calculate the mean μ and variance σ of the feature dimension data of each sample as follows: In the formula, t represents the sequence number of the feature, i represents the signal of the sample channel, N represents the feature dimension, and M represents the number of features in a batch; Then, normalize the samples as follows: Finally, two learnable variables, scaling γ and translation β, are added to obtain the final output; y i =γo i +x i When defining the loss function of the improved GAN, the Wasserstein distance is selected to define the distance between distributions, and its calculation formula is: where |f| L is the Lipschitz limit of the function f(x), and the gradient penalty strategy is used to satisfy the Lipschitz limit of the Wasserstein distance, P data represents the actual distribution of data, P g represents the distribution of generated data, k represents the constant of normalization scale, It represents finding the function that satisfies the K-Lipschitz condition and maximizes the expected difference. x stands for mathematical expectation; The final loss function of the model is defined as follows: Among them, D(x) represents the discriminator, λ represents the gradient penalty coefficient, Represents the gradient of the discriminator.
4. The method for data enhancement of a civil aircraft hydraulic system based on WGAN-GP and attention mechanism as claimed in claim 1, characterized in that: When defining the loss function of the improved GAN, the Wasserstein distance is selected to define the distance between distributions, and its calculation formula is: where |f| L is the Lipschitz limit of the function f(x), and the gradient penalty strategy is used to satisfy the Lipschitz limit of the Wasserstein distance. The final loss function of the model is defined as follows:
5. The method for data enhancement of a civil aircraft hydraulic system based on WGAN-GP and attention mechanism as claimed in claim 1, characterized in that: In step 4, the parameters are iteratively updated. The processed data is input into the model of step 3. A fixed number of data from the training set is randomly selected to participate in the training process. The model parameters are iteratively optimized. When the set number of iterations is met or the Nash equilibrium is met, the training is stopped and the model is saved. The specific steps include the following: Step 41: The constructed generator uses the ReLU activation function, and the constructed discriminator uses the LeakyReLU activation function. The formula of the LeakyReLU activation function is as follows: f(x)=max{αx,x} When x < 0, the function value is f(x) = αx, and when x > 0, the function value is f(x) = x; Step 42: During the training process, the generator is trained once and the discriminator is trained five times, using the Adam optimizer for training.
6. The method for data enhancement of a civil aircraft hydraulic system based on WGAN-GP and attention mechanism as claimed in claim 1, characterized in that: In step 42, the learning rate is set to 0.0001, while the true sample label is -0.5 and the generated sample label is 0.
5.
7. The method for data enhancement of a civil aircraft hydraulic system based on WGAN-GP and attention mechanism as claimed in claim 1, characterized in that: In step 5, random noise is input into the trained generator to obtain generated samples. The generated samples that differ too much from the real samples are removed using the independent forest-based filtering method, and the low-quality samples mixed in the generated samples are deleted. The specific steps to improve the quality of the generated samples are as follows: Step 51: For each data point, calculate its path length on all trees in the forest. The path length is the number of split nodes passed by the path from the root node to the leaf node. The formula is as follows: Where t is the number of trees in the forest, is the path length of point x in the i-th tree; Step 52: Calculate the anomaly score based on the path length. The shorter the path length, the higher the score, indicating that the point is more likely to be an anomaly. The anomaly score formula is as follows: Where c(n) is an adjustment factor, which represents the average path length when the dataset size is n. The formula is as follows: Step 53: Determine the abnormal point.
8. The method for data enhancement of a civil aircraft hydraulic system based on WGAN-GP and attention mechanism as claimed in claim 7, characterized in that: In step 53, if the anomaly score of a point is close to 1, then the point is very likely to be an anomaly point; if the anomaly score is close to 0.5, it means that the point is a normal point.
Citation Information
Patent Citations
Photographing method based on low-illumination image enhancement algorithm of brightness attention mechanism
CN111915526A
Network intrusion detection method based on improved VAEGAN and deep neural network
CN116405233A