# Reputation and Trust Approach for Security and Safety Assurance in Intersection Management System
## 4 Empirical Study
### Software Simulation
#### 4.1.1 Experiments Setup  
Movement  
* Testing ground: \(10\times 10\) elementary sectors; 4 lanes for AVs driving: 2 vertical (oncoming and passing), 2 horizontal (oncoming and passing); an example of the software testing ground is represented in the Figure 1.
* MAVs can drive in any direction within the roadway, according to the direction of the roads.
* On the testing ground, the probability of the appearance of new MAVs is given in advance, while the number of appearing MAVs is determined randomly.
* MAVs speed is constant and equal to 1.
* The testing ground is spatially limited.
* In the case more than one MAVs pretend to be in the same elementary section contemporaneously, the MAVs give way to each other, taking into account the maximization of the intersection capacity, as in Equation (13): \[\begin{cases}Y=\frac{\sum_{l=1}^{L}\sum_{j=1}^{N}\sum_{i=1}^{M}n_{lji}}{M}\\ n_{lij}=\begin{cases}1,\text{if }\text{with MAV is situated at the }i\text{th discretized time segment on the }l\text{th elementary sector}\\ 0,\text{ otherwise}\\ n_{lji}\
eq n_{lji+1}\\ Y\to max,\end{cases}\] (13) where \(N\) is the number of MAVs, passing the intersection; \(L\) is the number of elementary sections at the intersection; and \(M\) is the number of discretized time segments, for which \(N\) vehicles passed the intersection.  
Simulation Organization
* The experiment was divided into four groups with the probability of a new vehicle appearance with the values equal to 0.25, 0.5, 0.75, and 1, respectively.
* Each experiment group had 1000 tests with a duration of 1000 discretized time segments.  
Reputation Calculation
* The initial value of MAV reputation was set as 0.5.
* The probability that new MAV was a saboteur (could transmit bogus data) was 0.5.
* A saboteur, depending on the situation, could transmit either correct or incorrect data.
* The legitimate MAV also could transmit incorrect data due to technical failures; the probability of MAV technical fail occurrence was set as 10%.
* If the vehicle transmitted incorrect data, then its \(Truth\) value was equal to 0, otherwise \(Truth=1\).
* The MAV was detected as saboteur if its reputation was equal to or less than 0.25; such a strict threshold meant that neither saboteurs nor legitimate MAVs with technical problems should not leave the road, because they can quickly cause traffic collapses and provoke fatal consequences.  
Limitations
* The simulation was conducted in the traffic area without pedestrians.
* No vehicle had the priority except maximum intersection capacity value.
* No external obstacles were situated on the roads.  
Results Validation
* To assess the results, four parameters were calculated: true positive (TP), false positive (FP), true negative (TN), and false negative (FN):
* TP is the case when data transmitted by a MAV were bogus, and its MAV was classified by another group as a saboteur.  
Figure 1: Graphical representation of the intersection in the software simulator, where arrows indicate lane directions.  
FP is the case when data transmitted by a MAV were correct and its MAV was classified by another group as a saboteur. * TN is the case when data transmitted by a MAV were correct and its MAV was classified by another group as legitimate. * FN is the case when data transmitted by a MAV were bogus and its MAV was classified by another group as legitimate.
* Based on the four parameters mentioned above, two classification values were calculated: _Precision_ and _Recall_, as in Equations (14) and (15), respectively. \[Precision=\frac{TP}{TP+FP}\] (14) \[Recall=\frac{TP}{TP+FN}\] (15)