# A Proof-of-Multiple-State Consensus Mechanism for Mobile Nodes in Internet of Vehicles
## 6 Simulation Results  
The simulation experiments in this paper are conducted based on the OMNET platform, incorporating the urban traffic simulation software SUMO ([[https://sumo.dlr.de/docs/index.html](https://sumo.dlr.de/docs/index.html)]([https://sumo.dlr.de/docs/index.html](https://sumo.dlr.de/docs/index.html)) (accessed on 16 April 2024)) to complete the visualisation function of the network, to simulate the process of message passing in a complex scenario of multi-vehicle movement at a certain speed, and to analyse the performance of the proposed blockchain and PoMS consensus. The vehicle mobility model used in this simulation is the Freeway model proposed in [28], where the vehicle is limited to the driving road and the vehicle speed relationship can be expressed as:  
\[v_{i}(t+1)=v_{i}(t)+random(\ )*a_{i}(t) \tag{19}\]  
where \(a_{i}(t)\) represents the acceleration constant of vehicle \(i\) at time \(t\), which is consistent with our analysis above. In our initial setup, the vehicle sends message packets every 0.1 s, and a total of approximately 2000-4000 message data will be sent during the simulation duration. Each message contains a data volume of 512 KB. For vehicle nodes that frequently send information, the simulation uses the MAC protocol to control the forwarding of message packets at the Data Link Layer, which prevents message conflicts between vehicles. In the network simulation environment, the value of the neighbourhood node threshold nrange of the vehicles is kept below 40 in the experiments and the density of the vehicles within the whole map is kept at 100 nodes/km\({}^{2}\), which is set according to the derivation in the literature [29] to ensure that the vehicles can remain free to drive during the simulation without being blocked due to the over-dense traffic. The results obtained are the average of 100 simulation runs. Figure 4 shows the probability that vehicle-generated message packets successfully reach their destination at different average movement speeds. The results show that the success rate of data transmission continues to decrease as vehicle speed increases, especially in high-speed scenarios where transmission becomes significantly more difficult. The main reason is that a vehicle traveling at high speed may leave the reachable area of the message before communication is established, resulting in packet loss. For this situation, the relative speed factor is defined in this document. Vehicles traveling at high speeds in the opposite direction receive lower campaign weights to reduce the likelihood of communication equipment failure. In low-speed scenarios, the consensus mechanism proposed in this study performs slightly better than other approaches. Especially in the high-speed scenario, the relay nodes using the PoMS algorithm perform better than PoET in literature [27] and TIA in literature [30], although the packet loss rate still inevitably increases. This is attributed to the fact that the algorithm takes into account the speed fluctuations and effectively avoids the problem that the distance between nodes exceeds the communication range due to the speed difference, thereby performing well in terms of transmission efficiency. Figure 5 shows the effect of vehicle speed on node consensus delay. Higher speed increases the difficulty of selecting the relay node, which in turn increases the time required for the consensus process. With the same number of nodes, the PoMS algorithm is able to complete the consensus process in less time and with higher quality at different average speeds. This is due to the algorithm's prediction of speed fluctuations, which effectively resists the effects of driving state  
This allows PoMS to filter out better relay nodes within a fixed communication distance to ensure a more stable and reliable connection. At high driving speeds, the consensus time of PoMS is reduced by an average of 13.3% compared to the method in literature [26].