# Voice Assistant Application for Avoiding Sedentarism in Elderly People Based on IoT Technologies
## 4 Case Study and Results
### Test Results
#### 4.2.2 User Proximity Detection  
For the user proximity detection, three different RSSI signal filters have been applied--average, median, and Kalman--which were described in detail in Section 3.3.1 so that they can be compared with each other and with the case of not using any of them.  
To study the effectiveness of the filters, RSSI values were taken with the antenna pointing towards the smart bracelet at different distances. The approximation of the distances was obtained from the signal intensity based on the path loss model (Equations (1) and (2)). The statistical distribution of the RSSI samples obtained at different distances can be seen in Figure 6, where the raw values obtained are shown on the left and their distance estimation with a box of the same color on the right; it can be seen that the quality of the measurement decreases as the distance increases with increasing error and deviation, so that each time the estimated distance is less accurate.  
Since one of the requirements to be met by the system is that it should be as reactive as possible, and considering that the reactivity of this type of smart bracelet is not always optimal, narrow frame sizes were used in the filters average (\(n=3\)), median (\(n=3\)), and Kalman (\(n=2\)). The results of the tests at fixed distances are shown in the Figure 6, where each color shows a distance. As also shown in the Figure 7. Application of the filters at different distances. at a greater distance we find a greater error.  
To test the behavior of the system when the user wearing the smart bracelet is in motion, the experiment shown in the Figure 8 was performed, where the individual moves at a constant speed of 1 m/s, first approaching and then moving away from the ECD. This shows how the perceived distances vary as a function of time in each of the three filters and the raw values with respect to the ideal values.  
Figure 5: Result of modification of the step challenge.  
From the graphical results obtained and the tests carried out, although the filters help regulate the noise of the actual RSSI, it can be concluded that they do not ensure the quick reactivity of the system in the vast majority of cases. This is clearly seen in Figure 8, when the user starts to move away, the filters may indicate that s/he is standing at the wrong position or still approaching, for example, around 5-6 s, when the direction is reversed, and the reaction of the filters is delayed. In this case, it is important to note that a constant speed is assumed and that correct readings are obtained every second, which does not usually correspond to a typical real case, in which the user would move faster and the delay would be greater. If the speed were to be increased, the delay in the filters would be  
Figure 6: RSSI samples obtained at different distances.  
Figure 7: Application of the filters at different distances.  
even greater and therefore the error would be higher. As mentioned above, it is important that the system is reactive and notifications are made when the user is in close proximity. In this sense, unfortunately, the use of filters would make this task more difficult. Therefore, for the study it has been decided to use the raw values of the distance in order to generate a quicker and more direct response.  
However, as can be seen from the data in Figure 5, the accuracy is high when the smart bracelet is less than 2 m away. This has been the distance considered to univocally detect the presence of the user.