Keywords

1 Introduction

According to the World Health Organization (WHO), nearly, 1.35 million people are dying every year due to road traffic crashes. These crashes cost 3% of the gross domestic product for most countries. WHO’s global status reports on road safety emphasize the need for strong policies, smart road design, enforcement, and technological developments as preventive measures to help in reducing road incidents [12]. Collision detection is one of the most significant as well as the challenging safety application. The common causes are over speeding and exceeding safety distance. In the present time, VANET applications enable the rapid exchange of awareness and safety messages among the connected vehicles, help to reduce collisions [8].

VANET can connect vehicle-to-infrastructure (V2I), vehicle-to-vehicle (V2V), and vehicle-to-everything (V2X) [2]. So to address its complex nature, a simulation testbed is needed to provide precision and repeatability of the test cases mimicking the real-time events and study their capacity and capabilities. Simulation testbed not only reduces development and testing periods but also very economical and boosts rapid development cycle. These computerized simulations for communication networks are offered by softwares such as network simulator-1, ns-2, ns3, and OMNeT++; driving testbeds are CORSIM, PARAMICS, VISSIM, and SUMO. Here, collision scenarios are simulated on the SUMO software and collision detection algorithm designed under the supervision of vehicular network on OMNeT++. We choose SUMO and OMNeT++ simulators as they are open-source applications with robust performance [9].

2 Literature Survey

Vehicular network research started around 2000 in the scope of increasing traffic safety. Connected vehicular networks are an extensive part of building an intelligent transportation system. Author Validi’s paper focused on study of VANETS in combination with traditional vision-based sensors for quick and reliable safety features [7]. In urban areas, with increased traffic flow, there is a need for smart methods for handling traffic to avoid accidents. So, author ‘Senthil Kumar Mathi’ proposed a model to monitor and regulate the traffic flow at intersections through RSU to alert the driver with upcoming dangers like collisions [1].

Author ‘Rajeswar Reddy’ developed traffic simulation in SUMO and communication network in OMNeT++, so vehicles can communicate with a RSU in a V2I fashion. He concluded that, with increase in density of traffic the communication network will be busy, which may lead to loss of data and delay in communication [3]. Author ‘Sivraj P’ studied Wi-Fi, DSRC, and modified DSRC communication protocols for VANETs on SUMO and NETSIM. He analyzed that among the other variants modified DSRC with IEEE 802.11 g is having good performance [2, 10].

3 Methodology

The papers mentioned in the above literature survey section focused mainly on the study of comparison on various technological solutions for vehicular networks for enhancement of safety and comfort of the vehicle and its occupants. The work done to understand the specific road events such as different collision scenarios and the system behavior for these collisions at various speeds, traffic conditions, and road conditions are minimal. In this work, we used V2I communication through DSRC protocol to establish a vehicular network. RSU connected automatically to all the vehicles entering the vicinity of this communication range. This RSU is part of infrastructure that receives the CAM from vehicles showing their speed, position, and heading direction. We implemented a sophisticated collision detection algorithm in RSU to detect the collision chances using CAMs. And recorded the time taken for detection of collision to generate an alert or control action halt. We identified the collision scenario where the collision detection is fastest. This whole scenario is to be simulated using the below software tools [1, 6, 9].

  1. 1.

    Python 3.8,

  2. 2.

    Simulation of urban mobility simulator (SUMO),

  3. 3.

    Veins (integrated solution),

  4. 4.

    OMNeT++ (network simulator).

SUMO for Traffic Simulation

In SUMO, we imported real-world road maps and simulated traffic conditions to replicate the roads and road infrastructure like traffic lights, one-way, and two-way lanes that can accommodate denser and less dense traffic conditions, also integrated with other network simulator OMNeT++ and an integration simulator veins to provide a vehicular network for simulating connected vehicles on realistic traffic demands and incidents. To simulate traffic mobility in SUMO, we needed two inputs, they are street network, i.e., map and traffic demand, i.e., vehicle routing as shown in Fig. 1.

Fig. 1
figure 1

Flowchart for simulation of road traffic

In SUMO, there are three ways to generate these road maps, they are possible by

  1. (i)

    Using ‘netgenerate’ command, we compiled the subscripts that contain information of lanes, junctions, etc., to generate road network file.

  2. (ii)

    ‘NETEDIT’ is a visual network editor; offers powerful select, edit, and highlight capabilities for user defined road and traffic designing.

  3. (iii)

    Using ‘netconvert’ command, we converted real road maps imported from external source like OpenStreetMap database into network files (Fig. 2).

    Fig. 2
    figure 2

    Creation of network file—defines road map

We generated the road network and added traffic flow to create an active map with moving vehicles by compiling the network file(net.xml), demand file(.route.xml or trips.xml), and poly files(.poly.xml) to generate a SUMO executable configuration file with extension.sumo.cfg. We can visualize it by running it on the SUMO-GUI interface. Figure 3 depicts the real-world roads with traffic lights [11].

Fig. 3
figure 3

Real-world traffic network

Collision Simulation

Through the SUMO application, we designed road maps and generated the traffic entities. Now, we need to simulate the collision events to test the communication protocol on network simulator OMNeT++ software. SUMO software is a controlled environment that automatically detects any malicious events and controls the traffic to make it free of collisions. Therefore, the following operations we achieve vehicular collisions:

  1. (i)

    Halt vehicle on edge (lane) and route another vehicle on the same route, cause a rear-end collision

  2. (ii)

    Add variable speed signs to the edges (lanes), causing ambiguity in vehicle routing and leads to accident scenarios like intersection collisions, etc.

  3. (iii)

    Add variable speeds to vehicle definition and make overtaking scenarios that lead to a collision.

  4. (iv)

    Set the minimum gap parameter of SUMO, so whenever the gap between the vehicles reduced below the minimum gap, collision is detected.

After identifying the collision, SUMO provided a scope to take actions like warn, stop, and remove a vehicle to identify the collision. In Fig. 4, vehicle collision is indicated by a warning message in red color. This warning contains information about vehicles involved in a collision, minimum gap between them, lane identity, and type of collisions. We are able to succeed in simulating intersection and rear-end type collisions. In the warning message, rear-end collision type is specified as a move for stage parameter and intersection collision is identified with the same name [8].

Fig. 4
figure 4

Collision events in SUMO-GUI interface

To implement a collision-free algorithm in network simulator, we need vehicles information. As SUMO can also connect to the other software through traffic control interface (TraCI), it helped in controlling the simulation of road traffic and getting FCD data during runtime to share it with the network simulator through a middleware framework called veins [6].

OMNeT++ for Network Simulation

OMNeT++ is an event-based network simulator, and it can prototype vehicular networks to communicate with road traffic simulated on SUMO using the veins a middleware framework. Veins will enable SUMO’s traffic network models to work under the influence of OMNeT++ communication network as shown in Fig. 5. OMNeT++ offers a platform for implementing and re-using existing communication protocols, and it also supports automotive communication standards. So we can build a compatible and reliable vehicular network. [8] We developed a wireless network with dedicated short-range communication (DSRC) in V2I fashion by specifying medium access control (MAC) layer with IEEE 1609 standard and physical layer with IEEE 802.11p standard [3].

Fig. 5
figure 5

SUMO and OMNeT++ interface with veins

Messages are exchanged between RSU and vehicles within the maximum interference distance range of 2600 m. RSU will get the speed and position information as cooperative awareness message (CAM) from vehicles. The algorithm shown in Fig. 6 checks the chances for collision through current vehicle’s position and speed as inputs, represented by vectors × 0 and v1, and takes previous inputs in B. Initialize the set C for holding the vehicles that are to be collided with the current vehicles and calculated the current vehicle’s position for its changeover time. Every vehicle generated CAM that is to be received by the detector. The algorithm assigned this CAM to CAM b ∈ B (mapping messages with current vehicles). The vehicle’s position over time and calculated the difference between this vehicle and the current vehicle d(t). We computed d(t) as scalar by taking it as squared value of distance d(t), i.e., D(t) = |d(t)|^2. We must look for D(T) minimum value over time t; now take time t where D(t) is at its minimum value. If t < 0, vehicles are moving away from each other, it means there is no chance of collision. Else the vehicles are moving toward each other. Then, take distance d between vehicles. Check if the d value is lower than the dmin threshold. If so, then add b to C, i.e., mapping alert to the collision vehicles set, b identifies the vehicles to send alert message, that will be involved in the collision and sends an alert before the collision happens. In our scenario, we are sending a message to halt vehicles for 50 s [5, 6, 9].

Fig. 6
figure 6

Flowchart of collision detection

4 Results

Veins support parallel execution of traffic mobility on SUMO and vehicular network on OMNeT++. Red signals on vehicles indicate the threat of collision as depicted in Fig. 7 and 8.

Fig. 7
figure 7

Vehicular network on OMNeT++

Fig. 8
figure 8

Mobility model on SUMO-GUI at run time

On detection of a collision, RSU sends a message to vehicles and halts for a time duration of 50 s, at their current position to avoid accidents. Figure 9 shows the position of vehicles for time graph. Constant straight lines depict that the vehicles are in a halt state.

Fig. 9
figure 9

Vehicles position versus time plot

For any communication network, its reliability is highly dependent on data (packets) delivery time and data transfer, without any losses and delays. Here, we measured network reliability through packet delivery ratio (PDR), which tells how much percent of data packets received out of all the data packets transferred [4].

$$ {\text{PDR}} = \frac{{{\text{data}}\,{\text{packets}}\,{\text{received}}*100}}{{{\text{data}}\,{\text{packets}}\,{\text{transmitted}}}} $$

We got a maximum of 86% PDR. We calculated it by accessing the network performance data generated after complete execution. In Fig. 10, bar chart of the total received packets by individual nodes (vehicles) is plotted. In Fig. 11, bar chart of total lost packets by individual nodes (vehicles) is plotted. We took average values of all those parameters to compute PDR.

Fig. 10
figure 10

Bar chart of total received packets

Fig. 11
figure 11

Bar chart of total packets lost by vehicles

The average time delay for our vehicular network is calculated by taking the variation in total busy time and channel busy time between RSU and individual nodes (vehicles). The average result is 200 ms. Figure 12 illustrates the bar chart of a busy time for the vehicles.

Fig. 12
figure 12

Bar chart of busy time for vehicles

5 Conclusion

This paper aims to prevent or minimize the impact of vehicle collisions using vehicle-to-infrastructure fashioned VANET technology. We simulated traffic collision scenarios on traffic mobility application SUMO, communication network with collision detection algorithm on OMNeT++ network simulator, and created the VANET functionality by integrating the OMNeT++ communication network to simulated traffic environment on SUMO via veins. We achieved supervisory control over the vehicles within the network range through an exchange of messages between the roadside unit and vehicles. We used standard wireless DSRC protocol to communicate the data. We computed the reliability of the network through PDR and average time delay for an individual vehicle to the roadside unit channel. We attained 86% PDR and 200 ms for average individual time delay for vehicles. We improved PDR for this proposed VANET more than the existing methods [4]. This scenario was effective for short to medium range applications, as vehicles exceeding the network range, communication is lost. To extend the range, we can strategically place multiple RSUs on lane starting and ending based on high-probability accident zones.