# Road-Side Unit Anomaly Detection
## 3 RSU Failure Detection
Another characteristic of a functioning RSU in this context is that range is inversely proportional to the intensity of the received signal. We verify this relation by calculating the [PERSON]'s correlation coefficient of all records of range and signal during the coverage period. Thus, well-functioning RSUs should give a negative value below a certain threshold. The relationship between distance and the signal intensity of RSUs that are assumed to function well is not perfectly linear, as the factors that contribute to the signal attenuation are environmental such as air quality and the presence of various obstacles. Thus, the inversely proportional relation does not give a [PERSON]'s correlation coefficient that is strictly equal to \(-1\). We therefore chose a certain threshold to determine the RSUs that are behaving properly and those which are not. We also consider that both distances should be superior to 50 m for interurban RSUs; otherwise, it is considered failure. Figure 6 addresses the first discussed RSU in the city of Reims. We can observe here that both characteristics are present. The calculated ID is 1229 m, which is the largest distance recorded in the set, and the OD is 671 m. In terms of the relation between distance and signal, we can observe in the figure that the signal tends to increase when the distance becomes shorter. Therefore, the [PERSON]'s coefficient in this set is equal to \(-0.69\). The RSU in Figure 7 has a lower range than the previous one; thus, fewer packets were captured. But the pattern remains the same and the ID of coverage was calculated to be 407 m, whereas the OD was 300 m. The inverted relation between distance and signal is more visible here, and the correlation coefficient calculated here is equal to \(-0.83\). For the defective RSU in Figure 8, however, the ID is way smaller than the OD. In fact, this RSU is located on the side of the road that the vehicle was traveling on. The first contact the vehicle had with this RSU was after it had surpassed it on the road by around 297 m, which is the recorded ID, while the OD is at 1572 m. The relationship between signal intensity and range is also not as in the case of previously discussed RSUs. We see in the figure that, in the first 300 packets, the signal and range have a direct relationship, whereas in the last packets, the relationship becomes inverted. The Pearson's correlation coefficient for this set is equal to 0.01. This means that the rule of correlation could not be applied in this context. This RSU is definitely experiencing failure. Figure 6: The Correlation between Signal and Distance for a Normal RSU in Reims. Values are normalized between 0 and 1. Figure 7: Correlation between Signal and Distance for a Normal RSU in Saint Maurice (Paris). Values are normalized between 0 and 1. The proposed method to determine failure in the case of omnidirectional and bi-directional RSUs requires to verify these properties:  
* The ID is greater than the OD. * The Pearson's correlation coefficient of the coverage data is less than a certain threshold. In our case, we choose it to be less than \(-0.4\). This value was chosen by assessing the whole list of RSUs (Table 1), given that the smallest Pearson coefficient of a functioning RSU in the interurban context is of \(-0.457\) (RSU number 20). * The coverage should be larger than a threshold, and we chose the threshold to be 50 m. This is a threshold that excludes interurban RSUs in our data and only concerns the urban ones, like RSU numbers 16 and 23, respectively, as seen in Table 1.  
In Table 1 can be seen the summary of all calculations made in regards to the RSUs. For each RSU, its context is given, be it interurban or urban. The max range is given, as well as the ID and OD, and the Pearson coefficient. The RSUs in Figures 6-8 are numbered 4, 8, and 2, respectively.