This section describes an overview of the architectural design of the UWB system, the vision tracking system, and the Robot Operating System (ROS) ecosystem. The UWB system’s architectural design is intended to facilitate the positioning and localization of robots. To ascertain the veracity of the data, the vision tracking system employs camera vision techniques to track and monitor the robot’s movement. ROS 1.15.14 Noetic is a software framework that facilitates communication between software and hardware, providing tools for the construction, testing, and deployment of localization solutions.
3.2. Ultra-Wideband (UWB) Technology System
UWB technology, traditionally utilized in wireless communications, has recently gained significant traction in positioning applications due to its unique properties. The wide bandwidth of UWB not only prevents interference from other radio frequency signals but also enables effective signal penetration through obstacles such as walls and other barriers. This characteristic renders UWB particularly reliable in challenging environments, including non-line-of-sight (NLOS) and multipath scenarios where direct signal paths are often obstructed [
32]. Furthermore, the automatic identification of tags within a UWB system effectively streamlines data association challenges, thereby reducing potential errors in multi-tag environments. With regard to distance determination, UWB technology functions by transmitting ultra-short radio signals from a mobile transceiver (tag) to a set of known anchors, measuring the time of flight (ToF) of these signals, and subsequently calculating precise distances based on these measurements. This high level of precision in distance measurement serves to enhance the accuracy of UWB-based positioning systems, rendering them suitable for a diverse array of applications, including indoor navigation, asset tracking, and autonomous robotics.
The study employs the POZYX system, a sophisticated UWB-based hardware solution designed for precise position and motion sensing. The system permits the configuration of UWB settings according to four key parameters that directly influence system performance. Notwithstanding the sophisticated settings described above, the presence of noise and uncertainty in the data collected by UWB sensors can still present challenges to achieving accurate position estimation. To address these issues, the study incorporates advanced optimization techniques, including the EKF and deep learning models. These methods are of great benefit in reducing the impact of measurement noise and improving the accuracy of indoor localization systems that rely on UWB technology. The objective of the study is to enhance the precision and reliability of position and motion sensing in complex indoor environments by leveraging advanced algorithms. As illustrated in
Figure 1, the robot positioning system comprises a UWB positioning subsystem, a remote computer, and a mobile robot. The UWB positioning subsystem comprises fixed UWB anchors situated within the environment, as well as a UWB robot tag [
33]. By employing distance measurements between the UWB tag and the anchors, the computer executes positioning algorithms to ascertain the exact position and coordinates of the robot. A wireless communication link connects the remote computer to the robot, allowing for data processing, coordinate calculation, and motion control.
The system serves multiple functions, including interactive communication, robot control, position estimation, and robot position display [
34]. Recognizing that a single sensor may not achieve high accuracy due to errors or instability, the combined usage of UWB tags and anchor sensors is implemented to enhance positioning accuracy and stability. This study proposes a robust method for position estimation and error correction, which integrates a DNN with an EKF algorithm. This approach capitalizes on the respective strengths of both techniques, thereby enhancing accuracy and reliability. The robot positioning system can acquire and integrate data from UWB tags and anchors in real time, effectively managing the noise and uncertainties inherent in the measurements. By integrating the predictive capabilities of the EKF with the adaptive learning of the DNN, the system can achieve a high level of precision and robustness in a variety of operational environments, demonstrating enhanced performance in complex and dynamic conditions.
The distribution of UWB nodes plays a crucial role in determining the accuracy of indoor positioning for mobile robots, such as the TurtleBot 3, by providing high-precision range measurements based on time of flight (ToF). The accuracy of localization depends on factors like the density and placement of UWB nodes. A higher density of nodes leads to better coverage and more frequent, reliable distance measurements, improving the robot’s position estimate, especially in environments with limited line-of-sight characteristics. Proper placement of nodes minimizes gaps and blind spots, reducing uncertainties in the robot’s position. In this work, incorporating UWB nodes within the DNN-EKF framework significantly enhances localization accuracy. UWB provides precise range measurements that serve as valuable input for the DNN component, allowing the system to learn patterns from the data. When combined with the EKF, UWB data, along with other sensor data, help produce accurate real-time state estimates, improving the robot’s position and velocity predictions. This integration of UWB nodes into DNN-EKF results in more reliable and resilient indoor localization, especially in challenging environments where traditional sensors may struggle.
3.3. Experimental Environment for UWB System Localization
A visual tracking system is used to track and estimate the motion of objects in a sequence of images or video frames captured by a webcam within the experimental environment involving the UWB system. Visual tracking is a fundamental task with a wide range of applications across various fields, including surveillance, robotics, augmented reality, and human–computer interaction [
31]. As illustrated in
Figure 2, visual tracking methodologies are devised to ensure the accurate and robust localization and tracking of objects of interest over time, even in the presence of considerable challenges. These challenges include changes in the object’s appearance, variations in scale, alterations in orientation, and partial or complete occlusion by other objects. Effective visual tracking systems must overcome these obstacles to provide reliable data, ensuring that the tracked objects are continuously monitored and analyzed. This is crucial for maintaining the accuracy and efficiency of applications that rely on real-time object tracking and motion estimation.
Figure 2 illustrates a fundamental process for visual tracking, which was conducted using a webcam that was installed and tested at the IRRI laboratory of Sun Moon University in South Korea. The webcam was positioned in an optimal location, ensuring that all quadrants of the tracking area on the webcam were within the camera’s field of view. Based on the data obtained from the webcam, four positions were captured and saved in a two-dimensional projected coordinate system. A perspective transformation matrix was constructed using the saved positions, with the objective of mapping the webcam’s view to the desired tracking area. Subsequently, the image matrix and perspective transformation matrix were calculated using a resolution of 512 × 512, with the objective of achieving optimal tracking performance. The visual tracking process began after applying perspective transformation [
35]. We selected a high-contrast area of the robot for tracking. An appropriate tracking algorithm, such as the Discriminative Correlation Filter with Channel and Spatial Reliability (CSRT) algorithm, is implemented to track the robot within the 512 × 512 images [
36]. The tracking data provide the position within the 512 × 512 image and are subsequently converted to the corresponding position in the real environment, which may have different dimensions. By scaling the tracked position using Equation (1), the position is mapped to a 4000 mm × 4000 mm environment in the x- and y-coordinates, where
and
represent the positions within the 512 × 512 image.
This systematic and comprehensive approach highlights the significance of webcam calibration, perspective transformation, and precise scaling in the development of a robust visual tracking system. The incorporation of these sophisticated techniques enables the system to not only monitor the robot’s movement but also to do so with enhanced accuracy, rendering it well suited for applications where precision is of paramount importance. Furthermore, although the UWB node-based source localization algorithm is highly effective at determining the position of a robot, it is deficient in providing the robot’s orientation in relation to a map. To address this limitation, we propose an approach that integrates a map with a LiDAR scan matching technique. This integrated approach is essential for resolving orientation ambiguity by aligning the robot’s observed LiDAR scans with a pre-existing map, thereby determining the robot’s precise heading. Once the initial heading is accurately estimated, the robot’s pose, including its orientation, is published to the initial pose topic. This integration enhances not only the localization accuracy but also provides a comprehensive understanding of the robot’s spatial orientation within the mapped environment, facilitating more precise navigation and interaction with its surroundings.
Figure 3 provides a visual representation of the contrast in the robot’s pose before and after the initialization process. Prior to autonomous initialization, the robot’s pose is represented with a high degree of inaccuracy, resulting in a noticeable disparity between the scan data and the actual map, as illustrated in
Figure 3a. In contrast, following initialization, the scan data are aligned seamlessly with the map, as demonstrated in
Figure 3b.
Once the initial position of the robot has been established, it commences movement toward each specific point, utilizing the move-base algorithm within the ROS navigation stack. Subsequently, the final location of the robot is determined on the map and in the physical environment, following a meticulous initialization process. The precision of the robot’s arrival at its intended destination is corroborated through a comprehensive examination of LiDAR scans superimposed on the map, thereby confirming that the robot’s movements are exact and dependable.
3.4. Simulation Tool Within the ROS Ecosystem
This section will examine the ROS ecosystem and its components, including nodes, topics, and messages, as well as the integration of UWB sensors into this framework. Furthermore, the discussion will address the manner in which UWB sensors quantify the distance between a robot and its surrounding environment and the extent to which these measurements can augment the robot’s localization and mapping capabilities. In the context of navigation systems, the accuracy of position data is of paramount importance. UWB sensors are particularly well suited for robot localization because they provide low-noise range measurements that are resistant to multipath interference. This renders them an optimal selection for challenging environmental conditions. The integration of UWB data with odometry information provides a robust solution for accurate localization. The POZYX system employs UWB technology to attain centimeter-level precision, thereby exceeding the accuracy of conventional Wi-Fi and Bluetooth positioning systems. The system’s algorithm employs the Kalman filter to compute the robot’s position. This incorporates odometry data to establish the motion model and updates the robot’s pose using UWB range measurements. The graphical user interface (GUI) displays both the map and the current robot position. Additionally, the navigation stack can be supplied with Kalman filter-based pose information as needed. A number of ROS packages are available for the collection and processing of IMU sensor data in the context of mobile robotics. To illustrate, the ROS IMU package offers an implementation of an IMU sensor driver and a filter for estimating the robot’s orientation based on sensor data. Furthermore, the robot localization package provides an implementation of the EKF for the fusion of data from multiple sensors, including IMU data, with the objective of estimating the robot’s position and orientation.
We utilized RViz, a three-dimensional visualization tool, to display a range of elements, including sensor data, robot models, and robot states.
Figure 3a illustrates a map generated from sensor data collected by the robot. In this map, the white dots form shapes that are likely representative of obstacles or objects detected by the robot’s sensors. Green lines indicate specific paths or directions related to the robot’s movement or sensor orientation. Subsequent to the experiment illustrated in
Figure 3b, a more comprehensive map was generated, featuring colored regions in purple, white, and green. Two green circles with red lines, which may signify orientation, represent the robot or its sensors. A purple arrow extending from one of the green circles is indicative of a planned path or direction of movement. The background grid indicates that this visualization is intended to serve as a spatial mapping or planning tool. The RViz tool facilitated effective data visualization and analysis, enabling the presentation of complex data in a manner that facilitated comprehension and interpretation.
3.5. Existing Research and Proposed Localization Algorithms
Our work will be compared to the recent research presented in [
16,
31], which focuses on UWB-aided mobile robot localization with neural networks and the EKF, and the comparative analysis of integrated filtering methods using UWB localization in indoor environments. To demonstrate the effectiveness of our proposed DNN-EKF model, the algorithms from these two studies will be examined and experimentally tested in our work as part of a comparative analysis.
3.5.1. Extended Kalman Filter (EKF)
This section presents an overview of the extended Kalman filter (EKF) algorithm and provides an illustrative solution for implementing the filtering process. The EKF is designed to extract pertinent information from noisy or incomplete data by applying sophisticated mathematical techniques. The EKF is a widely utilized algorithm for localization in robotics, navigation, and autonomous systems. It extends the traditional Kalman filter to address nonlinear system states [
37,
38,
39]. The EKF operates recursively, estimating the system’s state over time by incorporating nonlinear functions into a linear approximation, which is then updated using a recursive Bayesian filter. The algorithm employs a set of linearized system models and measurements to estimate the system state, taking into account both model uncertainty and measurement noise. The operation involves two main steps: prediction and correction. During prediction, the EKF forecasts the system state at the next time step based on the present state and control inputs. In the correction step, the algorithm refines the prediction using the most recent measurement. Renowned for its proficiency in handling nonlinear systems and providing accurate estimates amid measurement noise, the EKF finds extensive application in diverse fields such as robotic navigation and autonomous systems. Its computational efficiency further renders it suitable for real-time applications.
In the prediction step (estimation equations), the prior estimated state can be expressed as follows [
21]:
First, the observation value,
, is the vector of ranges
. Noise vector
follows the Gaussian distribution according to Equation (2). Four anchors are located at
,
,
, and
, and
can be expressed as
where
is the Kalman gain that minimize the measurement covariance, and the measurement error that follows the Gaussian distribution (
) can be expressed as
In the prediction step of the EKF, the filter forecasts the subsequent state of a dynamic system by applying the system’s dynamic model and incorporating the nonlinear transition function to account for nonlinearity. This process entails the prediction of both the state and its associated covariance matrix, which captures the uncertainty inherent in the state prediction. This is achieved by considering the impact of system dynamics and external factors. The incorporation of process noise, represented by a zero-mean Gaussian random variable, addresses the inherent uncertainty associated with the dynamic model. In linear systems, a transition matrix is employed to propagate the state and covariance matrix, while in nonlinear systems, the Jacobian matrix is used to linearize the system dynamics around the current state. The resulting predictions set the foundation for the subsequent update step, where real measurements are assimilated to refine the state estimate iteratively. This iterative process enhances the accuracy of the estimation as the filter adapts to changing system conditions over time.
In the correction step of the EKF, real measurements are utilized to enhance the accuracy of the filter’s state estimate. The process begins by predicting expected sensor measurements based on the previously estimated state, incorporating a measurement model that may involve a nonlinear measurement function. The innovation, representing the difference between actual and predicted measurements, is then calculated. The Kalman gain, determined by the covariance matrices of the predicted state and measurements, as well as their cross-covariance, governs the weight assigned to the predicted state and the actual measurements during the update.
The state estimate is refined by adjusting it with the Kalman gain and the innovation. Simultaneously, the covariance matrix associated with the state is updated to reflect the reduced uncertainty after assimilating the measurements. This iterative process of prediction and correction optimally adapts the filter to dynamic system conditions, ensuring an accurate and continually refined estimation of the true system state.
According to the alteration method,
, which is the observation value, can be expressed as
The observation vector comprises the distances between anchors and the mobile node, in addition to the observation noise. It is necessary to transform this vector into a linear approach.
The projection matrix
can be expressed as the Jacobian matrix of partial derivatives of
with respect to estimate state
, that is,
Accordingly, the Kalman gain
can be calculated in accordance with the following equation:
is the matrix, which is a projection to turn
into a position.
is the measurement covariance matrix, and
is the measurement noise vector, where each element follows the Gaussian distribution. The final position is
, which can be calculated according to
This formular of ( is the observation value, and is the average range vector of anchors.
3.5.2. Low-Pass Filter and Average Filter (LPF-AF)
The low-pass filter and average filter (LPF-AF) is frequently employed in robot localization to mitigate the effects of sensor noise and enhance the clarity of the data [
21,
31]. The low-pass filter algorithm permits the transmission of low-frequency signals while attenuating high-frequency noise, thereby facilitating the maintenance of stable and accurate position estimates by filtering out rapid, unnecessary fluctuations in the data. In contrast, the moving average filter algorithm employs a weighted average of a fixed number of consecutive measurements to achieve a smoother output. This approach effectively reduces random variations and noise in the data. By continuously averaging recent data points, the moving average filter provides a more consistent estimate of the robot’s position, thereby reducing the impact of outliers or sudden changes in sensor readings. The application of both filters contributes to an improvement in the reliability of the robot’s localization as a consequence of an enhancement in the quality of the sensor data. Algorithm 1 illustrates the methodology employed in the implementation of low-pass and moving average filters.
Algorithm 1: LPF-AF |
1: | Input: data = , |
2: | Integrate LPF and AF |
3: | Filtered_data = [] |
4: | For in range (len(data)); |
5: | | Initialize parameters for both AF and LPF: |
6: | | | Choose a window size () for AF: |
7: | | | | |
8: | | | Choose a smoothing constant for the LPF |
9: | | | | ) |
10: | | | Apply AF(); |
11: | | | | For each time step : |
12: | | | | Update the sum from nearby data points |
13: | | | | Calculate average value from data points |
14: | | | | If , subtract the value that is leaving the window (i.e., the value from step ago): |
15: | | | | Compute the AF output: |
16: | | | | x-coordinates and y-coordinates from AF |
17: | | | Apply LPF on the AF output (); |
18: | | | | For each time step |
19: | | | | Update the filtered x-coordinate by LPF-AF |
20: | | | | Update the filtered y-coordinate by LPF-AF |
21: | End for |
22: | Output the final filtered by LPF-AF |
23: | Filtered x-coordinate |
24: | Filtered y-coordinate |
LPF-AF is an algorithm used to smooth x- and y-coordinate data, reducing noise while maintaining the overall trend. The LPF uses a smoothing factor (between 0 and 1) to calculate the filtered coordinates, blending the current coordinates with the previous filtered values. A smaller offers greater smoothing but slower response, while a larger responds faster to changes but reduces noise less effectively. In contrast, the AF averages the last data points for both x- and y-coordinates, requiring a buffer of past values. A larger window size produces smoother results but may delay the response. While the LPF is more suitable for real-time systems due to its simplicity, the AF provides straightforward averaging with potentially better noise reduction, depending on the chosen window size.
The LPF-AF algorithm combines the benefits of the LPF and AF to smooth x- and y-coordinate data. The LPF reduces noise by blending current coordinates with previous filtered values, offering a balance between a fast response and effective noise reduction. The AF averages the last data points, providing further noise reduction but with a potential delay. By integrating both, LPF-AF achieves enhanced noise reduction while maintaining real-time performance, making it ideal for systems that require both accuracy and timely feedback.
3.5.3. Low-Pass Filter and Kalman Filter (LPF-KF)
The combination of a low-pass filter and a Kalman filter (LPF-KF) represents a robust methodology for robot localization, with the objective of improving the precision and reliability of position estimates [
21,
31]. The low-pass filter is employed to attenuate high-frequency noise in sensor data, enabling the transmission of only the low-frequency, more pertinent information, which serves to mitigate the impact of abrupt, erratic fluctuations in the measurements. In contrast, the Kalman filter represents a more sophisticated algorithmic approach. It employs a dynamic model to predict the robot’s position and then updates this prediction by incorporating new sensor data while accounting for their inherent uncertainties. The integration of the LPF for the preprocessing of sensor data and the Kalman filter for real-time prediction and correction allows for an effective balance between noise reduction and accurate state estimation, thereby facilitating more reliable and precise localization of the robot. Algorithm 2 addresses the methodology for implementing the low-pass filter and Kalman filter (LPF-KF) combination. The process of using the low-pass filter to reduce high-frequency noise and the Kalman filter to refine position estimates through predictive modeling and updates is outlined. This enhances the accuracy and reliability of robot localization.
Algorithm 2: LPF-KF |
1: | Input: data = , |
2: | Integrate LPF and KF |
3: | Filtered_data = [] |
4: | For in range (len(data)); |
5: | | Initialize parameters for both KF and LPF: |
6: | | Initialize state vectors for x- and y-coordinates: |
7: | | Initialize state covariance matrices: |
8: | | Choose process noise covariance |
9: | | Choose a smoothing constant for the LPF |
10: | | | ) |
11: | | | Apply LPF(); |
12: | | | | For each time step : |
13: | | | | Update the LPF filtered values for both x- and y-coordinates |
14: | | | Apply KF(); |
15: | | | | Process Noise: |
16: | | | | | |
17: | | | | Correction Step: |
18: | | | | | |
19: | | | | Predict Step: |
20: | | | | Predict the next state based on the current state estimate |
21: | | | | | |
22: | | | | Update Step: |
23: | | | | | Use the LPF output as the measurement to correct the predicted state |
24: | | | | | Kalman gain calculation |
25: | | | | Extract filtered coordinates: |
26: | | | | Update the filtered x-coordinate by LPF-KF |
27: | | | | Update the filtered y-coordinate by LPF-KF |
28: | End for |
29: | Output the final filtered by LPF-KF |
30: | Filtered x-coordinate |
31: | Filtered y-coordinate |
The LPF and KF are two techniques used for smoothing x- and y-coordinate data, focusing on noise reduction while preserving the underlying signal. The LPF works by applying a smoothing factor that weights the current coordinates with the previous filtered values, blending them to reduce rapid fluctuations. A smaller value results in greater smoothing, producing a slower response to changes, while a larger allows the filter to adapt more quickly, with less noise suppression. This simplicity makes the LPF straightforward to implement, but it does not adapt to variations in noise levels over time. In contrast, the KF is a more sophisticated method that combines prediction and measurement updates to estimate the position of the coordinates. It starts by predicting the next state using a mathematical model, then corrects that prediction using new measurements. The degree of correction is determined by the Kalman gain, which is adjusted dynamically based on the uncertainties in the model and sensor measurements. This adaptability allows the KF to handle varying levels of noise more effectively, providing optimal estimates even in uncertain conditions, making it more suitable for complex scenarios compared to the simpler, fixed approach of the LPF.
Integrating the LPF with the KF combines their strengths, offering both simplicity and adaptability. The LPF smooths high-frequency noise initially, stabilizing the data for the KF to refine. The KF then adjusts predictions based on dynamic noise levels, providing more accurate and adaptable estimates. This hybrid approach enhances data smoothing and position estimation, improving responsiveness to varying noise and ensuring more reliable outputs.
3.5.4. Low-Pass Filter and Extended Kalman Filter (LPF-EKF)
Algorithm 3 provides a comprehensive explanation of the methodology employed in the implementation of the “low-pass filter and extended Kalman filter (LPF-EKF)” approach [
21,
31]. This algorithm details the implementation of a low-pass filter to preprocess sensor data, thereby attenuating high-frequency noise, which is of paramount importance for the enhancement of data quality prior to its introduction into the EKF. Subsequently, the EKF performs advanced state estimation, accounting for nonlinearities in the system dynamics by predicting the robot’s position and correcting it based on the filtered sensor inputs. The combination of these two techniques is illustrated in detail in Algorithm 3. It demonstrates how the low-pass filter enhances the robustness and accuracy of the EKF, thereby improving the reliability of robot localization in complex, dynamic environments.
Algorithm 3: LPF-EKF |
1: | Input: data = , |
2: | Integrate LPF and EKF |
3: | Filtered_data = [] |
4: | For in range (len(data)); |
5: | | Initialize parameters for both EKF and LPF: |
6: | | Initialize state vectors for x- and y-coordinates: |
7: | | Initialize state covariance matrices: |
8: | | Choose process noise covariance |
9: | | Choose a smoothing constant for the LPF |
10: | | | ) |
11: | | | Apply LPF(); |
12: | | | | For each time step : |
13: | | | | Update the LPF filtered values for both x- and y-coordinates |
14: | | | Apply EKF(); |
15: | | | | Process Noise: |
16: | | | | | |
17: | | | | Correction Step: |
18: | | | | | |
19: | | | | Predict Step: |
20: | | | | Predict the next state based on the current state estimate |
21: | | | | | |
22: | | | | | |
23: | | | | Calculate the Jacobian of the state transition function |
24: | | | | | Linearize the nonlinear function |
25: | | | | Update Step: |
26: | | | | | Use the LPF output as the measurement to correct the predicted state |
27: | | | | | Calculate the Jacobian of the measurement function at the current predicted state |
28: | | | | | Kalman gain calculation |
29: | | | | Extract filtered coordinates: |
30: | | | | Update the filtered x-coordinate by LPF-EKF |
31: | | | | Update the filtered y-coordinate by LPF-EKF |
32: | End for |
33: | Output the final filtered by LPF-EKF |
34: | Filtered x-coordinate |
35: | Filtered y-coordinate |
The utilization of a low-pass filter within an EKF for the purpose of robot localization presents several advantages, primarily in terms of enhanced accuracy and the stability of position estimates. The low-pass filter is an effective means of reducing high-frequency noise in sensor data, which can otherwise result in erratic or unreliable readings. By attenuating the noise before the data are processed by the EKF, the filter ensures that the EKF receives a more uniform and reliable input, which in turn allows for more precise predictions and corrections in the robot’s position. This preprocessing step assists the EKF in focusing on significant, low-frequency trends in the data, thereby enhancing its capacity to track the robot’s true state even in the presence of noisy or fluctuating measurements. Consequently, the combined use of the low-pass filter within an EKF results in more robust localization, particularly in environments with high levels of sensor noise or when dealing with complex, nonlinear system dynamics.
Integrating the LPF and EKF provides a robust approach for smoothing and estimating x- and y-coordinates. The LPF first reduces high-frequency noise by applying an exponential smoothing technique, which helps stabilize the data with a smoothing factor . This simple filtering method effectively removes quick fluctuations but may not fully account for varying levels of noise. Once the data is smoothed, the EKF takes over by predicting the state using a model, then adjusting the predictions based on noisy measurements. The EKF uses the Kalman gain to dynamically correct the estimates, providing an optimal balance between the model and measurements, especially in nonlinear systems. This combination leverages the LPF’s ability to reduce noise quickly and the EKF’s strength in adapting to changes in noise and uncertainties, leading to more accurate and reliable position estimates in dynamic environments.
3.5.5. Neural Network-Based EKF (NN-EKF)
Algorithm 4 combines an extended Kalman filter (EKF) with a neural network model to process and predict data. The process begins with input data, which consists of raw and ground truth values. These data are then processed by the EKF to filter and prepare the dataset for further analysis. The filtered data are then fed through a neural network model, specifically a Multi-layer Perceptron (MLP) Regressor. The objective of this MLP is to enhance predictive accuracy by identifying the relationships between the filtered inputs and their corresponding outputs.
Algorithm 4: NN-EKF |
1: | Input: data = , |
2: | Loading dataset processed by EKF |
3: | Data normalization: Minimum and Maximum Scaler (MinMaxScaler) |
4: | NN-EKF (filtered data) |
5: | Neural network model setup |
6: | | Multi-layer Perceptron Regressor (MLP) |
7: | | Input layer: |
8: | | Two neural network regressors (net-x and net-y) are created to predict the and positions. |
9: | | Hidden layer: |
10: | | Single hidden layer with 50 neurons |
11: | | | Parameters: |
12: | | | Initialize weights and biases : |
13: | | | Activation function: ReLU |
14: | | | Solver: Adam optimizer for efficient training |
15: | | | Alpha: 0.001, regularization parameter to avoid overfitting |
16: | | | Max iterations: 2000 iterations |
17: | | | Learning rate: 0.1, controlling the step size during training |
18: | | | Training process for optimizing loss function |
19: | | | For episode in range (500): |
20: | | | | Data splitting (60% for training and 40% for testing) |
21: | | | | Neural networks are trained on the training set for both x- and y-coordinates |
22: | | | | Total loss = 0 |
23: | | | | For in range(lens(data)): |
24: | | | | | Calculate loss: Mean Squared Error (MSE) |
25: | | | | | MSE = |
26: | | | | | Backpropagation and weight update |
27: | | | | | Update weights and biases |
28: | | | | End for |
29: | | | | Output layer: |
30: | | | | Inverse transformation from normalization data |
31: | | | | Optimal position filtering |
32: | | | End for |
33: | | Print (filtered data) |
34: | | Output: data = |
35: | | Euclidean distance loss |
The neural network model, which forms the basis of the algorithm of the neural network-based EKF (NN-EKF), comprises three layers: an input layer, a single hidden layer, and an output layer [
16]. The input layer receives the state values, which include both the unfiltered and filtered (estimated) x- and y-coordinates. The network is initialized with weights (
) and biases (
), which are then adjusted during the training process in order to achieve the best possible results. The hidden layer employs the ReLU (Rectified Linear Unit) activation function, which introduces nonlinearity into the model, enabling it to capture more complex patterns in the data. The core of the algorithm lies in the training process, where the network aims to minimize the prediction error by optimizing a loss function, specifically the mean squared error (MSE).
During the training phase, the algorithm employs backpropagation to compute gradients, which directs the updating of weights and biases in conjunction with the Adam optimizer. This process is repeated until the total loss across multiple epochs is reduced to a satisfactory level, at which point the model is deemed to have achieved an acceptable level of performance. Once the training phase is complete, the final output layer produces the predicted values for the input data. This results in a set of predictions (, ) that the model has learned to generate based on the training it received. The algorithm generates these predictions, which can be utilized for further analysis or decision-making processes.
Combining the EKF with a neural network can significantly improve indoor localization, ensuring precise and reliable robot movements. The EKF is effective at fusing noisy sensor data, such as odometry or distance sensors, to estimate the robot’s position. When combined with a neural network, which can learn complex patterns and dynamics, it further enhances the precision of state estimation, especially by handling nonlinearities more effectively than an EKF alone. Additionally, the neural network helps model and predict sensor noise patterns, allowing the EKF to better filter out erroneous data, leading to more accurate position estimates. The neural network can also learn from historical movement data, improving the EKF’s ability to predict future states, particularly in complex indoor environments with dynamic obstacles. This combination also enables adaptive filtering, as the EKF can refine its process based on the neural network’s insights, ensuring better localization under changing conditions. Neural networks optimize sensor fusion, providing a more accurate overall estimate by correlating multiple sensor inputs, and are especially useful for handling nonlinear relationships in robot kinematics or sensor inaccuracies. The integration improves robustness, allowing the system to generalize well in diverse and unpredictable indoor settings. Finally, with well-optimized neural networks, the combined system provides real-time updates to the EKF, ensuring quick adaptation and accurate localization for robot movement. This synergy enhances both the precision and reliability of indoor localization systems. While the NN-EKF combination offers benefits in specific scenarios, DNNs are generally more scalable, adaptable, and efficient at handling complex, nonlinear data, making them a better choice for large-scale or highly dynamic indoor localization tasks. So DNN-EKF is best for handling complex, nonlinear data, which is taken as our proposed approach in this work.
3.5.6. Deep Neural Network-Based Extend Kalman Filter (DNN-EKF)
In algorithm 5, the DNN-EKF fuses a deep neural network (DNN) with an extended Kalman filter (EKF) to elevate prediction precision in a series of steps. The input dataset comprises raw state measurements and their corresponding true values. At the outset, the algorithm loads a dataset that has been preprocessed by the EKF. This step is of great importance, as the EKF assists in reducing noise and filtering out inaccuracies from the raw data, thus making it more suitable for training the neural network. The filtered data are then prepared for use in the neural network, where the core processing will take place. At the core of the algorithm is the Multi-layer Perceptron (MLP) Regressor, a type of neural network that performs regression tasks. The MLP is structured into three main layers: the input layer, the hidden layers, and the output layer. The input layer receives the state values, including both the unfiltered and EKF-filtered measurements. The network’s neurons are initialized with weights and biases, and the ReLU (Rectified Linear Unit) activation function is applied in the hidden layers to introduce nonlinearity, allowing the network to capture complex patterns in the data. The network’s architecture begins with a single hidden layer, but additional hidden layers can be incorporated for more in-depth learning.
As data traverse the network, each subsequent layer processes the input from the previous layer, applying weights, biases, and activation functions in an iterative manner. This multi-layer approach allows the network to model complex relationships between the input features and the target outputs. Subsequently, the algorithm enters a training phase, during which the loss function is optimized across multiple epochs. The mean squared error (MSE) is used as the loss function, which quantifies the discrepancy between the predicted and actual values. The backpropagation algorithm is used to adjust the weights and biases in order to minimize the loss, with the Adam optimizer facilitating efficient and adaptive updates during training.
The final stage of the process is the generation of the predicted state values, which is achieved by combining the activations from the last hidden layer. The algorithm then generates the predicted data, which includes the predicted state values (x_predict, y_predict). The EKF-enhanced data stream plays a pivotal role in optimizing the neural network’s performance, ensuring more accurate and reliable inputs, which in turn deliver superior predictions. The result is a robust DNN-EKF model that effectively integrates traditional filtering techniques with modern deep learning methods, resulting in improved prediction accuracy.
Algorithm 5: DNN-EKF |
1: | Input: data = , |
2: | Loading dataset processed by EKF |
3: | Data normalization: Minimum and Maximum Scaler (MinMaxScaler) |
4: | DNN-EKF (filtered data) |
5: | Neural network model setup |
6: | | Multi-layer Perceptron Regressor (MLP) |
7: | | Input layer: |
8: | | Two neural network regressors (net-x and net-y) are created to predict the and positions. |
9: | | Hidden layer: |
10: | | 3 hidden layers with 50 neurons for each layer |
11: | | | Parameters: |
12: | | | Initialize weights and biases : |
13: | | | Activation function: ReLU |
14: | | | Solver: Adam optimizer for efficient training |
15: | | | Alpha: 0.001, regularization parameter to avoid overfitting |
16: | | | Max iterations: 2000 iterations |
17: | | | Learning rate: 0.1, controlling the step size during training |
18: | | | Training process for optimizing loss function |
19: | | | For episode in range (500): |
20: | | | | Data splitting (60% for training and 40% for testing) |
21: | | | | Neural networks are trained on the training set for both x- and y-coordinates |
22: | | | | Total loss = 0 |
23: | | | | For in range(lens(data)): |
24: | | | | | Calculate loss: Mean Squared Error (MSE) |
25: | | | | | MSE = |
26: | | | | | Backpropagation and weight update |
27: | | | | | Update weights and biases |
28: | | | | End for |
29: | | | | Output layer: |
30: | | | | Inverse transformation from normalization data |
31: | | | | Optimal position filtering |
32: | | | End for |
33: | | Print (filtered data) |
34: | | Output: data = |
35: | | Euclidean distance loss |
The combined EKF and DNN model utilizes three hidden layers, each with 50 neurons, while the neural network version uses only one hidden layer with 50 neurons. The addition of extra hidden layers in the DNN enables it to learn more complex, hierarchical patterns in the data, enhancing its ability to model nonlinear relationships and capture more detailed feature representations from the sensor inputs. Each hidden layer in the DNN allows the model to build progressively more abstract representations of the data, improving its ability to understand complex correlations between different sensor readings and the robot’s position. In contrast, the simpler neural network with a single hidden layer can only model relatively shallow and basic relationships, making it less capable of handling intricate or highly nonlinear patterns in the data.
With three hidden layers, the DNN can learn from more layers of abstraction, making it better suited to handle dynamic, nonlinear, and complex environments commonly encountered in indoor localization. This deeper architecture allows the DNN to generalize better across different environments, enabling it to process a variety of sensor inputs more effectively and adapt to new or unseen situations. Additionally, the extra layers enhance the network’s robustness by allowing it to better handle noisy or incomplete data, improving the overall accuracy of state estimation. The benefit of the deeper architecture in the DNN is that it provides richer and more robust feature extraction capabilities, allowing the model to learn more intricate dependencies between sensor data and the robot’s position. This enables the DNN to overcome the limitations of a simpler neural network by improving its predictive performance, leading to more precise, reliable, and adaptive localization. The increased depth helps the DNN capture long-term dependencies and subtle patterns in the data, which a shallow neural network might miss, ultimately improving robot movement in dynamic, cluttered, or complex indoor environments.
3.6. Proposed System Flow Diagram
Figure 4 shows the process in our proposed system flow diagram of DNN-EKF, which begins with the acquisition of a dataset containing input features and target labels, followed by data preprocessing to handle missing values and outliers. The DNN-EKF architecture is defined, including the configuration of layers, selection of activation functions, and specifications for the output layer. The DNN typically consists of an input layer, several hidden layers, and an output layer, each with a specific number of neurons depending on the complexity of the problem. The hidden layers are of critical importance to the DNN’s capacity to discern intricate patterns within the data. Each hidden layer is comprised of multiple neurons, wherein each neuron performs a weighted sum of its inputs, adds a bias, and then applies an activation function. We utilized the Rectified Linear Unit (ReLU) activation function, which is a good choice due to its ability to introduce nonlinearity into the model while maintaining computational efficiency. ReLU activation functions can enable the network to learn complex representations of the data. The depth and number of neurons in these hidden layers play a pivotal role in determining the model’s capacity to learn intricate relationships between inputs and outputs.
The process of training the DNN entails the minimization of the discrepancy between the predicted and actual target values, a procedure that is governed by a loss function. The loss function of the mean squared error (MSE) for regression tasks can provide a good correspondence between the model’s predictions and the actual outcomes. The objective during the training phase is to adjust the network’s weights and biases in order to minimize the loss function, thereby enhancing the accuracy of the model. This optimization is conducted through the use of an algorithmic technique known as backpropagation, which calculates the gradient of the loss function with respect to each parameter within the network. The gradients indicate the direction and magnitude of the requisite adjustments to the weights and biases to reduce the loss.
Backpropagation is comprised of two principal stages: the forward pass and the backward pass. During the forward pass, the input data flows through the network, with each neuron in the hidden layers applying its activation function (e.g., ReLU) to produce the output. Subsequently, the output is compared with the target values, and the loss is computed. In the backward pass, the algorithm calculates the gradients of the loss with respect to each weight and bias, proceeding from the output layer in a backward direction to the input layer. Subsequently, the gradients are employed to update the weights and biases, typically using the Adam optimization technique.
This iterative process of adjusting parameters continues until the loss function has reached an acceptable level of minimization. Validation is conducted on a separate dataset to fine-tune hyperparameters and prevent overfitting. Testing, on the other hand, evaluates the model’s performance on unseen data, and it is used to inform the final deployment of the trained model for real-world predictions.