*Modified AODV*

In this study, we proposed an improved AODV routing protocol for VANETs by introducing two optimization steps: (1) a route discovery phase and (2) a route selection phase. The current location, speed, and direction information about vehicles is included for performance optimization while keeping the E2E delays to a minimum. We assumed a Manhattan model in our research experiment environment. In this model, a vehicle can go straight with 50% probability and left or right, with a 25% probability each. We also assumed a highway model where the vehicles can move in the opposite direction. The AODV packets carry more information on each vehicle to keep the other vehicles more up to date about each node on the road. We assumed automated cars with automated cruise control and wireless sensors will be used to prevent accidents. Therefore, the RREP and RREQ packets now have three pieces of information: velocity, direction, and position of each source node. The routing table in the vehicles is updated with this information so that all of the nearby vehicles can be known to each other.

This method will certainly not increase the size of a packet. However, the direction information will provide more filtering options (to make the route more stable) for the vehicles. In our model, we have assumed two di fferent situations:


The RREQ packet format is changed in a modified AODV so that the reserved eight bits can be used for assigning the direction in which the source is moving in terms of the degree of rotation with reference to the equator. Therefore, each node of the network has the direction information along with the location of the destination. In the case of an accident, the information can be filtered and prioritized. This information will be given to the cars moving in the same direction and close to the accident. Therefore, the accident information will be passed to the nearby nodes with more ease.

The RREQ message format is presented in Figure 2, and the fields include [15]:



**Figure 2.** RREQ message format.

*J. Sens. Actuator Netw.* **2020**, *9*, 40

The nearest node is calculated using the Pythagoras formula. If the location of node *A* is (λ1, ϕ1) and the location of node *B* is (λ2, ϕ2), then the shortest distance between them is calculated as [16]

$$d = 2R\sin^{-1}\sqrt{\sin^2\frac{(q\_1 - q\_2)}{2} + \cos q\_1 \cos q\_2 \sin^2\frac{(\lambda\_1 - \lambda\_2)}{2}}\tag{1}$$

where *R* is the earth radius, ϕ is the latitude, and λ is the longitude.

If the latitudes of nodes *A* and *B* are ϕ1 and ϕ2, respectively, the direction between them is calculated as

$$
\theta \, = \, \varphi\_1 - \varphi\_2 \, \tag{2}
$$

In addition, the modified AODV routing table contains the direction information column for each nearby node that will be used to filter the nodes to pass data with little or no delay. Priority will be given to those nodes which have a minimum angle θ. Here, we assume that if the angle is less than 20 degrees, then the nodes are moving in the same direction [4].

## **3. Simulation Environment**

We assessed the performance of the proposed routing protocols in OMNeT++ and used MATLAB ® to analyze the simulation data. Recently, the combination of simulation of urban mobility (SUMO) and OMNeT++ has been used to build the network communication in a VANET. We combined the network with a tra ffic simulator named SUMO, which is used to reproduce the network protocols in the VANET. The mobility of each node in this simulation environment is controlled by SUMO, and the position is forwarded periodically to the network simulator.

In a VANET, the outcomes of a simulation are not entirely reliable and mostly guided by the mobility model in use. In this context, Sommer et al. [17] suggested the necessity for a robust simulation environment for VANETs. This led to the advancement of Veins (vehicles in network simulation) [18]. Veins is an open-source simulation environment that uses two simulators: (1) SUMO for conducting microscopic road tra ffic simulation and (2) OMNeT++ for conducting the network simulation, as shown in Figure 3.

**Figure 3.** Objective Modular Network NESTbed in C++ (OMNeT++) with simulation of urban mobility (SUMO) [16].

The road map for VANET simulation is imported from openstreetmap.org [19] by manually choosing the required region or area and exporting to the .osm option to download a map.osm file. The resultant file is an XML file with an OpenStreetMap-defined region. We used Java Open Street Map Editor (JOSM) to edit the map.osm file manually. Apart from the road network, the imported and edited map.osm also includes other information, such as rivers, walkways, power distribution lines, bicycle routes, parks, and other features that are outside the scope of this study. A brief description of the simulation tools used in this research is given below:

## *3.1. SUMO*

Simulation of Urban Mobility is an open-source tra ffic simulation software. When a vehicle or node moves through a given road network, SUMO can handle a given tra ffic demand and permits addressing a large set of tra ffic scenarios. In SUMO, each vehicle is modeled explicitly, having its own route, and moves autonomously through the system. There are also several alternatives to introduce randomness to the simulation [20].

## *3.2. JOSM*

Java Open Street Map (OSM) Editor, a desktop application, was developed by Immanuel Scholz. It is currently maintained by Dirk Stöcker. It is an open street map for a JAVA platform that supports loading standalone GPS tracks from an OSM database to load and edit existing nodes. The imported map.osm also includes other information (e.g., rivers, walkways, power distribution lines, railway networks, and bicycle routes, etc.) apart from the road network. In this study, JOSM was used to edit the map. We delete unnecessary nodes; and, if required, we add new nodes with new routes and infrastructures to the simulation environment. Therefore, the final map.osm file contains only the road network and infrastructure that are necessary for the simulation environment [21].

## *3.3. OMNeT*++

Objective Modular Network NESTbed in C++ is a discrete event simulator. It is used for modeling wired and wireless communication networks as well as microprocessors, multiprocessors, and other distributed or parallel computing systems. It is based on the C++ language, and it consists of di fferent basic modules that communicate with each other by passing messages among them. These basic modules are used to create larger modules [22].

The Network Description (NED) language is used to simulate models in OMNeT++. The component modules described in this language can be assembled to create a compound (system) module. Models written in NED can be simulated by one of the network simulators, such as MiXiM [23], INET [24]/INETMANET [25], or Veins [26]. Veins is the open-source vehicular network simulator. The execution of a model by Veins is controlled by OMNeT++ while interacting simultaneously with a road tra ffic simulator (SUMO). Various submodules in Veins take care of setting up, running, and monitoring the simulation.

When performing intravehicular communication (IVC) evaluations, both tra ffic and network simulators run in parallel since they are connected via a Transmission Control Protocol (TCP) socket. This communication network protocol is known as Tra ffic Control Interface (TraCI) [27].

The vehicle movement in SUMO is directed by the movement of nodes in an OMNeT++ simulation environment. We have also used Plexe [28] for the movement of an automated vehicle in OMNeT++. Plexe is an extension of Veins in OMNeT++. It allows realistic and accurate simulation of the automated car. It structures real-time vehicle dynamics and several cruise control models, enabling the implementation of large-scale and mixed scenario control systems along with di fferent networking protocols.

## **4. VANET Component Model**

The following are some of the essential models of VANET components that were used in the simulation.

## *4.1. Two-Ray Interference Model*

The Two-Ray Ground Reflection Model is a radio propagation model used to predict the path losses between transmitting and receiving antennas of the nodes. The received signal has two components: the line-of-sight (LOS) component and the multipath component, which is formed by a single ground-reflected wave. This model considers the impact of both the direct path and the ground reflection during information propagation. The path loss is included to model the propagation of information in the vehicular network. The received power is

$$P\_{\mathcal{T}} \propto \frac{1}{d^4} \tag{3}$$

where *d* is the distance between the transmitting and receiving antennas.

For any nonlinear (not smooth) unobstructed stretch of road, depending on the distance, the transmission faces constructive or destructive interference for its ground reflection. The two-ray ground model only considers that path loss increase for distances over approximately 900 m. Therefore, to capture ground reflection, VANET is comprised of a Two-Ray Interference model [29].

## *4.2. Obstacle Shadowing Model*

The signal shadowing e ffects are heavily impacted by radio transmission. Therefore, obtaining the real signal is important in VANET in both urban and suburban areas, where buildings and infrastructure block radio propagation. In the simulation, we include a calibrated and validated obstacle shadowing model against realistic obstacle measurement [18]. This model accurately captures the e ffect of blocking transmission by large buildings. In other words, while strong transmissions can be hindered by the presence of infrastructure in the line of sight, weak transmissions can be blocked by something as small as a short wall.

## *4.3. Adaptive Cruise Control (ACC) Model*

An ACC system o ffers driver comfort and ease by providing cruise control in a high mobility tra ffic environment. Adaptive cruise control systems improve highway safety. About 94% of highway accidents occur through human error [30], while a small percentage of highway accidents are caused by equipment failure or weather conditions (such as slippery roads). Since an ACC system possibly decreases driver liability and changes driver function with an automated process, it is estimated that the implementation of an ACC system will reduce the number of crashes and hazards [28] on the road.

An ACC system with two modes of steady-state operation (i.e., speed control and vehicle spacing control) is shown in Figure 4.

**Figure 4.** Adaptive cruise control (ACC) with vehicle [28].

## *4.4. Roadside Unit (RSU)*

Roadside units are essential nodes to provide communication support between vehicles. This support may be in the form of reporting an accident, safety warnings, and tra ffic congestion. A model of an RSU is shown in Figure 5. Each RSU is equipped with a network interference card (NIC) and the application layer software, appl. The NIC unit also includes the AODV router.

**Figure 5.** Roadside unit (RSU) model.

## **5. Results and Discussion**

To compare our results with published articles, we used the map of Erlangen in SUMO to generate the traffic information. This map is used primarily in VANET simulations in most of the state-of-the-art methods. The mobility model was generated using OMNeT++, and then the simulations were run by varying the number of vehicles. The simulation was run 20 times to have a statistically significant output.

Figure 6 shows the roads and the existing infrastructure of the area. The black lines are the roads, and the red-colored areas indicate the infrastructure.

**Figure 6.** View of Erlangen map in SUMO.

The simulation result in OMNeT++ is shown in Figure 7, where the blue dots are the moving nodes in the same area in SUMO. A summary of the simulation parameters is provided in Table 1.

The percentage of packet loss versus the number of cars is presented in Figure 8. It can be seen from the plot that the packet loss increased with an increase in the number of cars.

**Figure 7.** Simulation in OMNeT++.

**Table 1.** Summary of simulation parameters.


**Figure 8.** Percentage of packet loss vs. the number of cars.

The throughput vs. the number of cars is shown in Figure 9. It can be seen from this graph that the throughput increased with the number of cars due to the high network activities with more cars.

**Figure 9.** Throughput vs. the number of cars.

We examined the performance regarding packet loss and packet delivery ratios during the simulation; and the results are provided in Table 2 with 100 nodes and in Table 3 with 200 nodes, along with the results of other methods [4–6,9]. In both cases, the inclusion of the direction parameter outperformed the others by about 1.3% under the same environmental conditions.

**Table 2.** Percentage of packet loss with 100 nodes.



**Table 3.** Percentage of packet loss with 200 nodes.

The comparison of an average E2E delay is presented in Table 4. As shown, our method displayed a decrease of 11% in delay compared with the other methods.



The improved performance is the result of using two filtering steps in route discovery and route selection procedures. In this case, each node has the most updated routing information; therefore, it also has fewer broken links. The packet drop rate and end-to-end delay also decreased due to a lower number of broken links in a stable route. These processes also reduced the number of RREQ and RREP messages, which increased throughput.

## **6. Conclusions and Future Work**

In this research paper, we simulated the performance analysis of VANET using OMNeT++ and SUMO by collecting the map from OpenStreetMap. We modified the AODV routing protocols to reduce the number of RREQ and RREP messages by adding direction parameters and two-step filtering. The two-step filtering process reduced the number of RREQ and RREP packets, reduced the packet overhead, and helped selection of the stable route. We also compared the performance metrics in terms of E2E delay, packet delivery ratio, and throughput with other state-of-the-art techniques.

The inclusion of direction parameters along with two-step filtering in route discovery and route selection procedures reduced the average end-to-end delays and packet loss by 11% and 1.3%, respectively, as compared to other state-of-the-art methods. We also found an improvement in throughput that was due to the combined effect of direction parameters and filtering in the same direction to find the stable route, which reduced the packet loss during communication. Therefore, the proposed method increases the QoS in VANET, providing more safety on the road.

In our future research, we will study and propose new protocols that might help to improve the performance of protocols such as dynamic source routing with a grid or geographic location service protocol for VANETs concerning road safety in real-time applications.

**Author Contributions:** Conceptualization, methodology, software, and preparation of original draft by A.A.; supervision, review, recommendation for changes, and editing by H.V. All authors have read and agreed to the published version of the manuscript.

**Funding:** The APC is funded by the Department of Electrical and Computer Engineering, University of Nebraska-Lincoln.

**Conflicts of Interest:** The authors declare no conflict of interest.
