Development of a Mobile Inter-Vehicular Communication System Based on Gossip Algorithm

Mobile Inter-vehicular communication network is an ad hoc network that allows peer vehicles to share and receive data. The existing inter-vehicular communication approach uses data from a limited number of data sources located in distant areas. This leads to high latency caused by the short-range antennas used to connect the peers. Inter-vehicular networks are dynamic and selforganized networks that do not use any external infrastructure to send and receive data. Currently, inter-vehicular networks only exist as part of a hybrid system and hence there is a need for a faster inter-vehicular network which can function independently. In this study, we developed a model which uses the gossip algorithm to send and receive data. The results show that over time, in a peer-to-peer network, the distance to be covered and the delay time are reduced. In the current models, however, the delay and distance covered remain constant. The results show that a peer-to-peer model is faster. Keywords—Inter-vehicular networks, Autonomous, Gossip algorithm, Mobile Inter-Vehicular communication system.


Introduction
The future is ultimately enigmatic but planning requires predictions of imminent conditions and needs, especially in the modern digital era of autonomous vehicles. Such technology might influence future driving behaviors, travelling activities, parking space due to the advent of digital cameras, smartphones, smart computers, smart communities and smart cities, thus, making autonomous vehicles to be soon realistic and sufficiently reliable. Therefore, the existence of autonomous could soon replace human drivers and probably lead to huge savings and reduction of human driving errors because worldwide traffic safety is a major concern. Thus, giving special attention to autonomous vehicles, especially inter-vehicle communication (IVC) and vehicle to road communication (VRC) to reduce the number and severity of road events. The existence of automated cars relies on a good supply of data at all times and modern inter-vehicular networks are developed to address this issue amongst others. Good connection devices with an antenna range of up to 1000 meters have been developed for inter-vehicular communication systems but current communication protocols or strategies have high latency making it hard to use or impractical [1]. Core data failures that make • Zero automation (level 0): At this level, the car is fully controlled by the driver.
• Driver assistance (level 1): The car at this level is controlled by the driver but it has built-in assistance features such as internally controlled braking. • Partial automation (level 2): The car at this level has numerous built-in systems controlling the breaks, steering and acceleration, however, all other tasks are performed by the driver. • High automation (level 4): At this level, the car systems have full control of the car if certain criteria are met but, in this case, the driver does not need to pay attention to the car [9]. The car can allow the driver to take over if the criteria are not met or if the driver does not take over it stops safely. • Full automation (level 5): At this level, the car has full control in all possible circumstances. It can operate even if there is no one on board.
One key algorithm to use in the proposed model is the gossip algorithm which disseminates information amongst peer vehicles. It allows peers to share information, each peer distributes all the information it has to adjacent peers immediately a connection is established [10]. This algorithm allows cars to share data even in areas with low connectivity. It is highly influenced by the geographical location of each node since connections are affected by the proximity of each node [10].
The current existing inter-vehicular networks have huge challenges with obtaining data from remote areas and thus, are forced to get assistance from land-based structures. This causes autonomous cars to be possible only in smart cities.
The remainder of the paper is organized as follows: In section 2.0, we review previous literature on different vehicle communication systems while methodology is presented in section 3.0. The implementation and results analysis are presented in section 4.0, while some conclusions and recommendations are drawn in section 5.0.

Review of Related Work
A lot of research has been conducted in-vehicle communication systems with different approaches and technology being used. These approaches include, amongst others, land to vehicle communication systems, hybrid-vehicular communication and inter-vehicular communication systems [11].

Land to vehicle communication system
Land to vehicle communication systems allows vehicles to broadcast signals to other vehicles only through land-based infrastructure [11]. Some models using this approach have been conceptualized, some operate through cellular networks. One system used telephones installed in vehicles to convey information using cellular networks to telephones in peer vehicles covering both short and long-range distances [12]. An alternative design, also using cellular communication, uses onboard devices to transmit data to peer vehicles. This system covered both long and short communication distances as well [13]. Experiments have also been conducted in cases where the roadside infrastructure was built just for vehicle communication use only [14]. Another research was conducted using onboard equipment as well and the communicating infrastructures were satellite-based networks [14]. The biggest challenge with these concepts is that they are very expensive to develop especially when covering large areas.

Inter-vehicular communication systems
These are systems where the vehicle to vehicle information sharing is conducted without any land-based infrastructure [11]. It was first conceived in Japan in the 1980s by the Association of Electronic Technology for Automobile, its main purpose at the time was to achieve car platooning (enabling cars that follow each other to synchronize their actions, thus performing as a single unit). This system aided in accident reduction and with the dealing of traffic congestion [15]. The United States and Europe were suffering from similar problems. They quickly gained interest, and a number of concepts have been released from then to date. In 1987 in San Diego a demonstration was made, the demonstration involved eight cars connected through a 9000MHz local area network. In this concept, the maximum space between cars achieved was 6.3 meters travelling at speeds up to 96 kilometers per hour and the data transmission rate was 122 kbps [16]. This model, however, had a data transmission rate and distance between cars that was too small.
The Program for Europe Traffic with Highest Efficiency (PETHE) which existed from 1987 to 1994 also created an early model which used a 57GHz band to establish a full connection within a number of cars [16]. Another European based concept was done by The Europe Chauffer Project where a truck platooning network was created. This system only sent speed changes between trucks, acceleration and deceleration. The system used 2.4GHz frequency band and later 5.8GHz bands and was able to transmit data at a rate of up to 230kbps covering distances up to 40 meters [17]. However, the system was also perceived not to be good enough in real-life operation.
The Association of Electronic Technology for Automobile in 1997 conducted experimental tests whereby they used infrared signals to transmit data between cars. The infrared transmitting instruments were pinned on vehicle tops and transmissions between peers were done by triangulation. This concept allowed vehicles to measure the distance between each other [18]. Later models used the Geographical Positioning System, mainly, D-GPS to locate transmitting peers. The downfall with this approach was that infrared transmits in a straight line thus it could not transmit through corners and had a short-range.
Various universities and researchers have experimented with 5.8GHz Dedicated Short Range Communication to make geolocation-based networks using GPS. Information is shared using beacon messages which are messages that contain information such as current acceleration, speed, direction, the position of the car. This technology was well designed but failed to accommodate peers that did not form part of the network and always kept them in danger [19].
The main disadvantage with inter-vehicular systems is that cars make clusters which may not be connected if there is low traffic flow. This challenge also makes it hard to deploy it since a large number of vehicles need to use it in order for it to function and create a network [14].

Hybrid-vehicular communication system
The systems discussed in 2.1 and 2.2 have numerous advantages and disadvantages on their own, over the years but new models have been created which combine the advantages of both approaches to create hybrid systems. These systems are designed to solve the problem of clusters formed by inter-vehicular communication networks whilst avoiding the high cost incurred when developing large numbers of infrastructure [14].
One concept created to implement such a hybrid system used satellites as infrastructure mainly to transmit data over long distances and dedicated short-range communication is used for vehicle to vehicle communication. The system used between 2GHz and 4GHz band to transmit the data [14]. It allowed communication to extend to rural areas, facilitating good data flow even at low traffic and it was quick and easy to deploy providing full coverage on launch.
Another concept, developed, used roadside infrastructure to complement inter-vehicle communication. It was developed such that it provided no distinction between the vehicle to vehicle or infrastructure network but allowed the two technologies to complement each other creating a very dynamic network topology [20].

Autonomous inter-vehicular communication systems
The growing research in autonomous cars and their increasing presumed benefits, has led to the research on vehicle communication systems shifting to accommodate autonomous cars. Autonomous cars, however, have their own unique challenges unlike normal vehicle driver assistance-based vehicles; they require the transfer of huge amounts of data at a very high speed. Research has been done in various data transfer technologies and they all seem to have limitations which outweigh their benefits. Li-Fi and infrared failed due to the requirement of transfer in straight lines and have a very short range [8]. Wi-Fi has high data transfer capabilities but has poor mobility support and Bluetooth has a variety of connectivity platforms but its maximum range of 100 meters is too small.
One concept that was created did not have much emphasis on cars which had a large gap in between them, instead, it focused on neighboring peers. It used Dedicated Short-Range Communication to allow peer cars to enlarge their environment by sharing their sensors and cameras. This system also shared data on hazards on roads and peer vehicles shared data on their routes a feature which enabled peer vehicles to predict its movements in advance and all this data was shared in the 5.9GHz band. This concept also concluded that for long-range communication, cellular networks could be used to transfer some data like weather conditions but due to latency data cannot be shared in real-time [13]. The grand concept of the vehicle communication system is that of the vehicle communication network (VCN). This model combines different technologies, the vehicle to vehicle communication (V2V), vehicle to infrastructure (V2I), vehicle to the cloud (V2C), vehicle to road signs (V2RS) and vehicle to roadside units (V2RSU). This model uses 5.8GHz band for Dedicated Short-Range Communication and the Wi-Fi 802.11p for long-range communication. A cellular communication option is also designed and based on the LTE standard and 3GPP. The cellular model uses enhanced mobile broadband for broadcast and is ultra-reliable and has low latency [21].
Uses of the network: 1. Individual driving intelligence -this network allows vehicles to share data eradicating the limit of short-range sensing. One problem solved by such a system is that autonomous cars' software and onboard computers have limited capabilities. VCN can also be used by autonomous cars to download pieces of high definition road maps which can help increase performance since fully downloaded maps take a lot of space, about 5GB per kilometer. It also allows vehicles to share data required to make decisions in advance such as free parking locations [21]. 2. Cooperate swarm intelligence -Communicating vehicles over time create an intelligent swarm. This is the capability of peer cars to use data shared in the network to predict the actions by other vehicles in the network. VCN can also replace structures such as traffic light allowing traffic flow to be determined by the amount of traffic at a particular time. 3. Friendly service intelligence -Since autonomous cars will render everyone a passenger at some point in time, then the network also provides users with full internet access. This extends to the provision of entertainment and other daily updates such as weather and news [21].

Software development life cycle (SDLC)
A software development life cycle (SDLC) model was adopted to develop a mobile Inter-vehicular communication system based on gossip algorithms. The system was divided into phases. These phases enable proper planning and flow of task execution. In our case, however, only the system analysis, feasibility analysis and system design were coved required.
System analysis: 1. Existing model: The main challenge with the current inter-vehicular communication model is latency. This latency is a result of limited sources of data and the existence of gaps between vehicles beyond the antenna range currently at 1000 meters per vehicle. This means for all data required a source must first be located and the data must then be retrieved and returned. For every gap encountered on either destination, the process has to pause until a connection is made. This problem is rapid when there is a small number of registered peers and when traffic is low like during late hours. The alternative, hybrid inter-vehicular communication model uses land infrastructure which is expensive to set up and hence to the user. This latter approach is also not practical in remote areas and less developed countries. 2. The proposed solution: The proposed model of a decentralized peer-to-peer network where every peer vehicle acts as a client, transmitter (or antenna) and server creating a decentralized cloud. The model separates the data into different sections based on area coverage such as international, continental or local. It lets vehicles share data and data updates on contact using it immediately and storing some in databases. The occurrence is such that it simulates the spread of diseases (airborne diseases) and is known as the gossip algorithm through the Susceptible Infectious and Removed (SIR) model.
Each piece of data in each and every vehicle is treated independently from all other data. A peer is categorized as the susceptible state, infectious state or removed state for each piece of data. The states are defined as follows: a) Susceptible state: A peer is considered susceptible if it has the ability to receive data and data updates. A number of factors contribute to peers having different states whilst in each other's vicinity. An example is incomplete update transfer of data Y from car B make's car A to be in the susceptible state and car B be an infectious state. However, data X which is completely updated make's both cars to be in the infectious state. b) Infectious state: A peer is considered in an infectious state pertaining to specific data if it has that data to share. If a nearby peer does not have that data but also is not susceptible based on the group it falls under, then the peer with the data is not considered infectious. An example of a new car recently shipped from Canada may have a Canadian map, but no car will be susceptible to it in South Africa. c) Removed state: These are peers which are in neither susceptible state nor infectious state. These are mostly vehicles that do not have the ability to connect to the network. Vehicles that are not autonomous are not in the removed state by default since they can connect to the network but only use a limited amount of available data.
The number of peers in each particular state is highly dynamic for every piece of data. The number of peers in the network also keeps changing in time. Contributing factors to the changes include vehicles disconnecting from the network, peers registering in the network and vehicles being manufactured.
A more detailed illustration of how the gossip algorithm operates is depicted in figures 1, 2 and 3 respectively. The first peer obtains specific data; this is the point of origin and sends it to all directly linked peers. The peers with data forward it to their directly linked peers excluding the peer they received the data from and the process continues.
Another possible scenario in the model is the existence of more than one point of origin for the same data. An example is two cars outside of each other's vicinity but, within another car's vicinity can independently detect a pothole. Thus, the points of origin can be different and data can make different sub-networks and propagate as shown in fig. 4. The red circles show infected peers whilst the other circles show susceptible peers.    As stated earlier sharing the model segments the data and data update into area coverage groups. Some data sharing can be done with all vehicles, that is, to global reaches whilst some only local. The model specifies data pertaining to the vehicle's current actions such as current vehicle speed and vehicle location not to be saved in the database. All other data can be shared based on filters influenced factors such as data size, time, location and etc.
The SIR model can be described as a mathematical model defined by the set of ODE's shown in equation 1, 2, 3, 4 and 5.
Where: α is the recovery rate of peers; is the number of infected peers, and is the number of susceptible peers; the transmission rate constant; the number of hops, and is the number of packets sent. From equation 1, the number of susceptible peers reduces in relation to the number of infected peers at the transmission rate. In equation 2, the infected peers increase at equation 1 rate and decrease by the number of removed peers. In equation 2 we notice the increase of removed peers.
Feasibility analysis: This section highlights the strengths and weakness of the proposed model. It covers the weakness and strengths of the prototype we propose to build.

Technology and System Feasibility
• The proposed model is based on existing vehicle antennas and data storage systems, so, it doesn't require the development of new technology. • The proposed system always shares data through stores data in multiple vehicles thus having a highly backed up system. • The system always sends data through the shortest path similar to flooding. • The proposed system, however, has a weakness of producing many duplicates.
• As much as vehicles use existing technology, the data storage capacity needs improvement to make a more efficient network. • The proposed system can suffer from extensive security threats.

Prototype feasibility
Due to limited devices available to connect and test the delay in information, sharing will use the mathematical model described by equations 1, 2, and 3.
System design: To demonstrate the proposed model we aim to send data between two model autonomous vehicles. The shared data between peers will allow vehicles without sensors to manoeuvre using only the data received from its peer. To make the prototype model the key components will be an Arduino smart car kit, an Android smartphone with Wi-Fi Direct and USB On-The-Go (OTG) capabilities. Android smartphone uses a mobile application to perform its part. The Wi-Fi Direct version that allows file sharing between peers has a maximum range of 200 meters and a maximum bandwidth of 250 megabytes/second [8]. Since it covers a short-range, it has no regulations and hence it is free. OTG capability is the ability of a host machine to send and receive data to USB devices example is the ability of smartphones to support flash drives.
An Arduino is a hardware programmable microcontroller board. In the smart car kit, an Arduino board with a number of other component devices, an ultrasonic sensor and a sensor shield allows the board to interpret inputs from the sensor. It also has motors to move and control the wheels and the sensor. A motor controller controls the signals the Arduino board sends to the motors.

Fig. 5. Proposed Model
The connection of the network is as shown in figure 5. A single car will contain a fully assembled Arduino smart car connected to an android smartphone by an OTG cable. The smartphone will be on a moving platform that will allow the smartphone to move left, right and center in relation to the front sensor movements. This will allow the smart phone's acceleratory sensors to detect signals and they will correspond with the car's direction. Since the Arduino Uno cannot send information back to the smartphone without an Arduino USB shield that we do not have.
The smartphone runs an android application that allows it to connect to its peers through Wi-Fi directly. The application gets input from other peers and also form acceleratory sensor updates. All inputs are taken to the database where it is either updated if it's an update of existing information or inserted if its new data. The data retrieved from the database is processed and proper commands generated for the Arduino. Other data shared to peers on contact, or for updates made as shown in fig. 6.
The Arduino smart car takes input commands from the smartphones and from the front ultrasonic sensor. The first input is the ultrasonic sensor that uses sound waves differential to detect objects located in front and on the sides. If it detects an obstacle then the sensor uses a motor to switch directions checking if the left and right are clear. The motor also tilts towards the direction of the platform on which the smartphone is located and the data kept the database. If the sensor of the car does not work, it takes data from the database received from peers.

Hardware requirements
The prototype model of the proposed system consists of various hardware components. The key components are Arduino smart car kits and android smartphones. The connection between these two components will be through a Universal Serial Bus (USB) and a USB on-the-go (OTG) cables.
Arduino kit: An Arduino board is a programmable microcontroller introduced in 2005. It was developed as a tool for professionals and students to develop devices that can interact with the environment. It has the ability to store and execute small size software programs. Actuators and sensors are used to allow the Arduino to interact with the environment. To send and receive data from these actuators and sensors the Arduino uses shields [22]. The Arduino kit used in this study has an Arduino Uno board, three motors, an ultrasonic sensor, a sensor shield and a motor shield.
Android smartphones: This study employs two Android smartphones with at least one supporting OTG. Android is an open-source Linux based operating system (OS) developed from as early as 2004 and initially launched in 2008. It was originally developed for smartphones but has since migrated to tablets, car systems, computers, laptops and smart watches [23].

Software requirement
The implementation of Arduino Smart car model was developed using C, Java and SQLite. The Arduino board are developed using C. Java is used for the Android studio and the SQLite is for the databases.

Implemented prototype system
Due to limited resources, the sender and receiving vehicles are not similar only running the same software. Fig. 7 and Fig. 8 show the receiving and sender vehicles respectively.  iJIM -Vol. 14, No. 11, 2020 The application requires that Wi-Fi be turned on before launch. On launch the first activity initiates a connection service searching for all open devices available. To confirm that Wi-Fi was turned on, a message at the bottom of the screen read that a connection service was initiated else the initiation failed. If peers are available their names are listed where they are then selected. The screen also gets a notification asking permission to connect to a USB device. This happens to the receiver car which connects to the Arduino smart car. As shown in fig. 9, 10 and 11. When a peer is selected notification is given as a permission request to establish a connection with it as shown in fig. 12. These permissions are not much of a requirement for this study but are protocols which have been established by Android as security measures.
When a connection is established a launch, button is available to initiate the sending of data as shown in fig. 13. The sent data is shown on the screen as it is being sent and received as shown in fig. 14 and fig. 15.

The mathematical model results
The mathematical set of equations stated earlier to model the SIR model was used to show the change in latency over time as data is sent. These equations were used to compare the existing model to the proposed model. The key difference between the two models is the number of nodes data should pass through to complete single data transmission. The old model states that all peers that have received the data and those that can receive should be passed through only excluding all unavailable peers = + − . The proposed model, however, states = − − .  Figure 16 shows that for the proposed model, as the data keeps getting spread out the time taken to complete a transmission reduces. Whilst in the older model the time remains constant.

Conclusion
Autonomous vehicles are safer than vehicles driven by humans. The road is predicted to be going to be safest when only autonomous vehicles occupy the roads. The use of these cars requires the ability to send large size data such as maps. This requires the development of vehicle data sharing networks and current networks require expensive infrastructure to work. This makes the existence of autonomous cars to be impractical in developing countries and remote areas.

New Model Older Model
There are two main cases of data sharing tested in this study, sharing of data to be executed immediately and the sharing of data to be stored for future use. The developed prototype showed the viability of the model to distribute data for both cases. The mathematical model used to model the spread of data over the network showed that over time the delay decreases such that the vehicle even gets the data before it needs it in particular cases. When the time delay becomes negative it means peers on the opposite side of the car in relation to the point of the data origin also have the data. The data can be retrieved from either side if for some reason the vehicle loses it.
The increase in the number of possible sources of data in combination with the reduction of the distance to the data sources reduces the possibilities and number of antenna range gaps. All these factors show that this model clearly reduces the overall delay of data transmission. This means the transmission of data in the network is faster. The other more appealing factor is that the design does not require the development of new devices. It can be implemented using the existing devices only with the addition of memory space for optimization purposes. The existing model showed unnecessary duplication and security vulnerability but our model was developed to reduce the duplication. However further research can be carried out on possible ways to reduce duplications by balancing the data in the entire network using machine learning algorithms. The SIR model did not accommodate the random distribution of the vehicles.

Authors
Petros Mashwama (PhD) is currently lecturing in the Department of Computer Science in the University of Eswatini, Eswatini (formerly Swaziland). He has served as a Tutor of the Faculty of Science in the same University between 1997 and 2005. He is the head of the Department of Computer Science between 2005 and 2012, at the same time he was roped into the national panel of Scientists that manage the Science curriculum of High Schools in the Kingdom of Eswatini. He obtained his BSc degree in Mathematics and Physics in 1986, University of Swaziland (now Eswatini). In 1988 he obtained his Master's degree in Computer Science (Conversion programme) in Dundee, Scotland (UK). He returned to the UK, University of Leeds in 1992 to start his PhD, which he graduated in 1996. His research interests are in Computer Graphics, Computer Science Education and Machine Learning.
He is a member of the Computational Intelligence Research Group in the Department of Computer Science in the University of Eswatini and serves in the Eswatini National Science Panel for High Schools.