Abstract

The procedure of determining the initial values of the attitude angles (pitch, roll, and heading) is known as the alignment. Also, it is essential to align an inertial system before the start of navigation. Unless the inertial system is not aligned with the vehicle, the information provided by MEMS (microelectromechanical system) sensors is not useful for navigating the vehicle. At the moment MEMS gyroscopes have poor characteristics and it’s necessary to develop specific algorithms in order to obtain the attitude information of the object. Most of the standard algorithms for the attitude estimation are not suitable when using MEMS inertial sensors. The wavelet technique, the Kalman filter, and the quaternion are not new in navigation data processing. But the joint use of those techniques for MEMS sensor data processing can give some new results. In this paper the performance of a developed algorithm for the attitude estimation using MEMS IMU (inertial measurement unit) is tested. The obtained results are compared with the attitude output of another commercial GPS/IMU device by Xsens. The impact of MEMS sensor measurement noises on an alignment process is analysed. Some recommendations for the Kalman filter algorithm tuning to decrease standard deviation of the attitude estimation are given.

1. Introduction

Navigation can be defined as the process of determining the position, orientation, and velocity of an object. A GPS-based navigation is quick and drift free and is readily available most of the time. However, as the GPS requires direct line of sight signals from at least four GPS satellites, the navigation can be frequently interrupted in the land based applications. The GPS signal gets lost due to various factors such as the blockage by buildings, trees, and other natural and nonnatural obstructions. This affects both the amplitude and phase of the received satellite signals and causes the receiver to lose lock on the blocked satellite, meaning that it needs both to reacquire the signal and to resolve the ambiguities in the phase measurements. Both these processes take time, and if there are several satellites affected, the receiver cannot provide a position solution for a significant period of time. Also it is worth mentioning that the data rate for the GPS can be too low for the particular application. In such situations when the GPS signals are not available, a relative navigation can be performed using the inertial sensors (accelerometers and gyroscopes) and magnetometers.

The strapdown inertial navigation system (SINS) has been widely used in numerous fields such as the positioning and navigation of ships, aeroplanes, vehicles, and missiles. To initialize the navigation Kalman filter (KF), all three attitude angles including the roll, pitch, and heading (azimuth) are required. The initial misalignment is one of the major error sources of the SINS. So, it is crucial to have an accurate initial alignment in order to implement the integrated navigation system. The tactical and navigation grade sensors are limited to commercial and military applications and very expensive, but, with the introduction of the compact, low-power, and cost-efficient MEMS sensors, it is possible to have portable integrated INS/GPS navigation modules. For low-cost INS, the initial alignment is still a challenging issue because of the high noises from the low-cost inertial sensors. The SINS must be preferably aligned before positioning and navigation. The aim of the initial alignment of the SINS is to get a coordinate transformation matrix from the body frame to the navigation frame and conduct the misalignment angles to zero or as small as possible. In many applications, it is essential to achieve an accurate alignment of the SINS within a very short period of time.

Accordingly, a number of filtering algorithms have been developed for integrating the output of the gyros and the accelerometers, to estimate the attitude. Previous studies of the attitude calculation methods, using the inertial sensors only, have been researched for use in the robotics [1], aircrafts [2], and human motion tracking [3]. The initial alignments of the high precision INS and low-cost INS should be treated using different methods, because the noise levels of the inertial sensors are quite different for these two types of systems.

The low-cost IMUs usually use gyroscopes with noise levels larger than the Earth’s rotation rate, and, hence, they cannot be aligned in the static mode. In this case, the external heading measurements using, for instance, the magnetic compass, are usually used to provide the alignment information [4]. Another possibility is to transfer the obtained attitudes of another, statically aligned, better quality IMU through the master-slave initialization process [5]. In addition, the dynamic alignment can be performed through the velocity matching techniques by using the velocity updates from an aiding system such as the Differential Global Positioning System (DGPS) or the Doppler radar [68].

This paper proposes the attitude estimation of the low-cost IMU using the linear Kalman filter (standard and modified) in the stationary and dynamic mode. The linear accelerations and angular rates are measured by MEMS IMU. The gyro and accelerometer data is denoised by wavelet algorithm. Next, the Kalman filter algorithm was used to estimate the pitch and roll. The magnetometer data was used for estimation of the heading. Finally, the test results are presented to show the performance of the proposed algorithm for attitude estimation of the low-cost IMU in the stationary mode and attitude estimation of the moving vehicle.

2. Alignment

Here we are discussing the practical aspects of alignment mainly regarding the vehicle navigation. For land vehicles, it can be assumed that the direction of travel is identical to the direction of the b-frame -axis and the roll angle is near to zero. There are two types of alignment that are required before the navigation parameters can be estimated for the portable navigation module in a vehicle. The first alignment is the alignment of the IMU axes with respect to the vehicle axes (i.e., making the b-frame coincide with the v-frame), which is referred to as the relative alignment. Once the relative alignment is achieved, the next step is to align the b-frame with the l-frame, which is referred to as the absolute alignment [6, 8].

In a broad sense, the initial absolute alignment of the SINS can be divided into two categories, that is, the stationary based and the moving based alignment. The moving based alignment is used mainly when the good quality GPS signals are available. Here we are discussing the stationary based alignment using the inertial sensor signals only. The requirements of the initial alignment of the SINS are high accuracy and short time. An accurate alignment is crucial; however, this is based on the alignment over a long period of time. A compromise of accuracy and time consumption of the initial alignment should be made. During the process of absolute alignment the pitch, roll, and heading are estimated. The misaligned portable navigation system (PNS) with respect to the vehicle frame is shown in Figure 1. If the relative alignment is not done properly, the navigation solution will be erroneous. The relative alignment means alignment of the b-frame with respect to the v-frame. For the vehicle frame, the axes are generally defined as x (direction of travel), z (direction of gravity), and y—completing the orthogonal set. In case of misalignment, the -axis accelerometer will not measure the true vehicle acceleration in the travel direction. This is due to an additional accelerometer error—not correctly compensated gravity, which is caused by the IMU misalignment. Also the initial attitude angles of the vehicle will be incorrectly estimated if the relative misalignment is not taken into account. And this, in its turn, will cause additional velocity and position drift.

The orientation accuracy of the PNS in this case will totally depend on the user and it is quite easy to assume that even a careful user cannot align the system properly at every use. An easy way to solve this problem is the introduction of a holder inside the vehicle that is aligned with the vehicle and provides the user an easy way to align the system at every use [6].

Inertial sensors do not need external sources for the initial attitude measurement. It can align itself by using the measurements of the local gravity and earth rate. The gyroscope compassing method is used for estimation of the heading [8]. However, the MEMS sensors have significantly high drift rates and noise characteristics, and, therefore, the gyroscope outputs cannot be used to estimate the azimuth or heading of the vehicle. The main reason is that the gyroscope compassing uses the rotation rate of the Earth. The Earth rate is about 15 deg/h, so the noise levels of the low cost gyros are near or higher than the Earth rate. This means that the Earth rate cannot be monitored with the MEMS gyroscopes for the moment. The heading is important in the initialization of the navigation algorithm. Magnetometers are used for the heading estimation. When the vehicle is moving the heading or the azimuth of a vehicle can be determined by incorporating the north and east velocity components from the GPS receiver.

The gravity is a relatively large quantity; even the low-cost accelerometers can measure it properly. So, for the MEMS sensors, the strong gravity signals from accelerometers can be measured and these measurements are used for estimation of the roll and pitch of the inertial system with respect to the l-frame.

3. MTi-G Device

The calibrated data (the rate of turn, acceleration, and the magnetic field) is expressed in the sensor fixed coordinate system [9]. All calibrated vector sensor readings are in the right-handed Cartesian coordinate system. This coordinate system is body fixed to the device and is defined as the sensor co-ordinate system or the body frame. The coordinate system is aligned to the external housing of the MTi-G. The aluminium base plate of the MTi-G is carefully aligned with the output coordinate system.

The MTi-G default local tangent plane of the North-West-Up is defined in the Figure 2 above; it has pointing to the North and it is tangent to an arbitrary reference point. The third component () is chosen Up which is common for many applications (according to the ISO/IEC 18026). The vertical vector is perpendicular to the tangent of the ellipsoid as defined in Figure 2. The alignment of the bottom plane and the sides of the aluminium base plate of the MTi-G with respect to the sensor-fixed output coordinate system is within 0.1 deg.

The orientation output of the MTi-G is the orientation between the sensor-fixed coordinate system (the body frame) and the local tangent plane coordinate system, as the reference coordinate system. The output orientation can be presented in different parameterizations such as the quaternion, direction cosine matrix, or the Euler angles (roll, pitch, and yaw). The Euler angles have more meaningful attitude expression than the quaternion method or the direction cosine matrix method and the user recognizes the attitude of the object directly. According to the definition of the Euler angles, the coordinate system rotates in the angle (yaw) on the -axis; the coordinate system rotates in the angle (pitch) on the -axis. Finally this coordinate system can rotate in the angle (roll) on its -axis (see Figure 3).

4. Sensor Data Denoising

It is advisable to reduce the noise level of the inertial sensor signals before using the measurements in the alignment procedure. The objective is to provide more accurate computation of the initial attitude angles and speed up the convergence of the Kalman algorithm.

Most of the standard inertial denoising methods such as the low pass filtering are not efficient enough for reducing the high noise levels of the MEMS inertial measurement unit without corrupting some useful information in the sensors’ signal.

In [10] it was demonstrated that the wavelet tool can be useful for the analysis of the inertial measurements in order to decrease the noise level.

Since the low frequency fraction  Hz) of the inertial measurement reading contains the majority of the inertial sensor dynamics during the static alignment phase, these inertial measurement readings can be denoised using the wavelet multilevel of decomposition to separate the low and high frequencies.

Consequently, five levels of decomposition will limit the frequency band to 0.5 Hz. Five levels of decomposition (LOD) are adequate to reduce the high frequency noise from the real inertial sensor measurement [10]. Increasing the level of decomposition results in the undesired features of the navigation solution since the original features of the IMU data will be lost after wavelet filtering with too high LOD. Denoising of the inertial sensor signals by wavelet decomposition has proven its success in reducing errors of the estimated attitude angles for the integrated navigation systems [10]. The analysis of the gyroscope signal is made in order to demonstrate the effect of the wavelet denoising. The results are shown in Figure 4. As we can see, there is a considerable decrease of the noise level. The standard deviation of the gyroscope signal before the wavelet filtering was = 0.0063 rad/s, but, after it, it decreases till = 0.0011 rad/s. The same effect of the noise reducing can be demonstrated for the accelerometer signal too.

5. Heading Estimation Algorithm

When the GPS signal is available and the vehicle has a nonzero velocity, it’s possible to calculate a heading of the vehicle using the GPS-derived velocity. When the GPS signal is not available, the magnetometers (which sense the Earth’s magnetic field strength) can be used for the determination of the absolute heading with reference to the local magnetic North. The deviation between the true north and the local magnetic north is known as the magnetic declination. This declination can be calculated as a function of latitude, longitude, and time using a global model such as the World Magnetic Model (WMM). The global model is typically accurate to about 0.5 degree. The declination angle according to the WMM 2010 for latitude 55° 52′ 19′′N, longitude 26° 31′ 4′′E, and attitude 100 m is 7.284°E. The calculation was done using a software of the open access from the website of the British Geological Survey.

The short-term temporal variations of the Earth’s magnetic field can be caused by the magnetic storms [5]. The heading with reference to the local magnetic north is derived from the horizontal force of the magnetic field. If the magnetometer was aligned with the local horizontal the heading, ψ, would be calculated as [11] where ,   represent the Earth’s magnetic field along the - and -axes, aligned with the horizontal plane.

Different types of magnetic disturbances distort the measured magnetic field. The magnetic fields are produced not only by the earth but also by the man-made objects such as vehicles, buildings, bridges, and power lines.

Hence, the quality of the magnetometer heading strongly depends on the tilt compensation (if not horizontally located) and the calibration procedure, including identifying the possible error sources and removing them from the measurements.

The traditional autocalibration method [4] is based on the fact that the locus of the error free magnetometer measurements is a circle if the sensor moves around the circle. The impact of various magnetometer errors would distort the shape of this circle; however, the circular constraint eventually can be used to partially estimate the local variations of the Earth’s magnetic field.

Practical implementation of the auto-calibration does not require any reference headings, but this method strongly depends on the position and the effect of ferromagnetic materials in the proximity of the sensor. If the sensor’s location is changed or it is placed in a new environment, a new calibration is needed for identifying and removing the effects of the new magnetic environment.

The magnetometer calibrated measurements , for horizontal components can be represented as follows: where , are two scale factors, , are two biases along the horizontal axes of the magnetic field and , are the levelled magnetic components of the Earth. The scale factors and biases can be found using the following equations: where , are two scale factors, , are two biases along the horizontal axes of the magnetic field, , , , —the maximum and minimum of the measured magnetic field along the - and -axes.

To calibrate the magnetometer using the above equation, it’s necessary to rotate the levelled magnetometer several times by 360 degrees and then determine the scale factors as the ratio of the major and minor axes, changing the circle to an ellipse, and bias parameters as the offset center of the ellipse, after it’s possible to calculate the magnetometer calibrated horizontal components using (2). And the heading can be estimated using (1).

The above-mentioned auto-calibration approach has been implemented in MATLAB and applied to the MTi-G magnetometers’ signals in order to test the implementation of the auto-calibration procedure. The results are shown in Figure 5. Here the magnetic field strength of the Earth is defined in the arbitrary units (a.u.), normalized to the Earth’s field strength.

6. Kalman Filter Algorithm for Roll and Pitch Estimation

6.1. Process Model

In this paper quaternions were used as state variables for the Kalman filter. The equations for the linear Kalman filter algorithm used here can be found in [11]. Quaternion implementation of the attitude update is computationally efficient [5]. There’s no trigonometric function during the quaternion based attitude updating.

Quaternion is hypercomplex numbers with four components: where represents the magnitude of rotation, and other three components represent the axis about which that rotation takes place.

The differential equations for the process model have the following form [12]: where , ,   are the output signal of gyroscopes and , , ,   are zero mean Gaussian noise with the corresponding PSD . Allan variance method can be used in order to make coarse estimation of . Also sensor noise specification given by the manufacturer can be used for estimation. Then system noise matrix for the Kalman filter can be determined taking into account value. And the elements of this matrix can be precised in order to achieve better performance of the filter. For example, elements of the system noise matrix can be adjusted to minimize standard deviation of state vector values. Usually it’s preferable to increase values of the noise matrix elements in order to take into account other unmodelled noise of the system.

The defined system model (5) is linear and can be used in the linear Kalman algorithm (LKF).

6.2. Measurement Model

The pitch and roll angles calculated using the accelerometer data do not diverge with time because they are not calculated via integration, but rely on the earth’s gravity measured on each axis. Also, the low cost accelerometers have better characteristics (noise level, and stability) comparing with the low cost gyroscopes. The pitch and roll [5] may be determined using where , ,   are accelerometer signal and is the four-quadrant arctangent function.

Transforming the pitch, yaw, and roll angles to quaternion, we get the measurement vector z for updating a step of the Kalman filter. The value of yaw angle for the Kalman filter update step is calculated based on magnetometer data.

The measurement equation for the LKF has the following form: where   is the measurement matrix, is vector of the zero mean Gaussian measurement noises and   is the state vector.

The defined measurement model is linear and can be directly used in the linear Kalman algorithm.

At any time of the LKF algorithm processing attitude angles can be calculated using [5] where  is the quaternion.

7. Experimental Results

Experiments have been carried out with the MTi-G manufactured by Xsens Technologies. MTi-G is an integrated GPS and Inertial Measurement Unit (IMU) with the navigation and attitude and heading reference system (AHRS) processor. The MTi-G is based on the MEMS inertial sensors and the GPS receiver and also includes a 3D magnetometer and a static pressure sensor. In this work accelerometer, the gyroscope and magnetometer signals from the MTi-G will be processed by the algorithms described in the previous sections. The sensor data postprocessing algorithms were implemented using the MATLAB software.

7.1. Pitch and Roll Estimation for Stationary Object

To test the proposed attitude calculation method, the attitude result is compared with the attitude output of the MTi-G. The attitude output from the MTi-G and the proposed method with the calibrated data from the MTi-G use the same data; thus the attitude result comparison means only the comparison of differences in the attitude calculation algorithm. The GPS signal for the MTi-G was unavailable during the tests. Experiments for attitude estimation were conducted through simulating the certain value of pitch and roll angles of the MTi-G using a tilt table. The accelerometer and gyroscope signals were denoised using the wavelet filtering prior to its processing with the LKF.

In order to demonstrate the effect of the signal denoising using the wavelet filtering for attitude angle estimation (e.g., for the pitch), the inertial sensor signals were processed with and without their initial denoising. The result of such experiment is shown in Figure 6 for the case when the MTi-G was perfectly levelled (with ±0.1° precision) relative to the local horizontal. The standard deviation of pitch estimation using the LKF and without the wavelet filtering of accelerometer signals was = 0.0746°, but with denoising (prior to the data processing by the LKF) decreases till = 0.0105°.

As the pitch and roll estimation for a stationary object is based on the sensed accelerometer signals, it is worth mentioning that any sensor error such as bias drift, for example, due to the temperature variations will result in the estimation mistake of attitude angles. It’s impossible to differentiate the accelerometer bias due to the misalignment or sensor measurement error. In order to minimize the negative effect from random (stochastic) part of the accelerometer bias, it is recommended to switch on the low cost IMU some time before (5–15 min depending on the IMU technology) the real navigation. The internal characteristics of the low-cost accelerometer will stabilize during this time.

During the first test the tilt table was aligned in order to obtain the pitch = 0° and roll = 0° with a precision ±0.1°. The results of the tilt angle estimation are shown in Figures 7 and 8. The mean value and standard deviation of the estimated pitch and roll are given in Table 1.

Then the tilt table was adjusted in order to obtain the roll = 39.5° with a precision ±0.5°, but pitch was kept the same ( = 0°). The roll estimation for this test is shown in Figure 9.

Then the tilt table was adjusted in order to obtain the pitch = 39.5° with a precision ±0.5°; the roll value was zero ( = 0°). The pitch estimation is shown in Figure 10. The statistical characteristics of the pitch and roll for the last two tests are provided in Table 2.

7.2. Heading Estimation for Stationary Object

During this test the tilt table was aligned in order to make the pitch and roll equal to zero with a precision ±0.1°. The heading estimation for this test is shown in Figure 11. As it was not possible to obtain a true value of the heading with the necessary precision by external means, it can be assumed that the true heading value is approximately an average of two mean values, obtained by the proposed method (see Section 5) and the MTi-G output. In such a case the true heading value is . The statistical characteristics of the estimated heading are given in Table 3.

7.3. Minimisation of the Standard Deviation of the Pitch/Roll Estimation

The functional curves of the standard deviation of the pitch/roll estimation depending on the system noise level are shown in Figures 12 and 13.

The standard deviation of the pitch/roll estimation has a greater minimal value, when the KF algorithm is used without signal preprocessing by a wavelet algorithm. And there is only one optimal value of the system noise deviation that minimizes the standard deviation of the pitch/roll estimation, when only KF algorithm is used for data processing.

When wavelet algorithm is used for sensor data preprocessing, the standard deviation of the roll/pitch estimation decreases insignificantly, when .

The standard deviation of the pitch/roll estimation is high, when the system noise value is small () in the KF algorithm.

The functional curve type remains the same for different values of the measurement noise level, which is defined in the measurement noise matrix R.

It is possible to decrease the standard deviation of the pitch/roll estimation for a stationary object even more. For this purpose, the state transition matrix in the KF algorithm should be replaced by the corresponding identity matrix (). The system noise level should be decreased for at least 1000–10000 times comparing to the value defined according to the MEMS gyroscope specification. These changes in the algorithm are possible as the MEMS gyroscope in a stationary mode has no informative output signal. And it is assumed that such a model is perfectly suitable for the system description and hence requires very small level of system noise for setting in the KF algorithm. The results of the data processing by KF with a modified state transition matrix (modified KF) are presented in Table 4. For comparison, in the same table the results of the data processing by KF without modification of the state transition matrix are presented as well. The sensor data preprocessing by a wavelet algorithm (LOD = 5) was applied in both cases. The standard deviation of the pitch/roll estimation decreases twofold, when using the modified KF.

7.4. Attitude Estimation for a Vehicle

In most cases, it is sufficient to have accelerometer data for pitch and roll estimation, when a vehicle is in stationary mode. When the vehicle is moving, it is not possible to obtain a reliable solution for the vehicle pitch and roll attitude angles using only accelerometer signals. It is related to the fact that the accelerometer signal contains the information not only about the object misalignment but also additional signal components due to vehicle acceleration. Thus, the information from the gyroscope signal should be used for the attitude estimation of a moving vehicle. Taking this into account, it is necessary to adjust the algorithm (described in Section 6) in such a way that accelerometer measurements would be nearly ignored, when the vehicle is accelerating. This can be implemented by setting the Kalman gain matrix values to zero in the algorithm, when the vehicle has velocity change more than certain value during 1 second. This value of velocity change was determined empirically. This value was set to 0.15 m/s for the considered algorithm here.

The following additional modification of the algorithm was implemented taking in account results from Section 7.3—to replace state transition matrix by the corresponding identity matrix (), when the vehicle has velocity change less than 0.15 m/s during 1 second.

The experiment was conducted on the straight good quality asphalt road. The IMU was fixed rigidly on a board (Figure 14) inside the vehicle. The IMU is placed on the board in order for that the IMU -axis would coincide with the vehicle longitudinal axis. This can be achieved by a simple geometrical calculation and defining the corresponding axes orientation. (Then the -axis takes correct orientation automatically). The -axis of the b-frame was aligned with the gravity vector orientation. This was implemented by the verification of the tilt angles of the board. The tilt angles of the board were verified by an inclinometer in order to guarantee the minimal difference of the -axes orientation for the b and vehicle coordinate frame. This board was fixed inside the car.

The vehicle coordinate system defines the longitudinal axis of the vehicle as x, the lateral axis to be y, and the vertical axis -points downwards so that it is aligned with the gravity (Figure 15).

In the beginning of the test, the vehicle was in stationary mode. Then the vehicle accelerates till certain velocity, after that the velocity of the vehicle remains nearly the same for 1-2 minutes, and after that the vehicle slowed down, and the vehicle was again in the stationary mode. The trajectory of the vehicle moving is shown schematically in Figure 16.

The results of the vehicle attitude estimation are shown in Figures 17, 18, and 19. The vehicle was stationary for the first 60 seconds and the last 10 seconds of the experiment. As expected, the estimation of the pitch and roll based on accelerometer data (when vehicle is stationary) has less fluctuations comparing with the attitude estimation, when the vehicle is moving.

The standard deviation of the pitch/roll estimation (when the car is stationary) is bigger comparing to the results shown in Section 7.1. One of the reasons for this is the additional disturbances of the accelerometer signal caused by the closing car door, engine switching, and passenger moving inside the car.

The estimation of the pitch angle (when the car is moving) has a bit more of fluctuations when comparing to the roll estimation as the x-accelerometer (measures acceleration of the vehicle) signal influences the pitch estimation according to (6).

The roll value was bigger, when the vehicle was stationary since the vehicle was on the verge (Figure 16), where the road had greater inclination. The yaw of the vehicle had significant change in the beginning and in the end of the movement (Figure 19). This is due to the fact that the car made a maneuver, moving from the verge to the traffic line. The initial estimate of the yaw was made using magnetometer data.

8. Conclusion

The MEMS IMU is capable of estimating the initial attitude angles (pitch and roll) in the stationary mode without correction from an external sensor such as the GPS. The attitude estimation precision (±0.5°) is sufficient for a vehicle navigation application. The convergence rate of the proposed algorithm is very fast: less than 1 second is necessary to obtain the estimation values of pitch and roll. The results of the comparison show that the attitude (pitch and roll) estimations by the proposed algorithm are less noisy comparing with the MTi-G output. Moreover, the practice showed that it is necessary to wait for about 1-2 minutes until the values of pitch and roll from the MTi-G output stabilize. The heading was estimated using the magnetometer data. The heading estimation was noisier and less stabile comparing with the pitch and roll estimation, even taking into account that the wavelet denoising of the signal was used.

The estimation of the vehicle attitude is quite noisy, because the inertial sensors have additional, not enough reduced measurement errors (mainly sensor biases). It’s advisable to use specific methods such as stochastic modelling for reducing measurement errors of the inertial sensors or use an aiding sensor such as the GPS for the estimation of the measurement errors of the inertial sensors through fusion with the inertial sensors data. The particle filter [13] or extended Kalman filter [14] can be used as the data fusion algorithms.