CN115204302A - Unmanned aerial vehicle small sample fault diagnosis system and method - Google Patents
Unmanned aerial vehicle small sample fault diagnosis system and method Download PDFInfo
- Publication number
- CN115204302A CN115204302A CN202210868608.0A CN202210868608A CN115204302A CN 115204302 A CN115204302 A CN 115204302A CN 202210868608 A CN202210868608 A CN 202210868608A CN 115204302 A CN115204302 A CN 115204302A
- Authority
- CN
- China
- Prior art keywords
- fault
- sample
- unmanned aerial
- aerial vehicle
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to the technical field of unmanned aerial vehicle fault diagnosis, and discloses an unmanned aerial vehicle small sample fault diagnosis system and method, which are carried out according to the following steps: a. acquiring fault data by using a flight test system of the fixed-wing unmanned aerial vehicle, and sequentially performing resampling, normalization and training on multivariable flight data and constructing test sample pairs by adopting a state diagram strategy; b. inputting a training fault sample pair into a 1D CNN-LSTM mixed feature encoder, and extracting features containing space and time sequence information for embedding; c. calculating the similarity between the two feature embeddings by utilizing a weight sharing mechanism of a twin network and a Manhattan distance; d. and randomly sampling batch sample pairs, training and verifying the model, and executing an N-way K-shot test task by using the optimal model to realize small sample fault classification. The method has high fault diagnosis accuracy under limited training samples, has strong cross-task generalization, can identify new faults, and provides an intelligent solution for fault diagnosis of the fixed-wing unmanned aerial vehicle.
Description
Technical Field
The invention relates to the technical field of unmanned aerial vehicle fault diagnosis, in particular to a small sample fault diagnosis system and method for an unmanned aerial vehicle.
Background
Unmanned aerial vehicle relies on advantages such as mobility is strong, task diversity, accurate high-efficient operation as intelligent aircraft, by the wide application in tasks such as military affairs, plant protection, geography survey. The fixed-wing unmanned aerial vehicle can fly in a long-term flight with low energy consumption based on the passive lift force generated by the wings, but the fault occurrence rate of a complex system of the fixed-wing unmanned aerial vehicle in a severe service environment is very high due to the lack of real-time decision-making capability, and if the fault occurrence rate cannot be found in time, the task failure, the crash of the aircraft, serious casualties and economic loss can be caused.
The traditional hardware redundancy method has high reliability, but cannot be compatible with the requirements of the unmanned aerial vehicle on size, load and manufacturing cost; meanwhile, model-based methods, represented by filtering, adaptive control methods, etc., rely on accurate physical models and expert experience. With the rise of artificial intelligence technology, the powerful automatic feature extraction and pattern recognition capabilities of deep learning provide an intelligent solution for unmanned aerial vehicle fault diagnosis.
However, most of the current deep learning diagnosis models are supervised learning, the performance of the model depends on abundant fault data, fault types and high-quality labels, and due to the factors of high acquisition cost, complex service environment, long-tail data distribution and the like of fault samples of the fixed-wing unmanned aerial vehicle, only a small number of fault samples can be obtained in actual flight. Therefore, the existing supervised deep learning model cannot realize intelligent fault diagnosis of the unmanned aerial vehicle by using a small number of fault samples.
Disclosure of Invention
The invention aims to provide a small sample fault diagnosis method for an unmanned aerial vehicle, and solves the problem that the fault diagnosis of the unmanned aerial vehicle cannot be completed by depending on a small sample in the conventional deep learning model at present.
In order to solve the problems, the invention adopts the following technical scheme:
an unmanned aerial vehicle small sample fault diagnosis method comprises the following steps:
step one, constructing and forming a twin mixed neural network by adding a mixed characteristic encoder of 1D CNN-LSTM on the basis of the twin neural network;
acquiring original flight data including unmanned aerial vehicle fault data to form a flight data set; through a state diagram sampling strategy, resampling, normalizing and sample pair construction are sequentially carried out on a flight data set to obtain a training fault sample pair and a testing fault sample pair;
inputting the training fault sample pair into a 1D CNN-LSTM mixed feature encoder, and extracting feature embedding containing spatial feature information and time sequence feature information;
calculating the similarity between the two feature embeddings by utilizing a weight sharing mechanism of the twin network and the Manhattan distance to obtain feature similarity;
step four, converting the feature similarity into a [0,1] prediction probability through an activation function, and calculating a model loss value by using a loss function based on the prediction probability and a sample label;
step five, selecting batch samples to repeat the step two to the step four, finishing the training of the twin mixed neural model until the calculated loss value is minimum, and forming an optimal model;
and step six, constructing N-way K-shot test tasks based on random sampling of test fault data, namely randomly sampling N types of faults by each task, providing K samples as a support set for each type of fault, and performing fault classification on M samples of a query set in the test tasks by using a trained optimal model.
The principle and the advantages of the scheme are as follows:
compared with the prior art, the method and the device aim at the problem of performance degradation of a traditional deep learning model caused by few fault samples of the unmanned aerial vehicle, creatively designs a twin Hybrid Neural Network (SHNN) model on the basis of the twin Neural Network, and can effectively extract rich fault information to realize intelligent fault diagnosis under the condition of small samples by changing the construction and the use of the model.
In addition, the method adopts a 'state diagram' strategy to sequentially carry out resampling, normalization and sample pair construction on the multivariable flight data, realizes the standardized preprocessing of the flight data and the selection of strongly-associated variables, improves the quality of limited sample data, and lays a foundation for the accurate classification of a diagnosis model.
Compared with the prior art that only a CNN or LSTM network is used for acquiring single space or time characteristics, the scheme can greatly improve the completeness of fault information and reduce the dependence on a large number of fault samples by extracting the mixed characteristics containing time and space at the same time. And the similarity of the input sample pair is measured by calculating the Manhattan distance (L1) between two feature embeddings in the measurement space; and finally, sampling batch samples randomly, training and verifying by using a loss function optimizer, quickly obtaining an optimal model, and reducing the calculated amount on the premise of ensuring certain accuracy. And (4) executing the N-way K-shot test task by using the optimal model to realize small sample fault classification. The method can automatically extract features from the original flight data directly, realizes end-to-end intelligent fault diagnosis, and avoids the dependence of the traditional deep learning model on a large number of label fault samples.
The method can adaptively extract abundant space and time characteristic information in flight data, and the twin network structure design can map fault samples from an input space to a measurement space for similarity comparison, so that the fault diagnosis accuracy under the limited training samples is further improved.
Preferably, as an improvement, the "state diagram" sampling strategy is:
selecting a state variable with strong relevance to the fault from the flight data set, and utilizing a time window to slide along a time axis in a non-overlapping manner by using a fixed window length VL to obtain a state diagram containing the health state of the unmanned aerial vehicle and form multivariable state diagram data; setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; the same number of samples are randomly sampled from different types of fault data to construct the same/different sample pairs.
Above setting up, can carry out quick and effective processing to original flight data, can improve the data quality of limited sample, provide the prerequisite for the accurate extraction of following characteristic.
Preferably, as an improvement, the fixed window VL of the time window is 20 steps, and the number of variables having a strong correlation with the fault is 8.
The time window is optimal in size, effective state variables can be rapidly acquired to form state diagram data, and inconvenience caused by too large calculated amount or too frequent sliding operation is avoided.
Preferably, as an improvement, the spatial feature information extracted by the 1D CNN in the 1D CNN-LSTM hybrid feature encoder is obtained by the following process:
for a given sample pairThe ith spatial feature of each layer extracted using 1D CNN is described by the following formula:
wherein, W l-1,l Is the weight tensor of the layer, h 1,l-1 ,h 2,l-1 Is a sampleHidden tensor at l-th layer, b l Is the bias term.
Through the arrangement, the spatial characteristic information can be extracted adaptively and accurately, and necessary support is provided for the accuracy of the optimal model.
Preferably, as an improvement, the process of extracting the time-series feature information in the LSTM layer of the 1D CNN-LSTM hybrid feature encoder is as follows:
i t =g(W i h (t-1) +U i x (t) +b i ),
s t =f t e s t-1 +i t e tanh(W s h (t-1) +U s x (t) +b s ),
f t =g(W f h (t-1) +U f x (t) +b f ),
p t =g(W p h (t-1) +U p x (t) +b p ),
h (t) =p t e tanh(s t ),
wherein x is (t) Input of spatial features for time t, i t ,s t ,f t 、p t And h (t) Input gate, state gate, forget gate, output gate function and time characteristic information of the LSTM layer are sequentially arranged, and e represents element-by-element multiplication.
Through the arrangement, the method and the device can further mine potential time sequence characteristics in flight data from the extracted spatial characteristic information, and improve the information completeness of the limited sample.
Preferably, as an improvement, in step three, the process of calculating the similarity between two feature embeddings is as follows:
andfor the obtained feature embedded pairs containing spatial and temporal information,for the computed Manhattan distance (L1), smaller distance values indicate more similar input samples.
Through the method, the twin hybrid neural network model can be quickly trained by calculating the similarity between the two feature embeddings.
Preferably, as an improvement, the loss function is a binary cross entropy loss function:
Through the binary cross entropy loss function, the learning rate can be controlled through the output error, the problem of the decline of the learning rate is avoided, and the model training is optimized.
Preferably, as an improvement, when the twin hybrid neural model is trained in the fifth step, the Adam optimizer is used for back propagation of updated model parameters and finding the optimal model based on the verification set.
By means of the Adam optimizer, model optimization can be completed quickly, the method is simple to achieve, high in calculation efficiency and low in memory requirement.
Preferably, as an improvement, the pair of fault samples in the step two is a pair of state diagrams, and the pair of state diagrams includes a training data state diagram and a test data state diagram; the state diagram is a flight state matrix set.
The above arrangement facilitates the effective utilization of the original flight data set, and makes full use of all available information in the small sample.
The invention also provides a small sample fault diagnosis system of the unmanned aerial vehicle, which comprises a central processing unit, and an actual data acquisition module, a sample data acquisition module and a sample division module which are respectively connected with the central processing unit;
the central processing unit stores computer instructions corresponding to the unmanned aerial vehicle small sample fault diagnosis method according to claim 1;
the actual data acquisition module is used for acquiring actual flight data which are generated by actual flight of the unmanned aerial vehicle and contain actual fault data to form test fault data;
the sample data acquisition module is used for acquiring sample data for debugging and optimizing the small sample fault diagnosis method of the unmanned aerial vehicle;
the sample dividing module is used for dividing the sample data into a plurality of state diagrams through a time window according to a state diagram sampling strategy to form multivariable state diagram data; setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; the same number of samples are randomly sampled from different types of fault data to construct the same/different sample pairs.
The unmanned aerial vehicle small sample fault diagnosis system has the advantages that the problem of collecting a large number of unmanned aerial vehicle marked fault samples can be solved, the optimization of the diagnosis method can be rapidly completed through the sample data acquisition module and the sample division module on the basis of the method only by using a limited number of fault samples, and then the diagnosis and classification of the test fault data acquired by the actual data acquisition module can be completed.
Drawings
FIG. 1 is a fixed wing drone flight test system;
FIG. 2 is a schematic diagram of a "state diagram" sampling strategy;
FIG. 3 is a comparison graph of performance of a two-class fault diagnosis model based on limited training data;
FIG. 4 is a graph comparing the performance of a multi-class fault diagnosis model based on limited training data;
FIG. 5 is a graph of feature visualizations of the comparison model when the training sample is 90; wherein (a) 1D CNN; (b) LSTM; (c) CNLS; (d) SHNN;
FIG. 6 is a graph comparing the performance of new class fault identification based on limited training data;
FIG. 7 is a diagram of a twin hybrid neural network of the present invention.
Detailed Description
The following is further detailed by way of specific embodiments:
the invention aims to provide a twin hybrid neural network-based fixed wing unmanned aerial vehicle small sample fault diagnosis method. According to the method, sample training is carried out under the condition that only a limited number of samples exist, namely small samples which are commonly called by people, the obtained model is high in fault diagnosis accuracy and strong in cross-task generalization, new faults can be recognized, and an intelligent solution is provided for fault diagnosis of the fixed-wing unmanned aerial vehicle.
The invention relates to a fault diagnosis method for a small sample of an unmanned aerial vehicle, which comprises the following steps:
a. acquiring fault data by using a flight test system of the fixed-wing unmanned aerial vehicle, and sequentially performing resampling, normalization and sample pair construction on multivariable flight data of the fixed-wing unmanned aerial vehicle by applying a state diagram strategy;
b. inputting the fault sample pair into a 1D CNN-LSTM mixed feature encoder, and extracting features containing space and time sequence information for embedding;
c. calculating the similarity between the two feature embeddings by utilizing a weight sharing mechanism of a twin network and a Manhattan distance;
d. and randomly sampling batch sample pairs, training and verifying the model, and executing an N-way K-shot test task by using the optimal model to realize small sample fault classification.
In the step a, the flight data are processed by applying a state diagram strategy as follows:
selecting variables with strong correlation with faults from the multi-variable flight data, and acquiring a state diagram containing the health state of the fixed-wing unmanned aerial vehicle by utilizing the time window and the fixed window length VL to slide along the time axis in a non-overlapping manner; setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; and randomly sampling the same number of samples from different types of fault data to construct the same/different sample pairs as the input of the twin hybrid network.
In step b, the spatial feature information extracted by the 1D CNN in the 1D CNN-LSTM hybrid feature encoder is specifically as follows:
for a given sample pairThe ith spatial feature of each layer extracted using 1D CNN is described by the following formula:
wherein, W l-1,l Is the weight tensor of this layer, h 1,l-1 ,h 2,l-1 Is a sampleHidden tensor at l layer, b l Is a bias term.
In step b, the temporal feature information extracted from the LSTM layer of the 1D CNN-LSTM hybrid feature encoder is specifically as follows:
i t =g(W i h (t-1) +U i x (t) +b i ), (3)
s t =f t e s t-1 +i t e tanh(W s h (t-1) +U s x (t) +b s ), (4)
f t =g(W f h (t-1) +U f x (t) +b f ), (5)
p t =g(W p h (t-1) +U p x (t) +b p ), (6)
h (t) =p t e tanh(s t ). (7)
wherein x is (t) As a spatial feature input at time t, i t ,s t ,f t 、p t And h (t) Input gate, state gate, forget gate, output gate function and time characteristic information of the LSTM layer are sequentially arranged, and e represents element-by-element multiplication.
In step c, the similarity measure is specifically as follows:
andfor the obtained feature embedded pairs containing spatial and temporal information,for the computed Manhattan distance (L1), smaller distance values indicate more similar input samples.
In step d, the training process of the model is specifically as follows:
based on flight data processed by a 'state diagram' strategy, a training set D is divided train Verification set D val And test set D test ,D={D train ,D val ,D test }; using training set D train And (5) training the model.
In the invention, the adopted loss function is a binary cross entropy loss function:
In step d, the Adam optimizer is used to back-propagate the updated model parameters and find the optimal model based on the validation set.
And constructing an N-way K-shot fault classification task in the test process through the optimal model, randomly sampling N types of faults, selecting K samples from the N types of faults as support sets, classifying the fault samples in the query set, and completing fault diagnosis.
In the invention, a training set, a verification set, a test set, a support set and a query set respectively refer to a training sample set used for sample training, a verification sample set used for model verification, a test sample set used for model test, a support sample set used for optimal model verification support and a query data set of actual fault data to be diagnosed and queried.
Compared with the prior art, the invention designs a twin Hybrid Neural Network (SHNN) -based fault diagnosis method for small samples of the fixed-wing unmanned aerial vehicle, aiming at the problem of performance degradation of a traditional deep learning model caused by few fault samples of the fixed-wing unmanned aerial vehicle, which comprises the following steps: firstly, adopting a 'state diagram' strategy to sequentially carry out resampling, normalization and sample pair construction on multivariable flight data; then, the fault sample pair is input into a 1D CNN-LSTM mixed feature encoder to realize fault feature extraction; measuring the similarity of the input sample pair by calculating the Manhattan distance (L1) between two feature embeddings in the measurement space; and finally, randomly sampling batch samples, and training and verifying by utilizing the two-classification cross entropy loss and an Adam optimizer to obtain an optimal model. And (4) executing the N-way K-shot test task by using the optimal model to realize small sample fault classification. The method can automatically extract features from original flight data directly, end-to-end intelligent fault diagnosis is realized, and dependence of a traditional deep learning model on a large number of label fault samples is avoided.
Although the prior art also has some attempts to detect the fault of the unmanned aerial vehicle, the method is different from the research idea of the scheme.
For example: references "Cui, a., zhang, y., zhang, p., dong, w.,&Wang,C.(2020).Intelligent health management of fixed-wing UAVs:A deep-learning-based approach.2020 16 th international Conference on Control, automation, robotics and Vision (ICARCV), 1055-1060 describes the implementation of fixed wing drones using LSTM networksTemporal fault prediction, in the literature "Guo, d., zhong, m., ji, h., liu, y.,&yang, R. (2018), A hybrid feature model and deep learning based on arbitrary actual vehicle sensors, 319,155-163. It is recorded that the residual signal is converted into a video image, the unmanned aerial vehicle sensor fault diagnosis is realized by using CNN network extraction features, and the documents' Ahmad, M.W., akram, M.U., ahmad, R., hamed, K.,&hassan, A. (2022), intelligent frame for automated failure prediction, detection, and classification of failure critical autonomous arcs, ISA Transactions, S0019057822000209, "proposes an LSTM-based fixed wing drone failure prediction, detection, and classification integration framework.
Although the three documents are vigorously explored in the field of unmanned aerial vehicle fault diagnosis and achieve some fault diagnosis effects, the introduction and the scheme of the three documents are supervised learning as with most of current deep learning diagnosis models, and more importantly, the three documents depend on abundant fault data, fault types and high-quality labels for improving the accuracy. The invention breaks the bottleneck that the unmanned aerial vehicle fault diagnosis is highly dependent on the number and the quality of the samples.
The method can adaptively extract abundant space and time characteristic information in flight data, and the twin network structure design can map fault samples from an input space to a measurement space for similarity comparison, so that the fault diagnosis accuracy under the limited training samples is further improved.
To verify the validity and generalization of the invention, the following experiments were performed using a small fixed-wing drone flight data set:
examples of the experiments
1.1 sources of data
Experimental apparatus As shown in figure 1 and Table 1, this fixed wing unmanned aerial vehicle flight test system mainly comprises 3 parts: the unmanned aerial vehicle organism, ground control station and RC transmitter adopt current Paparazzi flight control system. In the experiment, various out-of-control faults of the unmanned aerial vehicle actuator are simulated by modifying commands of the ground control station and the onboard controller, and different days of 7 months in 2020 are recordedThe flight data of 7 months 12, 13, 21 and 23 are used in the verification experiment of the invention, wherein the flight data of 12 and 13 comprises two states: normal and right control plane runaway faults (30% control efficiency); flight data nos. 21 and 23 contain two states: normal, right control plane out-of-control failure, left control plane out-of-control failure (90% -30% control efficiency). The selected flight parameters include linear acceleration (a) x ,a y ,a z ) Angular rate (w) x ,w y ,w z ) And left and right control plane commands (u) c1 ,u c2 ) The specific sample data set is shown in table 2.
TABLE 1 flight test System Specification of fixed-wing UAVs
TABLE 2 sample data set
1.2 parameter selection
The "state diagram" strategy is applied to sample, the time window length is 20 steps, as shown in fig. 2. In the process of constructing the twin hybrid neural network, an optimal 1D CNN-LSTM model is determined through a plurality of experiments, and network parameters are shown in a table 3. Meanwhile, the training batch data volume is set to 64, the learning rate of the Adam optimizer is set to 0.0006, and an early stop mechanism is introduced to prevent overfitting.
TABLE 3 structural parameters of twin hybrid networks
1.3 analysis of results
To verify the validity and generalization of the invention, the method comprises the following steps: support Vector Machine (SVM), deep learning model: the one-dimensional convolutional neural network (1D CNN), the long and short term memory network (LSTM), the one-dimensional convolutional neural network, the long and short term memory network mixed model (CNLS), the small sample learning model, the twin convolutional network (SCNN), the twin long and short term memory network (SLS) and the like are compared under the same experimental conditions. To avoid the chance of experimental results, 5 averaging runs were performed per set of experiments.
1.3.1 Limited training data based two-class Fault diagnosis Performance
The comparison result of the model on the two classification fault diagnosis tasks is shown in fig. 3, and it can be seen from fig. 3 that: compared with the traditional machine learning model SVM, the fault diagnosis accuracy is improved by 10.95% compared with the SVM when the training sample is 45%, because the SVM can not effectively extract fault characteristics from limited flight data. Compared with a deep learning model, the recognition rate of the invention is higher than 1D CNN, LSTM and CNLS by 4% -5%, because the traditional 1D CNN focuses on the extraction of local features, LSTM only focuses on time sequence features, CNLS lacks the similarity measurement capability of samples, SCNN and SLS have twin learning mechanism but can only extract space or time sequence features, and the performance is still lower than that of the invention. Therefore, the invention utilizes the twin mixed structure design, can simultaneously extract the spatial and temporal characteristic information from the limited data and carry out the distance measurement of the sample pair through the weight sharing mechanism of the twin network so as to realize accurate fault diagnosis.
1.3.2 Multi-Classification Fault diagnosis Performance based on Limited training data
To further demonstrate the recognition effect of the present invention in multiple classes of faults, model comparisons were performed on data set F in table 2, which is flight data of 21 and 23, including 9 actuator failure faults, and the experimental results are shown in fig. 4. As can be seen in fig. 4: the performance of all models was degraded by approximately 40% over the two-classification task, indicating a higher complexity of multi-class fault diagnosis. However, the overall performance of the invention is higher than that of the comparative model, and when the training sample is 45, the 1D CNN can only reach 28.13 percent, which is 9.83 percent lower than the accuracy of the invention. This is because in the limited sample case, the deep learning based model is easily over-fitted, resulting in poor fault classification effect on the test samples.
In order to further demonstrate the feature learning capability of the SHNN model of the present invention, the feature embedding of the final full connection layer of each comparison model under 90 training samples is visualized by using the existing T-SNE method, as shown in FIG. 5, it can be seen from the figure that: the SHNN model can better distinguish different faults and aggregate similar faults during the test period, and the effectiveness of feature extraction and classification is proved.
1.3.3 Limited training data based New class Fault identification Performance
To further verify the ability of the SHNN model of the present invention to identify new-class faults, the model was trained on (9-N) class fault samples and tested on N (N =1,2, 3) class new fault samples based on the F dataset, and the experimental results are shown in fig. 6. As can be seen in fig. 6: the SHNN model can identify the fault types which are not seen in the training stage in the testing stage, and the identification rate reaches about 40% in the identification of new faults of class 2 and class 1, and can exceed the accuracy rate of comparison models under the condition that all faults are known.
In conclusion, the method directly uses the original flight data as model input, adaptively extracts spatial and temporal characteristic information in the flight data through a 1D CNN and LSTM mixed network, and measures the sample similarity by using a twin network structure, thereby realizing the end-to-end fault diagnosis of the actuator of the fixed-wing unmanned aerial vehicle. Experiments show that compared with the traditional machine learning model, the deep learning model and the small sample learning model, the method avoids dependence on a large number of marked fault samples, can realize higher recognition rate under limited fault samples, and has good generalization capability on new faults.
Example 1
Example 1 is substantially as shown in figure 7:
in the embodiment, the twin hybrid neural network-based fault diagnosis method for the small sample of the fixed-wing unmanned aerial vehicle is carried out according to the following steps:
and S1, constructing and forming a twin hybrid neural network by adding a 1D CNN-LSTM hybrid feature encoder on the basis of the twin neural network.
And S2, simulating various out-of-control faults of the unmanned aerial vehicle by utilizing the flight test system of the fixed-wing unmanned aerial vehicle shown in the figure 1 through a data link between the ground station and the unmanned aerial vehicle and a control link established between the RC emitter and the unmanned aerial vehicle and modifying commands of controllers on the ground station and the unmanned aerial vehicle, acquiring flight data of the unmanned aerial vehicle in real time, and collecting various flight data through a notebook connected with the ground station to form a multivariable flight data set comprising original fault data.
S3, sequentially resampling, normalizing and constructing a sample pair on multivariable flight data of the fixed-wing unmanned aerial vehicle by applying a state diagram sampling strategy shown in FIG 2 to obtain sample data and a state diagram pair, wherein the sample data and the state diagram pair respectively comprise a training data set and a testing data set, and the state diagram pair comprises a training data state diagram and a testing data state diagram; the state diagram is a set of matrices formed according to a time window.
The specific implementation of the "state diagram" sampling strategy to process flight data is as follows:
selecting variables with strong correlation to faults from multi-variable flight data, wherein the variables comprise 8 variables: linear acceleration (a) x ,a y ,a z ) Angular rate (w) x ,w y ,w z ) And left and right control plane commands (u) c1 ,u c2 ) The time window is used for sliding along a time axis in a non-overlapping mode by means of the fixed window length VL, and a state diagram containing the health state of the fixed-wing unmanned aerial vehicle is obtained; in this embodiment, VL is 20 steps, and the time window formed in this way can acquire enough sample data for performing model calculation, and can complete sampling in limited sliding times, thereby reducing the calculation amount.
Setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; and randomly sampling the same number of samples from different types of fault data to construct the same/different fault sample pairs as the input of the twin hybrid network. In the embodiment, the number range of the constructed sample pairs is 45-3600 to simulate the performance of the diagnosis model under the condition of limited data and sufficient data, and compared with a traditional deep learning model needing a large number of fault samples, the method not only achieves higher diagnosis accuracy under the limited fault samples, but also has considerable diagnosis performance under the sufficient data.
The multivariable flight data of the fixed-wing unmanned aerial vehicle refers to a set of flight data corresponding to various different states and each state formed by the fixed-wing unmanned aerial vehicle under various variable conditions. The invention is mainly used for fixed wing unmanned aerial vehicles, but is also suitable for other types of unmanned aerial vehicles.
S4, inputting the fault sample pair into a 1D CNN-LSTM mixed feature encoder, and extracting feature embedding containing spatial feature information and time sequence feature information; compared with the prior art, the scheme can greatly improve the completeness of fault information and reduce the dependence on a large number of fault samples by simultaneously extracting the mixed characteristics including time and space.
The spatial feature information extracted by the 1D CNN in the 1D CNN-LSTM hybrid feature encoder is specifically as follows:
for a given sample pairThe ith spatial feature of each layer extracted using 1D CNN is described by the following formula:
wherein, W l-1,l Is the weight tensor of the layer, h 1,l-1 ,h 2,l-1 Is a sampleHidden tensor at l-th layer, b l Is a bias term。
Specifically, the temporal feature information extracted in the LSTM layer of the 1D CNN-LSTM hybrid feature encoder is specifically as follows:
i t =g(W i h (t-1) +U i x (t) +b i ), (3)
s t =f t e s t-1 +i t e tanh(W s h (t-1) +U s x (t) +b s ), (4)
f t =g(W f h (t-1) +U f x (t) +b f ), (5)
p t =g(W p h (t-1) +U p x (t) +b p ), (6)
h (t) =p t e tanh(s t ). (7)
wherein x is (t) As a spatial feature input at time t, i t ,s t ,f t 、p t And h (t) And an input gate, a state gate, a forgetting gate, an output gate function and time characteristic information of the LSTM layer are sequentially arranged, and e represents element-by-element multiplication.
And S5, calculating the similarity between the two feature embeddings by utilizing a weight sharing mechanism of the twin network and the Manhattan distance.
Specifically, the similarity measure is specifically as follows:
andfor the obtained feature-embedded pairs containing spatial and temporal information,is calculated byManhattan distance (L1), a smaller distance value indicates that the input samples are more similar.
Step 6, dividing the flight data processed based on the 'state diagram' strategy into a training set, a verification set and a test set, wherein D = { D = (the number of the test sets is one) } train ,D val ,D test }; training the model using a training set. Respectively substituting the training sets into a similarity measurement calculation formula (8) to calculate to obtain feature similarity; converting feature similarity to [0,1] by activation function]Predicting probability, and calculating a model loss value by using a loss function based on the predicting probability and the sample label; the loss function is a binary cross entropy loss function:
Step 7, randomly sampling batch sample pairs, wherein the number of the batch sample pairs in the embodiment is 64, namely repeating the steps 2 to 6 by using 64 sample pairs each time, finishing training the twin hybrid neural model until the calculated loss value is minimum, and simultaneously utilizing an Adam optimizer to reversely propagate and update model parameters to form an optimal model; in the embodiment, the learning rate of the Adam optimizer is 0.0006, so that learning can be completed rapidly, an optimal model can be found, and meanwhile, an early-stopping mechanism is introduced to prevent overfitting.
And step 8, after the optimal model is obtained, constructing N-way K-shot test tasks based on random sampling of test fault data, namely randomly sampling N types of faults for each task, providing K samples for each type of fault as a support set, and performing fault classification on M samples of a query set in the test tasks by using the trained optimal model to realize accurate fault diagnosis.
Specifically, the test fault data are acquired through actual acquisition in the test process, an N-way K-shot fault classification task is constructed in the test process, N types of faults are randomly sampled, K samples are selected from the N types of faults as support sets, and the fault samples in the query set are classified.
The aforementioned 1D CNN is a one-dimensional convolutional neural network (one dimensional convolutional neural network), and the CNN is a typical artificial neural network, and generates a feature map from adaptively filtering information in input data by using a convolution operation. Among them, the convolution kernel of 1D CNN moves along one dimension, and is widely applied to the fields of speech recognition, electroencephalogram, fault diagnosis, and the like. The 1D CNN generally includes a convolutional layer, a nonlinear active layer, a pooling layer, and a fully-connected layer, as shown in fig. 7. Wherein, the convolution layer is responsible for filtering the input data; the nonlinear activation layer improves the expression capacity of the model by introducing a nonlinear function; the pooling layer reduces model parameters through downsampling; the full connection layer combines the activation function to realize the final classification.
The LSTM is a Long short-term memory network (Long short-term memory), and is a variant of a Recurrent Neural Network (RNN), so as to solve the problem of gradient explosion in the conventional RNN training. Typical LSTM cells include input, forget, state, and output gates, with gating mechanisms to add or delete useful information in the signal.
The twin network is a twin neural network(s), which is a small sample learning model based on measurement, and is formed by two identical models in parallel, and the similarity between sample pairs is measured by mapping samples to measurement space through weight sharing with the sample pairs as input. The twin network follows the test mode of 'N-way K-shot', wherein the 'N-way' indicates that N types of faults are contained in each test task, and the 'K-shot' indicates that each type of fault provides K samples.
The fault diagnosis method of the invention, namely the construction and application method of the twin hybrid neural network model, as shown in fig. 7, the twin hybrid neural network model mainly consists of two parts, 1D CNN in the hybrid feature encoder extracts the space feature, LSTM extracts the time sequence relation in the signal; the twin network structure measures the input sample pair similarity. The process can be described as follows: firstly, resampling and normalizing multivariable flight data of the fixed-wing unmanned aerial vehicle and constructing a sample pair by using a state diagram strategy; then inputting the fault sample pair into a mixed feature encoder of the 1D CNN-LSTM to obtain fault features containing space and time sequence information; secondly, measuring the similarity of the input sample pairs through a Manhattan distance function of the twin network; and finally, training and verifying the model, and applying the model to an N-way K-shot test task to realize fault classification under a small sample.
Example 2
The embodiment provides an unmanned aerial vehicle small sample fault diagnosis system based on embodiment 1, which comprises a central processing unit, and an actual data acquisition module, a sample data acquisition module and a sample division module which are respectively connected with the central processing unit;
the central processing unit stores a computer instruction corresponding to the unmanned aerial vehicle small sample fault diagnosis method;
the actual data acquisition module is used for acquiring actual flight data which are generated by actual flight of the unmanned aerial vehicle and contain actual fault data to form test fault data;
the sample data acquisition module is used for acquiring sample data for debugging and optimizing the unmanned aerial vehicle small sample fault diagnosis method, wherein the sample data comprises a sample fault pair;
the sample dividing module is used for dividing sample data into a plurality of state diagrams through a time window according to a state diagram sampling strategy to form multivariable state diagram data, and two state diagrams generally form a sample fault pair; setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; the same number of samples are randomly sampled from different types of fault data to construct the same/different sample pairs.
The central processing unit, the actual data acquisition module, the sample data acquisition module and the sample division module in this embodiment are all integrated modules having corresponding data storage and calculation, and may be a single component or device having this function, or an integrated circuit board formed by connecting a plurality of electronic components, and these hardware themselves can be purchased and obtained from the market directly, and are not described herein again.
The unmanned aerial vehicle small sample fault diagnosis system has the advantages that the problem of collecting a large number of unmanned aerial vehicle marked fault samples can be solved, the optimization of the diagnosis method can be rapidly completed through the sample data acquisition module and the sample division module on the basis of the method only by using a limited number of fault samples, and then the diagnosis and classification of the test fault data acquired by the actual data acquisition module can be completed.
The foregoing is merely an example of the present invention and common general knowledge in the art of designing and/or characterizing particular aspects and/or features is not described in any greater detail herein. It should be noted that, for those skilled in the art, without departing from the technical solution of the present invention, several variations and modifications can be made, and these should also be considered as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be defined by the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.
Claims (10)
1. An unmanned aerial vehicle small sample fault diagnosis method is characterized by comprising the following steps:
firstly, constructing a twin hybrid neural network by adding a 1D CNN-LSTM hybrid feature encoder on the basis of the twin neural network;
acquiring original flight data including unmanned aerial vehicle fault data to form a flight data set; sequentially carrying out resampling, normalization and sample pair construction on the flight data set through a state diagram sampling strategy to obtain a training fault sample pair and a testing fault sample pair;
inputting the training fault sample pair into a 1D CNN-LSTM mixed feature encoder, and extracting feature embedding containing spatial feature information and time sequence feature information;
calculating the similarity between the two feature embeddings by utilizing a weight sharing mechanism of the twin network and the Manhattan distance to obtain feature similarity;
step four, converting the feature similarity into a [0,1] prediction probability through an activation function, and calculating a model loss value by using a loss function based on the prediction probability and a sample label;
step five, selecting batch samples to repeat the step two to the step four, finishing the training of the twin mixed neural model until the calculated loss value is minimum, and forming an optimal model;
and step six, constructing N-way K-shot test tasks based on test fault data random sampling, namely randomly sampling N types of faults by each task, providing K samples as a support set for each type of fault, and performing fault classification on M samples of a query set in the test tasks by using a trained optimal model.
2. The method for diagnosing the fault of the small sample of the unmanned aerial vehicle as claimed in claim 1, wherein the sampling strategy of the state diagram is as follows:
selecting a state variable with strong correlation with the fault from a flight data set, utilizing a time window to slide along a time axis in a non-overlapping mode with a fixed window length VL, obtaining a state diagram containing the health state of the unmanned aerial vehicle, and forming multivariable state diagram data; setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; the same number of samples are randomly sampled from different types of fault data to construct the same/different sample pairs.
3. The method for diagnosing the fault of the small sample of the unmanned aerial vehicle as claimed in claim 2, wherein the fixed window VL of the time window is 20 steps, and the number of the variables having strong correlation with the fault is 8.
4. The unmanned aerial vehicle small sample fault diagnosis method of claim 1, wherein the spatial feature information obtained by 1D CNN extraction in the 1D CNN-LSTM hybrid feature encoder is as follows:
for a given sample pairThe ith spatial feature of each layer extracted using 1D CNN is described by the following formula:
5. The unmanned aerial vehicle small sample fault diagnosis method as claimed in claim 1, wherein the time series feature information extracted in the LSTM layer of the 1D CNN-LSTM hybrid feature encoder is processed as follows:
i t =g(W i h (t-1) +U i x (t) +b i ),
s t =f t e s t-1 +i t e tanh(W s h (t-1) +U s x (t) +b s ),
f t =g(W f h (t-1) +U f x (t) +b f ),
p t =g(W p h (t-1) +U p x (t) +b p ),
h (t) =p t e tanh(s t ),
wherein x is (t) Input of spatial features for time t, i t ,s t ,f t 、p t And h (t) Input gate, state gate, forget gate, output gate function and time characteristic information of LSTM layer in sequence, and e represents element-by-element multiplication。
6. The method for diagnosing the fault of the small sample of the unmanned aerial vehicle according to claim 1, wherein in the third step, the similarity between the two feature embeddings is calculated as follows:
8. The unmanned aerial vehicle small sample fault diagnosis method as claimed in claim 1, wherein during training of the twin hybrid neural model in step five, an Adam optimizer is used to back-propagate updated model parameters and find an optimal model based on the validation set.
9. The unmanned aerial vehicle small sample fault diagnosis method according to claim 1, wherein the fault sample pairs in the second step are state diagram pairs, and the state diagram pairs comprise a training data state diagram and a test data state diagram; the state diagram is a flight state matrix set.
10. An unmanned aerial vehicle small sample fault diagnosis system is characterized by comprising a central processing unit, and an actual data acquisition module, a sample data acquisition module and a sample division module which are respectively connected with the central processing unit;
the central processing unit stores computer instructions corresponding to the unmanned aerial vehicle small sample fault diagnosis method according to claim 1;
the actual data acquisition module is used for acquiring actual flight data which are generated by actual flight of the unmanned aerial vehicle and contain actual fault data to form test fault data;
the sample data acquisition module is used for acquiring sample data for debugging and optimizing the small sample fault diagnosis method of the unmanned aerial vehicle;
the sample dividing module is used for dividing the sample data into a plurality of state diagrams through a time window according to a state diagram sampling strategy to form multivariate state diagram data; setting a threshold value of [ -1,1], and carrying out Min-Max normalization on the multivariate state diagram data; the same number of samples are randomly sampled from different types of fault data to construct the same/different sample pairs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210868608.0A CN115204302A (en) | 2022-07-22 | 2022-07-22 | Unmanned aerial vehicle small sample fault diagnosis system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210868608.0A CN115204302A (en) | 2022-07-22 | 2022-07-22 | Unmanned aerial vehicle small sample fault diagnosis system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115204302A true CN115204302A (en) | 2022-10-18 |
Family
ID=83583935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210868608.0A Pending CN115204302A (en) | 2022-07-22 | 2022-07-22 | Unmanned aerial vehicle small sample fault diagnosis system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115204302A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116842459A (en) * | 2023-09-01 | 2023-10-03 | 国网信息通信产业集团有限公司 | Electric energy metering fault diagnosis method and diagnosis terminal based on small sample learning |
CN117034020A (en) * | 2023-10-09 | 2023-11-10 | 贵州大学 | Unmanned aerial vehicle sensor zero sample fault detection method based on CVAE-GAN model |
CN117171681A (en) * | 2023-11-03 | 2023-12-05 | 贵州大学 | Unmanned plane control surface intelligent fault diagnosis method and device under unbalanced small sample |
CN117349712A (en) * | 2023-12-04 | 2024-01-05 | 贵州大学 | Unmanned aerial vehicle fault diagnosis method based on space-time characteristic self-adaptive shared network |
CN117520950A (en) * | 2024-01-04 | 2024-02-06 | 贵州大学 | Multi-target UAV fault diagnosis method based on attention knowledge sharing network |
-
2022
- 2022-07-22 CN CN202210868608.0A patent/CN115204302A/en active Pending
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116842459A (en) * | 2023-09-01 | 2023-10-03 | 国网信息通信产业集团有限公司 | Electric energy metering fault diagnosis method and diagnosis terminal based on small sample learning |
CN116842459B (en) * | 2023-09-01 | 2023-11-21 | 国网信息通信产业集团有限公司 | Electric energy metering fault diagnosis method and diagnosis terminal based on small sample learning |
CN117034020A (en) * | 2023-10-09 | 2023-11-10 | 贵州大学 | Unmanned aerial vehicle sensor zero sample fault detection method based on CVAE-GAN model |
CN117034020B (en) * | 2023-10-09 | 2024-01-09 | 贵州大学 | Unmanned aerial vehicle sensor zero sample fault detection method based on CVAE-GAN model |
CN117171681A (en) * | 2023-11-03 | 2023-12-05 | 贵州大学 | Unmanned plane control surface intelligent fault diagnosis method and device under unbalanced small sample |
CN117171681B (en) * | 2023-11-03 | 2024-01-30 | 贵州大学 | Unmanned plane control surface intelligent fault diagnosis method and device under unbalanced small sample |
CN117349712A (en) * | 2023-12-04 | 2024-01-05 | 贵州大学 | Unmanned aerial vehicle fault diagnosis method based on space-time characteristic self-adaptive shared network |
CN117349712B (en) * | 2023-12-04 | 2024-03-12 | 贵州大学 | Unmanned aerial vehicle fault diagnosis method based on space-time characteristic self-adaptive shared network |
CN117520950A (en) * | 2024-01-04 | 2024-02-06 | 贵州大学 | Multi-target UAV fault diagnosis method based on attention knowledge sharing network |
CN117520950B (en) * | 2024-01-04 | 2024-03-19 | 贵州大学 | Multi-target UAV fault diagnosis method based on attention knowledge sharing network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115204302A (en) | Unmanned aerial vehicle small sample fault diagnosis system and method | |
CN109141847B (en) | Aircraft system fault diagnosis method based on MSCNN deep learning | |
EP3948437B1 (en) | Predictive classification of future operations | |
CN110288046B (en) | Fault prediction method based on wavelet neural network and hidden Markov model | |
CN110609524B (en) | Industrial equipment residual life prediction model and construction method and application thereof | |
CN108445752B (en) | Random weight neural network integrated modeling method for self-adaptively selecting depth features | |
Cen et al. | A gray-box neural network-based model identification and fault estimation scheme for nonlinear dynamic systems | |
CN112947385B (en) | Aircraft fault diagnosis method and system based on improved Transformer model | |
Titouna et al. | An online anomaly detection approach for unmanned aerial vehicles | |
CN112784920A (en) | Cloud-side-end-coordinated dual-anti-domain self-adaptive fault diagnosis method for rotating part | |
CN116306289B (en) | Multi-source domain self-adaption-based electromechanical device cross-domain residual life prediction method | |
CN115510950A (en) | Aircraft telemetry data anomaly detection method and system based on time convolution network | |
WO2019178930A1 (en) | Fault diagnosis method for mechanical device | |
You et al. | An adaptable UAV sensor data anomaly detection method based on TCN model transferring | |
Zhang et al. | Recurrent neural network model with self-attention mechanism for fault detection and diagnosis | |
CN113469013A (en) | Motor fault prediction method and system based on transfer learning and time sequence | |
CN113935413A (en) | Distribution network wave recording file waveform identification method based on convolutional neural network | |
Lang et al. | Data augmentation for fault prediction of aircraft engine with generative adversarial networks | |
Wu et al. | Remaining useful life prediction of bearings with different failure types based on multi-feature and deep convolution transfer learning | |
Zhao et al. | Intelligent fault diagnosis of hypersonic vehicle based on rescnn-lstm-att | |
CN113158537B (en) | Aeroengine gas circuit fault diagnosis method based on LSTM combined attention mechanism | |
Hu et al. | Research on pest and disease recognition algorithms based on convolutional neural network | |
Yu et al. | Fault diagnosis of wearable temperature sensors based on multi-scale feature extraction | |
Cui et al. | Prediction of Aeroengine Remaining Useful Life Based on SE-BiLSTM | |
Mortensen | Fault Detection in Mobile Robotics Using Autoencoder and Mahalanobis Distance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |