Next Article in Journal
GNSS Multipath Detection Using Continuous Time-Series C/N0
Next Article in Special Issue
Recognition of Blocking Categories for UWB Positioning in Complex Indoor Environment
Previous Article in Journal
Research on Identification Method of Wear Degradation of External Gear Pump Based on Flow Field Analysis
Previous Article in Special Issue
Observation Model for Indoor Positioning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Accuracy Improvement of Attitude Determination Systems Using EKF-Based Error Prediction Filter and PI Controller

by
Farzan Farhangian
* and
Rene Landry, Jr.
LASSENA Laboratory, Department of Electrical Engineering, Ecole de Technologie Superieure, Montreal, QC H3C 1K3, Canada
*
Author to whom correspondence should be addressed.
Submission received: 4 June 2020 / Revised: 17 July 2020 / Accepted: 18 July 2020 / Published: 21 July 2020
(This article belongs to the Collection Positioning and Navigation)

Abstract

:
Accurate attitude and heading reference system (AHRS) play an essential role in navigation applications and human body tracking systems. Using low-cost microelectromechanical system (MEMS) inertial sensors and having accurate orientation estimation, simultaneously, needs optimum orientation methods and algorithms. The error of attitude estimation may lead to imprecise navigation and motion capture results. This paper proposed a novel intermittent calibration technique for MEMS-based AHRS using error prediction and compensation filter. The method, inspired from the recognition of gyroscope’s error and by a proportional integral (PI) controller, can be regulated to increase the accuracy of the prediction. The experimentation of this study for the AHRS algorithm, aided by the proposed prediction filter, was tested with real low-cost MEMS sensors consists of accelerometer, gyroscope, and magnetometer. Eventually, the error compensation was performed by post-processing the measurements of static and dynamic tests. The experimental results present about 35% accuracy improvement in attitude estimation and demonstrate the explicit performance of proposed method.

1. Introduction

In the last decade, the development of the strap-down inertial navigation systems (INS) in various applications, such as unmanned aerial vehicles (UAV), missile guidance, body tracking systems, and underwater automatic vehicles, has led to the essential need to design low-weight, low-cost, and low-power-consumption INS with reliable and robust accuracy. With advancements in microelectromechanical system (MEMS) technologies, using the MEMS-based inertial measurement units (IMU) has become more prevalent due to their low-cost, low power consumption, and small size [1]. The main objective of AHRS is to estimate how the orientation of body frame relates to the navigation frame, which can be shown by quaternion vector or Euler angles. For researchers, the difficulties of the system are related to obtaining the nondivergent output and avoiding the error accumulation, which may come due to the time-integration of gyroscope outputs [1,2].
One of the most substantial problems in AHRS using the MEMS-based IMU is their dependency on drift and measurement errors, which lead to divergence of attitude and heading error over long time experiments. This paper presented a new method for predicting and bounding the AHRS error. The method attempted to anticipate the behavior of the error using mathematical investigation on the gyroscope’s drift. Consequently, the error of each channel, namely roll, pitch, and yaw were estimated in low-amplitude signals. Also, a regulator was considered that consisted of a constant shifter and a proportional integral (PI) controller for each element of the orientation. The best error estimation was obtained by tuning the parameters of the filter, and eventually, the error was subtracted from the output of EKF-based AHRS. The main idea of the method is from nature of the orientation error in INS sensors, which only need the measurement of gyroscope. To evaluate the proposed method, a low-cost, nine-degree-of-freedom (DoF) MEMS-based IMU was used, consisting of a three-axis gyroscope, three-axis accelerometer, and three-axis magnetometer. A Simulink design of the method and the EKF model was used in laboratory experiments with the calibrated data from the mentioned IMU module. The results demonstrate the improvement in precision of AHRS in all the channels of roll, pitch, and yaw with regard to proper adjustment of the filter’s parameters.
In Section 2, we present an overview of prior works in the literature, relevant to our research, and the background of a time-variant covariance quaternion-based EKF and its parameters is considered. In Section 3, we describe an attitude error prediction and compensation filter as an accuracy improvement method and elaborate on the PI controller and regulator. The experiments and the results are presented in Section 4 and the conclusions from the paper and future directions are presented in Section 5.

2. Related Works

Research studies on designing an accurate AHRS with minimum error could be categorized in three main topics, namely complementary filters (CF), optimization approaches, and Kalman filter (KF)-based solutions. The authors of [3,4] have considered AHRS improvement using CF and MEMS sensors. A more completed AHS was designed and implemented by the authors of [5] based on explicit CF, which showed great capability for implementation in embedded hardware [5]. In these papers, although the systems showed acceptable real-time performance, the drift estimation in passive and direct CFs were not robust enough in highly dynamic experiments. Apart from that, the system demonstrated dependency to methods of initialization. Adaptive Kalman filter (AKF) [6], extended Kalman filter (EKF) [7], and dual Kalman filter (DKF) methods [8] have been performed for orientation estimation with a basic model of the system. A precise stable Kalman-based AHRS was designed as an approach of the simultaneous localization and mapping (SLAM) applications by the authors of [9]. Furthermore, an EKF using a depth measurement for underwater AHRS and unscented Kalman filter (UKF) methods was investigated by the authors of [10,11]. As the attitude estimators require the precise model and noise covariance determiner, a novel time-varying noise covariance EKF was designed and experimented. The designed filter considered changing the noise covariance matrix of the system’s model to identify the magnitude of the angle between the estimated gravitational and measured acceleration [12]. In addition, determination of this angle and the orientation between the body and the navigational coordinates can be considered as an optimization problem. The quaternion-based optimization approach was studied by the authors of [13] using the gradient descent algorithm, known as Madgwick, with magnetic angular rate and gravity (MARG) sensors [14]. The mentioned works have had great improvements in attitude and heading estimation using kinds of Kalman-based systems. However, they did not analyze the behavior of error in noisy measurements, which is prevalent in low-cost AHRS designs. As a result, in highly dynamic maneuvers, fast angular rates, and noisy environments, the outputs can be diverged through time.
Low-cost MEMS-based sensors, especially the magnetometers, are required to be calibrated deterministically and stochastically. A KF-based AHRS method was studied by the authors of [15] in environments with high magnetic distortion. Also, some efforts have been performed to use attitude determination methods in healthcare applications, such as the fall detection of elderly persons [16], motion capture for sport activity analysis [17], and shoulder injury prevention [18]. The mentioned works have only considered special scenarios, which means they did not show the potential of their works to be expanded in all medical situations and sport activities. Wearable low-cost and lightweight IMUs were used in those applications. A comprehensive comparison between CF, UKF, EKF, Madgwick, and Mahony by the authors of [19] showed that the minimum AHRS error between CF and Kalman-based algorithms is accounted for by the EKF, with better results in attitude and position estimations. The authors of [20] compared Mahony and Madgwick and demonstrated that there is no significant difference between them. Apart from the mentioned filter-based AHRS algorithms, some researches have investigated the use of integration of AHRS with GPS signals to estimate more precise Euler angles. The method has shown significant results in airspace applications, but the method is significantly affected by pseudorange measurements of GPS and cannot respond to GPS-challengeable situations [21,22,23].

2.1. EKF Model and Parameters

There are different orientation representations between the body and navigation frame. This paper considered the quaternion-based equations because of their nonsingularity and lower computation complexity compared to directed cosine matrix (DCM) with nine integration equations [12,24]. The system model of EKF, defined with state vector x k , is formulated in Equation (1).
x k = F k x k 1 ,       x k = [ q 1 q 2         q 3 q 4 ] T ,
where q 1 , q 2 , q 3 , and q 4 are the elements of quaternion vector of q = q 1 + q 2 i + q 3 j + q 4 k , and model matrix of F k is defined as Equations (2) and (3). ω ¯ ¯ is the rotation angle for a time step, and matrix μ is the skew symmetric of quaternion form of angular velocity vector [12,25].
F k = cos ( ω ¯ ¯ 2 ) I + sin ( ω ¯ ¯ 2 ) ω ¯ ¯ 2 μ   d t , μ = [ 0 ω x ω y ω z         ω x 0 ω z ω y         ω y ω z 0 ω x         ω z ω y ω x 0 ] ,
ω ¯ ¯ = n o r m   ( [ ω x ω y         ω z ] T ) · d t = ( ω x · d t ) 2 + ( ω y · d t ) 2 + ( ω z · d t ) 2 ,
For the measurement model, the magnetometer and acceleration data are considered as the EKF measurement, as defined in Equation (4). H k is the measurement matrix, and z k consists of two elements, namely the normalized specific force and normalized horizontal component of the geomagnetic field. The first one is achieved from acclerometer and the second one from magnetometer output [12,25].
z k = h ( x k ) ,         z k = [ s ¯ ¯ b m ¯ ¯ b ] T   ,
where s ¯ ¯ b and m ¯ ¯ b are considered as s ¯ ¯ b = s b s b and m ¯ ¯ b = a × b [12]. The b and n subscripts show the body and navigation coordinates. The m ¯ ¯ b is calculated from cross-product of vectors a and b . This calculation is necessary because the geomagnetic field is not parallel to the earth. Fortunately, the obtained m ¯ ¯ b is parallel to the magnetic north [12]. Parameters a and b are defined in Equations (5) and (6) [12].
a = g b g b = C n b g n g n ,
b = g b × m b   g b × m b ,
As mentioned before, the measurement model predicts the gravitational acceleration and geomagnetism in the body frame. The predicted measurement is included two elements of g ¯ ¯ b and m ¯ ¯ b which are obtained from Equation (7). The horizontal element of m ¯ ¯ b is considered as the magnetometer measurement [12].
z ^ k = [ g ¯ ¯ b m ¯ ¯ b ] T ,
z ^ k = [ C n b [ 0 0 1 ] T C n b [ 1 0 0 ] T ] T ,
The conversion matrix C n b between navigation to body frame is obtained from predicted quaternion states with following the Equation (8). The simplified form of measurement matrix is considered in Equation (9) [12,25].
C b n = [ q 1 2 + q 2 2 q 3 2 q 4 2 2 ( q 2 q 3 + q 1 q 4 ) 2 ( q 2 q 4 q 1 q 3 ) 2 ( q 2 q 3 q 1 q 4 ) q 1 2 q 2 2 + q 3 2 q 4 2 2 ( q 3 q 4 + q 1 q 2 ) 2 ( q 2 q 4 + q 1 q 3 ) 2 ( q 3 q 4 + q 1 q 2 ) q 1 2 q 2 2 q 3 2 + q 4 2 ] ,
z k = H k x k = [ q 3 q 2 q 1 q 1 q 4 q 3         q 4 q 1 q 2 q 2 q 3 q 4         q 1 q 4 + q 3 q 3 q 2 q 1         q 2 q 3 q 4 q 4 q 1 q 2 ] x k   ,
Determination of the EKF parameters is required before the designing process. The important parameters of EKF are the measurements of noise covariance R k , process noise covariance Q k , and the initialization parameters comprised of initial states vector x 0 and initial error covariance P 0 . Initialization considers the initial orientation of the system, which can be characterized as wahba’s problem. The most effective approach to the problem is the triad algorithm [26,27,28,29,30]. The algorithm deliniates the angle between two nonparallel vectors. To initialize the attitude determination system, the gravitional acceleration of the two vectors and the magnetic field of the earth are defined as, and m , respectively. The vectors are obtained from transforming the magnetometer and accelerometer’s output from the body frame to the navigation frame with multiplying each one with C b n [26,27,28,29].
Two orthogonal matrices, from the body frame and from the navigation frame, are determined to calculate the transformation matrix of C n b for attitude initialization. The orthogonal matrices are defined as M b and M n , which are calculated as Equations (10) and (11) [12].
M b = [ s b s b s b × m b   s b × m b ( s b s b ) × ( s b × m b   s b × m b ) ] ,
M n = [ g n g n g n × m n   g n × m n ( g n g n ) × ( g n × m n   g n × m n ) ] ,
According to the fact that M n = C b n M b and C b n = M n M b T , the C b n is calculated as the matrix in Equation (12).
C b n = [ C 11 C 12 C 13 C 21 C 22 C 23 C 31 C 32 C 33 ] ,
Eventually, the parameters of quaternion vactor for the attitude initialization, q ( 0 ) , are obtained in Equations (13) and (14), as explained completely by the authors of [31].
q ( 0 ) = [ q 1         1 4 q 1 ( C 32 C 23 )         1 4 q 1 ( C 13 C 31 )         1 4 q 1 ( C 21 C 12 ) ] T ,
q 1 = 0.5 1 + C 11 + C 22 + C 33   ,
After the initialization of the states vector x 0 and the error covariance matrix P 0 , EKF needs to update the estimated states and estimated covariances. The measurement noise covariance was selected to vary with time with regard to α, which is the magnitude of the angle between the estimated gravitional acceleration, g n , and the measured specific force, s b [12]. The measurement noise covariance matrix, R k , in Equation (15), consists of the measured noise covariances of the acceleration and magnetometer sensors [12].
R k = [ U I 3 × 3 0 3 × 3 0 3 × 3 c U I 3 × 3 ] ,
where U changes as a results of the variation in α. The weight value, K r , and the constant shifter, K c , satisfy the performance accuracy of the attitude estimation algorithm [12].
U = K c + K r α ,               α = cos 1 ( ( C n b g n ) · s b   g n · s b ) ,
Q = 1 4   ϑ ϑ T   ,     ϑ = [   q 2 q 1 q 4 q 3         q 3 q 4 q 1 q 2         q 4 q 3 q 2 q 1   ] ,
The matrix Q is defined in Equation (17), assuming that the gyroscope uses the white gaussian noise model [25]. The proposed EKF with the time-varying noise covariance was considered for the attitude estimation in the AHRS. In the following section, the main innovation of this study regarding to prediction and compensation filter is described in detail.

3. Materials and Methods

The method considered in this study was based on the error prediction filter, which uses the output of AHRS algorithm inspired by proposed EKF-based method proposed by the authors of [12]. The mentioned AHRS algorithm was chosen due to its adaptability, precision, and time-varying noise covariance. The main objective of the proposed method was to improve the accuracy of the AHRS algorithms. Also, the designed filter can work with all kinds of orientation estimation methods. The attitude error prediction filter are described in Section 3.1, and the PI controller and regulator are described in Section 3.2.
The complete idea of paper is demonstrated in Figure 1. A 9-DoF MEMS-based IMU, consisting of accelerometers, gyroscopes, and magnetometers, was connected to the quaternion-based EKF system. The system used the gyroscopes data in the error prediction filter. Also, the accelerometer and magnetometer data were defined as EKF measurements. The quaternion-based EKF, as the state vector of the system, considered the four-dimensional quaternion vector. After the estimation of the state vector by EKF, the quaternions were transformed to Euler angles of roll, pitch, and yaw. As the initialization of the EKF was required, the initialization process is described in Section 2.1. As presented in Figure 1, the prediction error filter needs the gyroscope’s angular rates to estimate and predict the orientation error. In the following steps, PI controller and regulator tune the filter output to obtain more accurate compensation.

3.1. Attitude Error Prediction Filter

The attitude error model is characterized as Equation (18), comprised of the roll error (δφ), pitch error (δθ), and yaw error (δψ). The model depends on the conversion matrix between the body and the navigation frames, error of the angular velocity in the body frame, and the proportions of attitude in time step k.
Ψ ˙ N = C B N δ ω I B B ω I N N × Ψ N ,
where Ψ N = [ δ φ δ ϴ δ ψ ] T and δ ω I B B are the vector of error for the angular rate measurement from gyroscope, and ω I N N × is the skew symmetric form of the angular velocity vector in the navigation frame.
ω I N N = C B N ω I B B = [ ω I N N ( x ) ω I N N ( y ) ω I N N ( z ) ] T ,
ω I N N × = [ 0 ω I N N ( z ) ω I N N ( y ) ω I N N ( z ) 0 ω I N N ( x ) ω I N N ( y ) ω I N N ( x ) 0 ] ,
For the simplification of the equations, we assumed that the error of the angular velocity from the gyroscope was near to zero. Equation (18) can be reduced to Equation (21), as shown below:
Ψ ˙ N = ω I N N × Ψ N ,
To solve this integration equation, the trapezoidal method was considered. The right side of the equation, as a time-varying function f ( t , Ψ N ) , can be rewritten as the following Equation [24]:
d Ψ N d t = f ( t , Ψ N ) ,
Ψ N ( t ) = 0 t f ( t , Ψ N ) d t ,
Ψ N ( t + k ) = 0 t f ( τ , Ψ N ) d t + t t + k f ( τ , Ψ N ) d t ,
By approximating the Equation (24), the final discretized formula of Ψ N in the time step k can be calculated by Equation (25). The block diagram of the attitude error prediction filter is shown in Figure 2.
Ψ k N = Ψ k 1 N + h 2   ( Ψ ˙ k N + Ψ ˙ k 1 N ) ,
Herein, the filter needs to be initialized with the amounts of Ψ 0 N and Ψ ˙ 0 N . Also, h is the system sampling time step. The initial amount of attitude error can be selected from the drift bias value in the specification of the gyroscope, and the initial change rate of attitude error can be a zero vector. The obtained Ψ N can be countinuous again as the error prediction signal.

3.2. PI Controller and Regulator

The calculated error signal Ψ N ( t ) is the prediction of the attitude error in three channels, namely roll, pitch and yaw. The proper PI controller can support the prediction while responding to the high-frequency changes in the error. Also, it can adjust the prediction to the estimated attitude from EKF system. The regulator, as a constant shifter, can regulate the final signal aligned to the estimated attitude. The standard form of PI controller was defined as Equation (26).
u ( t ) = K P e ( t ) + K I 0 t e ( t ) d t ,
Therefore, the estimated Ψ N from the error prediction filter is the PI controller input. The final anticipated error signal after using the regulator was calculated by:
u ( t ) = [ K P _ 1 K P _ 2 K P _ 3 ] Ψ N + [ K I _ 1 K I _ 2 K I _ 3 ] 0 t Ψ N d t + [ ε 1 ε 2 ε 3 ] ,
where the ( ) is Hadmard (element-wise) product of vectors; parameters of K P _ 1 , K P _ 2 , and K P _ 3 are the proportion gains of PI controller; parameters of K I _ 1 , K I _ 2 , and K I _ 3 are the derivative gain of each channel; and ε 1 , ε 2 , and ε 3 are three constant values for the regulation of each roll, pitch, and yaw channel. If the final regulated signal is considered as two parts (the PI part and the regulator part), the signal can be rewritten as:
u ( t ) = p ( t ) + [ ε 1 ε 2 ε 3 ] T ,             [ ε 1 ε 2 ε 3 ] T = m e a n   v a l u e   ( [ p 1 ( t ) p 2 ( t ) p 3 ( t ) ] T ) ,    
The elements of the regulator vector were obtained from each bias signal according to the fact that their mean value should be zero over the experimental duration. The regulator constants were measured for the duration of the recorded data in the post-processing experiments.
The PI controller removes the steady state error, resulting in a standalone proportional controller. However, it may affect the speed of the response. For correcting the outputs of divergent systems using the PI controller, some criterias can be considered, namely rise time, overshooting, and transient response. Some investigation on overal stability of the system may also be needed. Therefore, determining the constant gains of PI controller is dependent on the precision of the sensors, drift of the gyroscopes, and overal stability of the system during the experiment.

4. Experimental Results and Discussion

4.1. Static Tests and Results

Three experiments were performed to validate the proposed method in static mode, and today’s orientation determination technology of smartphones were considered as true attitude references. We selected a smartphone as an orientation reference because of their accessibility, MATLAB and Simulink compatibility, and precise orientation estimation in static mode [32]. The iPhone 11 and Samsung S10 were chosen for comparison. These tests were performed on a table in which the main degrees and the true north were marked as −135, −90, −45, 0, 45, 90, 135, and 180 (see Figure 3). The zero degree for the heading test was fixed to the true navigation north. To compare the selected smartphones, three special trajectories were followed by locating both smartphones at the same time in each marked angle to obtain their angle error in static mode. Each trajectory was designed for one of the channels, and the complete experimental test was performed in three different scenarios for each angle. The results of root mean square error (RMSE) for the attitude determiner of each smartphone are shown in Table 1.
Because of minimum RMSE for iPhone, this smartphone was chosen as the orientation reference of our experiments. All tests were done using data of IMU from MPU-9250, which, in this study, is referred to as “module.” The proposed EKF-based AHRS algorithm was implemented in MATLAB and estimated the final orientation of the module from the recorded data in various durations between 60 s to 100 s. The module was connected to the laptop with a USB cable, and the data of magnetometer, gyroscope, and accelerometer were recorded by the MATLAB-based serial reader. Also, data of iPhone’s IMU was recorded in the MATLAB cloud with the “MATLAB mobile” iOS application. The smartphone and module were located on the degree marked table at the same time, one time along the z axis, one time along the y axis, and finally, along the x axis. To obtain more accurate results, the trajectory for each experiment were selected in a way that allowed all angles to be measured. Figure 3 demonstrates marked table for the heading experiment, with the module and the iPhone rotated in the same trajectory on the mentioned marked table.
Figure 4 and Figure 5 shows the estimated roll, pitch, and heading angles, respectively. The estimated orientation from the time-varying noise covariance EKF-based AHRS method before and after performing the error prediction filter, PI controller, and regulator are shown. It can clearly be seen that the overall estimation was improved in many periods of time, making the total estimation more accurate. For each experiment, gains of the PI controller and amounts of the regulator are mentioned in the Table 2.
Parameters of the PI controller and the constants of regulator vector were completely different in every experiment. Each variable had its own scale, as can be interpreted from Table 2. Apart from regulation constant values, which are predictable with mean value of each signal, PI parameters should be selected separately in each experiment. The highest amount of the integral gain was accounted for the pitch with the maximum error, as described in Table 3. For better understanding of the impact of the proposed compensation filter, Figure 6 demonstrates the absolute error between each estimated angle and iPhone reference orientation before and after performing the filter.
The proposed method utilized the gyroscope error model and the trapezoidal method to solve the integral equations of the filter, and finally, to obtain the signal of error for each attitude channel. The error signal was adjusted with the PI controller. Also, it was regulated by the regulation constant values, obtained from mean value of signal. The PI controller adjusted the high deviations of attitude and removed the error diverges, and it aligned the predicted error with the error signal. Finally, the regulation constant values removed the bias of the estimated error. The result of RMSE for each attitude channel is mentioned in Table 3.

4.2. Dynamic Test and Results

A dynamic test was designed to validate the performance of the proposed method in a real dynamic situation. A regular ground vehicle was selected to perform the experiment in the marked path. The experiment was performed in a region of Montreal. This time, the orientation reference was measured by a VN-100 Rugged IMU and AHRS board with the specifications pointed in Table 4. The MPU-9250 and VN-100 Rugged AHRS reference were mounted on top of the car, and they were connected to a laptop to record the true and measured data with two USB cables. The VN-100 Rugged board was connected to the VectorNav software as a control center Graphic User Interface (GUI). Figure 7 demonstrates the location and experiment’s route with starting and final points and shows the equipment used in this experiment.
The mentioned dynamic accuracy experiment was performed in 250 s. The inertial and magnetic data of the MPU-9250 and the AHRS reference data of VN-100 board were recorded during the experimental path. The experiment’s route was selected according to smooth inclination. Figure 8 demonstrates the attitude estimation before and after the proposed method compared to the true reference.
Figure 9 illustrates the absolute orientation error before and after the error prediction method. The proposed algorithm had the most significant effect on the heading error, and the error in roll and pitch was decreased. Figure 10 demonstrates that the attitude error prediction filter proposed in this paper could estimate the orientation error. The prediction signal for each channel was obtained after the PI controller and regulation.
These prediction signals were obtained with defining the parameters of PI controller and the regulator. The proportional gain, integral gain, and regulation constant values are defined in the Table 5 for the described dynamic experiment. By determining these parameters as Table 5, the most optimum error prediction signals were obtained.
The RMSE was calculated for each orientation channel, as described in Table 6. The static test was more challengeable for the roll and the pitch channels because of more movement along the x and y axes in the designed static experiment. However, due to the dynamic test with ground vehicle, the heading was more affected in this experiment. After performing the proposed AHRS error prediction method, the RMSE result for the roll and the pitch channels were decreased about 80% and 43%, respectively, and the heading’s precision improved by approximately 66%.
The Figure 6 and Figure 9 show the results of error compensation. However, it can be seen that in some phases of the trajectories, the attitude errors were not corrected. To analyze this, we need to consider the essence of the PI controller. The PI controller created some oscillations on the output of the system due to the integration part. Therefore, the error prediction system demonstrates the better performance in the overall investigation than in short-term phases. In other words, the PI controller tuned the predicted error signal to have the overall robust and stable attitude, which may have led to the lack of change in some parts.

5. Conclusions

The designed error prediction and compensation filter were implemented and tested with a low-cost IMU module. Two experiments were designed to validate the performance of designed method, one for static and one for dynamic validation. In the static test, the performance was compared to an iPhone smartphone orientation reference, the method demonstrated between 65% and 80% accuracy improvement in all orientation channels. For the dynamic test, the precise AHRS determiner board was selected as a true reference and the experiment was performed with ground vehicle, which showed about 60–80% error deduction in roll and heading, and about 43% accuracy improvement in pitch channel. Consequently, the proposed method demonstrated the significant improvement in the roll and the heading and moderate progress in the pitch estimation.
Although the presented method showed progress in error reduction of all channels in both static and dynamic tests, the error prediction can be modified to use other inertial sensors apart from the gyroscope. Also, because the method extremely depends on parameters of PI controller and regulator, finding a reliable mathematical solution for calculating them can be investigated for more accurate results. Determining the overshooting, overall stability, and other parameters for transfer function of the PI controller can play an active role in designing the prediction filter. Furthermore, the possibility of real-time calibration by estimating the parameters of error prediction filter warrants future investigations.

Author Contributions

F.F. designed the algorithm, prepared the literature review, and wrote contents of the paper. R.L.J. contributed to modifying the algorithm and supervising the project. The experiments, simulations, analysis, and final conclusion was performed by F.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sheng, A.H.; Zhang, T. MEMS-based low-cost strap-down AHRS research. Measurement 2015, 59, 63–72. [Google Scholar] [CrossRef]
  2. Doostdar, P.; Keighobadi, J. Design and implementation of SMO for a nonlinear MIMO AHRS. Mech. Syst. Signal Process. 2012, 32, 94–115. [Google Scholar] [CrossRef]
  3. Wang, Y.; Li, N.; Chen, X.; Liu, M. Design and implementation of an AHRS based on MEMS sensors and complementary filtering. Adv. Mech. Eng. 2014, 6, 214726. [Google Scholar] [CrossRef] [Green Version]
  4. Islam, M.S.; Shajid-Ul-Mahmud, M.; Islam, T.; Amin, M.S.; Hossam-E-Haider, M. A low-cost MEMS and complementary filter based Attitude Heading Reference System (AHRS) for low speed aircraft. In Proceedings of the 2016 3rd International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), Dhaka, Bangladesh, 22–24 September 2016. [Google Scholar]
  5. Mahony, R.; Hamel, T.; Pflimlin, J.M. Nonlinear complementary filters on the special orthogonal group. IEEE Trans. Autom. Control 2008, 53, 1203–1218. [Google Scholar] [CrossRef] [Green Version]
  6. Li, W.; Zhang, Z.; Sun, P. Quaternion-based kalman filter for AHRS using an adaptive-step gradient descent algorithm. Int. J. Adv. Robot. Syst. 2015, 12, 131. [Google Scholar]
  7. Guerrero-Castellanos, J.F.; HMadrigal-Sastre, S.; Durand, N.; Marchand, W.F.; Guerrero-Sanchez; Salmeron, B.B. Design and implementation of an Attitude and Heading Reference System (AHRS). In Proceedings of the 2011 8th International Conference on Electrical Engineering, Computing Science and Automatic Control, Merida City, Mexico, 26–28 October 2011; pp. 1–5. [Google Scholar]
  8. Rodrigo, M.; Grau, A. An Attitude and Heading Reference System (AHRS) based in a dual filter. In ETFA2011; IEEE: Toulouse, France, 2011; pp. 1–8. [Google Scholar]
  9. Johansen, T.A.; Brekke, E. Globally exponentially stable Kalman filtering for SLAM with AHRS. In Proceedings of the 2016 19th International Conference on Information Fusion (FUSION), Heidelberg, Germany, 5–8 July 2016; pp. 909–916. [Google Scholar]
  10. Ko, N.Y.; Choi, H.T.; Lee, C.M.; Moon, Y.S. Attitude estimation using depth measurement and AHRS data for underwater vehicle navigation. In OCEANS 2016—Shanghai; IEEE: Shanghai, China, 2016; pp. 1–4. [Google Scholar]
  11. Pourtakdoust, S.H.; Ghanbarpour Asl, H. An adaptive unscented kalman filter for quaternion-based orientation estimation in low-cost AHRS. Aircraft Eng. Aerosp. Technol. 2007, 79, 485–493. [Google Scholar] [CrossRef]
  12. Min-Shik, R.; Beom-Soo, K. Dynamic accuracy improvement of a MEMS AHRS for small UAVs. Int. J. Precis. Eng. Manuf. 2018, 19, 1457–1466. [Google Scholar]
  13. Lu, J.; Xie, L.; Li, B. Applied quaternion optimization method in transfer alignment for airborne AHRS under large misalignment angle. IEEE Trans. Instrum. Meas. 2016, 65, 346–354. [Google Scholar] [CrossRef]
  14. Madgwick, S.O.H.; Harrison, A.J.L.; Vaidyanathan, R. Estimation of IMU and MARG orientation using a gradient descent algorithm. In Proceedings of the 2011 IEEE International Conference on Rehabilitation Robotics, Zurich, Switzerland, 27 June–1 July 2011; pp. 1–7. [Google Scholar]
  15. Nagesh, Y.; Bleakley, C. Accurate orientation estimation using AHRS under conditions of magnetic distortion. Sensors 2014, 14, 20008–20024. [Google Scholar]
  16. Paola, P.; Belli, A.; Maurizi, L.; Palma, L.; Pernini, L.; Paniccia, M.; Valenti, S. A wearable fall detector for elderly people based on AHRS and barometric sensor. IEEE Sens. J. 2016, 16, 6733–6744. [Google Scholar]
  17. Adesida, Y.; Papi, E.; McGregor, A.H. Exploring the role of wearable technology in sport kinematics and kinetics: A systematic review. Sensors 2019, 19, 1597. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Rawashdeh, S.A.; Rafeldt, D.A.; Uhl, T.L. Wearable IMU for shoulder injury prevention in overhead sports. Sensors 2016, 16, 1847. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  19. Nak Yong, K.; Jeong, S. Attitude estimation and DVL based navigation using low-cost MEMS AHRS for UUVs. In Proceedings of the 2014 11th International Conference on Ubiquitous Robots and Ambient Intelligence (URAI), Kuala Lumpur, Malaysia, 12–15 November 2014; pp. 605–607. [Google Scholar]
  20. Diaz, E.M.; de Ponte Muller, F.; Jimenez, A.R.; Francisco, Z. Evaluation of AHRS algorithms for inertial personal localization in industrial environments. In Proceedings of the 2015 IEEE International Conference on Industrial Technology (ICIT), Seville, Spain, 17–19 March 2015; pp. 3412–3417. [Google Scholar]
  21. Gebre-Egziabher, D.; Hayward, R.C.; Powell, J.D. A low-cost GPS/inertial Attitude Heading Reference System (AHRS) for general aviation applications. In Proceedings of the IEEE 1998 Position Location and Navigation Symposium (Cat. No.98CH36153), Palm Springs, CA, USA, 20–23 April 1998; pp. 518–525. [Google Scholar]
  22. Hayward, R.; Powell, J.D. Single baseline GPS based Attitude Heading Reference System (AHRS) for Aircraft Applications. In Proceedings of the 1999 American Control Conference (Cat. No. 99CH36251), San Diego, CA, USA, 2–4 June 1999; Volume 5, pp. 3655–3659. [Google Scholar]
  23. Hian-Kun, T.; Shau-Shiun, J.; Fei-Bin, H. Pitch and roll attitude estimation of a small-scaled helicopter using single antenna GPS with gyroscopes. GPS Solut. 2009, 13, 209–220. [Google Scholar]
  24. Weideman, J.A.C. Numerical integration of periodic functions: A few examples. Am. Math. Mon. 2002, 109, 21–36. [Google Scholar] [CrossRef]
  25. Yuan, X.; Yu, S.; Zhang, S.; Wang, G.; Liu, S. Quaternion-based unscented kalman filter for accurate indoor heading estimation using wearable multi-sensor system. Sensors 2015, 15, 10872–10890. [Google Scholar] [CrossRef] [PubMed]
  26. Shuster, M.D.; Oh, S.D. Three-axis attitude determination from vector observations. J. Guid. Control Dyn. 1981, 4, 70–77. [Google Scholar] [CrossRef]
  27. Yun, X.; Bachmann, E.R.; McGhee, R.B. A simplified quaternion-based algorithm for orientation estimation from earth gravity and magnetic field measurements. IEEE Trans. Instrum. Meas. 2008, 57, 638–650. [Google Scholar]
  28. Stovner, B.N.; Johansen, T.A.; Fossen, T.I.; Schjølberg, I. Attitude estimation by multiplicative exogenous kalman filter. Automatica 2018, 95, 347–355. [Google Scholar] [CrossRef] [Green Version]
  29. Zhu, X.; Ma, M.; Cheng, D.; Zhou, Z. An optimized triad algorithm for attitude determination. Artif. Satell. 2017, 52, 41–47. [Google Scholar] [CrossRef] [Green Version]
  30. Mohammed, M.S.; Bellar, A.; Adnane, A.; Boussadia, H. Performance analysis of attitude determination and estimation algorithms applied to low earth orbit satellites. In Proceedings of the 11th International Conference on Control (CONTROL), Belfast, UK, 31 August–2 September 2016; pp. 1–6. [Google Scholar]
  31. Titterton, D.H.; Weston, J.L. Strapdown Inertial Navigation Technology, 2nd ed.; IEE Radar, Sonar, Navigation, and Avionics Series 17; Institution of Electrical Engineers: Stevenage, UK, 2004. [Google Scholar]
  32. Mourcou, Q.; Fleury, A.; Franco, C.; Klopcic, F.; Vuillerme, N. Performance evaluation of smartphone inertial sensors measurement for range of motion. Sensors 2015, 15, 23168–23187. [Google Scholar] [CrossRef] [PubMed] [Green Version]
Figure 1. Overview of the attitude and heading reference system (AHRS) method with error prediction filter, proprtional integral (PI) controller, and regulator.
Figure 1. Overview of the attitude and heading reference system (AHRS) method with error prediction filter, proprtional integral (PI) controller, and regulator.
Sensors 20 04055 g001
Figure 2. Block diagram of attitude error prediction, PI controller, and regulator. (1) Attitude error prediction; (2) PI controller; (3) regulator.
Figure 2. Block diagram of attitude error prediction, PI controller, and regulator. (1) Attitude error prediction; (2) PI controller; (3) regulator.
Sensors 20 04055 g002
Figure 3. Module MPU-9250 and smartphone iPhone 11 rotation trajectory for heading test: (a) 180 heading degree; (b) 135 heading degree; (c) 90 heading degree.
Figure 3. Module MPU-9250 and smartphone iPhone 11 rotation trajectory for heading test: (a) 180 heading degree; (b) 135 heading degree; (c) 90 heading degree.
Sensors 20 04055 g003
Figure 4. Estimated attitude before and after proposed method compared to the iPhone reference: (a) roll; (b) pitch.
Figure 4. Estimated attitude before and after proposed method compared to the iPhone reference: (a) roll; (b) pitch.
Sensors 20 04055 g004
Figure 5. Estimated heading, before and after proposed method compared to the iPhone reference.
Figure 5. Estimated heading, before and after proposed method compared to the iPhone reference.
Sensors 20 04055 g005
Figure 6. Absolute error before and after performing the proposed filter: (a) roll; (b) pitch; (c) heading.
Figure 6. Absolute error before and after performing the proposed filter: (a) roll; (b) pitch; (c) heading.
Sensors 20 04055 g006aSensors 20 04055 g006b
Figure 7. Dynamic experiment’s equipment and the experiment’s path.
Figure 7. Dynamic experiment’s equipment and the experiment’s path.
Sensors 20 04055 g007
Figure 8. Estimated orientation before and after performing the propsed method compared to the true reference orientation: (a) roll; (b) pitch; (c) heading.
Figure 8. Estimated orientation before and after performing the propsed method compared to the true reference orientation: (a) roll; (b) pitch; (c) heading.
Sensors 20 04055 g008aSensors 20 04055 g008b
Figure 9. Absolute attitude error before and after performing the method for each orientation channel: (a) roll; (b) pitch; (c) heading.
Figure 9. Absolute attitude error before and after performing the method for each orientation channel: (a) roll; (b) pitch; (c) heading.
Sensors 20 04055 g009
Figure 10. (a) Roll error and roll error prediction signal; (b) pitch error and pitch error prediction signal; (c) heading error and heading error prediction signal.
Figure 10. (a) Roll error and roll error prediction signal; (b) pitch error and pitch error prediction signal; (c) heading error and heading error prediction signal.
Sensors 20 04055 g010
Table 1. Comparison of error between iPhone 11 and Samsung S10’s AHRS algorithms.
Table 1. Comparison of error between iPhone 11 and Samsung S10’s AHRS algorithms.
AngleSamsung S10iPhone 11
Roll’s RMSE0.3801°0.2312°
Pitch’s RMSE0.4117°0.3993°
Yaw’s RMSE1.2313°0.7388°
Table 2. Parameters of PI controller and regulator for each static orientation experiment.
Table 2. Parameters of PI controller and regulator for each static orientation experiment.
ExperimentProportional Gain ( K P ) Integral Gain ( K I ) Regulation Constant ( ε )
Roll experiment K P _ 1 = 19 K I _ 1 = 0.002 ε 1 = 2
Pitch experiment K P _ 2 = 75 K I _ 2 = 0.5 ε 2 = 2
Heading experiment K P _ 3 = 2250 K I _ 3 = 0.002 ε 3 = 24
Table 3. RMSE of roll, pitch, and heading before and after the proposed filter in static test.
Table 3. RMSE of roll, pitch, and heading before and after the proposed filter in static test.
ChannelBefore Performing the FilterAfter Performing the FilterStatic Accuracy Improvement
Roll’ RMSE1.7603°0.4298°75.58%
Pitch’s RMSE3.7735°0.7268°80.74%
Heading’s RMSE1.1232°0.3720°66.88%
Table 4. Specification of the VN-100 Rugged AHRS board.
Table 4. Specification of the VN-100 Rugged AHRS board.
Dynamic Accuracy (Heading)Dynamic Accuracy (Roll and Pitch)Attitude Output RateOperation TemperatureBaud Rate
2.0° RMS1.0° RMS400 Hz–40°C to 85 °CUp to 921,600
Table 5. Parameters of PI controller and regulator for each orientation experiment in the dynamic test.
Table 5. Parameters of PI controller and regulator for each orientation experiment in the dynamic test.
ChannelProportional Gain ( K P ) Integral Gain ( K I ) Regulation Constant ( ε )
Roll K P _ 1 = 19 K I _ 1 = 0.002 ε 1 = 0.7
Pitch K P _ 2 = 50 K I _ 2 = 0.05 ε 2 = 1.1
Heading K P _ 3 = 4000 K I _ 3 = 0.001 ε 3 = 17
Table 6. Root mean square error (RMSE) of roll, pitch, and heading before and after proposed filter in dynamic test.
Table 6. Root mean square error (RMSE) of roll, pitch, and heading before and after proposed filter in dynamic test.
ExperimentBefore Performing the FilterAfter Performing the FilterStatic Accuracy Improvement
Roll’s EMSE0.9220°0.1880°79.61%
Pitch’s RMSE0.8611°0.4889°43.22%
Heading’s RMSE22.6029°7.6072°66.34%

Share and Cite

MDPI and ACS Style

Farhangian, F.; Landry, R., Jr. Accuracy Improvement of Attitude Determination Systems Using EKF-Based Error Prediction Filter and PI Controller. Sensors 2020, 20, 4055. https://0-doi-org.brum.beds.ac.uk/10.3390/s20144055

AMA Style

Farhangian F, Landry R Jr. Accuracy Improvement of Attitude Determination Systems Using EKF-Based Error Prediction Filter and PI Controller. Sensors. 2020; 20(14):4055. https://0-doi-org.brum.beds.ac.uk/10.3390/s20144055

Chicago/Turabian Style

Farhangian, Farzan, and Rene Landry, Jr. 2020. "Accuracy Improvement of Attitude Determination Systems Using EKF-Based Error Prediction Filter and PI Controller" Sensors 20, no. 14: 4055. https://0-doi-org.brum.beds.ac.uk/10.3390/s20144055

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop