INS Error Estimation Based on an ANFIS and Its Application in Complex and Covert Surroundings

: Inertial navigation is a crucial part of vehicle navigation systems in complex and covert surroundings. To address the low accuracy of vehicle inertial navigation in multifaced and covert surroundings, in this study, we proposed an inertial navigation error estimation based on an adaptive neuro fuzzy inference system (ANFIS) which can quickly and accurately output the position error of a vehicle end-to-end. The new system was tested using both single-sequence and multi-sequence data collected from a vehicle by the KITTI dataset. The results were compared with an inertial navigation system (INS) position solution method, artiﬁcial neural networks (ANNs) method, and a long short-term memory (LSTM) method. Test results indicated that the accumulative position errors in single sequence and multi-sequences experiments decreased from 9.83% and 4.14% to 0.45% and 0.61% by using ANFIS, respectively, which were signiﬁcantly less than those of the other three approaches. This result suggests that the ANFIS can considerably improve the positioning accuracy of inertial navigation, which has signiﬁcance for vehicle inertial navigation in complex and covert surroundings.


Introduction
With the increasing requirements of vehicle navigation accuracy, improving vehicle navigation performance is a popular research topic. The commonly used sensors in navigation include GPS (global positioning system), INS (inertial navigation system), camera, odometer, lidar, etc. [1]. However, in complex and covert surroundings such as indoors, underground, in forests, and even in celestial bodies, GPSs can hardly provide continuous and accurate positioning. As a low-cost relative positioning sensor not affected by topography and surroundings, INS has played an important role in calculating vehicle poses [2]. An inertial measurement unit (IMU) is the hardware of an INS. Compared with GPS measurement technology, an IMU is hardly impacted by complex surroundings and has the advantage of high sampling rates. However, the position calculated by the accelerometers and gyroscopes accumulate errors over time. The common solution is to use GPS and INS integration for loosely coupled and tightly coupled [3]. Moreover, cameras, odometers, lidars, and other light-and sound-sensitive sensors are often used for integrated navigation and positioning, with INSs used for indoors, underground, the moon, planets, and other complex surroundings where GPS is not applicable [4][5][6]; this is expensive and computationally complicated. When the GPS signal is blocked for a long time without the aid of other sensors, the error of the position obtained by an INS is most likely to be large, which is the major problem to be solved in this study. In this case, a machine learning method can be used to compensate for the error. Currently, the commonly used solutions are the utilizing of artificial neural networks [7], delayed neural networks [8], adaptive neural fuzzy inference system (ANFIS) [9,10], and other neural networks [11] to estimate the errors of the integrated system consisting of GPSs, IMUs, odometers, and ISPRS Int. J. Geo-Inf. 2021, 10, 388 2 of 18 other sensors which can output more accurate positioning results in real-time or quasireal-time. However, these methods require additional sensors, which generally increase training time. There are also some studies in the literature about IMU de-noising by using machine learning methods [12][13][14]. Some studies estimate the position and velocity errors end-to-end by only using an IMU when GPS outages occur; this is attempted mainly using artificial neural networks (ANNs) [15], recurrent neural networks (RNNs) [16], long short-term memory (LSTM) [17], convolutional neural networks (CNNs) [18], support vector machines (SVM) [19], and other machine learning algorithms [20][21][22]. As the high data collection frequency of the INS, these methods lead to the long training time of the model. Generally, machine learning is employed to estimate and correct the accumulative error in the position or velocity of the IMU; however, the main issues of the method are its low accuracy and long training time.
An accumulative error in the position of the IMU estimation model based on an adaptive neuro fuzzy inference system is proposed in this study to address the above problems. Using only INS observations, this model could effectively reduce the algorithmic complexity and shorten the training time compared with other machine learning methods. It can obtain the position of vehicles in complex and covert surroundings where GPS signals are missing or are not available for an extended period. In addition, a Karlsruhe Institute of Technology and Toyota Technological Institute (KITTI) unrectified raw dataset was used to validate the results of the new algorithm, and the differential GPS data of the dataset were used as the reference position to learn the position error of the INS solution and predict the subsequent position error. Experimental results indicated that the proposed model can estimate and correct the position error of the INS solution with high accuracy. The improvements made in this study can be summarized in three points: (i) Compared with other articles in the literature [9,10,[23][24][25][26][27][28][29], time stamps were used as the inputs, which can shuffle date in this time-series problem and enhance the robustness of the training model. (ii) This study uses ANFIS to estimate the IMU error over an extended period. In contrast, GPS/IMU integration is widely used to estimate the carrier trajectory by using ANFIS within a short time of GPS outage [10,[23][24][25][26][27][28]. (iii) Considering that the error will increase after two-dimensional integration, the position error was directly estimated without de-noising [14]. The findings of this study have theoretical and practical significance for improving the positioning accuracy of vehicles' inertial navigation in complex and covert surroundings and provide technical support for vehicle navigation in complex surroundings.

Methods
In this section, the algorithm of the INS solution and ANFIS is presented. The principles, basic equations, and information flow are briefly introduced.

INS Solution
An INS can be either a gimbaled inertial navigation system (GINS) or a strapdown inertial navigation system (SINS), depending on the availability of a physical platform. SINSs were the main focus of this study for calculating the position of the vehicles [30]. An IMU is a component of an inertial navigation system, generally composed of a threeaxis gyroscope and a three-axis accelerometer. Under a given initial condition, only the observations of an IMU can be calculated to estimate the position, velocity, and acceleration of the vehicle in the body coordinate system (b system) of the vehicle or a geographic coordinate system (n system).

Inertial Navigation Observation Model
As an IMU is directly installed on the vehicle of a SINS, its accelerometer and gyroscope can record the motion information of the vehicle, and the coordinate system of the measurements is in the b system. Let the observations of the IMU at a particular moment be where L is the vector of the 6-D observations from the accelerometer and gyroscope; L is the true value of L; and δ is the error of L, which can be expressed as where δ imu is the IMU error, which mainly contains the zero offset of the accelerometer, the zero drift of the gyroscope, the temperature drift of the two sensors, and the reading error caused by the special motion state; δ ini is the initialization error, including the initial alignment and calibration error of the IMU; δ cal is the calculation error, including the initial condition error and higher-order term error of the integration; and δ els includes all other errors.

Position Calculation by Using INS Observations
INS is not a Lyapunov stable system due to the non-linear and dynamic estimation system used for the INS solution. As a result, any minuscule external interference may change the error propagation. In this study, instead of performing error compensation under the initial conditions, the above errors were modeled as a whole, and the observations of the IMU were directly used to estimate the vehicle's pose. Let where Acc is the observations of the 3-D accelerometers, including the acceleration of the vehicle and the gravitational acceleration G in the n system; Gyr is the observations of the 3-D gyroscopes in the b system. Then, the acceleration of the vehicle in the n system can be obtained from the following transformation where is the orthogonal matrix denoting the transformation from the n system to the b system; ϕ, θ, and ψ are the angles of roll, pitch, and yaw angles, respectively, which are also the observations of the IMU gyroscopes, i.e., Gyr = [ϕ θ ψ] T By integrating the acceleration of the vehicle in Equation (4), the velocity of the vehicle at the moment t in the n system can be obtained by where V 0 n is the velocity of the vehicle at the initial time. Then, the position of the vehicle at time t can be derived as where X 0 n is the position of the vehicle in the n system at the initial time. Since the b system moves with the vehicle, to express the motion state of the vehicle relative to the surroundings, the pose of the vehicle at the initial time in the b system is called the b 0 system and, similarly to Equations (4)-(7), the position of the vehicle at time t in the b 0 system can be obtained by where X t b is the vehicle's position in the b 0 system at time t; R 0 nb is the rotation matrix from the n system to the b 0 system at the initial time. To describe the position and posture of the vehicle, a homogeneous matrix is used: where T t b is defined as the transformation matrix at time t, which is a special Euclidean group. Let be the pose matrix, and P t b = R 0 nb R t nb T R 0 nb X t n − X 0 n ; 0 1 . The first term of the matrix is the vehicle's attitude at time t relative to the initial time, and the second term is the vehicle's position at time t relative to the initial time.

ANFIS and Its Structure
The ANFIS is an ANN-based on a fuzzy inference system (FIS). It is, in fact, the integration of neural networks and fuzzy logic; hence it has the advantages of both and is introduced below.

Fuzzy Inference System
A fuzzy inference system is a system with crisp inputs and outputs, and the theory of fuzzy logic is its primary calculation tool. It imitates comprehensive human inference to cope with fuzzy information that is arduous to be solved by conventional mathematical methods and is mainly applied to resolve non-linear mapping issues [31]. It has been widely applied in unravel sequential signal processing, pattern recognition, automatic control, image processing, and other fields [32,33]. A fuzzy inference system is mainly composed of a fuzzification interface, a fuzzy rule base, a fuzzy inference method, and a defuzzification interface. The relationship between these modules is shown in Figure 1. called the b0 system and, similarly to Equations (4)-(7), the position of the vehicle at time t in the b0 system can be obtained by (8) where t b X is the vehicle's position in the b0 system at time t; 0 nb R is the rotation matrix from the n system to the b0 system at the initial time.
To describe the position and posture of the vehicle, a homogeneous matrix is used: where t b T is defined as the transformation matrix at time t, which is a special Euclidean be the pose matrix, and The first term of the matrix is the vehicle's attitude at time t relative to the initial time, and the second term is the vehicle's position at time t relative to the initial time.

ANFIS and Its Structure
The ANFIS is an ANN-based on a fuzzy inference system (FIS). It is, in fact, the integration of neural networks and fuzzy logic; hence it has the advantages of both and is introduced below.

Fuzzy Inference System
A fuzzy inference system is a system with crisp inputs and outputs, and the theory of fuzzy logic is its primary calculation tool. It imitates comprehensive human inference to cope with fuzzy information that is arduous to be solved by conventional mathematical methods and is mainly applied to resolve non-linear mapping issues [31]. It has been widely applied in unravel sequential signal processing, pattern recognition, automatic control, image processing, and other fields [32,33]. A fuzzy inference system is mainly composed of a fuzzification interface, a fuzzy rule base, a fuzzy inference method, and a defuzzification interface. The relationship between these modules is shown in Figure 1. The fuzzification interface is used to apply a membership function (MF) for converting the crisp inputs into a fuzzy set. The fuzzy set at the crisp value should have a high membership degree, and the fuzzification result should have the capability to perform anti-jamming. Commonly used membership functions are the triangular function, the trapezoidal function, the Gaussian membership function, and the generalized bell-shaped membership function [34]. In this study, the Gaussian membership function was adopted, and its membership function value of the j-th input value of the i-th rule is defined as  The fuzzification interface is used to apply a membership function (MF) for converting the crisp inputs into a fuzzy set. The fuzzy set at the crisp value should have a high membership degree, and the fuzzification result should have the capability to perform anti-jamming. Commonly used membership functions are the triangular function, the trapezoidal function, the Gaussian membership function, and the generalized bell-shaped membership function [34]. In this study, the Gaussian membership function was adopted, and its membership function value of the j-th input value of the i-th rule is defined as where x is the crisp input; c represents the center of the membership function curve; σ is the width of the membership function. The defuzzification interface is to determine a crisp value that can best represent the fuzzy set. The fuzzy rule base is ordinarily defined as the fuzzy if-then rules, which simulate the inference mechanism of humans making judgments in uncertain and inaccurate surroundings. The other modules of the FIS serve the fuzzy rule base to make more effective judgments. The i-th rule denoted by R i is usually expressed as . is the vector of the input values; y is the output value; A is the fuzzy set obtained by Equation (11); B is the polynomial related to x. The fuzzy inference method performs reasoning operations on fuzzy rules, and common approaches include the Mamdani inference method, the Larsen inference method, the Zadeh inference method, the T-S (Takagi-Sugeno) inference method, etc. [35]. Assuming that the number of rules set by the inference system is m, the fuzzy factor can be defined as The output can be obtained from the weighted mean formula as follows

Artificial Neural Networks
ANN [36] is a mathematical model that imitates the structure and function of biological neural networks to solve non-linear problems [37]. ANN aims to obtain the activation function value of each neuron and the weights between the neurons of adjacent network layers when the cost function value is minimized.
The cost function of the back propagation algorithm (BP algorithm) is where n is the total number of training samples; K is the output dimension, the second term of J(Θ) is the L 2 regular term; λ is the regularization coefficient; L is the number of the network layers; s l is the number of the neurons in the l layer; h Θ (x i ) gives the output of the neural network; y denotes the target value of the samples; θ l mj represents the connection weight between the j-th neuron in the l-th layer and the m-th neuron in the (l + 1)-th layer. The phenomenon of over-fitting can be circumvented by introducing the regularization term into the cost function, while matrix irreversibility can be avoided with the regularization term (when λ > 0) when solving the minimum cost function. Commonly used methods include the gradient descent method, the quasi-Newton method, the conjugate gradient method [38], and heuristic methods such as genetic and simulated annealing algorithms [39] to calculate the cost function. This study used the quasi-Newton BFGS algorithm to calculate the minimum cost function [40]. Compared with the traditional gradient descent method, its convergence is faster at the minimum value, and it is easier to achieve the global optimal value. Compared to the Newton method, it simplifies the complexity of the operation because it does not need to calculate the Hessian matrix.
The number of hidden layers and the number of neurons in the hidden layer are the main parameters that affect the accuracy and complexity of the model. It is generally argued that an appropriate increase in the number of hidden layers for the time sequence issues can decrease the model error, but an excessively high hidden layer will increase this error. In the BP algorithm, the gradient value decreases as the number of the hidden layers increases and gradually approaches zero, resulting in a vanishing gradient problem [41]. The number of the hidden layers' nodes is usually determined using empirical formulas [42,43], but the empirical formulas are often only applicable to some conditions. An evolutionary algorithm was employed in this study to establish the number of the nodes in the hidden layers [44]. To address the issue of different models due to different random seeds in the initialization of neural networks, in this study, we applied multiple training to acquire the average value of training results.

Estimation of the Accumulative Error in the Position of INS Based on an ANFIS
The first ANFIS was proposed in 1993 and has been applied in different fields [45][46][47]. Typical networks contain five layers [48]. The structure of the accumulative error estimation of INS based on an ANFIS designed in this study is shown in Figure 2. The system consists of a training module and a prediction module. The former can be used in open surroundings while the latter is used in covert surroundings. The training module and prediction module errors are obtained from GPS data in this study; alternatively, those errors can be replaced by other sensors such as lidars or cameras in special surroundings. At the training stage, the system inputs are (X, y) = a x , a y , a z , g x , g y , g z , t, ∆x, ∆y (16) where the first seven terms on the right-hand side of the equation represent the trained terms denoted by X, and the last two terms represent the target terms denoted by y; the dimension of each term is the number of the training samples; a x , a y , and a z are the measured values of accelerometers; g x , g y , and g z are the measured values of gyroscopes; t is the time series; ∆x and ∆y are the accumulative error of the INS in the b 0 system, calculated by where x true and y true denote the true position of the vehicle, which can be obtained from precise sensors in suitable surroundings. In this study, the reference position of the vehicle is obtained from differential GPS observations, and x imu and y imu denote P t b (1, 4) and P t b (2,4) in Equation (10), respectively. After training with the ANFIS, the system obtains a y for each group of X input in the prediction stage. this error. In the BP algorithm, the gradient value decreases as the number of the hidden layers increases and gradually approaches zero, resulting in a vanishing gradient problem [41]. The number of the hidden layers' nodes is usually determined using empirical formulas [42,43], but the empirical formulas are often only applicable to some conditions. An evolutionary algorithm was employed in this study to establish the number of the nodes in the hidden layers [44]. To address the issue of different models due to different random seeds in the initialization of neural networks, in this study, we applied multiple training to acquire the average value of training results.

Estimation of the Accumulative Error in the Position of INS Based on an ANFIS
The first ANFIS was proposed in 1993 and has been applied in different fields [45][46][47]. Typical networks contain five layers [48]. The structure of the accumulative error estimation of INS based on an ANFIS designed in this study is shown in Figure 2. The system consists of a training module and a prediction module. The former can be used in open surroundings while the latter is used in covert surroundings. The training module and prediction module errors are obtained from GPS data in this study; alternatively, those errors can be replaced by other sensors such as lidars or cameras in special surroundings. At the training stage, the system inputs are where the first seven terms on the right-hand side of the equation represent the trained terms denoted by X, and the last two terms represent the target terms denoted by y; the dimension of each term is the number of the training samples; ax, ay, and az are the measured values of accelerometers; gx, gy, and gz are the measured values of gyroscopes; t is the time series; Δx and Δy are the accumulative error of the INS in the b0 system, calculated by where xtrue and ytrue denote the true position of the vehicle, which can be obtained from precise sensors in suitable surroundings. In this study, the reference position of the vehicle is obtained from differential GPS observations, and ximu and yimu denote (1,4) in Equation (10), respectively. After training with the ANFIS, the system obtains a y for each group of X input in the prediction stage. After subtractive clustering is used to generate the Takagi-Sugeno fuzzy inference system [49], the network structure of the algorithm in the accumulative position error estimation of the INS is shown in Figure 3. There are five layers in the network, and the first layer is the input and fuzzification layer. In this study, the Gaussian membership function After subtractive clustering is used to generate the Takagi-Sugeno fuzzy inference system [49], the network structure of the algorithm in the accumulative position error estimation of the INS is shown in Figure 3. There are five layers in the network, and the first layer is the input and fuzzification layer. In this study, the Gaussian membership function in Equation (11) was employed to fuzzy the input data. The crisp input value turns to membership degree between 0-1 after fuzzification. The second layer receives the membership degree and applies Equation (13) to calculate the fuzzy factors of each rule. The third layer normalizes the fuzzy factors of each rule through where m is the number of rules; O 3i is the output of the third layer, which represents the trigger weight of rule i in all rules. The results of the fourth layer calculation rule are where B i is derived from Equation (12), which is generally a first-order polynomial of the input data; O 4i is the output of the fourth layer. The fifth layer outputs the results of the system, using Equation (14) to compute the weighted average of all the rules to defuzzify.
in Equation (11) was employed to fuzzy the input data. The crisp input value turns to membership degree between 0-1 after fuzzification. The second layer receives the membership degree and applies Equation (13) to calculate the fuzzy factors of each rule. The third layer normalizes the fuzzy factors of each rule through where m is the number of rules; O3i is the output of the third layer, which represents the trigger weight of rule i in all rules. The results of the fourth layer calculation rule are where B i is derived from Equation (12), which is generally a first-order polynomial of the input data; O4i is the output of the fourth layer. The fifth layer outputs the results of the system, using Equation (14) to compute the weighted average of all the rules to defuzzify. The calculating time of ANFIS is faster than ANN since the BFGS solution mode and FIS generated by subtractive clustering are efficient and rapid.

Experiments and Results
Public datasets are utilized for training and predicting one sequence data in different sessions and multi-sequence data. The position error of an INS solution, the position error predicted by the ANN model, and the position error predicted by the ANFIS were compared. Furthermore, LSTM, which is an advanced and improved method based on RNN [11,13,50,51], was compared with ANFIS in the position error prediction.

Introduction to KITTI
The KITTI dataset was jointly collected by KIT of Germany and TRI-NA, and is currently one of the world's largest computer vision algorithm evaluation datasets. The sensors include video cameras, laser scanners, GPS, and INS on urban roads, country roads, and expressways [52,53]. The unrectified raw data of GPS and INS in the dataset were used for experiments. Using the IMU data as the observations and the GPS measurements as the reference, the frequency of both observations in the unrectified raw data is 100 Hz.
All data were downloaded from the official website of KITTI. In the downloaded file, the dataformat.txt file contains the GPS and IMU format data, while the timestamps.txt file contains the time stamps. The files under the oxts/data/folder contain all observations, with filenames indicating the data count, and each file contains 30 values. Values-related properties are shown in Table 1. The latitude, longitude, and altitude are the positions in the WGS-84 coordinate system observed by GPS, and the roll, pitch, and yaw are the vehicle attitude angles observed by the gyroscope. The forward acceleration, leftward accel- The calculating time of ANFIS is faster than ANN since the BFGS solution mode and FIS generated by subtractive clustering are efficient and rapid.

Experiments and Results
Public datasets are utilized for training and predicting one sequence data in different sessions and multi-sequence data. The position error of an INS solution, the position error predicted by the ANN model, and the position error predicted by the ANFIS were compared. Furthermore, LSTM, which is an advanced and improved method based on RNN [11,13,50,51], was compared with ANFIS in the position error prediction.

Introduction to KITTI
The KITTI dataset was jointly collected by KIT of Germany and TRI-NA, and is currently one of the world's largest computer vision algorithm evaluation datasets. The sensors include video cameras, laser scanners, GPS, and INS on urban roads, country roads, and expressways [52,53]. The unrectified raw data of GPS and INS in the dataset were used for experiments. Using the IMU data as the observations and the GPS measurements as the reference, the frequency of both observations in the unrectified raw data is 100 Hz.
All data were downloaded from the official website of KITTI. In the downloaded file, the dataformat.txt file contains the GPS and IMU format data, while the timestamps.txt file contains the time stamps. The files under the oxts/data/folder contain all observations, with filenames indicating the data count, and each file contains 30 values. Values-related properties are shown in Table 1. The latitude, longitude, and altitude are the positions in the WGS-84 coordinate system observed by GPS, and the roll, pitch, and yaw are the vehicle attitude angles observed by the gyroscope. The forward acceleration, leftward acceleration, and upward acceleration are the accelerations of the vehicle observed by the accelerometers in the b 0 system, and the time stamp is the observation time of the data, which are stored in the timestamps.txt folder.

Process and Result Analysis
Sequences 20110930_drive_0018 (09300018), 20110930_drive_0033 (09300033), and 20110930_drive_0034 (09300034), which are the unrectified raw data in the residential category, were used in the experiments. The single-sequence position error estimation model was applied based on the 09300018-sequence, and the multi-sequences position error estimation model was employed from three sequences. Some issues were found in that there are repeated observations and missing observations in parts of the unrectified raw observations. To ensure that the observations were not interfered with by humans to a great extent, the processing method included deleting the repeated observations and not interpolating the missing sessions. Since the time stamp file corresponds strictly to the original observation file, the repeated session was also deleted when using the time stamp file.
The positions of the vehicle in the b 0 system and the n system were calculated by Equations (4)- (10). The coordinate conversion on the GPS data was simultaneously performed to attain the reference position value of the vehicle in the b 0 system and the n system, where R 1 , R 2 are the rotation matrices, and the specific expression can be referred to as the reference [54,55]. It is stipulated that the X-and Y-directions of the b 0 system are the right direction and the forward direction of the initial motion of the vehicle, respectively, while the X-and Y-directions of the n system correspond to the east and north directions of the vehicle. Since the ground truth in the Z-direction has a large error in the KITTI dataset, which can be provided by the observations of the cameras, this study did not consider the motion in the Z-direction.

Single-Sequence Position Error Estimation Model
In the 09300018-sequence data, the X-Y trajectory and the east-north trajectory using the INS solution relative to the reference trajectory of the vehicle in the b 0 system and the n system are shown in Figure 4a,b, respectively, in which the red line represents the reference trajectory and the black line represents the INS solution trajectory. The track discontinuity is the missing observations session after deleting the IMU repeated observations. It can be seen from Figure 4   In this study, the strategy of using ANFIS, ANN, and LSTM for single-sequence position error estimation is to use half of the total observations as the training sample to predict the position error of the other half of the observations, and contrast the accuracy of the three models for accumulative position error prediction of the INS in the b0 system and the n system, respectively. The data of the training part represent the moment where GPS is available, and the data of the prediction part simulate the vehicle in complex and covert surroundings.
In the training stage, subtractive clustering is used to generate FIS. Using the training data and the corresponding reference data as the input and setting some parameters, the ANFIS structure can be built. In addition, the parameters which include the optimization method, the maximum epoch, the error goal, and the initial step size should be identified. Digitals of the trained model by using ANFIS and LSTM in this experiment can be found at: https://github.com/robNavLoc/IMU-error-prediction-based-on-ANFIS (accessed on 31 May 2021). Training results are shown in Table 2. It can be seen that, due to the fuzzy logical system, the training results of the ANFIS are better than the results of the LSTM. In this study, the strategy of using ANFIS, ANN, and LSTM for single-sequence position error estimation is to use half of the total observations as the training sample to predict the position error of the other half of the observations, and contrast the accuracy of the three models for accumulative position error prediction of the INS in the b 0 system and the n system, respectively. The data of the training part represent the moment where GPS is available, and the data of the prediction part simulate the vehicle in complex and covert surroundings.
In the training stage, subtractive clustering is used to generate FIS. Using the training data and the corresponding reference data as the input and setting some parameters, the ANFIS structure can be built. In addition, the parameters which include the optimization method, the maximum epoch, the error goal, and the initial step size should be identified. Digitals of the trained model by using ANFIS and LSTM in this experiment can be found at: https://github.com/robNavLoc/IMU-error-prediction-based-on-ANFIS (accessed on 31 May 2021). Training results are shown in Table 2. It can be seen that, due to the fuzzy logical system, the training results of the ANFIS are better than the results of the LSTM. In the prediction stage, the vehicle runs 1052.9 m in 129.31 s. The position error estimated by the ANN, ANFIS, LSTM, and the INS solution versus time is shown in Figure 5. The green line, blue line, red line, and black line represent the accumulative position error of the ANFIS model, the LSTM model, the ANN model, and INS solution, respectively. Figure 5a-d exhibit the prediction position error in X-direction, Y-direction, east direction, and north direction, respectively. The mean square error (MSE), the root mean square error (RMSE), and the accumulative position error of each curve shown in Figure 5 in the b 0 system and the n system are shown in Tables 3 and 4, respectively. In the prediction stage, the vehicle runs 1052.9 m in 129.31 s. The position error estimated by the ANN, ANFIS, LSTM, and the INS solution versus time is shown in Figure 5. The green line, blue line, red line, and black line represent the accumulative position error of the ANFIS model, the LSTM model, the ANN model, and INS solution, respectively. Figure 5a-d exhibit the prediction position error in X-direction, Y-direction, east direction, and north direction, respectively. The mean square error (MSE), the root mean square error (RMSE), and the accumulative position error of each curve shown in Figure 5 in the b0 system and the n system are shown in Tables 3 and 4 Figure 5a,b shows that the vehicle's error in the Y-direction was much higher than in the X-direction. When the ANN model and LSTM model were used to predict and correct the accumulative position error of INS, they showed the effective result in the Y-direction, but the position errors in the X-direction were larger, which may be caused by the insufficient training samples of the ANN model. ANFIS performs far better than the ANN model in the X-and Y-directions and virtually restored the true position of the vehicle. Similar results can be seen in Figure 5c,d that ANFIS had a smaller predicting error than the INS solution and ANN. Moreover, the prediction accuracy of ANFIS is better than LSTM.
As seen from Tables 3 and 4, to a certain extent, ANN improved the Y-direction and north direction accuracy, and MSE was decreased to 10.3% and 16.1% of the position error, respectively, but it increased the X-direction and the east direction errors. In total, the accumulative errors decreased from 9.83% to 3.59% and 5.34% in the b0 and the n systems, respectively. Similar to the ANN, the LSTM decreased the error of the Y-direction and increased the X-direction, which ultimately results in a reduction in error from 9.83% to 1.77% and 2.33% in the b0 system and the n systems, respectively. Compared with the   Figure 5a,b shows that the vehicle's error in the Y-direction was much higher than in the X-direction. When the ANN model and LSTM model were used to predict and correct the accumulative position error of INS, they showed the effective result in the Y-direction, but the position errors in the X-direction were larger, which may be caused by the insufficient training samples of the ANN model. ANFIS performs far better than the ANN model in the X-and Y-directions and virtually restored the true position of the vehicle. Similar results can be seen in Figure 5c,d that ANFIS had a smaller predicting error than the INS solution and ANN. Moreover, the prediction accuracy of ANFIS is better than LSTM.
As seen from Tables 3 and 4, to a certain extent, ANN improved the Y-direction and north direction accuracy, and MSE was decreased to 10.3% and 16.1% of the position error, respectively, but it increased the X-direction and the east direction errors. In total, the accumulative errors decreased from 9.83% to 3.59% and 5.34% in the b 0 and the n systems, respectively. Similar to the ANN, the LSTM decreased the error of the Y-direction and increased the X-direction, which ultimately results in a reduction in error from 9.83% to 1.77% and 2.33% in the b 0 system and the n systems, respectively. Compared with the ANN, the LSTM, and the INS solution, the error predicted by the ANFIS was lower. Compared with the INS solution, the RMSE in the X-direction and the east direction using ANFIS was reduced to 65.4% and 12.3%, respectively, and the RMSE of the Y-direction and the north direction using ANFIS was correspondingly reduced to 7.1% and 6.3%, respectively. Overall, the accumulative errors were reduced from 9.83% to 0.45% and 0.43% in the b 0 and the n systems, respectively. It shows that the vehicle trajectory obtained by ANFIS has a superior fitting degree with the reference trajectory.
By comprehensively comparing Figure 5a-d and Tables 3 and 4, the results calculated by ANN and LSTM in the b 0 system are better than those in the n system. This was due to the SINS being installed on the vehicle and observations being attained from the sensors in the b system. However, this conclusion is not apparent when using ANFIS, so the following experiment only show the results under the b 0 system. The reference trajectory of the vehicle, the trajectory corrected by the ANFIS, and the INS solution trajectory of the corresponding time are shown in Figure 6, where Figure 6a ANN, the LSTM, and the INS solution, the error predicted by the ANFIS was lower. Compared with the INS solution, the RMSE in the X-direction and the east direction using ANFIS was reduced to 65.4% and 12.3%, respectively, and the RMSE of the Y-direction and the north direction using ANFIS was correspondingly reduced to 7.1% and 6.3%, respectively. Overall, the accumulative errors were reduced from 9.83% to 0.45% and 0.43% in the b0 and the n systems, respectively. It shows that the vehicle trajectory obtained by ANFIS has a superior fitting degree with the reference trajectory. By comprehensively comparing Figures 5a-d and Tables 3 and 4, the results calculated by ANN and LSTM in the b0 system are better than those in the n system. This was due to the SINS being installed on the vehicle and observations being attained from the sensors in the b system. However, this conclusion is not apparent when using ANFIS, so the following experiment only show the results under the b0 system.
The reference trajectory of the vehicle, the trajectory corrected by the ANFIS, and the INS solution trajectory of the corresponding time are shown in Figure 6, where Figure 6a

Multi-Sequences Position Error Estimation Model
The error accumulation curves of sequences 09300018, 09300033, 09300034 in the b0 system are shown in Figure 7, where Figure 7a,b shows the error accumulation curve in the X-and Y-directions, respectively. The black, red, and green lines indicate the 09300018, 09300033, 09300034 curves, respectively. The information of each sequence is shown in

Multi-Sequences Position Error Estimation Model
The error accumulation curves of sequences 09300018, 09300033, 09300034 in the b 0 system are shown in Figure 7, where Figure 7a,b shows the error accumulation curve in the X-and Y-directions, respectively. The black, red, and green lines indicate the 09300018, 09300033, 09300034 curves, respectively. The information of each sequence is shown in Table 5. As shown in Figure 7 and Table 5, the accumulation of each curve of error over time between curves shows different change trends, but they were gradually increasing overall, and the accumulative position error in each sequence has some correlation with the driving time; thus, the position error of an entire sequence could be predicted by similar sequences [18]. ISPRS Int. J. Geo-Inf. 2021, 10, x FOR PEER REVIEW 13 of 18 Table 5. As shown in Figure 7 and Table 5, the accumulation of each curve of error over time between curves shows different change trends, but they were gradually increasing overall, and the accumulative position error in each sequence has some correlation with the driving time; thus, the position error of an entire sequence could be predicted by similar sequences [18].  In this study, the strategy of using ANFIS for multi-sequences error estimation is to use the 09300018 and 09300034 observations and errors as training samples to predict the error of the 09300033 observations and compare the error prediction accuracy of the INS solution and the ANFIS in the b0 system. Similarly, the data of the training part represent the moment when the GPS is available, and the data of the prediction part simulate the vehicle in complex and covert surroundings.
Similar to the single-sequence, the subtractive clustering method was also used in the multi-sequences experiment to generate FIS, and then the training data and reference data were used to generate the training model. As the time series were included in the training inputs, the data of the sequences can be shuffled to satisfy randomness. Digitals of the trained model in this experiment can be found on the same website.
In the prediction stage, the driven time and distance of the vehicle in each sequence are shown in Table 5. The curve of the position error predicted by ANFIS and calculated by IMU is shown in Figure 8. The red line and black line represent the predicted position error of the INS by using the ANFIS model and the INS solution, respectively. Figure 8a,b shows the error in the X-and Y-directions in the b0 system of the vehicle, respectively. The  In this study, the strategy of using ANFIS for multi-sequences error estimation is to use the 09300018 and 09300034 observations and errors as training samples to predict the error of the 09300033 observations and compare the error prediction accuracy of the INS solution and the ANFIS in the b 0 system. Similarly, the data of the training part represent the moment when the GPS is available, and the data of the prediction part simulate the vehicle in complex and covert surroundings.
Similar to the single-sequence, the subtractive clustering method was also used in the multi-sequences experiment to generate FIS, and then the training data and reference data were used to generate the training model. As the time series were included in the training inputs, the data of the sequences can be shuffled to satisfy randomness. Digitals of the trained model in this experiment can be found on the same website.
In the prediction stage, the driven time and distance of the vehicle in each sequence are shown in Table 5. The curve of the position error predicted by ANFIS and calculated by IMU is shown in Figure 8. The red line and black line represent the predicted position error of the INS by using the ANFIS model and the INS solution, respectively. Figure 8a,b shows the error in the X-and Y-directions in the b 0 system of the vehicle, respectively. The mean square error (MSE), the root mean square error (RMSE), and the accumulative error of each trajectory in the b 0 system were calculated as shown in Table 6. mean square error (MSE), the root mean square error (RMSE), and the accumulative error of each trajectory in the b0 system were calculated as shown in Table 6.  It can be seen from Figure 8a,b that the accumulative position error of INS increased sharply over time, while the ANFIS error did not show a cumulative trend. In the initial stage of vehicle moving, ANFIS did not perform well in predicting errors due to the low INS solution error in the initial stage and the weak correlation of the error in the different road sections, leading to the fluctuation of ANFIS error prediction. Between 100-120 s of vehicle moving, the findings were not ideal because of the complex road conditions. However, overall, ANFIS could correct the accumulative position error of INS to a large extent. It can be seen from Table 6, compared to the INS solution, the MSE of the ANFIS algorithm in the X-and Y-directions was greatly decreased, and the accumulative error w was decreased from 4.1% to 0.6%.
The reference trajectory of the vehicle, the trajectory corrected by the ANFIS estimation INS solution error, and the INS solution trajectory of the corresponding time are shown in Figure 9.  It can be seen from Figure 8a,b that the accumulative position error of INS increased sharply over time, while the ANFIS error did not show a cumulative trend. In the initial stage of vehicle moving, ANFIS did not perform well in predicting errors due to the low INS solution error in the initial stage and the weak correlation of the error in the different road sections, leading to the fluctuation of ANFIS error prediction. Between 100-120 s of vehicle moving, the findings were not ideal because of the complex road conditions. However, overall, ANFIS could correct the accumulative position error of INS to a large extent. It can be seen from Table 6, compared to the INS solution, the MSE of the ANFIS algorithm in the X-and Y-directions was greatly decreased, and the accumulative error w was decreased from 4.1% to 0.6%.
The reference trajectory of the vehicle, the trajectory corrected by the ANFIS estimation INS solution error, and the INS solution trajectory of the corresponding time are shown in Figure 9. Through the above two experiments, a single-sequence can predict the accumulative position error of INS more accurately because of its continuity of motion, which almost restores the true location information of the vehicle. Due to the independent observation of each road section in multi-sequences, the correlation of the error of the INS at the initial stage was weak and had a high error. After a long driving period, the error of the INS in different road sections was strongly correlated, and the error was decreased.

Discussion
The results showed that the proposed ANFIS effectively reduced the position error of the vehicle in the single-sequence experiment and multi-sequences experiment. However, because fewer sequences were used, the result of the multi-sequences experiment did not perform as well as using CNN [18].
The trajectory in an upward direction was not considered in the experiments because the ground truth provided by the KITTI dataset occasionally had large errors in the Zdirection. Future work will involve training a model by using other datasets and collect data under more difficult conditions.
The LSTM method decreased the position error to a large extent but did not perform as well as ANFIS. The reason may be that the vehicle stopped for a few seconds, breaking the continuity of the time-series problem.
Due to the small INS solution error in the initial stage of the multi sequences experiment, the error predicted by ANFIS was often higher than that of the INS solution error at this stage, and the effect was worse on the road section with more bends. To address this, future work should adjust the input values of the ANFIS model in the initial stage and increase the training set of winding roads.

Conclusions
In this study, a model for estimating the accumulative position error of the INS based on ANFIS, which can quickly and accurately output the position error of a vehicle end-toend, is proposed. The new system was employed to estimate and correct the accumulative position error of the INS to obtain the accurate position information of a vehicle in complex and covert surroundings where other sensors do not work consistently. The proposed method was verified using the KITTI dataset, and results indicated that the accumulative position error was decreased to 0.45% and 0.61% in single-sequence and multisequences experiments by using ANFIS, respectively; this was significantly less than those of the other three approaches. This result suggests that the ANFIS could considerably improve the positioning accuracy of inertial navigation, which has significance for vehicle inertial navigation in complex and covert surroundings. Through the above two experiments, a single-sequence can predict the accumulative position error of INS more accurately because of its continuity of motion, which almost restores the true location information of the vehicle. Due to the independent observation of each road section in multi-sequences, the correlation of the error of the INS at the initial stage was weak and had a high error. After a long driving period, the error of the INS in different road sections was strongly correlated, and the error was decreased.

Discussion
The results showed that the proposed ANFIS effectively reduced the position error of the vehicle in the single-sequence experiment and multi-sequences experiment. However, because fewer sequences were used, the result of the multi-sequences experiment did not perform as well as using CNN [18].
The trajectory in an upward direction was not considered in the experiments because the ground truth provided by the KITTI dataset occasionally had large errors in the Zdirection. Future work will involve training a model by using other datasets and collect data under more difficult conditions. The LSTM method decreased the position error to a large extent but did not perform as well as ANFIS. The reason may be that the vehicle stopped for a few seconds, breaking the continuity of the time-series problem.
Due to the small INS solution error in the initial stage of the multi sequences experiment, the error predicted by ANFIS was often higher than that of the INS solution error at this stage, and the effect was worse on the road section with more bends. To address this, future work should adjust the input values of the ANFIS model in the initial stage and increase the training set of winding roads.

Conclusions
In this study, a model for estimating the accumulative position error of the INS based on ANFIS, which can quickly and accurately output the position error of a vehicle end-toend, is proposed. The new system was employed to estimate and correct the accumulative position error of the INS to obtain the accurate position information of a vehicle in complex and covert surroundings where other sensors do not work consistently. The proposed method was verified using the KITTI dataset, and results indicated that the accumulative position error was decreased to 0.45% and 0.61% in single-sequence and multi-sequences experiments by using ANFIS, respectively; this was significantly less than those of the other three approaches. This result suggests that the ANFIS could considerably improve the positioning accuracy of inertial navigation, which has significance for vehicle inertial navigation in complex and covert surroundings.