ANN-assisted robust GPS/INS information fusion to bridge GPS outage

Inertial navigation is an edge computing-based method for determining the position and orientation of a moving vehicle that operates according to Newton’s laws of motion on which all the computations are performed at the edge level without need to other far resources. One of the most crucial struggles in Global Positioning System (GPS) and Inertial Navigation System (INS) fusion algorithms is that the accuracy of the algorithm is reduced during GPS interruptions. In this paper, a low-cost method for GPS/INS fusion and error compensation of the GPS/INS fusion algorithm during GPS interruption is proposed. To further enhance the reliability and performance of the GPS/INS fusion algorithm, a Robust Kalman Filter (RKF) is used to compensate the influence of gross error from INS observations. When GPS data is interrupted, Kalman filter observations will not be updated, and the accuracy of the position will continuously decrease over time. To bridge GPS data interruption, an artificial neural network-based fusion method is proposed to provide missing position information. A well-trained neural network is used to predict and compensate the interrupted position signal error. Finally, to evaluate the effectiveness of the proposed method, an outdoor test using a custom-designed hardware, GPS, and INS sensors is employed. The results indicate that the accuracy of the positioning has improved by 67% in each axis during an interruption. The proposed algorithm can enhance the accuracy of the GPS/INS integrated system in the required navigation performance.


Introduction
In recent years, accurate vehicle positioning through edge computing concepts has significantly affected many applications of the transportation industry, such as intelligent driver assistance technology, routing, and auto-drive systems. Generally, the overall performance of low-cost inertial sensors degrades over a certain amount of time, and by using a high-grade sensor, the production cost of the vehicle will be significantly affected. Consequently, using low-cost sensors with an accurate positioning algorithm is the best solution to maintain accuracy and productivity [1]. Global Positioning System (GPS) and other similar systems such as Global Navigation Satellite System (GNSS), Global Navigation Satellite System (GLONASS), and Beidou are now widely accessible around the world and stand as environments. A robust Kalman filter could be employed to reduce the effect of gross error in observation.
In this work, EKF, along with a robust method, has been proposed to ensure dealing with the mentioned issues, and, improve the accuracy of the GPS/INS system. The robust algorithm evaluates the innovation vector with chi-square test and modifies the faulty innovation vector. Kalman filter robustness is the ability of the filter to deal with adverse environments and input conditions.
The primary purpose of this research is to design a high precision fusion algorithm along with a custom standalone hardware for civil and small-industry applications. Since increasing cost would affect negatively on the final product, in this research, lowcost MEMS sensors are used. Although expensive sensors provide high accuracy data, MEMS sensors provide a lower but acceptable range of accuracy along with a much lower price. Furthermore, all other parts of the hardware, i.e., processor, are chosen carefully from a low to medium range of price to ensure production capability of the system. Compared to other works in the same field as [11,15,16,23], two primary purposes in this work have been improved. First, the design of the hardware from both aspects of cost-effectiveness and multi-platform capability of the product (i.e., robots and autonomous drones) has been considered. Second, the accuracy improvement of the algorithm in most probable scenarios, standard scenario (using RKF), and GPS outage scenario (using Neural Network), has been investigated.
Choosing between ANN or machine learning methods in GPS/INS fusion algorithms depends on the type of the vehicle and main scenario, in which the algorithm is being used. Neural Networks implicitly integrates temporal data and recognizes temporal data patterns with arbitrary time intervals. Therefore, Neural Networks is suitable for applications where input-output data has temporal patterns. This has a beneficial effect on prediction accuracy [9]. The most crucial difference between ANN and machine learning methods is its performance as the scale of data increases. ANN algorithms need a large amount of data in order to be capable of accurate prediction, whereas machine learning methods perform well with less amount of data. On the other hand, when there is a large amount of data, the performance of ANN methods increases over time. In this work, GPS and INS sensors produce a tremendous amount of data over time, as the INS sensor works at 100 Hz. Thus, after a certain amount of time, when ANN is trained well, its performance would overcome the machine learning algorithm.
In the second section, GPS, INS, and the proposed scheme and formulations of the data fusion are presented. Results of an outdoor test with designed hardware are presented in Section 3. Finally, Section 4 makes the concluding remarks.

Materials and methods
In this section, the formulation of the work is briefly described. Primarily, position calculation of GPS and also output variables of INS are described. Also, GPS/INS fusion algorithm using EKF as a primary step for integrated navigation is investigated. Then, a robust methodology to increase the performance of EKF is proposed. Finally, integration schemes based on loosely-coupled integration method along with the proposed algorithm are demonstrated.

Formulation
GPS is a collection of 32 satellites orbiting the earth's surface and is continuously providing position data to receivers on earth [5]. The position is determined through measuring a range between receiver and a minimum of four satellite positions by measuring the bias error between receiver and GPS clock. This range is called pseudo-range and is determined as per Eqs. (1)-(3), as below.
where (x j , y j , z j ) denotes the satellite position in three-dimensional space, (x, y, z) is the receiver position, ρ i is the pseudo-range in meters, b is the clock bias of the receiver, c is the speed of light, and t j is the satellite clock [24]. The final coordinate frame in this paper is Earth Centered Earth Fixed (ECEF), which is denoted by superscript e. Other coordinate frames used in this paper are Inertia and Body frames denoted by superscripts i and b, respectively. The z-axis in ECEF frame is towards the rotation axis of earth from the center to the North Pole, and the x-axis is towards the equinox (in Greenwich) (Fig. 1). Accelerometer vector in and gyroscope angular velocity in body frame are denoted by respectively. Also, the transformation matrix for converting body-frame angular rates to Euler angular rates is given by Eq. (4), as below.  where [p q r] T is the angular velocity vector and by integrating ½φθψ T , Euler angles are obtained. C e b is the transformation matrix from body frame to earth frame defined as per Eq. (5). Also, state space representation of the vehicle is defined as Eq. (6), as below.
whereã e and Ω e ie , respectively represent the skew-symmetric forms of the acceleration and angular velocity vectors.
H sets for different conditions as follows. Due to the type of GPS receivers, velocity data may also be received. The first array of the matrix H represents observations of Position, and the second array is observations of velocity. When GPS is jammed, or the signal is interrupted, no data is available, and therefore, this matrix becomes zero, and another approach should be utilized for estimation. The state vector is defined as Eq. (10), as below.
where δp e , δv e , and ς are position n, velocity, and attitude errors, respectively. Also, δ ω b ib and δa b are angular velocity and acceleration error. The error values are determined by integrating the differential equations in (6) using appropriate initial conditions. The error between output position and velocity of GPS/INS algorithm and the reference position and velocity, e, is defined as Eq. (11), as below.
The state space model is nonlinear because matrices F(t) and G(t) contain nonlinear components. As a result, a linearized model needs to apply KF since the linear dynamics of the sensors are unknown [12]. To implement KF in a microprocessor-based system, a discrete form of the state space model is required as described in Eq. (12).
where u(k) is the process noise. The relations between continuous and discrete forms of converted matrices are defined in Eqs. (11) and (12), as follows.
where Φ k is the state transition matrix. T s is the sampling time. The measurement equation would be defined as in (15), as below.
where δy k is the numerical difference between GPS and INS vectors, and w k is the measurement noise.

Kalman Filter
In this paper, an EKF is implemented. At the first step of signal filtering, initial values for estimation of the state variables X 0 − and the covariance matrix of state estimation error P 0 − are selected. Next, the value of the state variables and the covariance matrix of state estimation error are predicted for the current moment in Eqs. (16) and (17) as: To improve the priori estimation, first, the Kalman gain is calculated and then, using information vector y(k), the posteriori estimations are updated in Eqs. (18)-(20), as follows.
These calculations repeat every time a new data is received.

Robust Kalman Filter
Generally, the performance of the GPS/INS system entering a tunnel, area with buildings, or in a forest may frequently be degraded, causing gross observation errors in filtering and estimation. Moreover, INS outputs are always exposed to high noise and different types of uncertainties, such as bias, scale factor, and misalignment. Therefore, inconsistency between vehicle and sensors lead to INS gross errors [25,26]. Availability of correct and persistent GPS data as observation is essential to continue correct estimation in integrated navigation systems. Theoretically, GPS observations must be Gaussian distributed with mean H k δx k and covariance H k P − kþ1 H T k þ R k . Therefore, according to Eqs. (16)- (20), the standard EKF is carried out [27]. The square of the Mahalanobis distance of the observations y k to its mean is considered as a test statistic described in Eq. (21) as: where M k is the Mahalanobis distance, γ k is a static variable used as an index for probability test, m is the degree of freedom, which is the same dimension as the observation vector, and χ 2 a ðmÞ is the probability threshold at significance level α, in which the null hypothesis test will be rejected. Usually, α is a small value, e.g., below 5%. In this contribution, 1% for α 1 and 0.01% for α 2 are adopted. According to the law of the chi-square test, if the statistical index γ k is between two thresholds, the observations are subject to gross error. A scalar factor β is introduced in Eq. (22) to adjust the covariance of the observation prediction in (17) and (18) to ensure robustness as follows: Equation (22) can be satisfied as stated in Eq. (23) as follows.
Since equation (23) is nonlinear in β k , by solving it iteratively using newton's method, Eq. 24 would be resulted as: Therefore, β k would be summarized as per Eq. (24) as follows.
If the gross error is small, GPS observations would significantly affect the update part of the filter by magnifying the covariance matrix of the measurement noise. However, if the error is considerably large, the observation is not beneficial. So, the covariance matrix is set to infinity to remove the negative effect of observation with the gross error. Therefore, the robust factor would be as Eq. (26).
Also, the Kalman gain in Eq. (15) is changed to the gain stated in Eq. (27), as follows.
This way, the information from the dynamic model would dominate the effect of actual observation, and therefore, the gross error will be overcome. This method is tested with the designed hardware and is presented in Section 3.

Integration scheme
There are two major types of integration schemes in sensor data fusion problems. In loosely-coupled integration, GPS output data and inertial sensors are integrated using a KF while in tightly-coupled integration, raw GPS data and INS measurements are used to calculate position, velocity, and orientation [28]. The integrated navigation system adopts the loosely-coupled integration scheme, and the fusion method incorporating the data preprocessing algorithm and Nonlinear Auto-Regressive (NAR) Neural Network is proposed in the system, as shown in Fig. 2a. The input of the KF is the position error of the INS calculated by subtracting the GPS position from INS. Then, estimated system states are applied to the position, velocity, and orientation of INS and consequently, the final navigation output is resulted.
GPS/INS data fusion using KF, due to its high performance and simplicity, is the first choice in meeting primary navigation demands, and in usual conditions, it calculates the position of a vehicle with acceptable precision. However, in many occasional scenarios like in urban and military areas in which GPS is interrupted for a long period, due to reasons like entering a tunnel or intentional signal jamming, GPS accuracy is dramatically reduced because KF cannot estimate current position in the absence of GPS signal. In order to correct this problem, the structure depicted in Fig. 2a is used together with a neural network.
Using the neural network in real-world applications is highly dependent on the proper training of the network before using it. In this work, the neural network should provide data for a limited period but after a specified minimum amount of time. This time is dedicated to the training of the neural networks and is necessary for accurate prediction of the network and the entire algorithm during GPS outages. In this structure, the neural network is used in two modes of training and prediction. When the GPS data is available, the neural network trains from the KF output data and, when the GPS signal interrupts, as in Fig. 2b, the neural network predicts the position, velocity, and orientation error in the absence of the KF.
Feedforward neural network consists of three layers: input, hidden, and output layer. Each layer is composed of several neurons and different layers and can have different quantities of neurons (Fig. 3).
In this network, neurons are connected to their adjacent layers. Information transfers using these connections, and the corresponding transfer function is selected separately [14]. One of the conventional methods of training a neural network is the backpropagation approach. This approach consists of two paths: forward and backward. In forward path, the input vector is applied to a network, and its outputs are transferred through hidden layers into output layers so that the final output of MLP is achieved. Also, weight matrixes and bias vectors are considered constant and invariant. This path is represented using Eq. (28), as follows. where i is the layer number andŷ i is the previous layer output used to calculate layer i + 1 as its input.
In the backward path, the network parameters are adjusted based on the error backpropagation algorithm. The error vector is the difference between the desired response and the network response. The error value in the training step is sent in the opposite direction, from the output layer to the input layer, to adjust the weights and compensate the error to reach the desired response. When the output vector is compared with the desired vector, the error value in the nth output of the last layer is defined for the kth pattern as per Eq. (29).
The main goal is to estimate the network weights in order to minimize the Root Mean Square Error (RMSE) of the system and model output. The error value in each iteration for the nth neuron of the output layer is defined as e 2 n ðK Þ. As a result, the network cost function is described in Eq. (30).
With the capabilities of the NAR model to adapt to the complex and nonlinear dynamics of the time series, this model is one of the most appropriate tools for modeling and predicting time series of GPS/INS integration problems and is widely used in various applications [29] (Fig. 4).
NAR model input is a nonlinear function of previous outputs which is described as Eq. (31).
where y(t − 1), y(t − 2), …, y(t − q) is a model output feedback, q is the order of the system, e(t) is the noise, and f(.) is the nonlinear function, which should be estimated. In control and navigation applications, an estimation of the system states is required at fixed intervals or a predetermined rate. Measurements of different sensors with different sampling characteristics should be synchronized, and standards of data transfer in the processor must be met. Therefore, an algorithm for converting sample rates should be used to ensure the availability of the data for signal processing at each interval [30]. The scheme of converting the sample rate is shown in Fig. 5.
At a specified time t, if an observation is available, the KF applies prediction and update steps. However, when the output is required, and measurement is not available, only the prediction step will be applied, and the update step will be deactivated. In Fig.  5, M contains measured samples, and O contains samples at the resampled rate. Because GPS receiver has a lower sample rate than IMU, and for some other systembased reasons, the data are usually not synchronous and should be resampled using different hardware or software methods.
Software resampling methods are generally based on interpolation, considering different interpolation methods such as linear, cubic, and spline. Because of the small differences in the final values, and the fact that the computation of linear interpolation is much easier than other methods, the linear method is used for resampling.  Moving an object toward an area with a signal jammer or similarly, during GPS signal interruption like the time that the vehicle is moving fast or passing through a tunnel, are important scenarios in aeronautical and automotive applications. In this scenario, it is presumed that at least four satellites are available, and at a particular moment, this number decreases to less than three satellites and stays in this state for a long period. In this section, the behavior of the system based on the defined scenario is studied, and additionally, the effect of the neural network on the system performance over a limited time is investigated. An outdoor test has been performed to investigate the accuracy of the fusion algorithm in the defined scenario. The test hardware is installed on a car, and a closed path in an urban area has been travelled. The whole test is performed in 700 s, and after 600 s, GPS data has been interrupted for 14 s. The position results of the test are shown in Figs. 12 and 13 separately.  The test hardware is a custom-designed circuit based on Digital Signal Processor (DSP) in circular shape with a 100-mm diameter in order to fit in every moving vehicle and work standalone (Fig. 6). The design based on a modular approach in three distinct modular layers and the IMU sensor are also removable and replaceable.
The first layer includes power supply; the second layer includes the processor and communication modules. The processor is TMS320F28335 made by Texas Instruments with 150 MHz and single-precision floating-point unit (FPU), which makes it suitable for data acquisition and motor control. The third layer includes sensors, GPIO, and PWM outputs with IMU model ADIS16448, which is connected through SPI port and GPS model NV08C-CSM, which is connected through SCI port. Also, the programming and online plot of results are processed through an XDS100 V2 emulator.  Figure 7 shows the values of γ k , and the red and green lines are the threshold values of significance levels α 1 and α 2 , respectively. There are 71 values of γ k which are between 8.9 and 3.2; also, there are 34 values of γ k which are higher than 8.9. The proposed algorithm for Robust Kalman Filter (RKF) is employed to process the various levels of gross error in the system.   Table 1 illustrates the Root Mean Square (RMS) of the position error of two utilized Kalman filters. Figures 8 and 9 represent the errors of position and velocity as well as estimation of accelerometer and gyroscope biases in (x, y, z).
Results of orientation estimation are represented in Fig. 10. Since the test has been performed by a car in an approximately closed path and low slope road, it is evident that the ϕ and θ angles are close to zero. Also, the ψ angle clearly shows the closed path. There is also a saturated data recorded at the first 10 s of the test due to the immediate start acceleration of the test vehicle.
In order to improve the accuracy of the system, and also, identify the most accurate neural network model, the order of the model must be appropriately defined. Therefore, the best order of the model is calculated by observing the correlation of the inputs and the outputs of the network. Comparing the values of the correlations, and by the fact that the minimum absolute value is the best order to be chosen, best order should be 13 or 16. Nevertheless, considering the correlation results and limitations on processor computation capacity, the order of the system is chosen as 5. therefore, five previous inputs must be used simultaneously as the input of the Neural network. The result of the input and output data correlation is shown in Fig. 11. Figure 12 represents a comparison between the position of the test path as reference, proposed RKF, and position estimation of the proposed neural network while GPS data is interrupted. GPS data has been interrupted for about 17 s, and the results show improvement of the estimation using the proposed neural network. Figure 13 also shows the same results of Fig. 12, but instead of Feedforward Neural Network, results of the NAR Neural Network are compared. The improvements by different methods are compared in Table 2.
In the proposed neural networks (Fig. 2), 75% of the data is dedicated to training, and the remaining 25% is for test. To simulate and test the described scenario, GPS data is presumed disconnected for 1500 samples starting from the sample number 60000 to 61500, and the last available GPS data is considered for these samples. In Table 2, position error improvement by both feedforward and NAR Neural Networks is shown. The results indicate that both neural networks have a good effect on the reduction of position error during GPS data interruption.

Conclusion
This study developed an implementation of ANN aided GPS/INS integration for moving vehicle applications towards an edge-enable and cloud-based access to information [31][32][33][34]. In this paper, information fusion of GPS and INS sensors using Kalman Filter  has been investigated. To improve the performance of the Kalman Filter, a robust method using Mahalanobis distance has been utilized. Also, in the previously defined scenario, two different types of Neural Networks are used to bridge GPS data interruption. A comparison between the proposed neural networks has been presented. Also, hardware was designed to test the proposed algorithm under the defined scenario. According to the presented figures, the proposed algorithm of GPS/INS data fusion shows a positive effect on the compensation of navigation error, reducing RMS of the position error by about 5%, and by using the neural network, the output position estimation error is reduced by at least 67%. The plot diagram shows that by using the mentioned algorithm, navigation system errors are well estimated in the absence of the GPS navigation system, and errors are limited to a specified range. The final accuracy of the state estimation highly depends on the covariance of the process and measurement noise, quality, and grade of the sensors used in hardware; therefore, navigation error compensation is generally limited.