Next Article in Journal
Method for Damage Detection of CFRP Plates Using Lamb Waves and Digital Signal Processing Techniques
Previous Article in Journal
Uncertainty Quantification at the Microscale: A Data-Driven Multi-Scale Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Fault Detection on Sensors of the Quadrotor System Using Bayesian Network and Two-Stage Kalman Filter †

1
Mechatronics Engineering Department, Istanbul Technical University, Istanbul 34457, Turkey
2
Control and Automation Engineering Department, Istanbul Technical University, Istanbul 34457, Turkey
*
Author to whom correspondence should be addressed.
Presented at the 9th International Electronic Conference on Sensors and Applications, 1–15 November 2022; Available online: https://ecsa-9.sciforum.net/.
Eng. Proc. 2022, 27(1), 33; https://doi.org/10.3390/ecsa-9-13352
Published: 1 November 2022

Abstract

:
In recent years, model-based fault techniques have become popular due to their capability to reduce calculation cost. Bayesian Network and two-stage Kalman filter-based methods have recently become quite popular due to their robustness. In this paper, a model-based fault diagnosis method is presented that uses a Bayesian network and two-stage Kalman filter (TSKF) together to robustly determine the sensor faults in an Unmanned Aerial Vehicle (UAV) system. By using these two approaches together, the robustness of the fault detection in the sensor improved. For demonstrating the behavior of the proposed method, numerical simulations were performed in MATLAB/SimulinkTM environment. The results show that the proposed method is capable of detecting faults more robustly.

1. Introduction

UAVs have gained a high level of popularity during the last decade in civilian, military, and engineering applications because of the recent advances in sensing, communicating, computing, and controlling technologies. UAVs have several basic advantages over manned systems, including increased maneuverability, reduced cost, reduced radar signatures, longer endurance, and less risk to human life. They range in size from full-scale craft to miniature aircraft only centimeters in size. These UAVs are driven by electric motors, petrol engines, or gas turbines. There are lots of benefits of using UAVs in different circumstances, for example, taking over from civilian aircraft that operate in hazardous conditions. Another situation for using unmanned aircraft could be to carry out power line inspection on electrical cables. They are also used in mining, detection agriculture, and photography. As an example of a UAV system, the quadrotor is a relatively simple, affordable, and easy-to-fly system, thus it has been widely used to develop, implement, and test-fly methods of control. A quadrotor is an aircraft that becomes airborne due to the lift force provided by four rotors usually mounted in a cross configuration, hence its name. In this study, a quadrotor model is created based on the Qball X4 quadrotor system made by QuanserTM.
Fault detection and identification is an important concept for the safety and reliability of technical processes [1,2,3,4]. Model-based fault detection techniques have gained a great deal of popularity in recent years due to advantages regarding analytical redundancy. In these approaches, there is no additional cost or weight caused by hardware redundancy [5,6]. There are lots of studies dealing with the fault detection algorithms for quadrotor systems. Chamseddine, Zhang, Rabbath, Fulford, and Apkarian worked on actuator fault-tolerant control (FTC) for the Qball-X4. Their strategy was based on Model Reference Adaptive Control (MRAC). Three different MRAC techniques, the MIT rule MRAC, the Conventional MRAC (C-MRAC), and the Modified MRAC (M-MRAC), were implemented and compared with a Linear Quadratic Regulator (LQR) controller [7]. Yu, Zhang, Minchala and Qu worked on two control algorithms based on the linear quadratic (LQ) technique of infinite time and finite time horizon applied to a quadrotor helicopter unmanned aerial vehicle (UAV) in the presence of actuator errors, which were applied and compared [8]. The specific control algorithms implemented were linear quadratic regulator (LQR) and model predictive control (MPC) to control the faulty and error-free quadrotor helicopter UAV test beds for both scenarios. Freddi, Longhi and Monteriù addressed the problem of fault detection and isolation (FDI) for a mini quadrotor. First, a model for a four-rotor quadrotor was presented for a model obtained by a Lagrange approach. A control strategy based on PD (Proportional Derivative) controllers was presented to stabilize a quadrotor at low cruising speeds. Using a Thau observer, a diagnostic system was developed for the nonlinear model of quadrotor [9].
In this paper, a new model-based fault detection algorithm including both a Bayesian network [10] and TSKF [11] is developed. For this purpose, firstly a Bayesian network is proposed for the estimation of possible faults in the sensors. Secondly, a TSKF algorithm is used to detect the fault in each sensor more robustly. To estimate the fault, residuals are used. While creating the residual signal, the sensor measurements and the synthetic data obtained by adding noise to the sensor measurements are used. After the residuals are created, fault estimation is determined using the Bayesian network. Then, in order to determine fault more precisely, the sensors with a high probability failure rate are inserted into the TSKF to obtain more accurate results.
The remainder of this paper is structured as follows. In Section 2, dynamics and equations of the quadrotor are given. Then the fault diagnosis algorithms are presented in Section 3. In Section 4, the simulation results are presented and discussed in detail.

2. Dynamics and Equations of the Quadrocopter

2.1. Input Description

The complete dynamics of an unmanned aerial vehicle are quite complex for control purposes. For this reason, it is interesting to consider a simplified model for the quadrotor with a minimum number of states and inputs. However, this model includes all of the basic features that must be considered when designing control laws.
The quadrotor is controlled by the angular speeds of the four electric motors as shown in Figure 1. Each motor generates thrust and torque. Four control inputs as a function of torque and thrust are defined below:
u z = T 1 + T 2 + T 3 + T 4 u θ = L ( T 1 T 2 ) u ϕ = L ( T 3 T 4 ) u ψ = τ 1 + τ 2 τ 3 τ 4
where uz is the main thrust and uθ, uφ and uψ are applied pitch, roll, and yaw moments, respectively. The main thrust is the sum of the individual thrusts of each motor. The pitch torque is a function of the difference T1T2, the roll torque is a function of T3T4, and the yaw torque is the sum t1 + t2t3t4. The torque produced by each rotor is proportional to its thrust via the relation of ti = KψTi where Kψ is the constant of proportionality.
The relation between the thrust and pulse width modulation (PWM) input to each motor is approximated by a zero-order transfer function, and can be expressed as follows:
[ u z u θ u ϕ u ψ ] = [ K K K K K L K L 0 0 0 0 K L K L K K ψ K K ψ K K ψ K K ψ ] = [ u 1 u 2 u 3 u 4 ]

2.2. Quadrotor Dynamics and Equations

Using both Euler–Lagrange and Newton–Euler approaches, it is possible to show that the dynamics of the quadrotor UAV can be defined as the following nonlinear equations:
( m x ¨ = u z ( cos ϕ sin θ cos ψ + sin ϕ sin ψ ) m y ¨ = u z ( cos ϕ sin θ sin ψ sin ϕ cos ψ ) m z ¨ = u z ( cos ϕ cos θ ) m g J 1 θ ¨ = u θ J 2 ϕ ¨ = u ϕ J 3 ψ ¨ = u ψ
where x, y, and z are the coordinates of the quadrotor UAV’s center of mass in the earth-frame; m: mass, θ: pitch, φ: roll, ψ: yaw Euler angles, respectively, and Ji where i = 1, 2, 3 are the moments of inertia along the y, x, and z directions, respectively. The parameters used while creating the mathematical model of the quadrotor are given in Table 1 as follows.

2.3. Linearization and State Space Description

In order to linearize the nonlinear Equation (3), it is fixed around an equilibrium point. The stated variables are defined as follows:
x ¯ = [ x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 ] T = [ x x ˙ y y ˙ z z ˙ θ θ ˙ φ φ ˙ ψ ψ ˙ ] T
where the underline indicates the vector form. In addition to that, to define the equation in the linear state space form, a nominal point is needed. Moreover, this assumes that the quadrotor stays in a predefined position with no yawing and small roll and pitch angles. Then, the nominal inputs are as shown:
[ u ˜ z u ˜ θ u ˜ ϕ u ˜ ψ ] T = [ m g 000 ] T
where “~” denotes the nominal value and g is the gravitational acceleration. Linearized state space A, B, C, and D matrices are the Jacobian matrices calculated at the nominal points.
x ¯ ˙ = A x ¯ + B u ¯ y ¯ = C x ¯ + D u ¯
A = f x ( x ¯ ˜ , u ¯ ˜ , t ) , B = f u ( x ¯ ˜ , u ¯ ˜ , t ) ,   C = I 12 x 12 ,   D = 0 12 x 4
where I and 0 are the Identity and Zero matrices, respectively. Let ui (PWM inputs to propellers) inputs to the system using (2), (3), (4) linearized state space matrices become
A = [ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 ] ,
    B = [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 K m K m K m K m 0 0 0 0 K L J 1 K L J 1 0 0 0 0 0 0 0 0 K L J 2 K L J 2 0 0 0 0 K K ψ J 3 K K ψ J 3 K K ψ J 3 K K ψ J 3 ]
Since, this study is based on discrete time domain, state space
    A k = e A T s , B k = 0 T S e A τ d τ B C k = I 12 x 12 , D k = 0 12 x 4
In the next section, the fault diagnosis algorithm is explained in detail. Firstly, the Bayesian network is explained. After the Bayesian network explanation, the Kalman filter and its equations are given.

3. Fault Diagnosis

3.1. Fault Detection Using Bayesian Network

In this part of the study, Bayesian network is explained in general terms. The joint distribution of the Bayesian network is calculated using the chain rule [10]:
P ( A 1 , , A 2 , , A n ) = i = 1 n P ( A i | A 1 , . , . , A i 1 )
where P ( A 1 , ,   A 2 , ,   A n ) is the joint distribution of all the variables, A i is the child node and A 1 , , A i 1 are the parents of the child node. The joint distribution of all the variables is equal to the product of each child A i with its parent nodes A 1 , , A i 1 . The marginalization of the joint probability distribution over the variables is given by (12) below:
P ( A 1 , A 2   ) = a 3 A 3 P ( A 1 , A 2 , A 3 )
Using Equations (11) and (12), and considering the conditional probability between each variable, fault diagnosis with Bayesian networks can be realized. Developing the conditional probability distributions (CPD) between the nodes is required to determine both the relationship between the nodes in the structure and to reflect the confidence in each value obtained from the node [10]. To further demonstrate the association between CPDs and the Bayesian network, consider the example network shown in Figure 2. In this case, each event and the outcome take on binary values, which can be thought of as a fault either being present or absent. Given two events A and B, by definition the conditional probability of A, given B, is:
P ( A | B ) = P ( A , B ) P ( B )
In Figure 2 the structure of the residuals with the Bayesian network is shown.
As it can be seen from the Figure 2, a model has been constructed in which the roll and pitch angles are dependent on each other, and the positions (x, y, and z) are independent of each other. In this Bayesian network, default values are set for false positive and false negative results. These are 0.1 ( Λ p = 0.1 ) and 0.05 ( Λ n = 0.05 ) , respectively. After setting these values, a threshold value is determined for each residual. Determination of this residual value threshold is explained in detail in Section 4. Using the CPD tables and residual values, a Bayesian network structure is created. Determination of the fault is based on whether the fault probability exceeds this threshold or not. In the next section, the equation of the TSKF is explained. In addition to that, how fault detection is made more robust is mentioned.

3.2. Fault Detection Using Kalman Filter

When looking at the Bayesian network, it is seen that it is difficult to distinguish sensor fault from one another, especially when a fault occurs in the psi and theta sensors, because these angle values are coupled with each other. A fault in one affects the other. For this reason, the sensor values with a high probability of fault will be given to the Kalman filter, and it will be possible to determine whether there is a malfunction in that sensor. The first and most important advantage is fault identification will be more precise, and there will be no problem in terms of calculation cost from running the TSKF since only the high probability of failure value sensor is being used.
In this section, TSKF is used for the fault detection algorithm. A discrete linear time-varying state-space model is used to describe the dynamic system as follows [11]:
    x k + 1 = A k x k + B k u k + w k x y k + 1 = C k x k + 1 + v k + 1
where xkRn, ukRl, and yk+1Rm ∈ are the state, control input, and output variables, respectively. Wkx and vk+1 are uncorrelated Gaussian random vectors with zero means and covariance matrices Qxk and Rk, respectively. The bias-augmented discrete linear state-space model is written as:
  x k + 1 = A k x k + B k u k B k U k γ k + w k x γ k + 1 = γ k + w k γ γ k + 1 = C k x k + 1 + v k + 1
The optimal bias estimator is written as follows:
γ ^ k + 1 | k = γ ^ k | k P k + 1 | k γ = P k | k γ + Q k y γ ^ k + 1 | k + 1 = γ ^ k + 1 | k + K k + 1 γ ( r ¯ k + 1 H k + 1 | k γ ^ k | k ) K k + 1 γ = P k + 1 | k γ H k + 1 | k ( H k + 1 | k P k + 1 | k γ H T k + 1 | k + S ¯ k + 1 ) 1 P k + 1 | k + 1 γ = ( I K k + 1 γ H k + 1 | k ) P k + 1 | k γ
The bias-free state estimator can be expressed as follows:
x ˜ k + 1 | k = A k x ˜ k | k + B k u k + W k γ ^ k | k V k + 1 | k γ ^ k | k P ˜ k + 1 | k x = A k P ˜ k | k + x A k T + Q k x + W k P k | k γ W k T V k + 1 | k P k + 1 | k γ V T k + 1 | k x ˜ k + 1 | k + 1 = x ˜ k + 1 | k + K ˜ k + 1 x ( y k + 1 C k + 1 x ˜ k + 1 | k ) K ˜ k + 1 x = P ˜ k + 1 | k x + C k + 1 T ( C k + 1 P ˜ k + 1 | k x C k + 1 T + R k + 1 ) 1 P ˜ k + 1 | k + 1 x = ( I K ˜ k + 1 x C k + 1 ) P ˜ k + 1 | k x
The filter residual and covariance equations are written below:
r ˜ k + 1 = y k + 1 C k + 1 x ˜ k + 1 | k S ˜ k + 1 = C k + 1 P ˜ k + 1 | k x C k + 1 T + R k + 1
The coupling equations can be expressed as below:
W k = A k V k | k B k U k V k + 1 | k = W k P k | k γ ( P k + 1 | k γ ) 1 H k + 1 | k = C k + 1 V k + 1 | k V k + 1 | k + 1 = V k + 1 | k K ˜ k + 1 x H k + 1 | k
The compensated error and covariance estimator is written as:
x ^ k + 1 | k + 1 = x ˜ k + 1 | k + 1 + V k + 1 | k + 1 γ ^ k + 1 | k + 1 P k + 1 | k + 1 = P ˜ k + 1 | k + 1 x + V k + 1 | k + 1 P k + 1 | k + 1 γ + V k + 1 | k + 1 T
The block diagram of TSKF, whose equations are given, is shown below (Figure 3). In the next section, simulation results will be explained.

4. Simulation System and Results

4.1. Simulation System

The fault diagnosis algorithm is tested by using synthetic data. These data were created in the SimulinkTM environment. The Bayesian network and TSKF structure are implemented in the Simulink environment. Figure 4 illustrates the model block diagrams for the quadrotor equations, TSKF, and Bayesian network, respectively.

4.2. Results and Discussion

The results are generated using the simulation system described in the previous section. The first of the results obtained are residual values of each sensor. This is shown in Figure 5 below.
As shown in Figure 5, it is seen that the x, y, and z values are close to each other and theta and psi values are close to each other. The maximum value of the calculated residual values is chosen as 0.25 for x, y, and z values. For the theta and psi angle, the maximum threshold values are 0.08. Since it is assumed that there is no malfunction in the system, the threshold value for each residual is determined as 0.25 for x, y, z and 0.08 for theta and psi, respectively.

Test Cases

The test case results are generated using the simulation system described in the previous section.
(a)
No Fault
When there is no malfunction in the system, it can be easily seen from Figure 6 that the probability of failure, calculated with Bayesian network, is quite small.
(b)
Theta Angle Sensor Fault
In cases where the residual values of R4 and R5 exceed the threshold value which is shown in Table 2, it can be detected that there is a fault in the theta and psi angle when we look at Figure 7. However, only the theta angle sensor is manually faulted from 20–30 s. Since this situation cannot be distinguished by the Bayesian network, the faulty sensors are inserted into the TSKF, and it can be easily understood by looking at Figure 8, Figure 9 and Figure 10 that the theta sensor is faulty.

5. Conclusions

In this paper, a model-based fault diagnostic method is presented, which is capable of determining faults using both a Bayesian network and TSKF. With the Bayesian network, it was possible to detect which sensors are faulty. However, since some sensors are coupled with each other, there are some cases where the faults cannot be separated. At this point, fault detection can be performed more accurately by using the TSKF structure described in this study. In addition, this TSKF structure provides a computational gain because it works only for sensors that are detected as faulty with the Bayesian network.
The implementation of the fault detection structure is carried out using synthetic test data and tests of the algorithm are done in a MATLAB/Simulink environment. The results show us that the fault detection algorithm is able to detect the corresponding faults correctly when the residuals are manually triggered. In addition, it gives precise results by using a Bayesian network and TSKF together. In the future, we aim to collect real test data and to make the threshold values more robust.

Author Contributions

Conceptualization, T.B. and F.C.; methodology, T.B.; software and data acquisition T.B.; validation, T.B.; writing—original draft preparation, T.B.; writing—review and editing, T.B and F.C; visualization, T.B.; supervision, F.C.; project administration, F.C.; All authors have read and agreed to the published version of the manuscript.

Funding

This research was financially supported by Istanbul Technical University, grant number 42754.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Patton, R.J. Robust model-based fault diagnosis: The state of the art. In Proceedings of the IFAC Symposium on Fault Detection, Supervision and Safety for Technical Processes (SAFEPROCESS’94), Espoo, Finland, 13–16 June 1994; pp. 69–74. [Google Scholar]
  2. Isermann, R. Model-based fault-detection and diagnosis-status and applications. Annu. Rev. Control. 2005, 29, 71–85. [Google Scholar] [CrossRef]
  3. Frank, P.M.; Ding, X. Freqeuncy Domain Approach to Optimally Robust Residual Generation and Evaluation for Model-Based Fault Diagnosis. Automatica 1994, 30, 789–804. [Google Scholar] [CrossRef]
  4. Zhong, M.; Xue, T.; Ding, X. A survey on model-based fault diagnosis for linear discrete time-varying systems. Neurocomputing 2018, 306, 51–60. [Google Scholar] [CrossRef]
  5. Ding, S.X. Model-based Fault Diagnosis Techniques: Design Schemes, Algorithms, and Tools; Springer: Berlin, Germany, 2008. [Google Scholar]
  6. Marzat, J.; Lahanier, H.P.; Damongeot, F.; Walter, E. Model-based fault diagnosis for aerospace systems: A survey. Proc. Inst. Mech. Eng. Part G J. Aerosp. Eng. 2011, 226, 1329–1360. [Google Scholar] [CrossRef] [Green Version]
  7. Chamseddine, A.; Zhang, Y.; Rabbath, C.-A.; Apkarian, J.; Fulford, C. Model Reference Adaptive Fault Tolerant Control of a Quadrotor UAV. In Proceedings of the AIAA Infotech at Aerospace Conference and Exhibit 2011, St. Louis, MO, USA, 29–31 March 2011. [Google Scholar] [CrossRef] [Green Version]
  8. Yu, B.; Zhang, Y.; Minchala, I.; Qu, Y. Fault-tolerant control with linear quadratic and model predictive control techniques against actuator faults in a quadrotor UAV. In Proceedings of the 2013 Conference on Control and Fault-Tolerant Systems (SysTol), Nice, France, 9–11 October 2013; pp. 661–666. [Google Scholar]
  9. Freddi, A.; Longhi, S.; Monteriù, A. Actuator fault detection system for a mini-quadrotor. In Proceedings of the 2010 IEEE International Symposium on Industrial Electronics, Bari, Italy, 4–7 July 2010; pp. 2055–2060. [Google Scholar]
  10. Cai, B.; Huang, L.; Xie, M. Bayesian Networks in Fault Diagnosis. IEEE Trans. Ind. Inform. 2017, 13, 2227–2240. [Google Scholar] [CrossRef]
  11. Amoozgar, M.H.; Chamseddine, A.; Zhang, Y. Experimental Test of a Two-Stage Kalman Filter for Actuator Fault Detection and Diagnosis of an Unmanned Quadrotor Helicopter. J. Intell. Robot. Syst. 2012, 70, 107–117. [Google Scholar] [CrossRef]
  12. Bodrumlu, T.; Soylemez, M.T.; Mutlu, I. Modelling and Control of the Qball X4 Quadrotor System Based on PID and Fuzzy Logic Structure. In Proceedings of the 13th European Workshop on Advanced Control and Diagnosis (ACD 2016), Lille, France, 17–18 November 2016; Volume 783. [Google Scholar]
Figure 1. Schematic representation of a quadrocopter.
Figure 1. Schematic representation of a quadrocopter.
Engproc 27 00033 g001
Figure 2. The structure of the residuals.
Figure 2. The structure of the residuals.
Engproc 27 00033 g002
Figure 3. TSKF Block Diagram.
Figure 3. TSKF Block Diagram.
Engproc 27 00033 g003
Figure 4. Quadrotor System and TSKF Equations.
Figure 4. Quadrotor System and TSKF Equations.
Engproc 27 00033 g004
Figure 5. Residual values for the sensors.
Figure 5. Residual values for the sensors.
Engproc 27 00033 g005
Figure 6. Bayesian fault probability (no fault).
Figure 6. Bayesian fault probability (no fault).
Engproc 27 00033 g006
Figure 7. Bayesian fault probability (theta angle fault).
Figure 7. Bayesian fault probability (theta angle fault).
Engproc 27 00033 g007
Figure 8. Psi angle measured and Kalman value.
Figure 8. Psi angle measured and Kalman value.
Engproc 27 00033 g008
Figure 9. Phi angle measured and Kalman value.
Figure 9. Phi angle measured and Kalman value.
Engproc 27 00033 g009
Figure 10. Theta angle measured and Kalman value.
Figure 10. Theta angle measured and Kalman value.
Engproc 27 00033 g010
Table 1. Parameters Table [12].
Table 1. Parameters Table [12].
SymbolExplanationValue
KThrust Gain120 N
LDistance from motor to center of gravity0.2 m
KφThrust to moment gain4 N·m
MMass1.4 kg
GGravitational acceleration9.81 m/s2
J1; J2; J3Moments of Inertia0.03; 0.03; 0.04 kg·m2
Table 2. Residual Threshold Values.
Table 2. Residual Threshold Values.
ResidualThreshold Value
R1, R2, R30.25
R4, R50.08
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Bodrumlu, T.; Caliskan, F. Fault Detection on Sensors of the Quadrotor System Using Bayesian Network and Two-Stage Kalman Filter. Eng. Proc. 2022, 27, 33. https://doi.org/10.3390/ecsa-9-13352

AMA Style

Bodrumlu T, Caliskan F. Fault Detection on Sensors of the Quadrotor System Using Bayesian Network and Two-Stage Kalman Filter. Engineering Proceedings. 2022; 27(1):33. https://doi.org/10.3390/ecsa-9-13352

Chicago/Turabian Style

Bodrumlu, Tolga, and Fikret Caliskan. 2022. "Fault Detection on Sensors of the Quadrotor System Using Bayesian Network and Two-Stage Kalman Filter" Engineering Proceedings 27, no. 1: 33. https://doi.org/10.3390/ecsa-9-13352

Article Metrics

Back to TopTop