Detection of Sensor Faults in Small Helicopter UAVs Using Observer / Kalman Filter Identification

Reliability is a critical issue in navigation of unmanned aerial vehicles UAVs since there is no human pilot that can react to any abnormal situation. Due to size and cost limitations, redundant sensor schemes and aeronautical-grade navigation sensors used in large aircrafts cannot be installed in small UAVs. Therefore, other approaches like analytical redundancy should be used to detect faults in navigation sensors and increase reliability. This paper presents a sensor fault detection and diagnosis system for small autonomous helicopters based on analytical redundancy. Fault detection is accomplished by evaluating any significant change in the behaviour of the vehicle with respect to the fault-free behaviour, which is estimated by using an observer. The observer is obtained from input-output experimental data with the Observer/Kalman Filter Identification OKID method. The OKID method is able to identify the system and an observer with properties similar to a Kalman filter, directly from input-output experimental data. Results are similar to the Kalman filter, but, with the proposedmethod, there is no need to estimate neither systemmatrices nor sensor and process noise covariance matrices. The system has been testedwith real helicopter flight data, and the results compared with other methods.


Introduction
Unmanned aerial vehicles UAVs are increasingly used in many applications in which ground vehicles cannot access to the desired locations due to the characteristics of the terrain and the presence of obstacles.In many cases, the use of aerial vehicles is the best way to approach the objective to get information or to deploy instrumentation.
Fixed wing UAVs, rotorcrafts, and airships with different characteristics have been proposed and experimented see, e.g., 1 .Helicopters have high manoeuvrability and hovering ability.Then, they are well suited to agile target tracking tasks, as well as to inspection model and the Kalman filter gain directly from time-domain input-output data, and this makes it an interesting method for practical applications.OKID was originally developed for the identification of large flexible space structures 17 , and it has also been used for aircraft system identification 18, 19 and other applications 20 .A related concept is the Interaction Matrix 21 , which has been used for fault isolation in actuator 22 and sensor 23 fault detection in structures.
In this paper, model-based diagnosis of sensor faults in an autonomous helicopter is investigated.The model is obtained with the OKID method.Experiments with an autonomous helicopter have been conducted.Preliminary results were presented in 24 .The rest of the paper is organized as follows: small autonomous helicopters are described in Section 2. In Section 3, the OKID method is introduced.Section 4 presents the fault detection and isolation approach.The results on the application of these techniques to an autonomous helicopter are presented in Section 5. Finally, Section 6 is devoted to the conclusions.

Small Autonomous Helicopters
Several small autonomous helicopter prototypes have been developed in recent years at different research centres throughout the world 25 .In most cases, the prototype is built upon a commercial airframe, to which sensors, computers, and communication equipment are added.In many cases, the airframe is a conventional model helicopter see, e.g., the MARVIN 26 , AVATAR 27 , or the HERO 28 autonomous helicopters in Figure 1 .In some cases, the Yamaha RMAX spraying helicopter is used as airframe see for example the GTMax 14, 15 .
Helicopter autonomous flight needs precise position and attitude information for control and stabilization.Small autonomous helicopters carry a pack of sensors that in a typical case includes an inertial measurement unit IMU with 3 gyros, 3 accelerometers, and 3-axis magnetometer for attitude determination, a centimeter-precision kinematic DGPS, a sensor for measuring the main rotor rpm, an ultrasonic, or barometric altitude sensor for takeoff and landing.
A fault in one of the sensors may induce position and attitude estimation errors if undetected.Reconfiguration in these cases usually consists in isolating the faulty sensor and using the other sensors to get the best estimation of position and attitude.
The experimental data presented in this paper have been recorded using the MARVIN helicopter 26 , which is based on a conventional model airframe see Figure 1 .Sensors for position and attitude determination include an IMU with three magnetometers, three accelerometers, and three piezo-electric gyroscopes , an ultrasonic rangefinder looking down and a Novatel RT-2 carrier phase differential GPS receiver.

The Observer/Kalman Filter Identification Method
The Kalman filtering problem has been studied for several decades.To compute the Kalman filter gain, the system model and the individual process and measurement noise covariance matrices should be known.A mathematical model of the system can be derived analytically or experimentally from input-output measurement data by a system identification method.An estimate of the measurement noise covariance may be obtained by examining the response of the sensor devices.The process noise covariances, however, are almost impossible to obtain by direct measurement and some guesswork is required.It is, thus, difficult to determine accurately the individual process and measurement noise characteristics.The process noise includes system uncertainties and input noise.But, collectively, their information is present in the system input-output data.The observer Kalman filter identification OKID 17 method is able to obtain an observer that converges to the Kalman gain, directly form input-output data.
The OKID algorithm 29-31 was developed at NASA Langley to model large flexible space structures.A description of the practical implementation of OKID 32 is presented in this section.A more in-deep description of the method can be found on the references.The OKID algorithm minimizes the error in the observer, which will converge to the true Kalman filter for the data set used, given that the true world process is corrupted by zero-mean white noise.
The OKID method of system identification uses only input and output data to construct a discrete-time state-space realization of the system.Since OKID's development at NASA Langley for the identification of lightly-damped space-structures, many advances on the basic theory have been published 33 .The OKID identification method has several advantages.The main advantage is that it requires only input and output data to formulate the model: no a priori knowledge of the system is needed.Second, the OKID method produces a pseudo-Kalman state estimator, which is very useful for control applications.Last, the modal balanced realization of the system model means that truncation errors will be small.Thus, even in the case of model order error the results of that error will be minimal.
The first step in applying the OKID methodology to the experimental data 32 begins with the standard state-space difference equation for an LTI system where k is the index time variable, x is the state vector, y is the output vector, and u is the input vector.
If the system is assumed to be initially at zero, and the inputs are set to unit values for one sample at time zero, then the convolution of 3.1 results in the unit pulse response of the system y 0 D; y 1 CB; y 2 CAB; y 3 CA 2 B; . . .; which are defined as the System Markov parameters Y , and they are invariant under a similarity transformation.In general, the response of the system can be shown to be

3.3
Assuming that the input u is a unit pulse at time zero, then the response reverts to the system Markov parameters.These system Markov parameters can be assembled into a specific form which is known as the generalized Hankel matrix

3.4
This matrix can be decomposed into the product of the observability matrix, a state transition matrix, and the controllability matrix; thus, the Hankel matrix in a noise-free case will always have rank n, where n is the system order.Unfortunately, in real data, noise will corrupt the rank deficiency of the Hankel matrix the Hankel matrix will always be full rank .Thus, the Hankel matrix is truncated using singular value decomposition SVD at an order that sufficiently describes the system.In practice, the singular values of the Hankel matrix are plotted and the singular values will decrease gradually until a sudden drop that indicates the model order.This sudden decrease is the hallmark of the transition between real and noise modes of the system.This truncated Hankel matrix is then used to reconstruct the triplet A, B, C in a balanced realization.This is referred to as the eigensystem realization algorithm ERA ; a modified version of this algorithm that includes data correlation is used to identify the helicopter model.A more complete treatment of the subject can be found in 29 .
Thus, given the system Markov parameters, it is possible to determine the order of the system and generate a balanced model that is adequate for control.In real systems, however, the system pulse response cannot be obtained by simply perturbing the system with a pulse input.A pulse with enough power to excite all modes above the noise floor would likely saturate the actuator or respond in a nonlinear fashion.The pulse response of the system can, however, be reconstructed from a continuous stream of rich system input and output behaviour.Under normal circumstances, there are not enough equations available to solve for all of the system Markov parameters.If the system is asymptotically stable, such that A k 0 for some k, then the number of unknowns can be reduced.
Rather than identifying the system Markov parameters which may exhibit very slow decay, an asymptotically stable observer can be used to form a stable discrete state-space model of the system.The poles of the system can be assigned arbitrarily, and hence specifying the decay rate of the Markov parameters of the system with the observer, and simultaneously the number of parameters needed before they have decayed to a negligible level.Considering the original system in 3.1 , and adding a discrete-time observer with unknown initial condition

3.5
Substituting y k in the observer equation, the system can be rewritten as

3.7
This new system has as input v k the original input u k augmented with the output y k , and the same output as the original system.The matrix G is called the observer gain matrix, which has to be determined.
A convolution is performed on the new observer equations, and the output at any time can be written as where p is a time-step integer.In matrix form, this equation can be rewritten as where y is the collection of output data, Y is the vector of observer Markov parameters, V is the stack of input and output data, X is the observed state, and ε is the miss-modelling noise

3.10
The new observer state transition matrix, A, has some unique properties that can be exploited for system identification.In a noise-free case, the observer can be made deadbeat placing the eigenvalues at the origin, making CA p X zero for time steps greater than the system order, n.In the presence of noise, A corresponds to a Kalman filter.In either case, it is asymptotically stable, and there will be a value of p such that the quantity A p is negligible.In the OKID algorithm, p is chosen such that the middle term of 3.9 is negligible.The equation for the observer Markov parameters is solved using the standard least squares solution

3.11
This minimizes the error term, ε T ε, which is the difference between the output obtained using this model with A p neglected and the measured values.
The system Markov parameters Y can be computed from the observer Markov parameters Y in the following way.The observer Markov parameters are defined as: where

3.13
Then, the observer Markov parameters can be partitioned into two blocks in the following way:

3.14
The system Markov parameters were defined in 3.2 , and they can be computed from the above-defined partitions

3.15
By induction, the general relationship between the system Markov parameters and the observer Markov parameters is

3.16
Then, the desired system realization A, B, C, D can be obtained from the system Markov parameters.To identify the observer gain G, first the sequence of parameters Z k will be defined

3.17
These parameters Z k can be recovered in terms of the observer Markov parameters partition blocks in 3.14 .The first parameter in the sequence is simply

3.18
The next sequence parameter By induction, the general relationship is

3.21
Then, the observer gain G can be computed from where Equation 3.22 implies that the observer gain G is automatically in the same coordinates as those for a set of A, B, and C resulted from any realization.Furthermore, 3.16 and 3.21 can be combined as a single-matrix equation for computation, and the combined system and observer Markov parameters used to identify A, B, C, D, and G at the same time by a time domain method as the ERA/DC algorithm detailed in 17 .
The main advantage of this approach is that the observer gain, G, which can be shown to converge to the steady-state Kalman filter gain 17 , is obtained directly from input/output data, without any prior knowledge of the system, and, at the same time, the system matrices are also obtained, which can be of significant advantage for practical applications.

Sensor Fault Detection Structure
The helicopter sensor FDI subsystem performs the tasks of failure detection and identification by continuously monitoring the outputs of the sensors.Under nominal conditions, these follow predictable patterns, within a tolerance determined by the amount of uncertainties introduced by random system disturbances and measurement noise in the sensors.Usually, sensor FDI tasks are accomplished by observing when the output of a failed sensor deviates from its predicted pattern.
For the detection of faults in the helicopter sensors, a bank of output estimators has been implemented as showed in Figure 2. The number of these estimators is equal to the number of system outputs.Thus, each device is driven by a single output and all the inputs of the system.In this case, a fault on the ith output sensor affects only the residual function of the output observer or filter driven by the ith output.
A residual is generated for each sensor, comparing the estimator output with the sensor output.Each residual is not affected by the other sensors, and, therefore, fault identification is straightforward; each residual is only sensitive to a single helicopter sensor.If the residual r k goes above the threshold level, a fault has been detected in sensor k.The FDI system with the above structure has been implemented using Kalman filters obtained with the OKID method.The results are presented in the following section.

Linear Observers for Helicopter Modelling
Helicopters are nonlinear coupled multiple-input, multiple-output MIMO systems.However, when dealing with nonaggressive flight scenarios, such as hovering, updown and forward-backward flights, a linear model can be sufficient for many applications.Furthermore, the models are used in FDI for prediction in the short term of helicopter position and orientation and sensor outputs.
In any case, the flight data used for identification do not cover the whole flight envelope for safety reasons in the experiments.Then, the designed FDI system has to check that the flight conditions are within the values of some variables used for identification.If the FDI system detects a fault when one of these variables is outside the specified range, the FDI system will issue a warning, but it has to confirm the fault declaration after the warning when the flight variables are inside the specified range.
The variables used to specify the flight envelope covered by the identification data, and the limit values are the helicopter velocity in the XY plane in world coordinates VelXY < 10 m/s , the vertical helicopter velocity in world coordinates VelZ < 2 m/s , the helicopter pitch angle Pitch < 20 • , and the helicopter roll angle Roll > 10 • .Figure 3 shows helicopter velocities in a typical experiment used for identification.
From a practical perspective, a FDI system based on linear observers is easier to implement on board small autonomous helicopters, which usually have limited computing resources.Linear observers have been used in this paper for fault detection, although the FDI system has been tested with real helicopter experimental data.
In aircraft and helicopter modelling and control, the main error sources are sensor noise and atmospheric perturbations.Sensor noise is accounted for explicitly in the OKID formulation.Atmospheric perturbations are caused mainly by air turbulence and wind gusts, and they are considered as process noise in the OKID method.The advantage of the OKID formulation is that the covariance matrices of these sensor and process noises are obtained directly in the OKID identification without intervention.The only requirement is that the input/output data is sufficiently representative of the system dynamics, as is a general rule in system identification.

Sensor Failure Types
Sensors used in autonomous helicopters can fail in several ways.Some failure types are general for various sensors, while others are specific of a single sensor.The failure types that have been considered are the following.
1 Stuck with constant bias sensor failure.In this failure type, at a given time the sensor gets stuck with a constant bias, and the output remains constant.This type includes zero-output error, that can be due to electrical or communication problems.2 Drift or additive-type sensor failure.This is a very common failure in analog sensors.Due to internal temperature changes or calibration problems, the sensor output has an added constant term drift .
3 Multiplicative-type sensor failure.This failure type is caused by a scaling error in the sensor output a multiplicative factor is applied to the sensor nominal value .

Input-Output Data for Model Identification
High-quality flight data are essential to a successful identification.The main concerns are the accuracy of the estimated vehicle states and the information content of the flight data i.e., whether the measurements contain evidence of the relevant vehicle dynamics .
The system identification has been performed using input-output data taken by flying the helicopter in a way to obtain evidences of the relevant vehicle dynamics.The only realistic way to obtain these data is to perform special purpose experiments with the helicopter.In these experiments, that were done open loop by a human pilot, an input sequence was used in one of the inputs of the helicopter, while maintaining almost constant the other inputs these inputs were modified slightly by the pilot to maintain stability if needed .
Input sequences that are normally used in aircraft and helicopter identification include the doublet signal and the 3211 input signal.The 3211 input sequence shown in Figure 4 a has been used in the identification experiments because it has higher-frequency content while still being easily reproduced by the pilot.Figure 4 b shows the corresponding real input signal generated by the human pilot in a sample experiment.

Residual Generation
Independent residuals are constructed for each different sensor failure.Residuals are designed so that they respond to an individual failure and not to the others.In general, residuals R k are functions of the squared difference between real c i and estimated c i sensor outputs where m i are weighting coefficients that are determined for each failure based on experience and experimentation.The first time the residual goes above the threshold level, the fault is supposed to be present.The fault detection procedure is designed to decide if the observed changes in the residual signal R k can be justified in terms of the disturbance measurement noise and/or modelling uncertainty as opposed to failures.It is critical to minimize the detection delay associated with a "true" fault; furthermore, the false alarm rate should be minimized while, at the same time, no "true" faults should remain undetected.A well-known filter for the detection of moderate persistent shift in the mean value of the residual is the CUSUM filter 34 .This filter is used to detect both positive and negative changes in the mean value of the residual r k caused by the occurrence of a fault.Although the CUSUM filter balances the detection delay with the false alarm rate, in this work it has been considered that fast fault detection is the most critical aspect of the FDI system, and, therefore, a threshold-based logic has been implemented.

Fault Detection Results
In this section, the results of MARVIN sensor FDI system using Kalman filters obtained with the OKID method are presented.All the experiments presented in this section have been done using real MARVIN flight data.
Flight data were recorded from several experiments carried out at the Lousa Portugal airfield during the general experiments of the COMETS project.These experiments were performed in spring with temperatures around 20 • C and low-wind conditions.
The MARVIN helicopter has 12 individual sensors: 3 gyroscopes, 3 accelerometers, 3 components of the magnetic sensor, and the 3 GPS coordinates.Since there are too many possible combinations of sensors and failure types, only a few representative cases will be described in detail in this section.The z component of the gyroscope angular velocity sensor will be used as representative case of sensor failure detection for the presented failure types.

Stuck with Constant Bias Sensor Failure Detection
In this case, the gyro-z sensor output gets stuck with the last output value before the fault produced.This category also includes zero-output sensor error.In Figure 5, a fault has been reproduced in the gyro-z sensor at t 3 s.In Figure 5 a , the residual generated by the OKID estimator is shown.It can be seen that, shortly after the fault, the residual goes above the threshold level dashed horizontal line , and the fault is detected Figure 5 b .This class of "hard" failures was detected by the OKID fault detection system in all cases for all sensors, with no false positives.

Additive-Type Sensor Failure Detection
Figures 6 and 7 show the results of the fault detection of additive faults in gyro-z sensor output.In Figure 6, a 3.5 degrees/sec drift has been added, and the residual detects the fault very fast.In Figure 7, a 1.75 degrees/sec drift has been added to the sensor output at t 3 s.
A fault detectability study has been done with the additive type sensor failure.Two cases have been considered: a drift of 50% of the maximum sensor value, whose results are   1 show that a drift 50% of maximum sensor value can be detected reliably using OKID filters in almost all the experiments, with short detection times.On the other hand, the results of Table 2 show that a 10% drift is much harder to detect using OKID filters, because it is more difficult to discriminate faults from sensor noise.Although threshold levels have been adjusted accordingly, there were some undetected faults and false alarms.As can be expected, detection times are larger than with a 50% drift.

Multiplicative-Type Sensor Failure Detection
Figure 8 shows the results of the fault detection of a multiplicative fault in the gyro-z sensor output.When the fault occurs, the sensor output is only 50% of the nominal output.
A fault detectability study has also been done with the multiplicative type sensor failure.As was done in the above subsection, two cases have been considered: a sensor output of 50% of the nominal output, whose results are presented in Table 3, and a sensor output of 10% of the nominal output, whose results are presented in Table 4.
The results presented in Table 3 show that a 50% multiplicative fault can be detected reliably in all the experiments.The detection time is larger than in the additive type sensor failure.The results of Table 4 show that a 10% multiplicative fault can also be detected with high reliability.

Discussion of Results
In additive and multiplicative sensor faults, the detection performance depends on the size of the failure.For example, for multiplicative faults where sensor output is 50% of the nominal output, the faults were detected in all cases with no false positives.But if the sensor output is 90% of the nominal output, there were some undetected faults, making fault detection unreliable.Depending on the specific sensor, the minimum error that was detectable reliably was between 80 and 85% of the nominal sensor output.As a general remark, sensor fault detection results obtained with OKID are similar to those obtained with a traditional Kalman filter, but, with the proposed method, the OKID observer was obtained directly from input-output data without having to estimate system model matrices the measurement and process noise covariance matrices, as is needed with the traditional Kalman filter.In fact, although system matrices are usually estimated by system identification or physical insight, the measurement noise covariance matrix is obtained frequently from sensor manufacturer datasheets without considering individual  sensor characteristics or calibration.Furthermore, the process noise covariance matrix is usually calculated arbitrarily.For comparison, Table 5 shows the mean fault detection time in case of a drift fault of 25% of maximum sensor value, for several algorithms: 1 the OKID method presented in this paper, 2 an ARX-based fault detection system see 16 , 3 a correctly tuned Kalman filter, and 4 a Kalman filter in which the parameters have been estimated with a 20% error.In all four cases, the threshold levels have been adjusted to not get false positives.When no number appears in Table 5, it means that in some cases there were undetected faults.
It can be seen from Table 5 that the OKID results are similar to the ARX and Kalman filter results.OKID is slightly better than ARX and more robust, since it includes the observer.On the other hand, OKID results are similar to the classical Kalman filter if it is correctly tuned, but they are better if it is not correctly tuned.Furthermore, the OKID method makes Mathematical Problems in Engineering much easier the development of the fault detection system, since there is no need to estimate separately the system matrices and the covariance matrices.

Conclusions
The use of autonomous helicopters, particularly in civilian applications, requires the improvement of safety conditions to avoid potential accidents.Fault detection and isolation plays an important role in this context.This paper has presented a system for helicopter's sensors fault detection based on the OKID method.The main advantage of the proposed method is that there is no need to estimate neither the system matrices nor the measurement and process noise covariance matrices, as all the information is extracted from experimental input-output data.Experiments with an autonomous helicopter have been conducted to collect input-output data in many different flight conditions.Several failure types have been considered."Hard" failures zero or constant sensor output are easily detected by the OKID fault detection system."Soft" failures sensor output with additive or multiplicative error are detected depending on the error size.If errors are too small, they cannot be distinguished from noise.OKID fault detection results are compared to the obtained using ARX linear observers and classical Kalman filters, presenting advantages over both of them.

Figure 1 :
Figure 1: MARVIN helicopter Technical University of Berlin and HERO helicopter University of Seville .

Figure 2 :
Figure 2: Bank of OKID estimators for output residual generation.

Figure 3 :
Figure 3: Helicopter velocities in a typical experiment.

Figure 4 :
Figure 4: a 3211 Input signal definition.b 3211 Real input signal in a sample experiment.

Table 1 :
Sensor fault detection with drift of 50% of maximum sensor value OKID filters .

Table 2 :
Sensor fault detection with drift of 10% of maximum sensor value OKID filters .

Table 3 :
Sensor fault detection with: a sensor output of 50% of the nominal output.

Table 4 :
Sensor fault detection with sensor output of 10% of the nominal output.

Table 5 :
Comparison of results: sensor fault detection with drift of 25% of maximum sensor value for OKID, ARX, correctly tuned Kalman filter, and a Kalman filter with 20% error parameter estimation.