{'fraction_non_alphanumeric': 0.025155650588013334, 'fraction_numerical': 0.005156908370542733, 'mean_word_length': 4.893995552260934, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deep Belief Net-Based Fault Diagnosis of Flight Control System Sensors

The present study implements a model based on the deep belief net (DBN) into the sensor fault diagnosis of the flight control system. The principle of DBN system identification was adopted to simulate and establish a nonlinear observer of the unmanned aerial vehicle (UAV) for the online estimation of sensors’ output, which identified the fault type by analyzing the residuals of estimated data and the actual output. After the fault detection is completed, the measured value of the faulty sensor is isolated and replaced by the observer-generated value, in order to ensure the UAV normal flight. The proposed DBN model uses the data of normal flight control system sensors as training samples for offline training. A flight control digital simulation system was established to select the optimal DBN model via comparative test runs. Eventually, the common faults of sensors were analyzed and diagnosed online. The results obtained strongly indicate that the proposed method ensures a rapid and accurate diagnostics and isolation of faults, as well as provides a proper signal reconstruction.


Introduction
With the rapid development of computer technologies, deep learning has become a popular research direction of machine learning and gained a wide range of applications, including the handwritten numeral recognition, data dimensionality reduction, speech recognition, image understanding, machine translation, prediction of protein structures, and emotion recognition [1][2][3][4][5]. Another promising field of the deep learning application is flight control, in particular, that of unmanned aerial vehicles (UAVs). Their increasingly challenging missions require more and more sophisticated flight control systems, whose failure probability increases accordingly, and their fault detection becomes very topical. Insofar as sensor faults account for about 70% of all faults in UAV flight control systems, the primary task is in the fault analysis of a flight control system becomes its sensor fault diagnosis. Unfortunately, most conventional fault diagnosis methods either necessitate the construction of an accurate mathematical model of the system [6] or place specific stringent requirements for the collected data [7]. The online diagnosis function was successfully introduced in the sensor fault diagnosis method based on the neural network observer [8]. However, it assigned separate observers for each output parameter, which made the problem solution too sophisticated. Furthermore, each observer form implied multiple inputs and single outputs with low data utilization rate.
In this respect, deep learning application seems to be more lucrative due to its excellent featurelearning ability. The principle of deep belief net identification is applied to the designed multi-input and multi-output observer, in order to estimate several outputs. This peculiarity reduces model complexity and improves the data utilization rate. The fault can be detected and classified by the residual analysis of observed results and actual outputs, with the further signal reconstruction. This study uses the UAV flight control system sensor as a research object, applies to it the proposed innovative DBN-based fault diagnosis system, as well as conducts numerical simulations to verify the feasibility of the developed fault diagnosis system performance.

The Principle of Deep Belief Net Observer
Deep belief net (DBN) is a generic model of deep learning introduced in 2006 by Hinton et al. [1,2,9], which is aimed to train a hierarchy of features one level at a time in iteration process called "unsupervised pre-training". At each iteration, one layer of weights and biases is added, while a set of layers is constructed after multiple iterations. The pre-trained system can be used to build a classifier. To form the deep architecture, multiple layers should be appropriately stacked, e.g., by stacking pretrained restricted Boltzmann machines (RBMs) into a deep belief network (DBN), stacking autoencoders (or RBMs) into a deep autoencoder, or constructing a free energy function iteratively. The first option, which is known to have strong universality and wide application range, is used in this study.
RBM is a typical neural network, which allows one to connect nodes between visible and hidden layers, whereas Hidden units can obtain the high-level correlation of the visible units. The RBM structure is depicted in figure 1 . The energy function of the standard RBM is defined as: w is the weight between visible and hidden nodes j and i, respectively; j a and i b are the biases of the visible node j and hidden node i, respectively. The smaller is the energy function, the more stable is the RBM system. When the network energy reaches its minimum through training, the parameters of the network are optimal.
The result of stacking a series of RBMS is a DBN. Figure 2 depicts a typical DBN with three hidden layers. The number of nodes in the visible and outer layers are determined by the vector dimension of the training data set and by the number of parameters to be estimated, respectively. However, insofar as there are no definite rules for selecting the number of nodes in each hidden layer, the trial-and-error approach is mainly used.
output layer  The DBN observer is a tool based on the deep belief net, which exploits the principle of system identification to estimate the pending output parameters of the current instant by observing the flight state and input instructions of the previous instant for the system [10]. . Then, the discrete mathematical model of a dynamic nonlinear flight control system takes the following form: The flight status data 12  , which conversion can be represented by vector Y. Therefore, according to the output parameters of the sensors to be detected, the obtained dependence can be summarized as: The above dependence depicts the basic principle of DBN observer. The right and left parts of equation (4) correspond to the DBN observer input and output, respectively. The previous flight data, e.g., acquired via a quick access recorder (QAR), are processed as the training dataset of the observer model, and the above relationship is fitted with the feature identification ability of DBN. After the observer is trained, the single data of deviation angle and accelerator at the previous moment of UAV are input into the observer, and the output is the predicted output of the sensor to be diagnosed at the current instant. The residual error is assessed by comparing the predicted output with the actual one. The residual error analysis will reveal whether the sensor failed or not and, in the former case, identify the particular fault type [11]. The flowchart of the sensor fault diagnosis for a flight control system based on the DBN observer is depicted in figure 3.

The Structure and Training of Observer
For the DBN observer described above, the unsupervised pre-training [12] combined with the backpropagation algorithm [13] based on the conjugate gradient algorithm was selected to fine-tune the parameters in the training process, as well as identify the nonlinear control model and dynamic model of the particular UAV. After training, the observer is added to the whole simulation system to realize the on-line fault diagnosis and signal reconstruction. In the design of UAV control ratio, the symmetry postulate is usually met, so that the longitudinal and lateral motions of UAV can be decoupled. For brevity sake, only the longitudinal motion of UAV was investigated in the further test simulations. The overall frame diagram of UAV longitudinal control system is shown in figure 4.

Flight Control System
Mission-instruction System

The Principle of Dbn Observer
The state output of a longitudinal system includes such data as speed, posture, altitude, and position, which are related to longitudinal control of the altitude h, rate of change in altitude h , angle of pitch , and angular rate of pitching  . The input is the deviation angle Z  and throttle opening signal T  , while the output parameters of the sensors to be diagnosed are the angle of attack  , angle of pitch , and angular rate of pitching  . Thus, the observer principle can be described as: , , , , , , According to the above principle, the observer was established and trained using the previous normal flight status data. After training, the observer could output the estimated values at the instant k by inputting the flight status values corresponding to k. The estimated output of the observer was compared with the actual output of the sensor to be diagnosed. If the residual error exceeded the preset threshold value, this indicated that the fault occurred, which type could be identified by the linear regression analysis, and then the feedback signal of control ratio was reconstructed to maintain the normal flight of UAV. If the residual value was less than the set threshold value, this indicated that the sensor operation was normal.

The Training of DBN
Since DBN is a probabilistic model-based neural network, the data should be normalized before training. The training of DBN mainly consists of two parts: (i) the pre-training of RBM without layerby-layer supervision and (ii) the backpropagation algorithm, which is used to adjust the network with supervision, in order to ensure that its parameters reach their optimal values. The specific steps are as follows: Step 1: Train the first RBM to achieve a stable state with 0 vh = .
Step 2: Take the output of the first RBM as the visible layer input of the second RBM and train the second RBM until it reaches a stable state.
Step 3: Repeat step 2 until the last RBM.
Step 4: Fine-tune the parameters of each layer with the backpropagation algorithm, so that the whole network can be optimized.
During the first three steps, the pre-training of RBM mainly adopts the k-step contrast divergence (CD-k) algorithm, with k=1. The specific training process of the CD-k algorithm is as follows.
(1) Assign the training sample data to the visible layer and map it to the hidden layer. Take a set of training samples ( ) 12 , , , m x x x = x and assign it to the visible layer as the initial state. Then, upon its substitution into the activation function, the activation probability of the hidden node can be derived as follows: (2) Consider the hidden layer samples. A group of samples is extracted from the probability distribution of the hidden layer derived from the above formula as the state of the hidden layer nodes. In the probability distribution of the hidden layer, the following relationship is assumed: (7) (3) Refactor visible layer. According to the hidden layer state data extracted from the above formula, the node probability of the reconstructed visible layer is calculated as follows:   (9) (5) Refactor the new hidden layer. Take the reconstructed visible layer as the visible layer nodes and input them into the activation function. The probability of the new hidden layer node activated is derived as follows: (10) (6) Update the model parameter set  . According to the residuals of the original and reconstructed visible layers, the first calculated hidden layer, and the second reconstructed hidden layer, the update of RBM internal parameters is reduced to the following set of equations: (11) where  is the learning rate, which value determines the step length of each adjustment. The variation range of  being from 0.005 to 0.200, the value of 0.1 =  was used in this study. Repeat steps 1-6 until the reconstruction error converges or becomes less than the required value.

Simulation Verification
The standard historical data of UAV level flight at different altitudes were used as the training and test samples. The total time of the simulation was 65s, the sampling interval was 10ms, and the samples were normalized. The network structure included five layers: one input layer, multiple hidden layers, and a single output layer. Firstly, unsupervised pre-training was adopted to train the network. Then, the parameters were tuned up and down by the backpropagation algorithm based on the conjugate gradient algorithm.
The number of nodes in hidden layers is known to influence the performance of the DBN observer to some extent. This study compared the performance of DBN observers with different structures to find the optimal DBN structure based on the same training and test samples. The experimental results are listed in table 1.
The number of required tuning iterations in table 1 was determined by the convergence criterion of the structural errors of each network. The average variance and mean deviation were derived as , e i j was a training or test sample error sequence and n was the number of sample data in the training or test sets. According to the training and test error results in table 1, the network with the maximal number of layers was not the optimal choice, insofar as an excessive number of layers made the training more complicated and hindered the optimal solution derivation. As the number of nodes in each layer increased, the accuracy was gradually improved. However, this process became saturated after reaching the critical number of nodes. Finally, the three-layer DBN network with a structure of 8-50-50-200-3 was selected to construct the observer model, according to the test error comparative analysis.
The common fault types of sensor in the simulation included the stuck fault (whereas the sensor output remained unchanged for a certain period), constant deviation fault, and constant gain fault. Such faults were simulated and analyzed, respectively, during the UAV climbing process. After fault incorporation, the values of angle of attack, angle of pitch, and angular rate of pitching would be erroneous; then, they would be taken as the observations of the sensor to be diagnosed. The fault was incorporated after 20s. When the fault occurred, the input values of the next moment were replaced by the output values of observers. During the simulation process, only one kind of parameter was The simulation results obtained strongly indicate that the DBN observer designed in this study can estimate the correct output of the sensor quickly and accurately. After the sensor malfunction, the proposed fault diagnosis system can rapidly detect the fault and replace the erroneous output of the malfunctioned sensor by the observer output. The performed signal reconstruction allows the UAV to continue its flight mission safely and reliably.

Conclusions
In this paper, the observer designed on the deep belief net basis is adopted for the sensor fault diagnosis of the flight control system by utilizing the excellent feature extraction capability of deep learning. In the simulation, firstly, the observer was trained by unsupervised pre-training, and then parameters were tuned up and down by the backpropagation algorithm based on the conjugate gradient algorithm. After various functions were tried, a new one was presented and adopted, which improved the estimation accuracy. Finally, the trained observer could estimate the sensor output rapidly and accurately, as well as realize the fault diagnosis of sensor and feedback signal reconstruction. As compared to the conventional BP observer, the DBN one has the advantages of shorter total training time and higher estimation accuracy. Moreover, it can reduce the number of observers, which makes the fault diagnosis system more concise. The proposed method is readily implemented and meets the real-time requirements, concerning a timely warning and provision of necessary data for the reconstruction and independent maintenance of the flight control rules. It is found to be instrumental in the fault diagnosis, and its functionality will be refined in the follow-up studies.