Nonlinear Extended Kalman Filter for Attitude Estimation of the Fixed-Wing UAV

Flying vehicle’s navigation, direction, and control in real-time results in the design of a strap-down inertial navigation system (INS). The strategy results in low accuracy, performance with correctness. Aiming at the attitude estimation problem, many data fusion or ﬁltering methods had been applied, which fail in many cases, which attains the nonlinear measurement model, process dynamics, and high navigation range. The main problem in unmanned aerial vehicles (UAVs) and ﬂying vehicles is the determination of attitude angles. A novel attitude estimation algorithm is proposed in this study for the unmanned aerial vehicle (UAV). This research article designs two ﬁltering algorithms for ﬁxed-wing UAVs which are nonlinear for the attitude estimation. The ﬁlters are based on Kalman ﬁlters. The unscented Kalman ﬁlter (UKF) and cubature Kalman ﬁlter (CKF) were designed with diﬀerent parameterizations of attitude, i.e., Euler angle (EA) and INS/unit quaternion (UQ) simultaneously. These ﬁlters, EA-UKF and INS-CKF, use the nonlinear process and measurement model. The computational results show that among both ﬁlters, the CKF attains a high accuracy, robustness, and estimation for the attitude estimation of the ﬁxed-wing UAV.


Introduction
e unmanned aerial vehicle (UAV) becomes an exploration hotspot recently in the area of robotics [1]. Similarly, microvehicles attain a lot of concentration due to their small sizes, lower risk, and easy application. e objectivity of the UAV is tested in low altitudes due to the shadowing of GPS signals [2]. Flying vehicles show great interest in the military and civilian sectors. Different types of missions are accomplished with UAVs such as tracking, inspection, searching, mapping, and much more. Recently, the advances in the tracking feature decreases the size as well as the cost of the camera [3,4]. A navigation system is widely used in the navigation of autonomous robots and for mapping. ese robots or vehicles are equipped with a camera for navigation in a GPS environment. Mostly, the strap-down inertial navigation system (SINS) occupies an electromechanical system (EMS) that attains low cost and consumption of power. e performance and robustness of EMS based on the INS improve due to nonlinear filtering, which helps in attaining attitude estimation and tracking of the UAV [5]. e information of attitude and position is attained by the INS with abundant update rate, and information combination is the way to increase the accuracy. e INS attains the capability to estimate the pose of the camera using the Kalman filter (KF) where the navigation measurement system is for visual measurement and update [6][7][8]. On the other hand, growing interest has been seen in using nonlinear filtering methods for attitude estimation of flying vehicles. e missions of UAVs need nonlinear dynamics, filters initialization, and estimators. Even the design of the vehicle is conservative. e most important task for UAVs is attitude estimation. Flying vehicles becomes cheaper and reliable due to the growing range of applications in UAVs. It also develops an interest in designing simple and robust algorithms for the attitude estimation of flying vehicles.
In reference to [9], the UKF is proposed for the flight of the UAV. e state equation model is based on the attitude angle differential equation formed by the fusion algorithm. e EKF helps in measuring the data of the gyro, accelerometer, and magnetometer. Static and dynamic experiments show the effectiveness of the algorithm. Experimental results show that the proposed scheme is accurate and effective. Similarly, in [10], the study proposes the attitude heading reference algorithm based on the cubature Kalman filter (CKF) for low precision of AHRS. is filter also helps in solving the nonlocal sampling problem. In the interim, the adaptive estimation algorithm realizes the estimation of motion acceleration. e simulation results show that the proposed algorithm accurately estimates the attitude and acceleration. In [11], the study proposes the low-computational complexity filter for attitude estimation of the UAV, namely, the square root UKF filter based on the KF. e basic equations of the KF are modified just because the feature of the filter is dignified.
is research article bespoke to the quadrotor UAV to attain the quaternion-based model. e simulation results verify the effectiveness of the proposed algorithm. In reference to [12], an efficient approach is proposed based on the Kalman filter. e purpose of the KF is to provide the possible region in which tracking objects might occur. It will also help in reducing the computational complexity. e performance of the proposed scheme is compared with other schemes. e results reveal that the scheme attains the best performance and accuracy. Last, in another study [9] for the error of the attitude estimation algorithm, a UAV attitude estimation algorithm based on the UKF is proposed.
e Euler angle method defines the attitude algorithm model of a vehicle. Similarly, the system state equation is developed. e filter algorithm helps in achieving the attitude angle of the aircraft. e simulation results show that the proposed algorithm attains a high improvement in accuracy and reliability as compared to the EKF. e contribution of this research article is to design the two nonlinear improved Kalman filters (NIKF) to approximate the attitude of fixed-wing UAVs based on the INS. e study designs the unscented Kalman filter (UKF) and cubature Kalman filter (CKF) with the help of two different types of parameterizations/based on the Euler angle (EA) and inertial navigation system (INS). Both filters attain a nonlinear process. en, these filters result in two different orientations, namely, EA-UKF and INS/UQ-CKF. Last, the computational simulations define the reliability, performance, and fitness of both filters. e study is planned as follows. e introduction is presented in Section 1.
e problem definition and its proposed solution are defined in Section 2. e state of art is defined in Section 3. Section 4 defines the designing of a nonlinear Kalman filter. In Section 5, attitude parameterization and estimation are presented. e simulations are done in Section 6. Section 7 presents the conclusion of this study.

Problem Definition and Proposed Solution
is section defines the problem statement and the proposed solution in this study. Recently, a growing interest takes place in the use of nonlinear filtering methods for the attitude estimation of UAVs. e missions assigned to flying vehicles involve the usage of nonlinear dynamics and filters initialization, and even the design of the vehicle is conservative [13,14]. e design of the INS results in a high error, low accuracy, and performance. e main problem during the flight mission is the determination of angles. is also involves the estimation and compensation of errors. Many filters applied to attitude estimation fail due to highly nonlinear dynamics and long-range system of navigation [15]. To solve the abovementioned problems, the two nonlinear filters are designed, i.e., EA-IUKF and INS-CKF. e proposed scheme also solves the both estimation and compensation of attitude errors. e scheme creates an efficient strategy with the help of parameters and different variables to reflect the current situation. It aims towards the better performance of UAVs during the flight mission.

State of the Art
is section defines the recent trends in this field. In reference to [16], sensors take place for the attitude estimation of flying vehicles. e study aims towards the flying problem due to the high rate of precision. To solve this issue, the study proposed the algorithm using the Kalman filters. e algorithm attains the capability of providing high attitude estimation. e computational simulations show that Kalman filters are a highly suitable method for attitude estimation. In the study by Odry et al. [17], a fuzzy adaptive Kalman filter (FAKF) for the attitude estimation of mobile vehicles was proposed. e structure of the filter includes the EKF and FAKF to calculate the vibration of the system, acceleration, and distortions. Filter performance is evaluated with the help of a test bench. e optimization performs the tuning of filter parameters. e simulations results show the effectiveness of the proposed scheme. Similarly, in [18], the study proposes positioning technology. e architecture of the system attains the multisensor technology established on the unscented Kalman filter (UKF). It avoids the high order relationships of nonlinear equations. Last, the HIL platform helps in performing the simulations which verify the effectiveness and improves the accuracy. In reference to [19], the study design of the CKF is based on fast Euler attitude and heading reference for flying vehicles smaller in size. e abovementioned article aims to derivate the low-cost model mutual with quaternion attitude determination. It also uses fast Euler to accurate the attitude update by which the realtime solution increases. Additionally, the proposed scheme improves the overall accuracy of the filter. e simulation results demonstrate that the algorithm attains an excellent attitude solution in highly dynamic conditions. In [20,21], the studies present the target motion estimation solution using the unmanned aerial vehicle (UAV). e UAV guidance law helps in solving the estimation problem mentioned in this manuscript. e designed estimator helps in tracking the moving ground target and provides the optimal solution in real-time. is study designs the Kalman filtering method based on inverse kinematics. e numerical simulations verify the accuracy and feasibility of the designed scheme. e simulation results show the stability in 2 International Journal of Optics position and velocity. Last, in [22], the study design is on the attitude estimation algorithm based on the complementary extended Kalman filter (CEKF). e inertial measurement unit (IMU) helps in deriving the attitude angle in real-time. e filtering algorithms eliminate the noise errors thereby improving the accuracy of the attitude solution. e proposed scheme is verified on MATLAB simulation. e computational results verify the effectiveness, accuracy, and robustness of the algorithm.

Designing of the Nonlinear Kalman Filter (NLKF)
e NLKF is a state space-based algorithm based on two phases. To calculate the state of the system, model information and measurement information are combined [23,24].

Phase 1: Prediction.
In this phase, the filter generates the prediction of system state vector xεR n at time t + 1. e error covariance matrix is denoted by EεR n×n and is shown in the following equation at time t.
where the estimation of the exact system state is denoted by x, F(t) is the process model matrix, u is a control vector, w denotes the process noise, K(t) is a process noise model matrix, and v is the observation noise. e process noise is denoted by Q. e matrix E should verify the following condition.
4.2. Phase 2: Estimate Correction. In this phase, the observation model refined the prediction/estimate produced in phase 1. Matrix E(t) is improved with a lower level of uncertainties. ey are calculated as where e(t + 1) is the innovation, and the Kalman gain matrix L(t + 1) is given as follows: where H(t + 1) is the observation model matrix, the measurement noise model matrix is M, and R is the covariance matrix of Gaussian white noise. Similarly, F(t), K(t), and H(t) are the Jacobian matrices. y vector contains the measurement attained by the summing system and residual reflects among the actual measurement [23].

Parameterization of Euler Angle (EA).
In moving body axes frame, the flying airframe orientation and position cannot be described. So, a fixed inertial axes system is used to conclude the angular velocities of the airframe. Figure 1 shows the body frame and navigation frame. ree sequential rotations are used to define the orientation of an airframe concerning fixed inertial reference. e most important is the directive of rotation in EA.
In the reference frame, the relationship between the angular velocities and EA of the flight is given by where c � cos and s � sin. e rotation angles are denoted by φ, θ, ψ, i.e., roll, pitch, and yaw, respectively. Similarly, the angular rates are denoted by p, q, and r. By assimilating the following equations, the orientation of the airframe is obtained, where t � tan. In the matrix form, it can be rewritten as e nonlinear filters attain effective results when designed with the base of EA. It helps in making smooth flight paths.
International Journal of Optics 3

Unscented Kalman Filter (UKF) Based on EA.
e UKF is articulated in the base of EA coordinates for the estimation of the airframe attitude of the UAV. In this part, the state vector is extended while including the gyros biases vector which is written as

Prediction.
e control input vector and state vector are defined as follows: e roll, pitch, and yaw gyro biases are denoted by g p , g q , and g r , respectively. Equation (1) can be reduced and can be rewritten as where F denotes the state transition matrix and U denotes the control input matrix and are given as follows: K(t) denotes the process noise model and is assumed to be identical. Transformation matrix T coppices angular rates to EA rates which are written as follows:

5.2.2.
Correction. e observation model is needed to refine the estimation which is given as follows: x(t + 1|t + 1) � (x(t + 1|t) + L(t + 1)z(t + 1)), e attitude of the UAV is estimated by a sensor as follows: ψ m � −ct2 m y cφ − m z sφ m x cθ + m y sφsθ + m z cφsθ , where m x , m y , and m z are the earth's magnetic field component. Similarly, c x , c y , and c z are the acceleration of the accelerometer along the body axes of the vehicle. e gravity vector is written as X(t) � σq 0 σq 1 σq 2 σq 3 σe n σe e σe u σL σl σh 9 jx 9 jy 9 jz 9 ox 9 oy 9 oz Λ ox Λ oy Λ oz T , Figure 1: Body frame (b) and navigation frame (n) [24].

Parametrization of the INS/UQ
where σq denotes the quaternion error. σe n , σe e , and σe u denote the error of north, east, and vertical. e longitude, latitude, and height are expressed by σL, σl, and σh, respectively. 9 j denotes the gyro drift error, and 9 o denotes the Markov gyro drift error. Similarly, Λ o denotes the accelerometer drift. With the help of an error model and equations, a state equation can be built.
where ω n ie denotes the projection of the earth rotation rate in the navigation frame. Similarly, ω n en denotes the angular rate of navigation in the navigation frame. ω j ij denotes the angular rate in the body frame. ω n in denotes the angular rate of the navigation frame in the inertial frame articulated in the navigation frame. Q n j denotes the quaternion that is attained by attitude. T a and T b denote the correlation time, and ω1 and ω2 denote the Gaussian white noise processes.

Cubature Kalman Filter (CKF) Based on the INS/UQ.
e state equation and measurement equation of the system are given as where f(x(t − 1)) and h(x(t)) are the known functions of the system, ω(t − 1) denotes the system noise, and v(t) is random measure noise. With the help of a sampling point, this filter approaches the distributing function. It also internments features of random variables after the transformation of a nonlinear system. is filter also creates the basic points with the help of the SRC rule. Basic points under the rule are written as International Journal of Optics 5 where n denote the measurement of state parameters. 1 defines the holohedral point set. e process of the CKF filter is defined as follows.

Time Update.
e cubature points that are generated, prediction of state, diffusion of cubature points, and state prediction covariance matrix are given as follows:    e calculation and transmission of cubature points, measurement prediction, innovation covariance matrix, cross-correlation matrix, filter gain matrix, current state estimation, and error covariance matrix calculation are given as follows:

Simulations and Discussion
is section of the manuscript analyzed the designed scheme based on the set of simulation data received from the movement of the UAV over 500 s. e simulation aims to confirm the applicability of the designed algorithm for short and long runs. is section offers the simulations of the UKF and CKF to prove the effectiveness of each designed technique. e simulations run on the computer with the processor of Intel Core-i7, 16 GB RAM, and 64-bit operating system. MATLAB software was used for the computational simulations.
Two different filters are analyzed and examined in this section. e red line denotes the CKF and the blue line shows the UKF. ese two filters solve the common challenges faced during the regular operation. EA estimated from the UKF and CKF is presented. e sensor installed in the UAV provides the readings which help in initializing the integrations. e performance of the system depends upon the environment in which the operation takes place. It is clearly shown in Figure 2 that the CKF has a better performance as compared to the UKF. In roll and pitch, the oscillations are much more as compared to yaw angle. But in comparison to both algorithms, the CKF achieves higher accuracy and stability. In the simulation process, the UKF takes a higher processing load. Table 1 provides the position and orientation errors averages for fifteen runs. It was done to analyze the reliability of both approaches. e results showed that the CKF provides the best position and orientation as compared to the UKF. Figure 3 shows the longitude and latitude errors recorded. e period of error recorded is 8 min approximately. As shown in figure, the CKF shows less error as compared to others concerning time. Similarly, in Figure 4, the velocity against north and east is defined based on the UKF and CKF. Both velocities are calculated and by the algorithms and with the real parameters. It is shown in figure clearly that east velocity increases after 220 s in the UKF, while in the CKF, the value remains constant near to zero. In north velocity, the error ratio of the UKF is more as compared to the CKF. Last, Figure 5 shows the estimation error of the heading. e figure clearly shows that the error span of the UKF ranges from ±4 to ±15, while the CKF remains nearly to zero. is section defines the reliability and accuracy of the designed approach. Based on the results obtained, the CKF provides the best results as compared to the UKF.

Conclusion
is research study presents the design of a nonlinear Kalman filter for the attitude estimation of fixed-wing UAVs. e simulation of the proposed scheme, i.e., AE-UKF and INS-CKF was carried out. e simulation results show that the CKF algorithm can increase the precision of vehicles, and it is inherently nonlinear as compared to other designed algorithms. In many cases, both algorithms show the same results, but the CKF is more precise, having a better nonlinear performance, higher accuracy, and better filter stability. e most important advantage of the CKF is that it is easy to implement.

Future Enhancement and Limitations.
e experimental results show that the proposed scheme in this study increases the accuracy and precision of the fixed-wing UAVs. It solves the attitude estimation problems, and the approach is novel. e future recommendation is that the studies should focus on establishing more accurate and effective techniques for International Journal of Optics the attitude estimation of fixed-wing UAVs. e schemes also solve all the problems related to attitude estimation and angle effectively. is study attains some limitations which are as follows.
(i) First, the proposed scheme only solves the attitude estimation problems (ii) Second, the projected elements of the state vector are real numbers (iii) ird, the proposed scheme does not solve the external disturbance issues (iv) Finally, the study only explores the attitude estimation of fixed-wing UAVs, and this design leaves the possibility of attitude errors in some cases.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.