Ubiquitous Vehicular Ad-Hoc Network Computing Using Deep Neural Network with IoT-Based Bat Agents for Trafﬁc Management

: In this paper, Deep Neural Networks (DNN) with Bat Algorithms (BA) offer a dynamic form of trafﬁc control in Vehicular Adhoc Networks (VANETs). The former is used to route vehicles across highly congested paths to enhance efﬁciency, with a lower average latency. The latter is combined with the Internet of Things (IoT) and it moves across the VANETs to analyze the trafﬁc congestion status between the network nodes. The experimental analysis tests the effectiveness of DNN-IoT-BA in various machine or deep learning algorithms in VANETs. DNN-IoT-BA is validated through various network metrics, like packet delivery ratio, latency and packet error rate. The simulation results show that the proposed method provides lower energy consumption and latency than conventional methods to support real-time trafﬁc conditions.

VANETs have recently provided their users with the means for safety management and data management, where the control methods are designed to work under any circumstances based on network dynamics [5]. On the one hand, the use of centralized [5] and distributed algorithms makes traffic management more complex one regarding the increasing adoption of vehicles in VANETs. On the other hand, the increase in traffic affects urban transport indirectly, and it increases the delay in transportation, fuel consumption, and emission values [6].
Even in real-time with precise traffic flow predictions, the traffic management systems in VANETs often play a vital role in predicting the traffic flow. The Intelligent Transport 1.
In terms of various collision prevention methods, such as packet delivery rate, latency, failure rate, and real-time traffic throughput, the authors analysed the DNN-Internet of Things (IoT)-BA model with existing deep learning models; 2.
The authors devised and updated the routing table to reduce vehicle collision rates in real-time based on the traffic information collected by the IoT agents across the network; 3.
In order to improve VANET routing in a real-time scenario, the authors combined the Deep Neural Network [64][65][66][67][68] algorithm with BA. In regular cases, this ensures optimal routing decisions based on IoT-BA inputs, ensuring better service delivery through the mobile ad hoc networks (MANETs).
The outline of this paper is as follows: Section 2 provides the network model. Section 3 deals with the traffic management model. Section 4 evaluates the traffic management model with existing models. Section 5 concludes the paper. Figure 1 shows the network model under Vehicle-to-Vehicle (V2V) and Vehicle-to-Infrastructure (V2I) entities. The following are the entities used to design the VANET infrastructure [69][70][71][72].

•
Vehicle Unit: VANETs are responsible for communication with nearby vehicles along the highway sector or with the RSUs at the edges/corners in simple terms for transport purposes. VANETs are also responsible for facilitating transport. We used elliptical curve encryption as an encryption algorithm in this paper to generate cryptographic credential information and store it in the vehicle. The Global Positioning System (GPS) is responsible for locating the vehicle inside. In a road segment, RSUs can determine the total number of vehicles using a GPS unit [40][41][42][43][44][73][74][75][76][77] The IoT-BA calculates the traffic density using road segments. In order to obtain road traffic information, the directional connection of TMC to RSUs and other IoT-BAs are used. In order to avoid congestion in road segments, the IoT-BA transfers the collected information to the DNN. The differential between TMC and IoT-BA is that the former is a fixed segment and the latter is a network-wide mobile segment.
The proposed method was tested in an urban scenario that was designed as grids and intersections of roads. The path between any two crossings was considered to connect two or more street segments, such as the segment s(i,j) and intersection I(i) s(i,j), providing a collection of different characteristics, which include road widths and lengths, vehicle traffic density, and the number of roads between two intersections [78][79][80].
The unit has a unique identification number (ID), consisting of the location, direction, and speed of the vehicle. Vehicles automatically accessed the RSU to understand total crossroads, traffic segments, and congestion levels. This study used IoT-BA to provide more precise vehicle information than existing vehicle communication models. The DNN made appropriate decisions by forming the graph G = <V,E> with V in the proposed method, as the intersections between the source, the destination vehicle, and E are considered the road segments connected to intersections in V.
The below definitions can be considered as parameters that append themselves for optimizing the DNN via BA: • Detection range is defined as the communication region between the receiver sensitivity threshold of any two vehicles and the SINR, which are required for payload; • Data Exchange range is defined as the communication region in which the data transmission takes place; • Time before handover is defined as the communication region where the OBU prepares for handover; • Time to handover is defined as the communication region where the actual handover takes place.
The minimum received power is defined as the minimum power a car requires to physically receive the signal from RSUs, which is defined below Min (P R ) = 10 0.1*sat (1) where sat is defined as the minimum signal attenuation. The detection range is defined as the minimum reception power needed to establish communication based on wavelength, transmitter power, threshold, and path loss coefficient Detection Range = (λ 2 max(p))/(16π 2 P R )) 1/α (2) where: λ is the wavelength; max(p) is the maximum level of transmission power; α is defined as the minimum level of a path loss coefficient.
Network Dwelling Time (NDT) is defined as the inverse of mobility leave rate (µ ml ), where a Vehicle Unit (VU) is in the range of RSU, which is given by where: V is the velocity of the VU; P is defined as the Perimeter of an RSU; A is defined as the area of an RSU.

Traffic Management Model
The DNN-IoT-BA traffic management model operates as a driverless assistant system that uses IoT-BA to collect traffic information near the road segments and intersections and acts as a forwarder of data to RSU. The DNN-IoT-BA traffic management system is a distributed graph-based model with a set of vehicles (V) and edges (E). The IoT-BA sends the number of vehicles present in the road segment and the traffic congestion near the intersections and road segments. In the proposed method, VANETs work with the IoT-BA that assists the infrastructure unit and then connects with the vehicle unit for routing operations.

Mobile Agent Unit
The DNN-IoT-BA traffic management system works as an unmanned traffic assistant system that collects traffic information near the roads and intersections with IoT-BA, as a data transmitter to RSUs. A distributed graph-based model with vehicle set (V) and The IoT-BA in the proposed VANET architecture is a dynamic module moving into VANETs and connecting vehicle units with the infrastructure unit. The IoT-BA is made up of four segments: an identification unit, an execution code unit, a path unit, and a space unit of datum. In order to distribute the data packets from the sources of the source to the destination node through cooperative BAs via the selective routing track, the IoT-BA uploads vehicle information onto the DNN.
As IoT-BAs contain a wide range of information, each system has a unique identity. The data of current vehicles passing through a road segment are stored in the cloud, and the routing path is defined by DNN, which is a core indicator of packet transmission. Lastly, the data space stores the data from the car units completely. In this case, it is in the RSU Infrastructure Unit that the DNN routing path is found [68].

Infrastructure Unit
The infrastructure unit is located on the application level, and the routing path can be robustly calculated using the vehicle position and speed via DNNs (DNN architecture with optimization for BA in Figure 2). Figure 2 specifies the workflow of the infrastructure unit.

Mobile Agent Unit:
The DNN-IoT-BA traffic management system works as an unmanned traffic assistant system that collects traffic information near the roads and intersections with IoT-BA, as a data transmitter to RSUs. A distributed graph-based model with vehicle set (V) and edges (E) is the DNN-IoT-BA traffic management model. In intersections and on roads, the IoT-BA sends the total number of vehicles. The VANETs work with IoT-BA in the proposed method, supporting the infrastructure unit and connecting it to the vehicle for routing operations.
The IoT-BA in the proposed VANET architecture is a dynamic module moving into VANETs and connecting vehicle units with the infrastructure unit. The IoT-BA is made up of four segments: an identification unit, an execution code unit, a path unit, and a space unit of datum. In order to distribute the data packets from the sources of the source to the destination node through cooperative BAs via the selective routing track, the IoT-BA uploads vehicle information onto the DNN.
As IoT-BAs contain a wide range of information, each system has a unique identity. The data of current vehicles passing through a road segment are stored in the cloud, and the routing path is defined by DNN, which is a core indicator of packet transmission. Lastly, the data space stores the data from the car units completely. In this case, it is in the RSU Infrastructure Unit that the DNN routing path is found [68].

Infrastructure Unit
The infrastructure unit is located on the application level, and the routing path can be robustly calculated using the vehicle position and speed via DNNs (DNN architecture with optimization for BA in Figure 2). Figure 2 specifies the workflow of the infrastructure unit.

Bat Algorithm (BA)
The Bat algorithm emulates bat echolocation, whereby bats use echolocation to distinguish between prey and physical boundaries. Bats, additionally, identify differences in other ways, such as by flying in an arbitrary motion with speed v i at position x i, with a recurrence of f min , turbidity A 0, and shifting wavelength λ, in order to look for prey. The bats alter the recurrence naturally, based on the radiated pulse, and this changes the pulse discharge rate r [0, 1] based on the closeness of the fitness function. In general, the loudness varies between large A 0 (positive value) and a minimum A min (constant value).
IoT-BA operations are defined in terms of their frequency, velocity, position, emission pulse rate, and loudness. These terms help the bats to search for prey in a Ddimensional space.
Virtual Bat Movement is obtained after the random initialization and the new position and velocity are updated in a regular time-step t, as below where: i is the emission pulse rate; x * is the global best; F min is the minimum frequency; f max is the maximum frequency.
For a local search, the solution is chosen based on the current best solution, and then the updated solution is locally produced for each bat based on the following condition where: ε is the arbitrary vector; A t is the normal commotion at step t.
The global solution is updated with the best fitness function obtained from N bats when it is better than the previous best f (x * ).
Loudness and Pulse Emission: A t i and r t i , respectively, tend to reduce and increase based on the rationalization of a new solution. This means the bats are moving in the correct direction towards their prey. This is formulated as shown below where: rand is considered a random vector with uniform distribution. 0 < α < 1 and γ > 0 The negative Mean Absolute Percentage Error (MAPE) is used to enhance the weights and bias of the DNN in the form of a fitness function, which is provided below where Electronics 2021, 10, 785 7 of 16 a i is the actual value; d i is the estimated value.
The lower the MAPE, the better the optimization of parameters of DNN. BA predicts the value of critical strength parameters in the VANET congestion detection process based on its operating of parameters and conditions. DNN uses the trained BA prediction to determine the values of process parameters that result in the optimal value of the strength parameters in various operating conditions.

Infrastructure Unit Workflow
The Infrastructure Unit (Figure 3) collects control information such as the position, location, speed, and time signature of the vehicle. The information is iteratively collected to ensure that the information is accurate. The data are gathered by the BAs and not directly transmitted to infrastructure units.
The information from IoT-BAs is sent to the DNN, and the routing path is processed based on the routing information collected from BAs (routing process is the same as in [64]). The BAs route BAs with a code execution unit and set the route to prevent the congestion of the VANETs. All operations are carried out to prevent the greatest challenge of congestion.

Performance Evaluation
The DNN-IoT-BA was simulated in a python compiler (Anaconda with Python 3). DNN simulation parameters under VANETs are presented in Table 1. The simulation was performed on a two-way road with a fixed road width in an area of 1500 m × 1500 m. The simulation covered 300 vehicles in an urban scenario with speeds ranging from 0 kph to 50 kph. The IEEE 802.11p MAC protocol was used to estimate the packet interval and update the report on secured packet transmission. It also helped maintain the retransmission of packets that fail during the broadcast. The Krauß model was considered as the mobility model in the current study, which is a spatially continuous, car-following model, where the distance between the vehicles can be estimated by the VU itself. It further allowed the safe travel of VUs with proper velocity. The validation of the DNN-IoT-BA proposed was conducted against the existing models of deep-learning: DNN and Artificial Neural Network (ANN) [65]. The DNN and ANN were trained without the predictions from BA and were trained directly with the proposed module without the inputs from BA. Validation was performed by different performance metrics, such as transport type, speed of the vehicle, and network density, to assess the average latency and cumulative distribution function (CDF).
The network connectivity quality of the existing DNN and ANN models is illustrated in Figure 4. The transmission range varied from 200 m to 500 m and the vehicle's arrival rate was fixed from 30 kph to 50 kph. The simulation results show that the probability of connection expired with an increasing distance metric and the connection to a vehicle was lost when distance from the RSU was increased by 400 m.
Placing RSU on all 350 m, however, helped the VANETs build long-term connections with vehicles. Nevertheless, the connection probability still presented a challenge when connecting vehicles within the 300 m range (as illustrated in Figure 5), with increasing network traffic (from 100 to 300 vehicles). The CDF results from the DNN-BA, DNN, and ANN, testing the connection probability between 100 and 300 vehicles, are shown in Figure 5.
In this respect, the density of the network was high for 300 vehicles, mid-range for 200, and low for 100. The results show that a more distant connectivity to vehicles was established under the proposed method than using low-density models of DNN and ANN. Network degradation was shown when the density of the network increased.    The results of the average data latency between the vehicles are shown in Figure 6, depending on their velocity. The simulation results show that data transmission latency increased alongside increases in speed. On the other hand, the latency continued to increase with increasing network density. The combined surges in speed and vehicle density contributed to the maximum latency. Such mobility affects the transmission of data because the link between vehicles is not established.
This affects the delivery rate directly because the average latency is indirectly proportional to the ratio for package delivery (Figure 7). The simulation results, on the other hand, show that the link was well established, with minimal vehicle speed and density,    The results of the average data latency between the vehicles are shown in Figure 6, depending on their velocity. The simulation results show that data transmission latency increased alongside increases in speed. On the other hand, the latency continued to increase with increasing network density. The combined surges in speed and vehicle density contributed to the maximum latency. Such mobility affects the transmission of data because the link between vehicles is not established.
This affects the delivery rate directly because the average latency is indirectly proportional to the ratio for package delivery (Figure 7). The simulation results, on the other hand, show that the link was well established, with minimal vehicle speed and density, The results of the average data latency between the vehicles are shown in Figure 6, depending on their velocity. The simulation results show that data transmission latency increased alongside increases in speed. On the other hand, the latency continued to increase with increasing network density. The combined surges in speed and vehicle density contributed to the maximum latency. Such mobility affects the transmission of data because the link between vehicles is not established.
This affects the delivery rate directly because the average latency is indirectly proportional to the ratio for package delivery (Figure 7). The simulation results, on the other hand, show that the link was well established, with minimal vehicle speed and density, and the average delay was, therefore, significantly reduced. The DNN-IoT-BA performance was efficient overall, due to the presence of IoT-BA, compared with the DNN and ANN, as the average minimum latency rate showed a lower failure rate.
Electronics 2021, 10, x FOR PEER REVIEW 11 of 16 and the average delay was, therefore, significantly reduced. The DNN-IoT-BA performance was efficient overall, due to the presence of IoT-BA, compared with the DNN and ANN, as the average minimum latency rate showed a lower failure rate. The results of the delivery ratio of packages with different car speeds and densities are given in Figure 7. As the transmitters failed to transfer the packets to the neighbouring VU, the packet delivery ratio was affected by a link failure due to increasing speed. Therefore, the connection breaks and the link with increasing network density exists. The break in connection had a significant influence on the packet loss stimulus rate, and thus on performance. The collision of the vehicle packets increased the packet loss rate with an increased vehicle density and resulted in a decreased functionality in the overhead network. The simulation results show that the DNN-IoT-BA was delivered with higher feasibility than DNN and ANN.  The results of the delivery ratio of packages with different car speeds and densities are given in Figure 7. As the transmitters failed to transfer the packets to the neighbouring VU, the packet delivery ratio was affected by a link failure due to increasing speed. Therefore, the connection breaks and the link with increasing network density exists. The break in connection had a significant influence on the packet loss stimulus rate, and thus on performance. The collision of the vehicle packets increased the packet loss rate with an increased vehicle density and resulted in a decreased functionality in the overhead network. The simulation results show that the DNN-IoT-BA was delivered with higher feasibility than DNN and ANN.
Electronics 2021, 10, x FOR PEER REVIEW 11 of 16 and the average delay was, therefore, significantly reduced. The DNN-IoT-BA performance was efficient overall, due to the presence of IoT-BA, compared with the DNN and ANN, as the average minimum latency rate showed a lower failure rate. The results of the delivery ratio of packages with different car speeds and densities are given in Figure 7. As the transmitters failed to transfer the packets to the neighbouring VU, the packet delivery ratio was affected by a link failure due to increasing speed. Therefore, the connection breaks and the link with increasing network density exists. The break in connection had a significant influence on the packet loss stimulus rate, and thus on performance. The collision of the vehicle packets increased the packet loss rate with an increased vehicle density and resulted in a decreased functionality in the overhead network. The simulation results show that the DNN-IoT-BA was delivered with higher feasibility than DNN and ANN.  The results of the data with different data rates are displayed in Figure 8. The data rates vary according to the density of the network and the speeds of the vehicle. As a result of the simulation, the maximum output was achieved at the borders of roads, as the vehicle moved in the direct and curved road sections with minimum speed and minimum throughput.
The DNN-IoT-BA also enhanced the network performance compared to other methods with the optimal choice of vehicles in road segments. The optimal selection reduced the packet loss rate, and the selection of the optimally adjacent vehicle hops effectively maintained the transmission connection. Due to the absence of an IoT-BA-in which vehicles can be used for determining a connection, and thus strictly prevent energy consumption by linking reliability-a throughput decrease was found in DNN and ANN. The determination of neural network parametric values by the BA assisted in improving the DNN optimization by finding the routes for the packets to traverse across the network. The results of the data with different data rates are displayed in Figure 8. The data rates vary according to the density of the network and the speeds of the vehicle. As a result of the simulation, the maximum output was achieved at the borders of roads, as the vehicle moved in the direct and curved road sections with minimum speed and minimum throughput.
The DNN-IoT-BA also enhanced the network performance compared to other methods with the optimal choice of vehicles in road segments. The optimal selection reduced the packet loss rate, and the selection of the optimally adjacent vehicle hops effectively maintained the transmission connection. Due to the absence of an IoT-BA-in which vehicles can be used for determining a connection, and thus strictly prevent energy consumption by linking reliability-a throughput decrease was found in DNN and ANN. The determination of neural network parametric values by the BA assisted in improving the DNN optimization by finding the routes for the packets to traverse across the network.

Conclusions
This paper shows that DNN-IoT-BA offers an efficient routing of vehicles on highspeed roads in VANETs. This DNN-IOT-BA is the best way of increasing energy efficiency. The IoT-BA examines the entire network to find the moving states of every vehicle in VANETs. The DNN-IoT-BA then optimizes routing decisions based on the MA inputs, with higher traffic congestions in the network. The DNN effectively processes routing decisions at a faster rate and provides a network solution to set optimum routes, thus reducing network congestion more quickly. The use of the routing table for regular vehicle updates at RSUs ensures optimal selection of vehicles and stable routing decisions. Data and transmission rates were demonstrated through variable speed, distance, and vehicle density, confirming that DNN-IoT-BA offers quicker routing decisions than existing DNN and ANN models. Simulation results show the higher connectivity, throughput, packet delivery, and end-to-end latency of the DNN-IoT-BA model. The results also show that the probability of connection termination in DNN-IoT-BA is lower, which supports increased data transmission. This means that simplified routing choices based on the continuous IoT-BA monitoring of DNN have optimally retained the traffic density, which ensures an efficient packet delivery to the destination nodes. Finally, the application of

Conclusions
This paper shows that DNN-IoT-BA offers an efficient routing of vehicles on highspeed roads in VANETs. This DNN-IOT-BA is the best way of increasing energy efficiency. The IoT-BA examines the entire network to find the moving states of every vehicle in VANETs. The DNN-IoT-BA then optimizes routing decisions based on the MA inputs, with higher traffic congestions in the network. The DNN effectively processes routing decisions at a faster rate and provides a network solution to set optimum routes, thus reducing network congestion more quickly. The use of the routing table for regular vehicle updates at RSUs ensures optimal selection of vehicles and stable routing decisions. Data and transmission rates were demonstrated through variable speed, distance, and vehicle density, confirming that DNN-IoT-BA offers quicker routing decisions than existing DNN and ANN models. Simulation results show the higher connectivity, throughput, packet delivery, and end-to-end latency of the DNN-IoT-BA model. The results also show that the probability of connection termination in DNN-IoT-BA is lower, which supports increased data transmission. This means that simplified routing choices based on the continuous IoT-BA monitoring of DNN have optimally retained the traffic density, which ensures an efficient packet delivery to the destination nodes. Finally, the application of low-mobility vehicle routing decisions is efficient compared with those with a faster mobility of vehicles. In future, the application of other deep learning algorithms considering vehicles with mixed traffic data can be utilized for vehicular traffic management.