MEASUREMENT SCIENCE REVIEW, 20 , (2020), No. 1, 35-42
Journal homepage: https://content.sciendo.com
Two-Stage Kalman Filter for Fault Tolerant Estimation of Wind Speed and UAV Flight Parameters
Chingiz Hajiyev 1, Demet Cilden-Guler 2, Ulviye Hacizade 3 1Istanbul Technical University, Faculty of Aeronautics and Astronautics, Istanbul, Turkey, [email protected] 2Istanbul Technical University, Faculty of Aeronautics and Astronautics, Istanbul, Turkey 3Halic University, Faculty of Engineering, Istanbul, Turkey
In this study, an estimation algorithm based on a two-stage Kalman filter (TSKF) was developed for wind speed and Unmanned Aerial Vehicle (UAV) motion parameters. In the first stage, the wind speed estimation algorithm is used with the help of the Global Positioning System (GPS) and dynamic pressure measurements. Extended Kalman Filter (EKF) is applied to the system. The state vector is composed of the wind speed components and the pitot scale factor. In the second stage, in order to estimate the state parameters of the UAV, GPS, and Inertial Measurement Unit (IMU) measurements are considered in a Linear Kalman filter. The second stage filter uses the first stage EKF estimates of the wind speed values. Between these two stages, a sensor fault detection algorithm is placed. The sensor fault detection algorithm is based on the first stage EKF innovation process. After detecting the fault on the sensor measurements, the state parameters of the UAV are estimated via robust Kalman filter (RKF) against sensor faults. The robust Kalman filter algorithm, which brings the fault tolerance feature to the filter, secures accurate estimation results in case of a faulty measurement without affecting the remaining good estimation characteristics. In simulations, noise increment and bias type of sensor faults are considered.
Keywords: Unmanned aerial vehicle, Kalman filter, fault detection, wind speed, GPS, pitot tube.
1. INTRODUCTION known aircraft model. This can be very limiting for some A popular approach to the estimation of the flight types of aircraft where the model has not yet been derived, or parameters of a small Unmanned Aerial Vehicle (UAV) additional system uncertainties have been introduced. includes the integration of sensor measurements from a In [8], a pitot-tube-independent estimation for airspeed is Global Positioning System (GPS) with that of a low-cost presented using the Extended Kalman Filter (EKF). This Inertial Navigation System (INS). Various formulations of paper focuses on developing an approach to fault detection flight parameter estimation using GPS/INS sensor fusion for airspeed sensors in UAVs by using data from gyros, exist in the literature [1]-[4], containing comparison studies accelerometers, GPS, and wind vanes. Based on the evaluating different estimation algorithms. kinematics model of the UAV, an estimator is proposed to In this work, the wind field is estimated for both horizontal provide analytical redundancy using information from the and vertical wind using GPS and pitot tube measurements. above-mentioned sensors. The χ 2 test and cumulative sum Estimation of the wind field is useful in UAV applications for detector are employed to detect the occurrence of airspeed various objectives such as dropping objects, target tracking, measurement faults together. automatic control, trajectory optimization, and air traffic In [9], an estimator is proposed based on the kinematics control [5]. There is some existing work in the area of wind model of the UAV in order to provide analytical redundancy estimation. A Kalman-like filter is derived in [6] for wind using information from gyros, accelerometers, GPS, and velocity estimation based on magnetic heading, true airspeed, wind vanes. This filter process is independent of the airspeed and radar measurements. This filter is called the velocity bias measurement and the aircraft dynamics model. The filter for wind estimation. In [7], the problem of aircraft wind estimation of the wind velocity is necessary to relate ground velocity estimation is performed using the aircraft dynamic velocity to airspeed, which is why the wind velocity response rather than the wind triangle relationship. In this components are considered as states. method, it is assumed that the mathematical model of the Aircraft are usually equipped with vanes or multi multi-port aircraft is perfectly known. The primary limitation of these air data probes that, when properly calibrated, can be used to types of wind estimation methods is the requirement of a infer the wind velocity, angle-of-attack (AOA), and side-slip
______DOI: 10.2478/msr-2020-0005
35
MEASUREMENT SCIENCE REVIEW, 20 , (2020), No. 1, 35-42
angle (SSA). In this study the wind velocity, AOA and SSA The body-axis velocity components can be rotated into the are estimated using standard sensors. The standard sensor Earth-fixed frame using the transformation matrix A()φ, θ , ψ suite contains GPS, Inertial Measurement Unit (IMU), and a pitot-static tube. cosψψ− sin 0 cos θ 0 sin θ 1 0 0 In this study, an estimation algorithm based on a two-stage Kalman filter (TSKF) was developed for wind speed and A()φθψψψ, ,= sin cos 0 0 1 0 0 cos φφ− sin UAV motion parameters. In the first stage, the wind speed 0 0 1 − sinθ 0 cos θ 0 sin φφ cos estimation EKF was developed by the usage of GPS measurements and dynamic pressure measurements. In the and corrected for wind by [5], second stage, the estimation of the state parameters of the UAV was made based on the GPS and IMU measurements GPS VN u N by using the Linear Kalman filter. The second stage filter uses GPS GPS V= Aφθψ, , v + + υ . (3) the first stage EKF estimates of the wind speed values. E () E GPS Between these two stages, a sensor fault detection algorithm VD w D is designed. The innovation sequence of the wind speed estimation filter is used for fault detection purposes. As an Earth-fixed frame, the North-East-Down (NED) A robust Kalman filter (RKF) algorithm, which makes the frame is used. This is a reference frame locally fixed to a point filter fault-tolerant and keeps giving accurate estimation on the Earth's surface and its X-Y-Z axes pointing to North- results in case of faulty measurements, is proposed in this East-Down. The Z-axis aligns the Earth's ellipsoid normal paper. This filter is designed in order to minimize the effects VGPS, V GPS , V GPS of sensor faults and to estimate the UAV flight parameters direction. In (3) N E D are the NED ground accurately. After detecting the fault on the sensor velocity measurement components by GPS, υGPS is the zero- measurements, the state parameters of the UAV are estimated mean Gaussian measurement noise vector of GPS. by using RKF against sensor faults. It is required to estimate the wind speed, Air Data System (ADS) scale factor and UAV states in the presence of sensor 2. STATEMENT OF THE PROBLEM faults on the acquired information above. This work aims to estimate aircraft body-axis velocity components (u, v , w ) , Euler attitude angles (φ, θ , ψ ) , and 3. TWO -STAGE ESTIMATION OF THE WIND SPEED AND UAV STATES three-axis wind velocity components , , . This ( N E D ) A two-stage Kalman filter is proposed for wind speed and estimation is performed through the functional fusion of IMU UAV state estimation purposes. In the first stage, the wind measurements of attitude angles (φ, θ , ψ ) , angular rates speed is estimated by the EKF using GPS and pitot tube measurements. Here, the wind speed components and pitot p, q , r , GPS measurements of velocity components ( ) scale factor are considered as state vector variables. In the
(Vx, V y , V z ) , and the dynamic pressure measurements by the second stage, the estimation of the state parameters of the UAV was made based on the GPS and IMU measurements pitot-static tube ( P ). Due to the random nature of wind, e.g. d by using the Linear Kalman filter. The second stage filter uses turbulence, it is challenging to predict the behavior of the the first stage EKF estimates of the wind speed values. local wind field dynamics. Therefore, the wind velocity state Between these two stages, a sensor fault detection algorithm dynamics are modeled as a random walk process [9], is designed. After detecting the fault in the sensor
measurements, the state parameters of the UAV are estimated & (t ) N via the robust Kalman filter against sensor faults. Fault & ()t = w () t (1) E p tolerance and accurate estimations are achieved by using the & RKF algorithm in case of faulty measurements. The D (t ) interaction of two filtering stages is shown in the structural where wp denotes the zero-mean Gaussian process noise diagram of Fig.1. vector with the covariance matrix Qp . The UAV state equation is given in a discrete-time linear state-space format,
Xk(1)+= FXk () + BUk () + GWk () (2) where X( k ) is the vector of the system state, F is the transition matrix of the system, B is the control distribution matrix, U is the control input vector, which comprises the control surface deflections and wind velocity, W is the Fig.1. General block diagram of the proposed two-stage estimation system noise vector with a covariance matrix Q , G is the procedure. transition matrix of system noise.
36
MEASUREMENT SCIENCE REVIEW, 20 , (2020), No. 1, 35-42
A. Design of the Kalman filter for wind velocity estimation If all of these are combined, the output vector equation becomes: Nonlinear state-space formulations of wind velocity estimation problems of the unmanned aerial vehicle are PV=ζ −2 +−+− V 2 V 2 + v discussed in this section. As the formulations use the d()()() NN EE DD p (11) relationship of the wind triangle, it is necessary to have the knowledge of both the ground and airspeed. The formulations where v is the zero-mean Gaussian measurement noise with use the pitot-static tube airspeed and the GPS velocity p the variance Rp . estimates. Here, the state vector includes north ( N ) , east ( ) , down ( ) components of the wind velocity and the The ground speed components are measured by GPS and E D therefore the equations for the ground speed are ADS scale factor (ζ ) . The effects of the sideslip angle, GPS angle-of-attack and the air density parameters can be VN V N GPS GPS estimated by using the scale factor. The state-space system is V= V + υ (12) E E composed of the state vector x [10], GPS VD V D T x = [] N E D ζ (4) The linear state model can be written in the following form
The dynamic pressure measurements by the pitot-static tube [11], x( k+ 1) = Ax () k + Gwp () k (13) Pd are presented as output. As there is no information on the state dynamics, dynamic equations are expressed by random walk process, where A and G are 4x4 unit matrices. The measurement equation (11) is nonlinear and can be xk( )= xk ( −+ 1) wk ( − 1) (5) written in the form: p zk()= hxkk[ (),] + vk () (14) where w is the zero-mean Gaussian system noise vector p p with the process covariance matrix Q . Output vector can be p where h[⋅] is the nonlinear measurement function, x( k ) is composed by using the wind triangle relationship 4-dimensional state vector at time k. It is assumed that both
r r r noise vectors wp( k ) and vp ( k ) are Gaussian white noise with V= V − V (6) air ground wind zeroing,
r r r Ewk() = Evk () = 0, ∀ k (15) where V, V , V are the air, ground, and wind velocity p p air ground wind vectors in the NED coordinate system, respectively. After Filter algorithm based on the described system and taking the square of each side of the equation (6) it can be measurements in (13)-(14) can be given. The estimation of obtained [10] states (4) can be found based on the EKF. The estimation value is, 2 2 2 2 VVair=−()()() N N +− V E E +− V D D (7) xkkˆ(/)= xkk ˆ (/ −+ 1) Kkzk ()(){ − hxkk[ ˆ (/ − 1,) k ]} (16)
The airspeed of the pitot-static tube (V pitot ) can be expressed in terms of total airspeed (V ) , angle-of-attack The extrapolation value from the dynamic function can be air found as, (α ) , and sideslip angle (β ) , xkkˆ(/−= 1) Axk ˆ ( − 1/ k − 1) (17)
Vpitot= V air cosα cos β (8) Filter-gain of the EKF is,
Dynamic pressure can be written considering the Bernoulli Kk()= Pkk (/ −∇ 1) hxkkT [ ˆ (/ −× 1), k ] equation as: ρ T −1 2 {∇hxkk[][]ˆ(/ − 1), kPkk (/ −∇ 1) hxkk ˆ (/ −+ 1), k Rkp () } Pd= V pitot (9) 2 (18)
where ρ represents the air density. So, the scale factor (ζ ) ∂hxkk[ˆ ( / − 1), k ] where ∇hxkk[]ˆ( / − 1), k = is the partial can be written as: ∂xˆ( k / k − 1)
derivative of the measurement function with respect to the ρ 2 2 ζ= ()()cos α cos β (10) states. 2 The covariance matrix of the extrapolation error is,
37
MEASUREMENT SCIENCE REVIEW, 20 , (2020), No. 1, 35-42
T T In this case, the measurement noise variances of the indirect Pkk(/−= 1) APk ( −− 1/ k 1) A + GQkp ( − 1) G (19) measurements (,,u v w ) should be calculated. As a result, the The covariance matrix of the filtering error is, measurement nonlinearities are eliminated and for estimation of the UAV state vector (24), the linear KF can be used. The Pkk(/)=−∇ IKk () hxkk[ ˆ (/ − 1), kPkk] (/ − 1) (20) input vector is T ˆ ˆ ˆ (28) where I is the identity matrix. U = δctwp δ δ δ N E D The innovation sequence is presented as, The first four elements of the input vector (28) represent the =−(k ) zk ( ) hxkk[ ˆ ( / − 1), k ] (21) control surface deflections (column, throttle, wheel, and pedal, respectively) and the last three elements of the wind The innovation covariance is, velocity estimations. For estimation of the state vector of UAV (24), the linear Kalman filter can be used [11]. T Using the second stage estimation results (uˆ, v ˆ , w ˆ ) , the Pk ( )=∇ hxkk[ ˆ ( / − 1), kPkk] ( / −∇ 1) hxkk[ ˆ ( / −+ 1), k] Rkp ( )
(22) airspeed ( Vair ), angle-of-attack ( α ), and sideslip angle ( β) can be calculated EKF that estimates the state vector of the system is expressed with the formulas (16) - (22). ˆ 2 2 2 Vair = uvwˆ + ˆ + ˆ (29) B. Design of the Kalman filter for UAV state estimation Let us consider the UAV flight dynamics described by the wˆ αˆ = arctan (30) linear state equation (2) using the trim condition and uˆ measurement equation
vˆ Zk()= HkXk ()() + Vk () , (23) βˆ = arcsin (31) 2 2 2 uˆ+ w ˆ + v ˆ where Z( k ) is the measurement vector, H( k ) is the measurement matrix, V( k ) is the random vector of C. Sensor fault detection measurement noise. Assume that the random vectors W( k ) A sensor fault detection algorithm is considered based on the normalized innovation squared [12] and V( k ) are Gaussian white noise with zero mean. Note that W( k ) and V( k ) are assumed mutually uncorrelated. 2 { } { } β ()()k= % k (32) The UAV state vector is
where % k is the normalized innovation sequence of the T ( ) Xuvw= φ θ ψ pqr (24) 2 [] Kalman filter. This statistical function (32) has χ
distribution with s = 1 degree of freedom, where s is the The measurement vector is expressed as dimension of the innovation vector. Now consider the
T following two hypotheses: ZVVV=GPS GPS GPS φ θ ψ pqr H : Sensor fault occurs (33a) N E D mmmmmm (25) 0 : No sensor faults. (33b) H 1 As seen from equation (3), the ground velocity If the level of significance, α , is selected as, GPS GPS GPS 2 2 measurement components VN, V E , V D are nonlinear with P {χ>χα ,s } =α ; 0 << α 1 (34) respect to the UAV states. Through converting, we can also change the measurements to be the threshold value χ2 can be found. Hence, when the α,s T hypothesis H 1 is true, the value of the statistical function Zuvw=[]φm θ m ψ m pqr m mm (26) 2 β (k ) will be greater than the threshold value χα,s i.e.:
where 2 GPS H 0 : β(k ) ≤ χ α ,s ∀k (35) u V N− ˆ N −1 GPS v= A()φθψmmm, , V E − ˆ E (27) 2 H : β (k ) > χ ∃k . (36) w V GPS − ˆ 1 α,s D D
38
MEASUREMENT SCIENCE REVIEW, 20 , (2020), No. 1, 35-42
4. ROBUST KALMAN FILTER FOR UAV STATE ESTIMATION In normal operation conditions, the Kalman filter gives A. GPS fault case sufficiently good estimation results where any kind of First, noise increment type of fault was adopted and the measurement malfunction is not observed. However, when measurement equation was redefined for the interval between the measurements are faulty, filter estimation outputs become 300 and 500 seconds as inaccurate. Therefore, a robust Kalman filter algorithm, which has the ability to be fault-tolerant with accurate VGPS ( kVk) = ( ) + 5υ GPS ( k ) (40) estimation results in case of a faulty measurement with no effect on the remaining good estimation characteristics, is introduced. Simulation results are given in Fig.2. to Fig.4. Estimation The base of the RKF is the comparison of real and results of the wind speed are given in Fig.2. In this figure, the theoretical values of the covariance of the innovation blue line shows the actual values and the red line - estimated sequence [12]. When the operational condition of the values. The obtained results show that the wind speed measurement system mismatches with the models used in the estimations converge to their actual values except for the synthesis of the filter, then the Kalman filter gain changes faulty period and UAV states can be estimated with high according to the differentiation in the covariance matrix of accuracy. the innovation sequence. Under these circumstances, the The fault detection algorithm works using the statistic (32). covariance matrix of the innovation sequence differs as: The level of significance in the sensor fault detection is chosen as 0.05. The threshold value, χ2 for α = 0.05 and T α,s Pk ()= HkPkk ()(/ − 1) H () k + SkRk ()() (37) s 1 is found as χ 2 = 2.71 . By using the algorithm, the = α ,s and the Kalman gain becomes faulty period is detected between 300 and 500 seconds as seen in Fig.3. by using β (k ) , fault detection statistics. T Kk( ) = Pkk( / − 1 ) H( k ) × Second, continuous bias type of GPS measurement fault is (38) T −1 considered and the measurement equation is redefined for the HkPkk()()()()/1− H k + SkRk () interval between 300 and 500 seconds as where P( k / k − 1) is the covariance matrix of the VGPS( kVk) =( ) +υ GP S ( k ) + 4 (41) extrapolation error, R( k ) is the covariance matrix of the measurement noise, S( k ) is the measurement noise scale Estimation errors of wind speed are presented in Fig.4. As seen from the figure, the estimation errors of the proposed factor. S( k ) can be written as TSKF are small except for the faulty period.