Abstract
Concentrating on the issue that the existence of wind has an effect on the attitude estimation of unmanned aerial vehicle (UAV) and thereafter degrades the controllability of the UAV, based on the extended Kalman filter (EKF), an approach of UAV attitude estimation is proposed in the presence of wind interference. Firstly, attitude quaternion and drift bias of gyroscope are selected to construct the state vector, and the state equation is established based on the kinematics model of gyroscope. After that, observation equation can be obtained via using the measurement of accelerometer, magnetometer, and airspeed tube. In what follows, the EKF update equation is exploited to determine the UAV attitude. As compared to the traditional EKF and unscented Kalman filter, experimental results show that the proposed algorithm can depress the divergence of attitude angle obviously, upgrade the attitude measurement accuracy considerably, and lower the attitude angle error significantly.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
With the rapid development of the microelectromechanical system (MEMS) technology and advanced control technologies, four-rotor aircraft has become a research hot spot in recent years [1, 2]. Compared with other unmanned aerial vehicles (UAVs), four-rotor aircraft has the advantages of small size, low cost, and good maneuverability. Therefore, it has been widely used in transmission line inspections and aerial photography [3, 4]. For four-rotor aircraft, pose estimation is the basis for autonomous flight and therefore has attracted more and more attentions from researchers and engineers [5,6,7,8,9]. To estimate the attitude of UAV, complementary filtering was firstly applied [5]. However, the calculation accuracy obtained via complementary filtering is rather low. To tackle this issue, the extended Kalman filter (EKF) and unscented Kalman filter (UKF) were employed to posture calculations such that the higher attitude estimation accuracy can be achieved [6, 7]. It is well known that UAV must actually fly within the wind; however, wind interference was not taken into account among the above-mentioned methods. Concerning this problem, a wind parameter estimation algorithm was proposed by exploiting a single-antenna global positioning system (GPS) and tachometer [8]. The authors of [9] developed the nonlinear disturbance observer for UAV to estimate the velocity and acceleration of the wind, which is exploited to address the UAV attitude tracking control issue with the wind field. However, UAV has not been well controlled due to the inaccurate wind speed. In [10], an approach was developed to estimate wind velocity, angle of attack (AOA) and sideslip of angle (SSA) of a fixed-wing UAV only using kinematic relationships with Kalman filter (KF). Unfortunately, the obtained wind speed is not utilized to control UAV. Moreover, an adaptive controller design was considered for the attitude and altitude of UAV quadrotors subjected to wind disturbances [11], howbeit, which is still contaminated by wind field because of some unrealistic assumptions. It should be noted that the algorithm of [8,9,10,11] only investigated wind parameter estimation without involving the influence of wind power on drone control or attitude measurement. However, aircraft is susceptible to wind in application, which will result in a rather high attitude estimation error and then control of the UAV can be effected heavily [12].
Focusing on this issue, an attitude measurement of UAV method is developed in this paper in the wind disturbance environment to enhance the robustness of the attitude estimation such that the UAV control performance can be improved. Considering the wind force as observation, the extended Kalman state equation is established on the basis of the quaternion differential equation and gyro noise error. Moreover, the gyro estimation error can be compensated by using the data collected via accelerometer, magnetometer, GPS, and airspeed meter [13, 14].
2 The solution of attitude matrix
To describe clearly the attitude information such as pitch, yaw, and roll angle, the following two coordinate systems are employed in this paper: the navigation coordinate system \( n \), i.e., the east–north–up (ENU) coordinate system shown in Fig. 1, and \( \psi \), \( \theta \), and \( \phi \) indicate yaw, pitch, and roll angle, respectively, and the body coordinate system \( b\left( {x_{b} ,\,y_{b} ,z_{b} } \right) \) shown in Fig. 2, where \( x_{b} \), \( y_{b} \), and \( z_{b} \), respectively, point right along the horizontal, forward along the longitudinal, and upward along the vertical axis of the body. The origin of the drone is the center of gravity of itself. Due to the fact that the attitude calculation is implemented under the navigation coordinate system, and therefore the attitude information should be mapped from the coordinate system \( b \) to \( n \) through the coordinate transformation matrix \( {\mathbf{c}}_{n}^{b} \in {\mathbb{C}}^{3 \times 3} \) illustrated as [15, 16]:
where \( {\mathbf{q}} = [q_{0} \, q_{1} \, q_{2} \, q_{3} ]^{\text{T}} { = }\left[ {q_{0} \, e} \right]^{\text{T}} \) denotes a quaternion, \( q_{0} \) is the scalar part, \( e = \left[ {q_{1} \, q_{2} \, q_{3} } \right] \) is the vector part, and
The direction cosine form of \( {\mathbf{c}}_{n}^{b} \), i.e., Euler angle form, can be illustrated as:
where
in which \( \psi \), \( \theta \), and \( \phi \) indicate yaw, pitch, and roll angle, respectively. Comparing (1) with (2), the quaternion of the attitude angle can be concluded as follows [17]:
where \( \arctan \,( \cdot ) \) and \( \arcsin \,( \cdot ) \) denote arctangent and arcsine function, respectively.
With the discussion above, the quaternion representation of the attitude angle can be obtained. By using this formulation, the extended Kalman state equation under wind disturbance condition can be formulated in the following section.
3 The proposed algorithm
3.1 Kalman filtering state equation of attitude calculation
According to the description in [18], the Kalman filter prediction equation can be written as:
where \( {\mathbf{x}}_{k} \in {\mathbb{C}}^{4 \times 1} \) denotes the state vector estimation matrix at time \( k \), \( \varPhi_{k,k - 1} \in {\mathbb{C}}^{4 \times 4} \) is one-step transfer matrix from time \( k - 1 \) to \( k \) and \( {\mathbf{w}}_{k - 1} \in {\mathbb{C}}^{4 \times 1} \) is the system excitation noise sequence.
Since the state variable is a quaternion, by using the quaternion differential formulation, the state equation can be depicted as [19]:
where \( {\dot{\mathbf{q}}}(t){ = }\left[ {q_{0} (t) \, q_{1} (t) \, q_{2} (t) \, q_{3} (t)} \right]^{\text{T}} \) stands for the state estimate of the quaternion form at time \( t \). \( \omega_{x} \), \( \omega_{y} \), and \( \omega_{z} \) are, respectively, the angular velocity of the body frame with respect to navigation frame along with the x-, y-, and z-axis, respectively.
Because the system state equation shown in (5) is continuous, it is not easy to be tackled by using the discrete methods. Concerning this, the Picca approximation [6] can be exploited to discretize (5), which can be shown as:
where \( {\mathbf{q}}(k) = [\begin{array}{*{20}c} {q_{0} (k)} & {q_{1} (k)} & {q_{2} (k)} & {q_{3} (k)} \\ \end{array} ]^{\text{T}} \) is the state estimate of the quaternion form at time \( k \), and
3.2 The observation equation in the presence of wind interference
In the wind disturbance environment, observations consist of the following three measurements: accelerometer, magnetometer, and the wind power. With these measurements, the Kalman observation equation can be described as:
where z(k) denotes measured value matrix at time \( k \), \( {\mathbf{h}}_{k} \) is measurement matrix, x(k) is the state vector and v(k) indicates the measurement noise.
Firstly, accelerometer and magnetometer are considered. With the reference coordinate system, the gravity and geomagnetic vector can be defined as \( {\mathbf{g}} = \left[ {\begin{array}{*{20}c} 0 & 0 & 1 \\ \end{array} } \right]^{\text{T}} \) and \( {\mathbf{h}}_{0} = \left[ {\begin{array}{*{20}c} {h_{x} } & {h_{y} } & {h_{z} } \\ \end{array} } \right]^{\text{T}} \), respectively [20]. The matrix forms of them can be written as:
where \( g \) and \( m \) are measurements of accelerometer and the magnetometer in the body coordinate system \( b \), respectively.
With Eq. (2), by using the Jacobian matrix, (8) and (9) can be reformulated as:
where
With the discussion above, the quaternion representation of the accelerometer and magnetometric measurements can be obtained. The third measurement, i.e., the wind power, is analyzed as follows.
3.3 Wind observation equation
3.3.1 Air flow coordinate system
The air flow can be represented by the airspeed vector \( {\mathbf{V}}_{T} \) with an amplitude of \( A_{T} \). Its direction is defined by the two angles relative to the body, i.e., the attack angle \( \alpha \) and the side slip angle \( \beta \), which are, respectively, illustrated as [21]:
where \( u_{T} \), \( v_{T} \), and \( w_{T} \) are the three-axis components of airspeed in the body coordinate system \( b \). \( V_{T} \) denotes the value of airspeed.
Let \( {\mathbf{c}}_{b}^{w} \in {\mathbb{C}}^{3 \times 3} \) be the rotation matrix from the body coordinate system \( b \) to the airflow coordinate system \( w \), due to the fact that \( {\mathbf{c}}_{b}^{w} = ({\mathbf{c}}_{b}^{w} )^{ - 1} = ({\mathbf{c}}_{b}^{w} )^{\text{T}} \), and then, we have [21]:
where the vector \( {\mathbf{a}} \) is, respectively, represented as aw and ab in the navigation coordinate system \( w \) and body coordinate system \( b \).
Similar to that in [21], the rotation matrix \( {\mathbf{c}}_{b}^{w} \) can be expressed as:
Replacing \( {\mathbf{a}} \) with \( {\mathbf{V}}_{T}^{{}} \), Eq. (15) can be rewritten as:
where \( {\mathbf{V}}_{T}^{{}} \) denotes the airspeed vector and \( {\mathbf{c}}_{b}^{w} \in {\mathbb{C}}^{3 \times 3} \) stands for the rotation matrix from the body coordinate system \( b \) to the airflow coordinate system \( w \).
3.3.2 Wind disturbance
The inertia speed \( {\mathbf{V}} \) of the aircraft is the sum of airspeed \( {\mathbf{V}}_{T} \) and wind speed \( {\mathbf{W}} \) [22], which can be formulated as:
By defining the disturbance wind as \( {\mathbf{W}}^{n} \) in the navigation coordinate system \( n \), the speed in the body coordinate system \( b \) can be expressed as:
which can be rewritten as:
where \( {\mathbf{W}}^{n} { = }\left[ {W_{N} \, W_{E} \, W_{D} } \right]^{\text{T}} \), \( {\mathbf{V}}_{T}^{b} { = }\left[ {u_{T} \, v_{T} \, w_{T} } \right]^{\text{T}} \), and \( {\mathbf{V}}^{b} { = }\left[ {u \, v \, w} \right]^{\text{T}} \). In the coordinate system n, the matrix form of (20) can be depicted as:
where \( W_{N} \), \( W_{E} \), and \( W_{D} \), respectively, denote wind speed with respect to navigation frame along with N-, E-, and D-axis. \( u_{T} \), \( v_{T} \), \( w_{T} \) and \( u \), \( v \), \( w \) indicate air and ground speed with respect to body coordinate system along with the x-, y-, and z-axis, respectively.
With the observation shown above, it is obvious that the quaternion is a nonlinear function with respect to measurement of accelerometer, magnetometer, and the wind force. Therefore, it is difficult to be solved. Focusing on this issue, it can be linearized by using the Jacobi matrix [23]. With (10), (11), and (15), \( {\mathbf{h}}_{k} \in {\mathbb{C}}^{9 \times 4} \) can be expressed as:
where
3.4 Attitude calculation based on the extended Kalman filtering
Based on the above-mentioned Kalman prediction Eq. (6), observation Eq. (7), and the measurement matrix with wind disturbance \( {\mathbf{h}}_{k} \) shown in (22), the EKF can be exploited to acquire the attitude angle, in which prediction and update process are shown in Fig. 3.
-
(1)
Prediction step:
State one-step prediction:
where \( \hat{\varvec{X}}(k |k - 1) \) is the prediction of the state variable \( \hat{\varvec{X}}(k) \) and \( {\varvec{\Phi}}_{k/k - 1} \) is the state one-step transfer matrix.
One-step prediction covariance matrix:
where \( \varvec{P}(k |k - 1) \) is the prediction of the state covariance matrix \( \varvec{P}(k - 1) \), \( \varvec{Q} \) is the system noise covariance matrix, and \( {\varvec{\Phi}}_{k |k - 1} \) is the state one-step transfer matrix.
-
(2)
Correction step:
Kalman gain update:
where \( \varvec{R} \) is the observed noise covariance matrix.
Status update:
where \( \varvec{Z}(k) \) denotes the measurement matrix at time \( k \).
Status covariance matrix update:
where \( \varvec{I} \) denotes the identity matrix.
EKF predicts the status of the update process. Initial value \( \hat{\varvec{X}}(0) \) is given by accelerometer, airspeed tube and magnetometer. The initial value of covariance matrix \( {\text{P(0)}} \) can be selected as an identity matrix. In this process, it is assumed that both the system and observed noise are white, and their covariance matrix can be, respectively, denoted as \( {\mathbf{\mathcal{Q}}} \) and \( \varvec{R} \). Based on the obtained \( {\varvec{\Phi}}_{k,k - 1} \) and \( {\mathbf{h}}_{k} \) with (6) and (22), respectively, one can acquire the UAV attitude estimation via (23)–(27).
4 Numerical simulations
In this section, the effectiveness of the developed algorithm can be verified with the data collected via the following sensors: gyroscope, magnetometer, GPS, and airspeed tube. It is noted that all numerical examples are implemented via MATLAB 2014b version on a laptop with CPU 1.8 GHz Intel Core(TM) i5 and 8 GB RAM.
The basic simulation parameters can be illustrated as follows:
(a) Both the attitude estimation frequency and sample frequency of MPU9150 are 200HZ.
(b) According to the geomagnetism in Dalian, the reference geomagnetism vector is:
(c) With the platform being horizontal, the reference acceleration vector can be determined as:
(d) The initials conditions of Kalman filter are:
The initial value of the quaternion can generally be depicted as:
It is well known that the error covariance indicates the confidence of prediction state at present. The smaller it is, the more we believe the current prediction state. Moreover, the error covariance matrix determines the initial convergence speed, and then, a smaller value is generally set to facilitate the acquisition. Consequently, the initial value of error covariance matrix can be expressed as:
where \( {\text{diag}}\left( \cdot \right) \) denotes the diagonal matrix.
The smaller the value of \( \varvec{Q} \), the easier the system will converge; however, it will easily diverge if it is too small. Therefore, initial value of \( \varvec{Q} \) can be given as:
As for measurement noise, if it is too large, the Kalman filter response will be slower because the confidence in the newly measured value is reduced. Conversely, the smaller the value is, the faster convergence speed of the system is. However, it is easy to oscillate if it is too small. Considering this, the initial value of \( \varvec{R} \) can be installed as:
(e) The initials values of wind force are:
The attack angle is \( \alpha = 5^{ \circ } \) and the side slip angle is \( \beta = 10^{ \circ } \). With the reference coordinate system, the wind vector can be defined as:
To verify the effect of wind interference on the attitude estimation, Figs. 4 and 5 illustrate the attitude angle estimation error versus number of samples in the following three conditions: the absence of wind, considering wind and without considering wind in the presence of wind with its speed being, respectively, 5 m/s and 8 m/s. Obviously, it can be seen from Figs. 4 and 5 that the attitude angle estimation error in the absence of wind is smallest among these three cases, and the estimation error achieved by the proposed method is larger than that in the absence of wind. It can also be observed that the estimation error of roll, pitch, and yaw is, respectively, 1.3, 1.2, and 1, with its speed being 5 m/s and 1.9, 2.2, and 2.1 with speed being 8 m/s considering wind interference in the presence of wind. Besides, regardless of any condition, the attitude angle estimation error with wind speed being 8 m/s is larger than that of 5 m/s, which implies more wind power makes more attitude estimation error. Moreover, the angle estimation error with speed of 8 m/s is larger than that of 5 m/s. The above mentioned is attributed to the fact that the larger the wind force, the greater the disturbance to the UAV, and therefore, the greater the error, while there is no wind outside, the disturbance to UAV is almost zero, so the error is small. Furthermore, the estimation error without considering wind power in the presence of wind is largest, which indicates that the developed method can alleviate the effect of wind interference on the attitude estimation, and hence, the robustness of the flight control of UAV can be improved. In addition, the attitude estimation error can converge at the number of sample being 50 in above-mentioned three cases with various wind powers, which implies that the proposed method has a rather fast convergence speed. From the discussion above, it can be seen that the proposed algorithm can depress the divergence of attitude angle obviously, shorten the attitude convergence time sharply, upgrade the attitude measurement accuracy considerably, and therefore improve the performance of the UAV control effectively.
To testify the superiority of the proposed algorithm on the attitude estimation, the attitude angle estimation error acquired via the developed approach and EKF [6] as well as UKF [7] in the presence of wind with its speed being 5 m/s, versus number of samples, is illustrated in Fig. 6. Obviously, it can be seen from Fig. 6 that the attitude angle estimation error of the proposed algorithm has the smallest error in comparison with the EKF and UKF methods. Moreover, the attitude angle error fluctuation of the developed method proposed algorithm is also lowest. Consequently, it can be concluded that the proposed algorithm can obtain a more accurate and robust attitude angle estimation than that of EKF and UKF.
Remark Based on the above conducted experiments, one can see that the angle estimation error is reduced significantly by the developed algorithm in comparison with state-of-the-art algorithms under various wind conditions: the absence of wind, considering wind and without considering wind in the presence of wind with its speed being, respectively, 5 m/s and 8 m/s. Consequently, the proposed method can achieve more effective UAV control.
5 Conclusion
Focusing on the issue that the existence of wind interference has influence on the attitude measurement of UAV has been investigated via including the wind interference into the Kalman filter observation equation. Numerical simulations show that the proposed method can obtain the lowest attitude measurement error in comparison with EKF and UKF methods in the presence of wind interference, which can improve the attitude angles accuracy obviously, and the performance of UAV control can be improved significantly. However, the proposed algorithm has its drawbacks, since the gyroscope model we used is an empirical model, which might result in the estimate error. And we are going to study more accurate models in our future works.
References
Wang, R., Liu, J.: Trajectory tracking control of a 6-DOF quadrotor UAV with input saturation via backstepping. J. Frankl. Inst. 355(7), 3288–3309 (2018)
Ruan, L., Wang, J., Chen, J., et al.: Energy-efficient multi-UAV coverage deployment in UAV networks: a game-theoretic framework. China Commun. 15(10), 194–209 (2018)
Qiang, Z., Jing, Y.: Research on reliability modeling of image transmission task based on UAV avionics system. In: International Wireless Communications and Mobile Computing Conference (IWCMC), pp. 1504–1507. IEEE (2019)
Shakhatreh, H., Sawalmeh, A., Al-Fuqaha, A., et al.: Unmanned aerial vehicles (UAVs): a survey on civil applications and key research challenges. IEEE Access 7(1), 109–117 (2018)
Duong, D.Q., Sun, J., Nguyen. T.P., et al.: Attitude estimation by using MEMS IMU with fuzzy tuned complementary filter. In: IEEE International Conference on Electronic Information and Communication Technology, pp 372–378. IEEE (2017)
Tong, X., Li, Z., Han, G., et al.: Adaptive EKF based on HMM recognizer for attitude estimation using MEMS MARG sensors. IEEE Sens. J. 18(8), 3299–3310 (2018)
Kang, D., Jang, C., Park, F.C.: Unscented Kalman filtering for simultaneous estimation of attitude and gyroscope bias. IEEE/ASME Trans. Mechatron. 24(1), 350–360 (2019)
Cho, A., Kim, J., Lee, S., et al.: Wind estimation and airspeed calibration using a UAV with a single-antenna GPS receiver and pitot tube. IEEE Trans. Aerosp. Electron. Syst. 47(1), 109–117 (2011)
Yong, K., Wu, Q., Chen, M., et al.: Wind estimation-based robust flight control for UAV with active maneuverability limit. In: International Symposium on Industrial Electronics, pp 682–687. IEEE (2019)
Johansen, T.A., Cristofaro, A., Sorensen, K., et al.: On estimation of wind velocity, angle-of-attack and sideslip angle of small UAVs using standard sensors. In: International Conference on Unmanned Aircraft Systems, pp 510–519 IEEE (2015)
Demircioglu, H., Basturk, H.I.: Adaptive attitude and altitude control of a quadrotor despite unknown wind disturbances. In: Annual Conference on Decision and Control, pp 274–279. IEEE (2017)
Yang, H., Cheng, L., Xia, Y., et al.: Active disturbance rejection attitude control for a dual closed-loop quadrotor under gust wind. IEEE Trans. Control Syst. Technol. 26(4), 1–6 (2017)
Silva, A.L.D., Cruz, J.J.D.: Fuzzy adaptive extended Kalman filter for UAV INS/GPS data fusion. J. Braz. Soc. Mech. Sci. Eng. 38(6), 1671–1688 (2016)
Valenti, R.G., Dryanovski, I., Xiao, J.: A linear Kalman filter for MARG orientation estimation using the algebraic quaternion algorithm. IEEE Trans. Instrum. Meas. 65(2), 467–481 (2016)
Zhang, W., Li, X., Wei, D., et al.: A foot-mounted PDR system based on IMU/EKF + HMM + ZUPT + ZARU + HDR + compass algorithm. In: International Conference on Indoor Positioning and Indoor Navigation, pp 1–5. IEEE (2017)
Saeedi, J., Alavi, S.M.: Improved navigation-based motion compensation for LFMCW synthetic aperture radar imaging. Signal Image Video Process. 10(2), 1400–1405 (2015)
Ko, N.Y., Jeong, S.: Attitude estimation and DVL based navigation using low-cost MEMS AHRS for UUVs. In: International Conference on Ubiquitous Robots and Ambient Intelligence, pp 605–607. IEEE (2015)
Ghobadi, M., Singla, P., Esfahani, E.T.: Robust attitude estimation from uncertain observations of inertial sensors using covariance inflated multiplicative extended Kalman filter. IEEE Trans. Instrum. Meas. 67(1), 209–217 (2017)
Shi, Z., Wu, Z., Liu, J., et al.: Cubature Kalman filter based attitude estimation for micro aerial vehicles. In: International Conference on Intelligent Human–Machine Systems and Cybernetics. IEEE (2016)
Möckli, M.: Guidance and control for aerobatic maneuvers of an unmanned airplane. PHD thesis, ETH Zurich. Diss No. 16586 (2006)
Lembono, T.S., Low, J.E., Win, L.S.T., et al.: Orientation filter and angular rates estimation in monocopter using accelerometers and magnetometer with the extended Kalman filter. In: IEEE International Conference on Robotics and Automation, pp 4537–4543. IEEE (2017)
Min, B.C., Hong, J.H., Matson, E.T., et al.: Adaptive robust control (ARC) for an altitude control of a quadrotor type UAV carrying an unknown payloads. In: International Conference on Control, Automation and Systems, pp 1147–1151. IEEE (2011)
Azmi, K.Z.M., Pebrianti, D., Ibrahim, Z., et al.: Simultaneous computation of model order and parameter estimation for system identification based on gravitational search algorithm. In: International Conference on Intelligent Systems, Modelling and Simulation, pp 633–642. IEEE (2015)
Acknowledgements
This work is partially supported by the National Natural Science Foundation of China under Grant No. 61301258, China Postdoctoral Science Foundation Funded Project under Grant No. 2016M590218, Key Scientific Research Projects of Colleges and Universities in Henan Province under Grant No. 14A520079, and Science and Technology Research Plan in Henan Province under Grant No. 162102210168.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Zheng, J., Wang, H. & Pei, B. UAV attitude measurement in the presence of wind disturbance. SIViP 14, 1517–1524 (2020). https://doi.org/10.1007/s11760-020-01693-5
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11760-020-01693-5