6.2. Signal Filtering
Signal filtering is an essential procedure for RSSI-based indoor localization systems to mitigate signal fluctuations caused by multipath interference and environmental noise. Three filtering techniques were tested in this work: the Kalman filter, the Weighted Moving Average (WMA), and the Gaussian Filter. Various tests revealed the optimal parameters for each filter, aiming to minimize the distance estimation error.
The Kalman filter is one of the most used filters in relevant applications, as it is particularly effective in dynamic environments where RSSI readings fluctuate rapidly due to movement or interference. By continuously updating its estimates based on prior values and new measurements, the Kalman filter can provide stable and accurate RSSI readings. The optimal parameters of the filter in our case are F = 1, H = 1, Q = 0.1, and R = 8.55 after extensive tests. Those were based on finding the best set of the four parameters for each of the 0.5 m, 1.5 m, and 2.5 m distances, based on the Mean Squared Error, standard deviation, and a range that covered all parameters from 0 to 10 with an interval of 0.1. The final parameters are the mean of the 3 Q’s and R’s (1 for each distance).
The Weighted Moving Average (WMA) filter is a more popular filtering technique with sufficient results. It smooths RSSI values by assigning higher weights to more recent measurements while still considering past values, and a window defines the number of the latest values being used in the calculation. In our dataset, greater window sizes lead to smaller errors and deviations. On a deployed system, though, where the targets are moving objects, it is inefficient to use wide windows.
The Gaussian filter applies a Gaussian-weighted convolution to the RSSI readings, giving more emphasis to values near the center of the window while gradually reducing the influence of outliers. This method is particularly useful for environments where RSSI fluctuations follow a normal distribution, as it effectively removes high-frequency noise while preserving important signal variations. The algorithm has been tested and used in various relevant works.
A dataset comprising measurements at distances of 0.5 m, 1.5 m, and 2.5 m is used to evaluate the efficiency of the filtering methods. The measurements are collected in an empty space, ensuring that the received signals—both raw and filtered—are as stable as possible. For the WMA and Gaussian filters, a window size of 20 samples is applied, as previously mentioned. To determine the optimal window size, a parameter search was conducted in the range of 1 to 30 samples. As expected, greater window sizes generally result in higher accuracy, due to the dataset’s inherent stability. However, because the system is intended for near real-time tracking, using large window sizes is not sensible, as it affects its responsiveness. Given that the beacons provide 10 samples per second, a window size of 20 results in a position update every two seconds. Moreover, as illustrated in
Figure 12, the Root Mean Squared Error (RMSE) reduction between window sizes of 20 and 30 is only 2.5 cm (WMA at 2.5 m), which is considered an acceptable trade-off.
The final decision for filter method selection was made based on a detailed comparison of both their respective low Mean Squared Error (MSE) and variance across the sampled distances, as presented in
Table 5. Starting with the distance of 0.5 m, all three filters—Kalman, Weighted Moving Average (WMA), and Gaussian—exhibit comparable performance, with MSE values around 3.45 × 0
−3 and decreased variance, showing effective noise suppression capabilities.
As distance increases, though, the performance divergence becomes more obvious.
At 1.5 m, the Kalman filter indicates marginally better MSE (4.57 × 10−2) when compared to Gaussian and WMA, but it comes at the cost of a moderate variance (6.84 × 10−3). In contrast, the Gaussian filter preserves a balanced performance between accuracy and stability, with MSE of 4.73 × 10−2 and a lower variance than the Kalman, suggesting more robust behavior under increased signal uncertainty.
The most significant outperformance emerges at 2.5 m, where the Gaussian filter achieves the lowest MSE (4.90 × 10−1) and the lowest variance (6.75 × 10−2) among the three filters. This indicates its effectiveness in handling noisy, long-distance signals, in which multipath interference and environmental noise tend to degrade reliability and stability.
Finally, when averaging across all distances, Gaussian yields the lowest mean MSE (1.80 × 10−1) and variance (6.46 × 10−2), signifying its overall effectiveness. On the other hand, Kalman, while it performs adequately at shorter ranges, accumulates higher average errors at greater ones, making it a less suitable option. In conclusion, the Gaussian filter offers the optimum balance between error minimization and output stability across all tested distances. Its performance, especially at larger distances, where filtering becomes more demanding, makes it the most effective filtering solution.
In order to further showcase the reasons that the Gaussian filter is selected, a comparative plot including the row and filtered signals at different distances (0.5, 1.5, and 2.5 m) and the same scenario is presented in
Figure 13. We observe that there are some points where a signal has spikes that interfere with another signal and negatively affect its structure. For this reason, we applied filters to normalize the sample to make it more distinct. From the filters applied, we ended up with three that had the best results and are depicted in the middle of each signal: Gaussian (orange), Kalman (blue), and Weighted Moving Average (pink). We observe that the WMA filter responds faster and makes abrupt changes in the signal compared to the Gaussian filter, where the change occurs more smoothly (this is more obvious in the area between 200 and 400 in the X-axis of the sample and at a distance of 1.5 m). On the other hand, the Gaussian manages to make smoother changes when there are fluctuations in the signal, and in this way, we can have a smoother transition (this is observed more at the distance of 2.5 m between 150 and 200 of the
X-axis).
6.4. Position Estimation
The evaluation of the overall localization system is performed in the surrounding area of AAL House (
Figure 11), a controlled indoor environment specifically designed for testing ambient assisting living technologies. Measurements were carried out across four separate paths that cover representative sections of the environment, including corridors, open spaces, and areas with moderate furniture density, as illustrated in
Figure 14. Each path was segmented to enable a detailed analysis of system behavior under different spatial configurations. The left part of the figure displays the actual trajectory, whereas the right part provides a visual comparison between the predicted trajectories produced by the proposed localization system and the corresponding ground truth data.
The accuracy of the proposed localization system is assessed using the Root Mean Square Error (RMSE) and the mean localization error as quantitative performance metrics. The results of the localization system estimates are illustrated in
Table 7.
To evaluate the performance of the localization system, we conducted 15 independent test rounds across the same set of routes. Among them, Route 1 (blue lines) demonstrated the highest average error (mean error = 0.62 m; RMSE = 0.73 m), yet its relatively narrow confidence intervals indicate consistent, though less accurate, performance. It is noted that this elevated error level observed regarding Route 1, compared to other routes, is likely attributed to a greater number of static and dynamic obstacles present along Route 1, which can cause signal attenuation and multipath effects, reducing the localization accuracy. However, this reduction remains within the acceptable ranges for indoor localization applications. In contrast, Route 2 (red lines) produced the lowest error values (mean error = 0.51 m; RMSE = 0.58 m), coupled with tight confidence bounds—signifying both high accuracy and reliability. This performance can be explained by the absence of significant obstacles along Route 2, allowing for direct line-of-sight communication between the nodes and minimizing signal degradation. Route 3 (green lines) exhibited the widest confidence intervals for both metrics, revealing high variability in system behavior, caused by closely spaced obstacles. Finally, Route 4 (orange Lines) performed comparably to Route 2, with error levels slightly higher but still within a reliable range.