1 Introduction

Recent advances in wireless technologies have enabled its multi-dimensional usage across various sectors. Vehicular safety is one of them. In this context, intelligent transportation systems (ITS) adopt dedicated short-range communications (DSRC) or IEEE 802.11p [1] standard for vehicular ad-hoc network (VANET) to increase vehicular safety on roads. In VANET, beacons are periodically exchanged after every 100 ms by vehicles to be constantly aware of their surrounding vehicles and events. In highly dense scenario, it is difficult for the vehicles to exchange their beacons in this time bound interval. Hence, a reliable medium access control (MAC) protocol is required to enable high beaconing suitable for vehicles bearing high mobility.

Communication in VANET safety applications requires high throughput and bounded time delay at the same time. Designing a MAC protocol fulfilling these requirements is a challenging task. Carrier sense multiple access (CSMA) has problems of unbounded time delay due to contention between nodes and hence packet drops. Several clustering based MAC protocols are proposed to limit contention. Clustering enables network of reusing frequency spectrum and members of a cluster use a single channel for transmission. In clustering algorithms, selection of cluster head (CH) and maintaining the membership of a vehicle in a cluster in a rapidly changing environment is a challenging task. Decision of number of vehicles in a cluster is also required so that beacons among all the cluster members can be exchanged periodically.

In this paper, an Adaptive Mobility and Range Based Clustering (AMRBC) dependent MAC protocol is proposed. In AMRBC, CHs are selected based on their stability and position within a cluster. Each cluster is provided one channel from five service channels (SCH) of DSRC band (DSRC band has six SCH but in AMRBC one is reserved for communication between CHs), which will be different from its neighbors so that hidden terminal problem can be avoided. Each CH uses two channels, one is to communicate with its cluster members and another is to communicate with other CHs. Since maintaining the cluster and CHs in the highly mobile scenario is very difficult.

Major contributions of this paper are summarized as follows:

  1. 1.

    Proposed a MAC protocol named AMRBC that provides a stable CH selection algorithm. It considers relative velocity of the vehicle and its position with respect to other vehicles within a cluster to maintain high stability of the network.

  2. 2.

    Proposed a cluster partitioning and combining algorithm (CPCA) that limits the maximum number of vehicles in a cluster and allows every vehicle in a cluster to exchange its status messages within control channel interval (CCHI). It will increase the reliability of the network.

  3. 3.

    Implementing prioritization of safety messages over infotainment messages to ensure real-time safety message delivery.

The rest of the paper is organized as follows. Section 2 discusses related works. Problem statement and system model is described in Sect. 3. Section 4 discusses the proposed AMRBC protocol. In Sect. 5, performance of AMRBC protocol is evaluated and compared with related protocol in terms of different performance metrics. Finally, Sect. 6 presents the conclusion.

2 Related Works

IEEE has developed the physical and MAC layer standard IEEE802.11p for VANETs. For different priorities, four access categories (ACs) are defined with different arbitration interframe space (AIFS) numbers and different contention window sizes. To assign priority to an AC, it is given small AIFS number and small contention window size compared to other ACs. IEEE802.11p uses CSMA/CA in licensed 5.9 GHz (5.850–5.925 GHz) band. In this 75 MHz spectrum, there are seven 10 MHz channels and 5 MHz is used for guard band. Channel 178 is called control channel (CCH) and is used to transmit control packets. Six channels are SCHs and dedicated for data transmission. Channels switch alternately between SCH and CCH at the interval of 50 ms. Initially, vehicles are synchronized to control channel (CCH), after 50 ms, vehicles synchronize to one of the SCH and this process goes on. IEEE 802.11p uses DCF as its MAC protocol. Authors in [2,3,4,5] showed that this protocol has several problems due to high mobility of vehicles. These problems include lower throughput [6], frequent link ruptures, high collision rate, especially in high density networks.

Several solutions of these problems have been proposed. Authors in [7] proposed a Trinary partitioned black-burst-based broadcast protocol for time-critical emergency messages dissemination. It discusses two mechanisms (i) Priority to emergency messages are given by a mini distributed interframe space (DIFS) in MAC sub-layer. (ii) Communication range is divided into small sectors by a trinary partitioning mechanism. In [8], a region-based clustering mechanism for channel access is proposed that is applied to the contention based MAC protocols to reduce the contention period. Hence decreases the delay for time bound safety messages. In [9], mobility prediction based clustering (MPBC) is proposed for ad hoc networks with high mobility nodes. In MPBC, a node may change the associated CH several times during its presence in the network. The clustering scheme includes an initial clustering stage and a cluster maintaining stage. Authors in [10] proposed a space division multiple access scheme, in which road is divided into small cells.

In [11,12,13,14,15], researchers proposed cluster based multichannel MAC protocols to improve the reliability and performance. In [16], a social clustering of vehicles based on semi-Markov process is proposed in which two methods, namely, sociological pattern clustering (SPC) and route stability clustering (RSC) use the historical data of each vehicle, modeling it as semi-markov process, in order to extract the social patterns and create stable clusters. In [17], authors proposed a Performance-aware Mobile community-based Video on Demand (PMCV) streaming over VANET. PMCV design includes a novel mobile community management mechanism (MCMM), which performs (i) Assignment of roles and tasks to members (ii) Enables members to join the community (iii) Enables members to move between communities (iv) Enables collaborative store and search for resources. (v) Allows replacement of broker members. Authors in [18] provided a detailed survey of MAC protocols for safety applications in VANET. Distributed multichannel MAC (DMMAC) protocol [19] employs an adaptive broadcasting mechanism that adopts hybrid channel access to provide collision-free and delay-bound transmission for safety related traffic. DMMAC makes more stable and non-overlapped clusters. Each cluster uses a different sub-channel from its neighbors in a distributed manner to eliminate hidden terminal problem. Increasing the reliability of the system, reducing the time delay for vehicular safety applications and efficiently clustering vehicles are the main contributions of DMMAC. However, DMMAC does not take position of a cluster member in the cluster into account while selecting it as CH.

3 Problem Statement and System Model

High node mobility is one of the major challenges in VANET. Frequent disconnection between vehicles, low throughput and high delay may occur due to it. Since timely delivery of emergency messages and high packet delivery ratio are required, several researchers are working in this area. Authors in [7] proposed a 3P3B algorithm for timely delivery of time-critical emergency messages using mini DIFS in MAC sub-layer and a trinary partition algorithm. Its performance metrics used are delay, hop count, packet delivery ratio etc. However, it does not talk about stable connection between nodes. In [8], a region based clustering mechanism is proposed to reduce contention period of existing MAC protocols and to decrease delay. Performance evaluation is done in terms of total transmission time and average contention period. Again, it does not discuss about stability of the network that is important in ad hoc networks. In [9], mobility prediction based clustering (MPBC) is proposed for high mobility nodes, it helps maintaining higher connection life time and lower re-association time. But, it does not provide analysis of delay in this work. In [10], authors proposed a space-orthogonal frequency-time medium access control (SOFT MAC) protocol to allocate transmission slots via reservation. It improves throughput of network but delay or connectivity analysis is not provided. Authors in [11] proposed clustering algorithm to enhance channel throughput by channel access coordination. In [12], a type based cluster forming algorithm is proposed to increase quality of service. [13,14,15] discuss about some more clustering algorithms for enhanced performance. In [16], authors developed two algorithms, (i) sociological pattern clustering (SPC), and Route Stability Clustering (RSC). Mean lifetime of clusters is calculated that is a measure of network stability. Other parameters such as throughput and delay are not observed. PMCV [17] includes a novel mobile community management mechanism (MCMM). Performance of this protocol is measured in terms of Throughput, Packet Loss Rate, Server stress, Overlay maintenance overhead and lookup success rate by varying number of system members and simulation time. DMMAC [19] proposes a more stable and non-overlapped clusters by employing an adaptive broadcast mechanism. Its performance is measured by Average cluster head time, average cluster size, Reliability, Emergency message delay etc. DMMAC includes relative mobility while selecting cluster heads but does not check position of cluster head in cluster. A node with minimum relative velocity may not be at the center of cluster so it can get out of cluster due to change in its velocity. Hence, position of cluster head should be in the middle of the cluster. It may result in higher stability. Further, these protocols talk little about ensuring status message delivery. That is very important for maintaining a stable cluster.

Therefore, a protocol that uses local information instead of global information of the network is required. In the proposed system model, we focus only on clustering based MAC protocol. Stability of network is increased by forming more stable clusters. In high density urban scenario, number of members in a cluster may be too large to exchange status messages within CCHI. To overcome this issue, maximum number of vehicles in a cluster is limited by CPCA. As far as the safety messages are concerned, they are given high priority over infotainment messages. An urban scenario is taken into account to check the performance of the proposed protocol. Figure 1 presents VANET scenario. Vehicles having same parameters are formed in clusters. Ellipses in figure present clusters. One vehicle in each cluster is selected as CH. Each cluster member communicates with its CH and CHs communicate with each other.

Fig. 1
figure 1

VANET scenario with clustering of vehicles

4 Adaptive Mobility and Range Based Clustering (AMRBC)

This section describes the proposed MAC protocol namely Adaptive Mobility and Range Based Clustering (AMRBC) which is divided into four sub-sections. First sub-section describes the cluster formation process. Second sub-section describes CH selection algorithm to enable more stable clustering leading to reliable data dissemination. Third sub-section describes Cluster Partitioning and Combining Algorithm (CPCA) which helps to control congestion, and ensures successful status message reception. Fourth sub-section prioritizes safety messages over infotainment messages in order to decrease safety message delivery delay during data transmission.

4.1 Cluster Formation Process

When a vehicle enters in the network, it is in lone state, that is, it has no CH. All CHs send a cluster formation request (CFR) on CCH in the CCHI interval which is reserved for lonely vehicles. CFR includes current channel used by cluster members. On receiving CFR by a lone member that is in the range of CH, it sends a cluster formation acceptance (CFA) to the CH on CCH and tunes its frequency to the channel which was mentioned in CFR. When a vehicle has been added to the cluster, it is checked for its CH coefficient and is selected as CH if it fulfills the criteria. If there is no CH in the range of any lonely vehicle, then it will not be the part of any cluster and is out of the network. In this case, it periodically transmits lonely cluster formation request (LCFR) on CCH until it finds another lonely vehicle receiving this request or a CFR received by it which is sent by a CH. Figure 2 presents the flowchart of clustering algorithm of AMRBC.

Fig. 2
figure 2

Clustering algorithm of AMRBC

When another lonely vehicle receives this request, it sends back a lonely cluster formation acceptance (LCFA) which includes a channel number other than CCH and the channel that is reserved for communication between CHs. This channel will be used by both the vehicles for further communication or in other words, they form a cluster. Both vehicles check each other’s CH coefficient and vehicle having higher CH coefficient will be selected as CH.

4.2 Cluster Head Selection Algorithm

Selection of CH is the most important task in a cluster. CH should be selected in such a way that it provides stable clusters i.e. CHs should not be changed too fast. To select a CH, the scheme of DMMAC is enhanced. DMMAC [19] used a relative velocity based clustering algorithm which uses relative velocity of a vehicle to determine a weighted stabilization factor (βWSF). Vehicle having highest βWSF is selected as CH.

In the proposed work, a new parameter named Closeness Factor (C.F.) is proposed which includes transmission range in consideration while selecting CH. Every node transmits its status message in CCHI interval periodically which contains different parameters which are used for different purposes e.g. vehicle ID, position, velocity, current transmission range, CH coefficient and CH ID. Table 1 shows the status message format of the proposed protocol.

Table 1 Status message format of AMRBC

This status message is received by all the cluster members so that each vehicle in a cluster knows the parameters of each vehicle of the cluster.

Let there are N vehicles in a cluster. Let (x1, y1), (x2, y2), …, (xN, yN) are positions of different vehicles in that cluster. Centroid of cluster can be calculated as

$$X = (x_{1} + x_{2} + \cdots + x_{N} )/N\quad {\text{and}}\quad Y = (y_{1} + y_{2} + \cdots + y_{N} )/N$$
(1)

(X, Y) is called the centroid of the cluster. Distance of each vehicle from CH is calculated using distance formula

$$d_{j} = \sqrt {(x_{j} - X)^{2} + (y_{j} - Y)^{2} }$$
(2)

CF for each vehicle is calculated as

$$CF_{j} = \left( {1 - \frac{{{\text{distance of jth vehicle from centroid}}}}{\text{Transmission range}}} \right)$$
(3)

Value of CF is always less than 1. Higher the value of CF, closer is the vehicle to the centroid.

A new coefficient called Cluster Head Coefficient (CH Coefficient) is proposed to combine both velocity and transmission range while selecting CH. It is expressed as

$$CH{\text{ coefficient}}_{j} = \varepsilon CF_{j} + (1 - \varepsilon )\beta_{{WSF_{j} }}$$
(4)

Value of ε is selected as per the requirement, that is, it depends on the factor whether range is more important or the velocity. Vehicle having highest CH coefficient is selected as CH. Figure 3 shows the flowchart of proposed CH selection algorithm.

Fig. 3
figure 3

Cluster head selection process of AMRBC

4.3 Cluster Partitioning and Combining Algorithm (CPCA)

In a dense scenario, there are many vehicles in a cluster and there is a possibility that all the vehicles in a cluster are not able to transmit their status messages in CCHI. This can cause incorrect calculations of parameters resulting in packet drops. In this work, this possibility is considered and a Cluster Partitioning algorithm is proposed to ensure that all the vehicles in a cluster can successfully transmit their status message in the CCHI interval. Maximum number of vehicles in a cluster is defined using the relation

$$N_{\hbox{max} } = \frac{\text{CCHI}}{{ 2 ( {\text{Time to send one status message + Turn around time) + slot time}}}}$$
(5)

Here, turn-around time is the time required by a transceiver to switch from transmitter to receiver and vice versa. CPCA helps to partition clusters when number of vehicle exceeds Nmax. Range of all the vehicles in a cluster is divided by 2 while partitioning the cluster. Again, cluster formation process and CH selection process is performed and different channels are assigned to the newly formed clusters. CPCA also helps in combining two or more clusters into a single cluster if the total number of vehicles in a cluster decreases below a predefined number. In this process range of all the vehicles in the neighboring clusters are increased by a factor of 2. Then again cluster formation process and CH selection process is performed and a channel is assigned to the newly formed clusters. The algorithm for CPCA is described below.

Step 1

If N > Nmax then

Step 2

R = R/2 for each vehicle of that cluster

Step 3

Repeat cluster formation process

Step 4

Repeat CH selection process

Step 5

Go to step 1 to check the condition again

Step 6

Else if N < 0.2 Nmax for two or more neighboring clusters then

Step 7

R = 2R for each vehicle of that cluster

Step 8

Repeat cluster formation process

Step 9

Repeat CH selection process

Step 10

Go to step 1 to check the condition again

4.4 Assigning Priority to Safety Messages

Safety message should be given high priority over infotainment message because it contains important information regarding traffic jams and road accidents and should be delivered in time. When a vehicle has a safety message to send, it checks whether the channel is free or not. If channel is idle, it transmits the message. If channel is busy then it checks whether a safety message is being transmitted or an infotainment message. If ongoing transmission is of infotainment message then ongoing transmission is stopped and channel is freed and is occupied by the safety message. After transmission of safety message infotainment message is resumed. In case of ongoing transmission is of the safety message then new safety message will have to wait till the current transmission is finished. Figure 4 presents the complete flow chart of AMRBC.

Fig. 4
figure 4

Flowchart of AMRBC

5 Model Validation and Simulation

To check the network’s reliability, stability and other performances, following metrics are used: (i) Average CH time: it is sum of the time for which a CH remains as CH divided by number of CH selections in the network within the simulation time. (ii) Safety message delay: it is the average delay between transmission and successful reception of safety messages in the network. (iii) Reliability: it is the probability of successful exchange of the status messages by all the cluster members of a cluster within the CCHI. (iv) Infotainment message delay: it is the average delay between transmission and successful reception of infotainment messages in the network. (v) Packet delivery ratio: it is the ratio between received and transmitted data packets in the network. (vi) Packet loss ratio: it is the ratio between lost and transmitted data packets in the network. (vii) Throughput: it is the total number of bits received per unit time (or seconds).

Simulation is performed using network simulator-2 (NS2) [20] version 2.34 and is integrated with a realistic scenario generated using simulator for urban mobility (SUMO) [21]. Scenario has bi-directional roads with one lane in each direction. Figure 5 shows a part of scenario under simulation.

Fig. 5
figure 5

Snapshot of scenario under simulation

Speed range of vehicles is 10–50 m/s. Other simulation parameters are listed in Table 2. Results are compared with DMMAC [19] since it is comparable and relevant to this paper.

Table 2 Simulation parameters

Figure 6 shows the results of average cluster head time with respect to number of vehicles. Higher the value of average cluster head time, more stable is the cluster and it helps to control congestion. Since AMRBC considers range as a parameter with velocity to select CH, it will select a CH more close to centroid. Hence average cluster head time of AMRBC should be greater than that of DMMAC.

Fig. 6
figure 6

Average cluster head time versus number of nodes

Figure 7 shows the result of safety message delay with respect to number of vehicles. It is an important parameter which describes the average time taken by safety message to reach from source to destination. Lesser value of Safety message delay is preferable. In AMRBC, safety message is given priority over infotainment messages by stopping infotainment messages if a safety message needs the channel. So safety message will never be in the queue and its delay will be decreased.

Fig. 7
figure 7

Safety message dissemination time versus number of nodes

Figure 8 shows the result of infotainment message delay with respect to number of vehicles. It describes the average time taken by infotainment message to reach from source to destination. In AMRBC, safety message is given priority over infotainment messages by stopping non-safety messages if a safety message needs the channel. So infotainment message delay will be increased. However, lesser value of infotainment message delay is preferable and further work can be done for reducing its value.

Fig. 8
figure 8

Infotainment message delay versus number of nodes

Figures 9 and 10 show throughput and packet delivery ratio respectively with respect to number of vehicles. Higher value of throughput and packet delivery ratio is considered as better result. AMRBC ensures the stability of clusters and network. Hence, it will increase the total number of messages received at receivers in the network.

Fig. 9
figure 9

Throughput versus number of nodes

Fig. 10
figure 10

Packet delivery ratio versus number of nodes

Figure 11 shows the result of packet loss ratio with respect to number of vehicles. Lesser value of PLR is required. Due to high network stability of AMRBC, number of packets lost should be reduced.

Fig. 11
figure 11

Packet loss ratio versus number of Nodes

Figure 12 shows the result of reliability with respect to number of vehicles. CPCA algorithm used in AMRBC does not let the number of cluster members to be increased more than a predefined value. It ensures the successful exchange of status messages by every cluster member within CCHI. Hence, it will increase the reliability.

Fig. 12
figure 12

Reliability versus number of nodes

6 Conclusion

In this work, a clustering algorithm to control congestion depending on vehicle velocity is proposed. In addition to that, a CH selection algorithm based on relative velocity and position of a vehicle is proposed that increases the stability of the cluster. CPCA is proposed to limit the maximum number of vehicles to increase reliability. Proposed CH selection algorithm includes velocity as well as transmission range of vehicles while selecting CH. To include transmission range for CH selection, two new factors, viz. closeness factor and CH coefficient have been proposed. Further, in the course of an infotainment message being transmitted in a cluster, if a safety message arises then, infotainment message is aborted and safety message is rendered immediate channel access.

Further work can be done on the proposed CPCA algorithm which partitions and combines clusters when required. If a cluster is partitioned, it will have to select another CH for its cluster members. Hence, average cluster head time will decrease because of this process. The problem worsens if the scenario is very dense. In this case Average cluster head time may be decreased by a large amount. So, in future, to avoid a condition when number of members in a cluster increases beyond threshold limit, cluster partitioning and subsequent CH selection mechanism can be proposed that further helps in controlling congestion.