**3.2 Analysis of results of GPS-IMU data correction models using LSTM and ELM**

To compare and validate the results of the simulated ANFIS models, different LSTM and ELM models were also simulated to achieve their best-offered models. The 2521 input and output data rows were split into training, validation, and test data, as with ANFIS models. About 55% of the data is used for training, 25% for validation, and 20% for testing. The input data consists of actual data, particularly GPS latitude and longitude coordinates, accelerometer 3-axis coordinates, and magnetometer 3-axis coordinates. In contrast, the output data is the extracted reference GPS latitude and longitude from Google Maps. The simulations of LSTM models for latitude and longitude prediction were done in MATLAB. A total of nine combinations of LSTM networks using the different set hyperparameters have been modeled. From the different combinations, the results of the best combinations of the LSTM model are shown in **Table 5**. The table shows that an LSTM network comprised of 1500–700- 300 hidden neurons for each of the three hidden layers with 300 epochs is the best


**Table 5.** *Results of best LSTM models for latitude and longitude correction.* *Adaptive Neuro-Fuzzy Inference System-Based GPS-IMU Data Correction for Capacitive… DOI: http://dx.doi.org/10.5772/intechopen.112921*


#### **Table 6.**

*Results of best ELM models for latitude and longitude correction.*

model for latitude correction among the other simulated models. This model obtained the least training RMSE of 0.106777, validation RMSE of 0.100347, and testing RMSE of 0.101889. Moreover, the best simulated LSTM model for longitude correction is the combination of 1500–700-300 hidden neurons for each of the three hidden layers with less training epochs of 200. Thus, this selected model obtained the least training RMSE of 0.145039, validation RMSE of 0.149588, and testing RMSE of 0.149149.

Compared to the LSTM models, **Table 6** also provides the results of the highestperforming simulated ELM models for latitude and longitude correction. From the results, the ELM network with 100 hidden neurons indicates the least training, validation, and testing RMSE for latitude and longitude correction. The training RMSE of the selected highest-performing ELM model for latitude correction is 0.72205, the validation RMSE is 0.78897, and its testing RMSE is 0.79802. On the other hand, the training RMSE of the highest-performing ELM model for longitude prediction is 0.109437, with a validation RMSE of 0.119175 and training RMSE of 0.138129.

#### **3.3 Comparison of results between ANFIS, LSTM, and ELM**

Using 25% of the collected data as validation data for model evaluation, the selected best ANFIS model performance is compared to the selected highest-performing LSTM and ELM models for latitude correction which is presented in **Table 7**. In terms of MSE, the selected best ANFIS model, model 1B from **Table 3**, showed significantly superior results compared to the LSTM and ELM models, which is 0.000069. Other evaluation metrics such as the R2 and MAE of 0.995479 and 0.000375, respectively, also signify that the best ANFIS model still offers superior performance.

Furthermore, among the simulated highest-performing ANFIS, LSTM, and ELM prediction models for longitude correction in **Table 8**, the ANFIS model, which is model 2A from **Table 4**, still has the most superior performance with attained MSE, R2 , and MAE of 0.000050, 0.997675, and 0.000042, respectively.

A scatter plot is presented to visualize the performance of the ANFIS models using the validation data (**Figures 11** and **12**) to compare further the relationship between the reference latitude/longitude and the predicted corrected latitude/longitude. The given plot is clear and concise, indicating a strong relationship between the predicted and response variables. The predicted latitude/longitude values are close enough to the reference latitude/longitude values as the points cluster around the trend line.


**Table 7.**

*Summary of the evaluation metrics for the selected best models for GPS latitude correction.*

#### *Advances in Fuzzy Logic Systems*


**Table 8.**

*Summary of the evaluation metrics for the selected best models for GPS longitude correction.*

#### **Figure 11.**

*The resulting scatter plot of the predicted corrected latitude of the selected most superior ANFIS model versus the reference latitude data.*

#### **Figure 12.**

*The resulting scatter plot of the predicted corrected longitude of the selected most superior ANFIS model versus the reference longitude data.*

Therefore, the simulated ANFIS models still outperformed the LSTM and ELM models, which proved that these models can combine the advantageous features of neural networks and fuzzy logic in one framework. In giving better accuracy in

*Adaptive Neuro-Fuzzy Inference System-Based GPS-IMU Data Correction for Capacitive… DOI: http://dx.doi.org/10.5772/intechopen.112921*

predicting the corrected latitude and longitude. The comparison of results also proved that ANFIS is a promising method for localization and tracking vehicles utilizing GPS and IMU data. In terms of generalization, ANFIS has demonstrated high generalization capability, which increases its robustness and accuracy when transforming fuzzy sets into crisp inputs [22].
