# Road-Side Unit Anomaly Detection
## 3 RSU Failure Detection
One way to determine whether the packet was sent or received by the vehicle without looking at the source address is via radiotap. The difference between a sent and received packet is the format of the signal intensity; in the first case, it is denominated transmission power and concerns the signal power that was used to send the packet from the vehicle, whereas in the latter it is denominated antenna signal and concerns the transmission power at the moment of reception of the packet by the test vehicle. We then need to identify which packets were sent by an RSU in contact with the vehicle. Assuming that each RSU has sent at least one CAM, we search through all CAM instances for the field station-type. The station-type of a vehicle is equal to 5, whereas that of an RSU is equal to 15. We can therefore identify all CAMs that were sent by RSUs and save their MAC addresses. We use the MAC address rather than the CAM's station-ID for identification because the station-ID is supposed to change every 10 min, whilst the MAC address remains static during the experiment. An RSU could also be identified through its positioning. A vehicle moves, whereas an RSU remains static; therefore, if a station does not change its location in the C-ITS stack in  
Figure 5: Radiation Diagram for a Directional Antenna: (**a**) vertical plane and (**b**) horizontal plane. all records, it is assumed to be an RSU. Concerning the pcap dataset, and so far, we verified that all static position stations have sent at least one CAM with a station-type of 15. A vehicle is assumed to be under the coverage of an RSU once it starts receiving packets from it until it stops. This method may give false indications as the vehicle could leave the coverage area and enter once again, having thus two coverage periods or more and still be considered as one single coverage. This verification is however not needed since we only consider the packets sent by an RSU in the analysis and the coverage remains irrelevant for the study topic. The comparison between the ID and OD is also taken from the absolute point of view (meaning, as one coverage). Therefore, coverage from the point of view of the vehicle as a metric is dismissed. To calculate the ID and OD from the pcap files, the Euclidean distance \(D\) between two points on the Earth's globe is given by:  
\[D=6378\times arccos[(sin(lat_{1})\times sin(lat_{2}))+cos(lat_{1})\times cos( lat_{2})\times cos(lon_{2}-lon_{1})]\]  
where 6378 is the radius of the Earth in kilometers, \(lat_{1}\) and \(lon_{1}\) are the longitude and latitude of the first point, and \(lat_{2}\), \(lon_{2}\) are those of the second point. Each figure from Figures 6-8 represents a set of captured packets by the vehicle from the RSU during the vehicle's travel in the area of coverage. Each packet is represented by the tuple (range, signal), where red dots represent the distance of the packets and blue dots represent their signal intensity. In order to correlate them, both these variables were normalized between zero and one. Overall, and for the ITS-G5, packets were captured from 23 RSUs from France, Germany, and Italy. These RSUs are located both in urban and interurban locations. Since the presence of buildings and other factors in the urban context causes signal attenuation, the RSU's range can be modified by these factors. Therefore, we chose the interurban context for the comparative study of the RSUs. When analyzing the data, we have observed several characteristics concerning the properly functioning RSUs. Mainly, that the ID is usually larger than the OD, which is validated by [12]. This particular behavior can be observed in Figures 6 and 7, which concern two proper functioning RSUs both in France; the first one is located in Reims which is in the north eastern part of the country and the second one in Saint Maurice in the suburbs of Paris. Figure 8 represents the behavioral profile of a defective RSU located in Reims. This RSU is bidirectional but behaves as a uni-directional one.