^{1}

^{2}

^{*}

^{2}

This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

Navigation employing low cost MicroElectroMechanical Systems (MEMS) sensors in Unmanned Aerial Vehicles (UAVs) is an uprising challenge. One important part of this navigation is the right estimation of the attitude angles. Most of the existent algorithms handle the sensor readings in a fixed way, leading to large errors in different mission stages like take-off aerobatic maneuvers. This paper presents an adaptive method to estimate these angles using off-the-shelf components. This paper introduces an Attitude Heading Reference System (AHRS) based on the Unscented Kalman Filter (UKF) using the Fast Optimal Attitude Matrix (FOAM) algorithm as the observation model. The performance of the method is assessed through simulations. Moreover, field experiments are presented using a real fixed-wing UAV. The proposed low cost solution, implemented in a microcontroller, shows a satisfactory real time performance.

Nowadays the industry is employing UAVs for mobile missions, specially in vigilance, monitoring and inspection scenarios [

Three attitude angles can be represented in the Direct Cosine Matrix (DCM), which can be observed employing vectorial algorithms solving the Wahba's problem [

Using a quaternion formulation, which is a conventional way to deal with the attitude of aerial vehicles [

For systematic and non-risky work, a simulation environment has been developed. The core of the simulation is the X-Plane 9 simulator, which is certified by the Federal Aviation Administration (FAA) for subsonic terrestrial flight. For realism [

During these simulations a maximum error of 1.0° is imposed on the pitch and roll attitude angles, and a maximum error of 4.0° on the yaw attitude angle. Under those requirements, which are standard in the industry [

Summarising, the second section of the paper presents the state of the art about AHRSs. The following section is devoted to the formulation of the problem, including the kinematic model and how to adapt the observation model depending on the UAV situation using the FOAM algorithm. Then comes a section describing the whole solution using the UKF and FOAM. The fifth section deals with data obtained by simulation and it is compared with previous work where TRIAD algorithm was employed. Then, field experiments are presented to fully evaluate the proposed AHRS. In the final section of the paper, some conclusions are drawn.

The core of a well designed Kalman filter relies on an accurate model of the plant as well as the noise. Fortunately the attitude kinematics based on rate gyros is well known and corresponds to experimental results. However these equations are highly non-linear. This issue leads to the employment of the Unscented Transformation (UT) and the UKF, which have been introduced by Julier and Uhlmann [

Most of the attitude estimation works trust in sensors in a fixed way throughout vehicle's mission [

A well-known problem with gyroscopes is the random walk bias which can not be identified at the calibration process. Nowadays, the random walk bias in gyroscopes based on MEMS technology can not be ignored even for short time missions. Therefore, different sensors have to be used to correct these random walk biases in real time. For instance, in [

Other approaches rely on magnetometers to estimate the yaw angle in helicopters [

The FOAM algorithm was introduced by Markley in [

In the present paper, the authors propose an attitude estimator using the UKF and the FOAM algorithm as adaptive observation model. Gyroscopes, magnetometers and accelerometers based on MEMS technology are involved in the proposed estimator. The validation of the algorithm is done by both simulations and field experiments.

Despite the specific aerodynamic coefficients of the vehicle, it is possible to determine the attitude angles evolution from a kinematic model. In this section we derive the mathematical formulation of the AHRS problem in a UAV equipped with a three-axis gyroscope, a three-axis accelerometer and a three-axis magnetometer.

The attitude angles describe the aircraft body-axis orientation in north, east, and down coordinates,

Integrating

The kinematics

The discrete formulation of

Additionally, it is useful to formulate the DCM using quaternion components and the attitude angles from the DCM terms:

The three-axis gyroscope measures the angular velocities, and for obtaining the attitude angles, the gyros can be integrated using

Fortunately, for a MEMS gyroscope in normal conditions (not extremal temperature or pressure variation), this random walk varies really slowly, compared with the integration step, throughout the UAV mission. Therefore this bias for the gyroscope can be modeled as:

Denoting the angular velocity vector ^{T}_{s}

The Wahba's problem [_{k}, _{k}, _{k}

The cost function

The two observations for the DCM determination in the UAV are the gravity vector and the Earth's magnetic field. The module of the gravity vector is the most stable, but it is not measurable directly; the accelerometers have to be compensated due to inertial effects and vibrations. The Earth's magnetic field is not affected by inertial effects, but it could be perturbed by standing close to the Earth's surface or environment as buildings, power lines,

The optimum

The attitude matrix is given by:

If only two observations are available, the determinant of _{3} = (w_{1}×w_{2})/|w_{1}×w_{2}|, v_{3} = (v_{1}×v_{2})/|v_{1}×v_{2}|, w_{1,2} are the measured column vectors with respect to the body frame (accelerometers and magnetometers), and v_{1,2} are the two reference vectors in navigation frame (Earth's gravity and magnetic field model).

During a flight, sometimes the accelerometers are more reliable than magnetometers and vice versa. The criteria chosen to assign the weights are based on how close is the measured vector's module to the model vector's module. The measured magnetic field module can be perturbed by standing close to the Earth's surface, power lines, _{k}

The trust in the two sensors are related between their weights, so we can establish a weight maximum value of 1, and a minimum value of 0.001. Weights must be always positive and different from zero. In the last case, the FOAM algorithm is reduced to the particular case of TRIAD.

The sensor fusion algorithm is implemented as a two-step

The criteria for selecting the frequency for the correction step are based on the random walk bias of our MEMS gyro, which is 0.007 deg/s (1

In our case, the correction step is limited by the GPS velocity with respect to ground at 1 Hz sample rate, which fits safely with the before requirement. This GPS velocity is employed to compensate the centripetal acceleration in the accelerometers readings. The diagram of the algorithm is described in ^{b}a^{b}m^{T}

This section describes the design of the filter under the considerations given above. Subsection 4.1 details the equations involved in the propagation loop whilst Subsection 4.2 deals with those of the correction loop.

The state vector selected for the UKF is:
_{i}_{j}

The discrete-time _{q}^{−6} · _{4}_{x}_{4}, where _{4×4} is the 4 × 4 identity matrix, and subscript

The process noise covariance associated to the gyroscope biases _{b}

Even though the FOAM algorithm gives the nine terms of the DCM (see

To determine the pitch and roll angles, the terms are the X and Y components of the Z earth vector expressed in the body frame:

For the yaw angle, the terms are the X and Y components of the X body vector expressed in the Earth reference frame:

Therefore, the observation model is given by the following Equation:

According to the FOAM algorithm two vector pairs are needed to compute the terms of the DCM. Each pair consists of a measure or observation and a reference vector. In our case, these pairs are the magnetic field, and the acceleration of the UAV. The value of the measurement noise covariance can be derived from the nominal values of the involved sensor errors. This derivation is described thoroughly in [

As in the propagation stage, the detailed UKF correction stage can be found in [

Since real experiments might imply crashes, some previous simulations have been carried out. For this, we developed a simulation framework, which consists of four different parts. The core of the simulation is the X-Plane 9 software. The other three parts are: the plug-in code for X-Plane 9, the realistic model of the sensors, and finally, the

X-Plane 9 includes different aircraft models. Its default radio control model is very similar to our UAV, so no additional modifications are needed. This is the model used in the simulations of this section. Because the airplane model is manually piloted, the navigation is not in any closed-loop; therefore if a tuning process is required, it could be done

The purpose of the simulations is to study the effects of sensor noise, bias, latencies and filter convergence. Therefore, the model of the sensors focuses on these aspects:

The GPS signal is delayed 1 s.

The signals from the gyroscopes are biased with angular random walk, and corrupted with white noise.

Accelerometers are biased with angular random walk and corrupted with colored noise, focusing in high frequencies.

Magnetometers are biased with angular random walk and corrupted with white noise.

Filter initial conditions are far from the actual initial values.

A first simulation challenge is to study the tolerances of the AHRS to bias and noise magnitude. According to standard procedures for Guidance and Control in aeronautics, a maximum error of 1.0° in the estimation of pitch and roll angle, and 4.0° for yaw angle, are imposed. It is assumed that with this error it is possible to do closed-loop control. This is covered in the first part of this section. The second part assesses the performance of the UKF using real values for the biases and noises magnitude of our sensors in a scenario where aerobatics are performed.

A Monte Carlo analysis of the tolerances was made, supported by a batch of simulation experiments. Each of the experiments specifies different values of biases and noise magnitudes, which were drawn from a Gaussian distribution. The values are shown in

As it can be appreciated the algorithm is more sensitive to errors in

The results show that the attitude estimator algorithm tolerances are large enough to embrace the actual UAV sensors on board. Therefore, the algorithm is suitable for being used with MEMS sensors.

In this section we compare the FOAM algorithm against TRIAD in an aerobatics scenario.

For this simulation, the real biases and noise magnitudes were extracted from our sensors' data sheet and they can be consulted in

Right graph in

However, the final bias values even in FOAM are not stationary due to the random walk noise in gyroscopes. Nevertheless, it can be noted how this random walk evolution is slower than the system dynamics.

The RMSE shown in

During the simulations, although it is not very clear in the graphs, it is observed that the proposed solution with FOAM does not introduce big delays.

Two real experiments were carried out using the small fixed-wing UAV shown in

An on-board autopilot hardware has been designed and built for this UAV.

Two ARM7 microcontrollers are assigned for sensor data handling and navigation algorithms. Both are connected with a UART channel. Flight data are measured by different sensors: a GPS receiver, an Inertial Measurement Unit (IMU) with magnetometers, and four pressure sensors. One of the pressure sensors is used as a barometer for altitude measurement and the rest, one per axis, are connected to Pitot tubes for air-speed measurement. Sensor data are stored in an SD card for experiment post-processing analysis.

The objective of the experiments is to assess the accuracy of the estimation of each of the three attitude angles during a non-stationary flight such as the take-off, and to assess the filter convergence during a long flight. A ground station was built to receive data from the UAV using a radio link. The flight is manually controlled using a conventional radio control unit.

For validation purposes, data coming from independent sensors (not used by the estimation algorithm) have been considered. For the roll angle, a computer vision system is used. The GPS velocity is used to validate the yaw angle.

The vision system uses a small camera attached to the UAV. An algorithm was developed to obtain the roll angle from the video measuring the slope of the horizon. The algorithm is based on [

The left graph in

The right graph in

The second experiment took place under adverse atmospheric conditions, in particular, there were gusts of wind. So when there is strong crosswind, the yaw angle differs from the heading of the plane. Even if there is no wind, the plane slides due to its inertia when it turns. The heading is measured using the GPS velocity with an uncertainty of ±10°. It can be noted that the GPS velocity is only used to subtract the centripetal contribution of the accelerometers in the estimation algorithm. Therefore, it can be taken as an independent system for validation purposes.

During the area marked with “1”, the UAV faces the wind, therefore the GPS footprints are closer each other. The area marked with “2” shows the effect of crosswind; it biases the yaw angle and the heading, which is known as to have a non-zero

The sensors used in the field experiments do not allow to have an independent measurement for the pitch angle validation. However, due to the formulation of the algorithm using quaternions, the pitch angle is strongly coupled to the roll and yaw angles. Therefore, it can be assumed that if the roll and yaw angles are both correctly estimated, the pitch angle is correctly estimated too.

This paper considered the navigation problem of attitude estimation of a light-weight UAV. Due to the severely limited free space of this kind of vehicles, MEMS accelerometers and gyroscopes are only suitable for being on board.

Previous studies in the attitude determination context give the same confidence to the sensors throughout the whole UAV mission. This is unsuitable for missions that mix both aerobatic and non-aerobatic maneuvers. A common solution in the satellite attitude estimation is the FOAM algorithm and it has been used as the observation model in the UKF framework due to the highly non-linear kinematic model of aircraft attitude. An adaptive algorithm to determine the weights in FOAM algorithm has been presented, showing reliable results of the attitude along the different phases of a flight.

The performance of the algorithm has been validated by simulation and assessed using field experiments. By means of independent sensors it has been checked that the estimation algorithm gives good results, confirming the suitable quality of the estimations. The algorithm is light enough to be run on an onboard system with minimal electronic resources. The experimental results give confidence to pursue next works concerning automatic control implementation.

Mentor Multiplex aircraft modified by the authors to be a UAV.

Axes and coordinate definitions.

Algorithm block diagram. WMM is the World Magnetic Model and the GPS velocity is employed for subtract the centripetal acceleration.

Block diagram of the simulation environment.

Aerobatics scenario with two

Estimation of the biases of the gyroscopes, employing TRIAD at the left and FOAM at the right during the aerobatics simulation shown in

Pitch angle estimation during the aerobatics, employing TRIAD in the left and FOAM in the right during the aerobatics simulation shown in

Roll angle estimation during the aerobatics, employing TRIAD in the left and FOAM in the right during the aerobatics simulation shown in

Accelerometers readings and evolution of the FOAM weights during the aerobatics simulation shown in

Functional diagram of the autopilot and its hardware implementation.

One of the frames processed by the vision system capturing the roll angle.

Roll angle comparison between vision system and UKF estimation and Pitch angle at the landing time after ten minutes of flight.

Accelerometers readings and FOAM weights during taking off.

Yaw angle comparison between GPS system and UKF estimation.

UKF tolerances and actual onboard sensors: Maximum bias and random error standard deviation. It can be noted how the algorithm based on UKF meets the onboard values.

Roll rate, P | ±11.38°/s | ±3.00°/s | ±8.82°/s | ±1.00°/s |

Pitch rate, Q | ±11.38°/s | ±3.00°/s | ±8.82°/s | ±1.00°/s |

Yaw rate, R | ±11.38°/s | ±3.00°/s | ±5.32°/s | ±1.00°/s |

Accelerometers | ±0.3 m/s^{2} |
±0.05 m/s^{2} |
±0.7 m/s^{2} |
±0.009 m/s^{2} |

Magnetometers | ±10.63 mG | ±4.00 mG | ±22.53 mG | ±1.25 mG |

GPS Velocity | ±2.46 m/s | ±0.5 m/s | ±2.35 m/s | ±1.5 m/s |