## 4 Simulation Results and Analysis
From all the simulation results and analysis, we obtained the best LSTM hyperparameters for position prediction. Table 2 shows the optimized LSTM parameters based on the training data. \begin{table}
\begin{tabular}{c c} \hline \hline
**LSTM Parameter** & **Value** \\ \hline Ratio of training data to & 0.75 \\ overall data & 100 \\ Number of epochs & 100 \\ Batch size & 5 \\ Timesteps & 30 \\ Hidden nodes & 256 \\ Optimizer & Nadam \\ Loss & Mean squared \\ error (MSE) \\ Dropout Rate & 0.2 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: LSTM parameter values. Figure 15: Localization accuracy of training data in terms of number of timesteps. The Table 2 configuration of LSTM parameters are used in the proposed approach for predicting the current user position. To validate the performance of the proposed LSTM based localization, we estimated the mean localization error from average localization error \((E)\) results. The estimation of \(E\) is expressed as  
\[E=\sum_{i=1}^{L}\Big{(}\big{(}x_{i}^{true}-x_{i}^{est}\big{)}^{2}+\big{(}y_{i}^{ true}-y_{i}^{est}\big{)}^{2}\Big{)}^{0.5}, \tag{32}\]  
where \((x_{i}^{true},y_{i}^{true})\) is the actual UWB tag position and \((x_{i}^{est},y_{i}^{est})\) denotes the estimated UWB tag position calculated by proposed localization approach. The \(L\) value indicates the total number of data samples used for the localization. The performance of the proposed LSTM approach evaluated with a number of LSTM layers, training and testing time of the model and mean localization error with different number of UWB anchors. Figure 16 shows the mean localization errors with different number of LSTM layers. From Figure 16, the proposed two-layer LSTM approach shows better performance than standard LSTM (one LSTM layer) and a higher number of LSTM layers. The results show that if we increase the number of LSTM layers, the UWB system shows worst performances. This is due to the overfitting of the networks with more layers. The proper selection of the number of LSTM layers is an influencing factor of the localization performances and our system used the two-layer LSTM network for better performances. The training and testing time of the proposed model is an important parameter for real time indoor localization. The training and testing time of all models are summarized in Table 3.  
From Table 3, the training time of the proposed approach is still much higher than the approaches of BP, ELM and RNN. However, when we consider the accuracy of the localization system, the proposed LSTM approach gives acceptable localization accuracy with reasonable computational time. The testing time of the proposed approach with all testing samples is acceptable for real time indoor localization. Figure 16: Mean localization errors with different number of LSTM layers. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Time** & **BP** & **ELM** & **LSTM** & **RNN** \\ \hline Training time (sec) & 740 & 520 & 1080 & 900 \\ \hline Testing time (sec) & 0.287 & 0.215 & 0.795 & 0.321 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Training and testing time of all models. To investigate the impact of the number of anchors for UWB localization for all the approaches, we perform an additional simulation with the data from different number of anchors in the simulation environment. Figure 17 shows the simulation results with the number of anchors from 3 to 5 for all approaches. From Figure 17, the mean localization error decreases with increase the number of anchors. The mean localization error results indicate that the proposed approach achieves the best localization performance in all situations. The results from RNN are better than ELM and BP models. However, the ELM model gives faster learning speed, better generalization performance and with least human intervention when compared to BP model. The results from BP model are not suitable for UWB indoor localization when we use multiple anchors.