# A Reliable Broadcast Protocol in Vehicular Ad Hoc Networks

Authors: Xiumei Fan; Chao Wang; Jiguo Yu; Kai Xing; Yingwen Chen; Jiawei Liang
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Periodical broadcasts of individual vehicle’s safety information such as velocity and acceleration are critical
in vehicular ad hoc networks (VANETs). However, current contention-based
media access control (MAC) protocols cannot guarantee high performance in high density VANETs.
In this paper, we propose a MAC protocol based ons-disjunct code
to achieve reliable and real-time broadcasts via assigning a channel to each vehicle
as the vehicle enters the network. Our protocol is adaptive as vehicles are required to adjust
their communication ranges according to the network density
in order to avert the interference among them. We conduct an extensive simulation study, and our results indicate that
the proposed scheme can successfully achieve the requirements of the dedicated short range communication (DSRC) standard, that is,
to broadcast safety information 10 times per second.
Even at a high vehicle density, our scheme still guarantees that the success rates of both transmission and reception are greater than 95%, and the collision rates
of access collision and merging collision are lower than 10 collisions/period.


---

## Body

## 1. Introduction

A vehicular ad hoc network (VANET) consists of a collection of vehicles communicating with each other or with road side units (RSUs) by wireless networking techniques. Each vehicle is equipped with an onboard unit (OBU) that includes a global position system (GPS) device. The major purpose of VANETs is to provide safety information such as collision avoidance and traffic jam prediction to vehicles in the network [1]. Other services such as entertainment and social networking can also be supported by VANETs. Because of the critical safety issues, the United States Federal Communication Commission has allocated 75 MHz spectrum from 5.850 GHz to 5.925 GHz to the dedicated short-range communication (DSRC) standard, which is specifically designed for short-range to medium-range automotive communication use.The DSRC standard divides the 75 MHz spectrum space into seven 10 MHz channels. The one in the middle is the control channel while the other six are service channels. Safety information is periodically broadcasted to neighboring vehicles through the control channel 10 times/second. But not the whole100ms period is used for safety information broadcasts: half of this period is used by the other six service channels. The safety information and control information altogether need to be sent out within 50 ms [2, 3]. However, the MAC protocol of DSRC adopts the contention mechanism, which is called carrier sense multiple access with collision avoidance (CSMA/CA). This protocol performs well only when the node density is low. When the density increases, frequent transmission collisions occur due to the relatively limited time period and the contention-based mechanism. Based on real experiments, [4] has shown that there is a gray zone phenomenon for VANETs, which means that a good reception (package deliver rate (PDR) > 80%) is not always guaranteed.Reliably broadcasting safety information to neighboring nodes is a big challenge, especially in the case of high node density. Although a lot of previous work has focused on this problem, most of it marginally increase some aspects of the performance. As Section2 describes, contention-based protocols aim at achieving a larger throughput and a lower transmission delay, while schedule-based protocols focus on improving transmission reliability. Nevertheless, neither of these two categories of solutions to date has addressed scalability problems at scenarios when node density in the network is high.Motivated by this situation, we present a MAC protocol based ons-disjunct code. In this protocol, each node is assigned a codeword locally and independently according to its current GPS location. Our proposed algorithm assigns a node a transmission channel according to its codeword. In order to adapt to high node density we propose a transmission range control algorithm based on the number of nodes in the communication range of a vehicle. The analysis and simulation results show that our protocol achieves considerable performance improvements, with the success rates of transmission and reception greater than 95%. The contributions of this paper are outlined as follows.(1)
We first propose a distributed codeword allocation algorithm, which assigns a codeword to each vehicle based on its current location.(2)
We then present a channel assignment algorithm based ons-disjunct code. Theoretical analysis of this algorithm is provided to derive the probabilities of merging collision and access collision.(3)
We next design a transmission range control algorithm, which can dynamically adjust the coverage range of a vehicle to reduce interference.(4)
We finally conduct an extensive simulation study to verify the performance of our protocol. The results demonstrate high success rates in transmission and reception while keeping a low collision probability.The rest of the paper is organized as follows. Section2 summarizes the related work. Section 3 presents our system model and Section 4 details the three algorithms. Section 5 analyzes the performance of the channel allocation algorithm and Section 6 presents our simulation results. At last, Section 7 draws our conclusion.


## 2. Related Work

Reliable broadcast has been extensively studied. The proposed approaches are either contention-based (such as CSMA/CA) or schedule-based (such as time division multiple address (TDMA) and frequency division multiple access (FDMA)).Several contention-based approaches proposed for VANETs [5–8] focus on optimizing the channel contention mechanisms and channel parameters. Artimy et al. [7] have built a math model to simulate the relationship between vehicle density and velocity to estimate the vehicle density and proposed an algorithm to dynamically change the transmission range based on the estimated density. Rawat et al. [8] have proposed an approach that not only adjusts the transmission range according to node density but also tunes enhanced distributed channel access (EDCA) parameters to achieve a larger throughput and a lower transmission delay. However, these studies cannot completely solve the reliable broadcast problem, because they are still based on the contention mechanism, and suffer from serious contention problems when the node density is very high.The main idea of schedule-based mechanisms is to avoid contention collisions of the nodes in the network by designing a schedule algorithm [9–12]. Farnoud and Valaee [9] have compared the positive orthogonal code- (POC-) based broadcast algorithm with the synchronous p-persistent retransmission (SPR) and the synchronous fixed retransmission (SFR) algorithms. For POC-based broadcast, nodes in the network repeatedly broadcast information to guarantee broadcast reliability; thus the protocol wastes a lot of network resource due to repetition. Choi et al. [10] have proposed the concept of location division multiple access (LDMA), in which a time period is divided into many slots and each time slot is assigned to a node located at a certain location. This approach can mitigate the broadcast storm problem but is not appropriate for periodically broadcasting control information.Omar et al. [12] have presented an algorithm called VeMAC which is also based on TDMA. All the slots in VeMAC are divided into three sets (left, right, and infrastructure); and each node chooses a channel from its corresponding set to access. Additionally this approach uses the RTS/CTS mechanism to tackle the hidden terminal problem. The result demonstrates a good performance in success rate and collision rate. However, our simulation study indicates that when the node density is high, the performance clearly degrades. Because VANETs must operate in high densities, dense scenarios are an important area that should be considered when designing algorithms for better performance.s-disjunct code has been used for channel allocation in previous work [13, 14]; but those algorithms fit stationary networks better than dynamic networks as every node in the network is assumed to have a code before joining in the network and the code will never change. This does not fit VANETs, where nodes are always moving. Motivated by the heuristics in [14], we develop algorithms in this paper that are applicable to VANET environments.To address the problems in high density scenarios, we propose a protocol that is based ons-disjunct code to assign channels and tunes transmission range according to node density. Our protocol incorporates both the schedule-based approach and the contention-based approach to achieve a better performance.


## 3. System Model

In this section, we introduce the underlying network model, assumptions, and the terminologies employed in this paper.


### 3.1. Basic Framework

We consider a vehicular ad hoc network withV vehicles (also called nodes). Each vehicle is assumed to be equipped with a GPS receiver or be able to obtain its location information from any technique [15]. Based on the DSRC standard, the band width of the control channel is 10 MHz, which can be divided into Q orthogonal (nonoverlapping) subchannels: k1,k2,…,kQ. We assume each node is equipped with Q radio interfaces for data reception and one additional interface for data transmission. This is a practical assumption due to the low cost of radios nowadays. Each radio can access any subchannel and the footprint of the radio is a disk resulted from the equipped omnidirectional antenna.Safety information is sent every 100 milliseconds in the control channel, required by the DSRC standard. The 100 milliseconds are shared by both safety information and nonsafety information. Although the problem of time allocation to safety information has been discussed in [16], there is not a fixed subinterval value. It is advised to change according to the node density and the reliability requirement. But the node density is always changing, and it is hard to coordinate the subintervals of all the nodes in the network to the same value. So it is necessary to set a fixed subinterval value to all the nodes in the network. Currently, the standard [17] fixes the default value of safety information broadcast subinterval as 50 milliseconds. So we take the default value as the safety information broadcast subinterval in this paper. However, it can be changed in some other scenarios. Each subchannel of the control channel can be shared by multiple nodes in time domain, which means that 50ms can be partitioned into multiple time slots and these slots can be accessed by different nodes without collision. Avirtual channel is defined to be a time slot in a subchannel which is part of the control channel in VANETs. If the number of slots in every 50 ms is L and the number of subchannels is Q, the number of virtual channels is N=Q×L. For simplicity, we call a “virtual channel” a “channel” in the rest of the paper.For each node, theN virtual channels are partitioned into primary channels and secondary channels. A node is linked with a binary column vector called achannel codeword, which is used to mark primary channels and secondary channels: “1” represents a primary channel and “0” represents a secondary channel. For example, a node with the vector c→u=(1,1,1,0,0,0,0,0,0,0)T indicates that channels k1, k2, and k3 are its primary channels and channels k4, k5, k6, k7, k8, k9, and k10 are its secondary channels. Nodes prefer primary channels to secondary channels and in general the number of primary channels is smaller than that of the secondary channels for any node.It is required that, for any two different codewordsci and cj, there are at least two channels k1 and k2 such that k1 is primary to i but secondary to j and k2 is primary to j but secondary to i. Take c→i=(1,1,1,0,0,0,0,0,0,0)T and c→j=(0,1,1,1,0,0,0,0,0,0)T, for instance; channel k1 and channel k4 are such channels for i and j, respectively.In our study, the network can be modeled by a directed graphG(V,E,C), where V represents network nodes, E represents directed links among nodes, and C is an N×V matrix with each column being a channel codeword associated with a node in V. For a node u∈V, we use N(u) to denote u’s interferers whose communication coverage areas overlap with that of u.


### 3.2.s-Disjunct Code

Given a binaryN×t matrix X, the ith (1≤i≤t) column of X is denoted as X(i), where X(i)=(x1(i),x2(i),x3(i),…,xN(i))T. The BoolSum of X(i) and X(j), denoted by X(i)∨X(j), is also a binary vector of length N, shown as Y=(y1,y2,y3,…,yN)T, where(1)yn=0,xni=xnj=01,others.If X(i)∨X(j)=X(i) holds, X(i) covers X(j).Definition 1 (s-disjunct code).
A binary matrixX defines s-disjunct code if and only if the Boolean sum of any s-subset of columns of X does not cover any other column of X that is not in s-subset [18, 19].Take the2-disjunct code shown in ∗ as an example; the BoolSum of the first two codewords X(1) and X(2) cannot cover any other codeword in X except X(1) and X(2). An example of a 2-disjunct code is as follows:∗1110000000100110000001010100000010110000100100110001000010100010000110000100100100001001010000010011.We define the column weight as(2)wi=∑k=1Nxkiand the row weight as(3)rj=∑k=1txjk.Based on the characteristic ofs-disjunct code, [14] derived the following important property.Property 1.
Givens-disjunct code X, let z be any designated codeword in X and let S be any subset of no more than s columns not including z. There exists at least one index i, such that the ith element in z is “1” and the ith element of any codeword in S is “0.”This property motivates us to build a mapping between the codeC in the network G(V,E,C) and s-disjunct code X. In other words, we can use N×ts-disjunct code X as the channel code, where N represents the number of channels and t stands for the number of available codewords. Any column of code X is an available codeword assigned to a node in network G. Note that 1/0 still stands for a primary or secondary channel of node u; column weight wi means the number of primary channels that node i has and row weight rk means the number of nodes in G using channel k as a primary channel. In the following of this paper, we use s-disjunct code X as a code matrix C.


### 3.3. Main Idea

We focus on channel assignment to mitigate interference among channels and maximize the network capability by usings-disjunct code. Given that every node has a copy of the codeword matrix X, a node picks up a codeword from X according to its current location and ID (e.g., vehicle’s plate). At Section 4.1, we propose an algorithm to assign codewords to nodes randomly.Then each node chooses an available channel based on its channel codeword and the current channel status, as shown in Section4.1. Each node maintains two tables: the one-hop neighbor table and the two-hop neighbor table, which contains the one-hop and two-hop neighborhood information, respectively. Note that due to the distinct transmission ranges of the nodes, the one-hop neighbor set of node u includes those nodes sending messages successfully to u. The information consists of node IDs, their codeword indexes, and their current transmission channels. The one-hop neighbor table and the codewords of the nodes are broadcasted with safety information every time. On the contrary, the two-hop neighbor table shall be updated once a node receives its neighbors’ one-hop neighbor tables. When a collision happens, the colliding nodes release their current channels and choose new channels based on their codewords.At last, an algorithm is proposed at Section4.3. Nodes adjust transmission ranges to control the number of nodes in their coverage ranges. In the next section, we describe the three algorithms in detail.


## 3.1. Basic Framework

We consider a vehicular ad hoc network withV vehicles (also called nodes). Each vehicle is assumed to be equipped with a GPS receiver or be able to obtain its location information from any technique [15]. Based on the DSRC standard, the band width of the control channel is 10 MHz, which can be divided into Q orthogonal (nonoverlapping) subchannels: k1,k2,…,kQ. We assume each node is equipped with Q radio interfaces for data reception and one additional interface for data transmission. This is a practical assumption due to the low cost of radios nowadays. Each radio can access any subchannel and the footprint of the radio is a disk resulted from the equipped omnidirectional antenna.Safety information is sent every 100 milliseconds in the control channel, required by the DSRC standard. The 100 milliseconds are shared by both safety information and nonsafety information. Although the problem of time allocation to safety information has been discussed in [16], there is not a fixed subinterval value. It is advised to change according to the node density and the reliability requirement. But the node density is always changing, and it is hard to coordinate the subintervals of all the nodes in the network to the same value. So it is necessary to set a fixed subinterval value to all the nodes in the network. Currently, the standard [17] fixes the default value of safety information broadcast subinterval as 50 milliseconds. So we take the default value as the safety information broadcast subinterval in this paper. However, it can be changed in some other scenarios. Each subchannel of the control channel can be shared by multiple nodes in time domain, which means that 50ms can be partitioned into multiple time slots and these slots can be accessed by different nodes without collision. Avirtual channel is defined to be a time slot in a subchannel which is part of the control channel in VANETs. If the number of slots in every 50 ms is L and the number of subchannels is Q, the number of virtual channels is N=Q×L. For simplicity, we call a “virtual channel” a “channel” in the rest of the paper.For each node, theN virtual channels are partitioned into primary channels and secondary channels. A node is linked with a binary column vector called achannel codeword, which is used to mark primary channels and secondary channels: “1” represents a primary channel and “0” represents a secondary channel. For example, a node with the vector c→u=(1,1,1,0,0,0,0,0,0,0)T indicates that channels k1, k2, and k3 are its primary channels and channels k4, k5, k6, k7, k8, k9, and k10 are its secondary channels. Nodes prefer primary channels to secondary channels and in general the number of primary channels is smaller than that of the secondary channels for any node.It is required that, for any two different codewordsci and cj, there are at least two channels k1 and k2 such that k1 is primary to i but secondary to j and k2 is primary to j but secondary to i. Take c→i=(1,1,1,0,0,0,0,0,0,0)T and c→j=(0,1,1,1,0,0,0,0,0,0)T, for instance; channel k1 and channel k4 are such channels for i and j, respectively.In our study, the network can be modeled by a directed graphG(V,E,C), where V represents network nodes, E represents directed links among nodes, and C is an N×V matrix with each column being a channel codeword associated with a node in V. For a node u∈V, we use N(u) to denote u’s interferers whose communication coverage areas overlap with that of u.


## 3.2.s-Disjunct Code

Given a binaryN×t matrix X, the ith (1≤i≤t) column of X is denoted as X(i), where X(i)=(x1(i),x2(i),x3(i),…,xN(i))T. The BoolSum of X(i) and X(j), denoted by X(i)∨X(j), is also a binary vector of length N, shown as Y=(y1,y2,y3,…,yN)T, where(1)yn=0,xni=xnj=01,others.If X(i)∨X(j)=X(i) holds, X(i) covers X(j).Definition 1 (s-disjunct code).
A binary matrixX defines s-disjunct code if and only if the Boolean sum of any s-subset of columns of X does not cover any other column of X that is not in s-subset [18, 19].Take the2-disjunct code shown in ∗ as an example; the BoolSum of the first two codewords X(1) and X(2) cannot cover any other codeword in X except X(1) and X(2). An example of a 2-disjunct code is as follows:∗1110000000100110000001010100000010110000100100110001000010100010000110000100100100001001010000010011.We define the column weight as(2)wi=∑k=1Nxkiand the row weight as(3)rj=∑k=1txjk.Based on the characteristic ofs-disjunct code, [14] derived the following important property.Property 1.
Givens-disjunct code X, let z be any designated codeword in X and let S be any subset of no more than s columns not including z. There exists at least one index i, such that the ith element in z is “1” and the ith element of any codeword in S is “0.”This property motivates us to build a mapping between the codeC in the network G(V,E,C) and s-disjunct code X. In other words, we can use N×ts-disjunct code X as the channel code, where N represents the number of channels and t stands for the number of available codewords. Any column of code X is an available codeword assigned to a node in network G. Note that 1/0 still stands for a primary or secondary channel of node u; column weight wi means the number of primary channels that node i has and row weight rk means the number of nodes in G using channel k as a primary channel. In the following of this paper, we use s-disjunct code X as a code matrix C.


## 3.3. Main Idea

We focus on channel assignment to mitigate interference among channels and maximize the network capability by usings-disjunct code. Given that every node has a copy of the codeword matrix X, a node picks up a codeword from X according to its current location and ID (e.g., vehicle’s plate). At Section 4.1, we propose an algorithm to assign codewords to nodes randomly.Then each node chooses an available channel based on its channel codeword and the current channel status, as shown in Section4.1. Each node maintains two tables: the one-hop neighbor table and the two-hop neighbor table, which contains the one-hop and two-hop neighborhood information, respectively. Note that due to the distinct transmission ranges of the nodes, the one-hop neighbor set of node u includes those nodes sending messages successfully to u. The information consists of node IDs, their codeword indexes, and their current transmission channels. The one-hop neighbor table and the codewords of the nodes are broadcasted with safety information every time. On the contrary, the two-hop neighbor table shall be updated once a node receives its neighbors’ one-hop neighbor tables. When a collision happens, the colliding nodes release their current channels and choose new channels based on their codewords.At last, an algorithm is proposed at Section4.3. Nodes adjust transmission ranges to control the number of nodes in their coverage ranges. In the next section, we describe the three algorithms in detail.


## 4.s-Disjunct Code Based MAC Protocol

This section introduces the codeword distribution algorithm and shows how to links-disjunct code to the channel allocation algorithm. A communication range control algorithm is finally proposed to reduce the interference among neighboring nodes.


### 4.1. Codeword Distribution

LetG(V,E,X) be a vehicular ad-hoc network with V nodes and let X be s-disjunct code for the network. Every codeword in X has an index i and we use X(i) to denote the ith codeword in X. Any node u in this network has a copy of the code X.Each node chooses a codeword fromX when it comes into the network and the codeword is changed with its location. Each node only needs to know its current GPS location based on which to determine the codeword to use. Thus the algorithm is distributed.A large city area is divided into a number of small grids with the size of several hundred square meters. Although GPS location information is usually with an error of several meters, a node can still locate itself to a grid accurately. The codeword setX is divided into M subsets that do not intersect. Let Sm(1≤m≤M) be the mth subset. For ∀i,j, 1≤i, j≤M, and i≠j, we have Si∩Sj=∅. Each grid is assigned a codeword subset Sm. Any node in the grid chooses one codeword from Sm. Next, we introduce how to map grids to subsets and present the algorithm for a node to choose a codeword from a subset Sm.


#### 4.1.1. Segment Generation

We divide a large area (such as a city or a state) to a number of small grids with lengthL, as illustrated in Figure 1(a). Additionally, we divide M subsets to a 2-dimensional array A with m rows and m columns, where m2≤M, as shown in Figure 1(b). Each element denoted by Aij in A stands for a subset of codewords and the codeword number in each subset is t/m2. Next, we show how to map a 2D grid to a 2D array, as shown in Figure 1(c).Figure 1
Segment generation.
(a)
Area grids
(b)
Codeword array
(c)
Map togetherLet0∘ longitude (namely meridian) and 0∘ latitude (namely equator) be reference lines. Given a node’s GPS location (latitude, longitude), its distance to the equator is(4)distancee=latitude-0°360°×2πR′,where R′ means the radius of the meridian. Its distance to the meridian is(5)distancem=longitude-0°360°×2πRcos⁡latitude,where R is the radius of the equator. The number of segments from the equator to this node is(6)indexe=distanceeL=latitude-0°/360°×2πR′L,where a is the minimum integer that is not smaller than a. This means the node is at the (indexe)th grid with the equator as reference. Similarly, the number of segments from the meridian to this node is(7)indexm=distancemL=longitude-0°/360°×2πRcos⁡latitudeL.Then the corresponding subsetAij in array A is chosen according to (indexe) and (indexm). Intuitively, we should do a modulo operation on indexm or indexe:(8)i=indexe%m+1,j=indexm%m+1.


#### 4.1.2. Codeword Selection

Once a node has already known codeword subset to choose, it does a hash operation on its plate number and the output of the hash operation is the index of the codeword inAij subset. The output domain of the hash function is at the range of [0,t/m2] and the hash function performs randomly. Each node may find a proper index with the smallest probability of collisions. Based on the rules, the best case is that any two codewords used in the area of (mL)2 are different at any time instance. But there is still a collision probability. Take 8-bit Pearson hash function as an example; we can get the average number of collisions when there are n(1~100) nodes to choose codewords simultaneously. The function input is any 5-digit decimal number generated randomly and this number is considered as a plate number. Its output is a decimal number ranging from 0 to 255 as the index in a codeword subset. Figure 2 reports the number of collisions averaged over 100 runs when two or three nodes with different plate numbers hashed to the same value. One can see that when the number of nodes is less than 60, there exists no more than 4 pairs of collisions. When the number of nodes is more than 60, there are more collisions for both two vehicles and three vehicles. The average number of collisions for three vehicles is less than 1 sometimes, which means that collisions for three vehicles do not happen usually. Since each node has several primary channels to choose, two nodes may avoid choosing the same primary channel, even though their plate numbers are hashed to the same value; thus code collisions do not affect our algorithm too much.Figure 2
The number of collisions for two or three nodes.


### 4.2. Channel Allocation Algorithm

In this section, we present the channel allocation algorithm shown in Algorithm1 for broadcast. Each node u in G has a codeword X(u), according to the description in the last section. Let N(u) be the one-hop and two-hop neighbors of u and their codewords are denoted by X(N(u)). Node u at a time instance only takes one codeword and it knows the codewords and transmission channels of N(u). Denote the channels currently occupied by N(u) by CH(O). Let CHc(u) be its currently used channel and let CH(u) be the channel assigned to node u to be used in the next time period.Algorithm 1:Channel allocation of broadcast for node u.
Input: Codewords X(u), X(N(u)), CH(O), CHc(u)
Output: CH(u), the channel assigned to u.
(1)function  CH(u) = ChannelSelect(X(u), X(N(u)), CH(O), CHc(u))
(2)CH1(u) ← Channels(BoolSum(X(N(u)∪u))⊕BoolSum(X(N(u))))  ⊳ Find the set of primary channels
of u that are secondary to all nodes in N(u).
(3)if  CH1(u)≠∅  then
(4)CH(u)=SelectAChannel(CH1(u),CHc(u))
(5)else
(6)CH2(u) ← Channels(X(u))∩CH(O)¯  ⊳ Find the set of available primary channels for u.
(7)if  CH2≠∅  then
(8)CH(u) = SelectAChannel(CH2(u),CHc(u))
(9)else
(10)CH3(u) ← Channels(X(u)) with the smallest row weight ⊳ Find the set of primary channels
with the least row weight
(11) CH(u) = SelectAChannel(CH3(u),CHc(u))
(12) end if
(13) end if
(14)end function
(15)function  CH(u) = SeclectAChannel(CHi(u), CHc(u))
(16) if  CHc(u)∈CHi(u)  then
(17) CH(u)=CHc(u)   ⊳ Verify whether its current channel belongs to CHi(u)
(18) else
(19) CH(u) ← RandomlyChooseOneFrom(CHi(u))
(20) end if
(21)end functionIntuitively,u should choose those channels not being used by any of its interferers. At the beginning, u should choose a channel that is secondary to N(u) from its primary channel set. If such a channel can not be found, choose a primary channel that is not used by N(u) currently. If all of the primary channels of u are used, a channel with the least row weight of N(u) should be chosen at last.The basic idea of Algorithm1 is sketched below.(1)
GivenX(u) and X(N(u)), BoolSum of X(N(u)∪{u}) and BoolSum of X(N(u)) are first calculated. Then the set of channels CH1 which are from the primary channel set of node u but secondary to all nodes in N(u) can be obtained. In addition, channels in CH1 cannot be used by N(u). If CH1≠∅, verify whether CHc(u)∈CH1 holds. If so, assign CHc(u) to CH(u); otherwise, randomly assign one channel of CH1 to u.(2)
IfCH1=∅, compute the set of channels CH2 which are primary to node u and currently not being used by N(u). If CH2≠∅, check whether CHc(u)∈CH2 holds. If so, assign CHc(u) to CH(u); otherwise, randomly choose one from CH2 to allocate to u.(3)
IfCH2=∅, calculate the set CH3 in its own primary channels, in order to get the channel with the least row weight of X(N(u)). Then if CHc(u)∈CH3, assign CHc(u) to CH(u); if not, randomly assign one channel of CH3 to u.Example 2.
Takes-disjunct code in ∗ as an example. Give a network with three nodes {x,y,z} whose codewords are, respectively, X(x)=X(2), X(y)=X(3), and X(z)=X(4) and whose current channels are, respectively, 3, 4, and 5. Then node u whose current channel is 1 joins the network and x, y, and z become u’s neighbors. According to Algorithm 1, u calculates CH1=∅, CH2={1,2}. Because u’s current channel 1∈{1,2}, CH(u)={1}, which means that channel 1 should be assigned to node u.Remark 3.
First, a node prefers its primary channels to its secondary channels. Second, after a node obtains the nonempty channel set (CH1, CH2, or CH3), it first checks whether its currently used channel is in the set. If yes, its currently used channel should be allocated to u instead of randomly choosing a new channel from the set.


### 4.3. Communication Range Control

Each road may have different vehicle densities due to nodes’ mobility. When the density is considerably high, the capacity of control channel is not adequate for a large amount of vehicles to access. At such a high density, a node only needs to transmit its information to the nodes close to itself. At this subsection, we propose an algorithm to control the transmission range of each node with a purpose of reusing the network space and decreasing the interference.The idea of dynamic transmission range control was first proposed by [7], which is based on vehicle’s stop time to estimate density and tune transmission range. In our algorithm, we use a more direct and lighter algorithm to achieve the objective. First, we define node density K as(9)K=Current  Number  of  NodesMaximum  Number  of  Nodes.In order to estimate the current number of nodes in a designated area, each node should count the nodes in its vicinity within the minimum transmission rangeRmin according to the information received from its neighbors. The maximum number of nodes can be estimated as follows. Assume that the safety driving distance Ds between two consecutive cars is known (it is got from observations and statics) and given the minimum transmission range, the maximum number of nodes within this range can be computed as Rmin∗L/Ds (L is the number of lanes obtained from the local digital map). Then(10)K=Current  Number  of  NodesRmin∗L/Ds.Therefore, the transmission range is calculated by the following equation:(11)TR=max⁡Rmax∗1-K,Rmin,where (i)
TR is the calculated transmission range,(ii)
Rmax is the maximum transmission range,(iii)
K is the ratio of the number of nodes to the maximum number of nodes that can be accommodated within the minimum transmission range area.In our algorithm the minimum transmission rangeRmin is defined in order to guarantee network connection. If the transmission range computed from (11) is smaller than Rmin, the computed one should be dropped and Rmin should be chosen.


## 4.1. Codeword Distribution

LetG(V,E,X) be a vehicular ad-hoc network with V nodes and let X be s-disjunct code for the network. Every codeword in X has an index i and we use X(i) to denote the ith codeword in X. Any node u in this network has a copy of the code X.Each node chooses a codeword fromX when it comes into the network and the codeword is changed with its location. Each node only needs to know its current GPS location based on which to determine the codeword to use. Thus the algorithm is distributed.A large city area is divided into a number of small grids with the size of several hundred square meters. Although GPS location information is usually with an error of several meters, a node can still locate itself to a grid accurately. The codeword setX is divided into M subsets that do not intersect. Let Sm(1≤m≤M) be the mth subset. For ∀i,j, 1≤i, j≤M, and i≠j, we have Si∩Sj=∅. Each grid is assigned a codeword subset Sm. Any node in the grid chooses one codeword from Sm. Next, we introduce how to map grids to subsets and present the algorithm for a node to choose a codeword from a subset Sm.


### 4.1.1. Segment Generation

We divide a large area (such as a city or a state) to a number of small grids with lengthL, as illustrated in Figure 1(a). Additionally, we divide M subsets to a 2-dimensional array A with m rows and m columns, where m2≤M, as shown in Figure 1(b). Each element denoted by Aij in A stands for a subset of codewords and the codeword number in each subset is t/m2. Next, we show how to map a 2D grid to a 2D array, as shown in Figure 1(c).Figure 1
Segment generation.
(a)
Area grids
(b)
Codeword array
(c)
Map togetherLet0∘ longitude (namely meridian) and 0∘ latitude (namely equator) be reference lines. Given a node’s GPS location (latitude, longitude), its distance to the equator is(4)distancee=latitude-0°360°×2πR′,where R′ means the radius of the meridian. Its distance to the meridian is(5)distancem=longitude-0°360°×2πRcos⁡latitude,where R is the radius of the equator. The number of segments from the equator to this node is(6)indexe=distanceeL=latitude-0°/360°×2πR′L,where a is the minimum integer that is not smaller than a. This means the node is at the (indexe)th grid with the equator as reference. Similarly, the number of segments from the meridian to this node is(7)indexm=distancemL=longitude-0°/360°×2πRcos⁡latitudeL.Then the corresponding subsetAij in array A is chosen according to (indexe) and (indexm). Intuitively, we should do a modulo operation on indexm or indexe:(8)i=indexe%m+1,j=indexm%m+1.


### 4.1.2. Codeword Selection

Once a node has already known codeword subset to choose, it does a hash operation on its plate number and the output of the hash operation is the index of the codeword inAij subset. The output domain of the hash function is at the range of [0,t/m2] and the hash function performs randomly. Each node may find a proper index with the smallest probability of collisions. Based on the rules, the best case is that any two codewords used in the area of (mL)2 are different at any time instance. But there is still a collision probability. Take 8-bit Pearson hash function as an example; we can get the average number of collisions when there are n(1~100) nodes to choose codewords simultaneously. The function input is any 5-digit decimal number generated randomly and this number is considered as a plate number. Its output is a decimal number ranging from 0 to 255 as the index in a codeword subset. Figure 2 reports the number of collisions averaged over 100 runs when two or three nodes with different plate numbers hashed to the same value. One can see that when the number of nodes is less than 60, there exists no more than 4 pairs of collisions. When the number of nodes is more than 60, there are more collisions for both two vehicles and three vehicles. The average number of collisions for three vehicles is less than 1 sometimes, which means that collisions for three vehicles do not happen usually. Since each node has several primary channels to choose, two nodes may avoid choosing the same primary channel, even though their plate numbers are hashed to the same value; thus code collisions do not affect our algorithm too much.Figure 2
The number of collisions for two or three nodes.


## 4.1.1. Segment Generation

We divide a large area (such as a city or a state) to a number of small grids with lengthL, as illustrated in Figure 1(a). Additionally, we divide M subsets to a 2-dimensional array A with m rows and m columns, where m2≤M, as shown in Figure 1(b). Each element denoted by Aij in A stands for a subset of codewords and the codeword number in each subset is t/m2. Next, we show how to map a 2D grid to a 2D array, as shown in Figure 1(c).Figure 1
Segment generation.
(a)
Area grids
(b)
Codeword array
(c)
Map togetherLet0∘ longitude (namely meridian) and 0∘ latitude (namely equator) be reference lines. Given a node’s GPS location (latitude, longitude), its distance to the equator is(4)distancee=latitude-0°360°×2πR′,where R′ means the radius of the meridian. Its distance to the meridian is(5)distancem=longitude-0°360°×2πRcos⁡latitude,where R is the radius of the equator. The number of segments from the equator to this node is(6)indexe=distanceeL=latitude-0°/360°×2πR′L,where a is the minimum integer that is not smaller than a. This means the node is at the (indexe)th grid with the equator as reference. Similarly, the number of segments from the meridian to this node is(7)indexm=distancemL=longitude-0°/360°×2πRcos⁡latitudeL.Then the corresponding subsetAij in array A is chosen according to (indexe) and (indexm). Intuitively, we should do a modulo operation on indexm or indexe:(8)i=indexe%m+1,j=indexm%m+1.


## 4.1.2. Codeword Selection

Once a node has already known codeword subset to choose, it does a hash operation on its plate number and the output of the hash operation is the index of the codeword inAij subset. The output domain of the hash function is at the range of [0,t/m2] and the hash function performs randomly. Each node may find a proper index with the smallest probability of collisions. Based on the rules, the best case is that any two codewords used in the area of (mL)2 are different at any time instance. But there is still a collision probability. Take 8-bit Pearson hash function as an example; we can get the average number of collisions when there are n(1~100) nodes to choose codewords simultaneously. The function input is any 5-digit decimal number generated randomly and this number is considered as a plate number. Its output is a decimal number ranging from 0 to 255 as the index in a codeword subset. Figure 2 reports the number of collisions averaged over 100 runs when two or three nodes with different plate numbers hashed to the same value. One can see that when the number of nodes is less than 60, there exists no more than 4 pairs of collisions. When the number of nodes is more than 60, there are more collisions for both two vehicles and three vehicles. The average number of collisions for three vehicles is less than 1 sometimes, which means that collisions for three vehicles do not happen usually. Since each node has several primary channels to choose, two nodes may avoid choosing the same primary channel, even though their plate numbers are hashed to the same value; thus code collisions do not affect our algorithm too much.Figure 2
The number of collisions for two or three nodes.


## 4.2. Channel Allocation Algorithm

In this section, we present the channel allocation algorithm shown in Algorithm1 for broadcast. Each node u in G has a codeword X(u), according to the description in the last section. Let N(u) be the one-hop and two-hop neighbors of u and their codewords are denoted by X(N(u)). Node u at a time instance only takes one codeword and it knows the codewords and transmission channels of N(u). Denote the channels currently occupied by N(u) by CH(O). Let CHc(u) be its currently used channel and let CH(u) be the channel assigned to node u to be used in the next time period.Algorithm 1:Channel allocation of broadcast for node u.
Input: Codewords X(u), X(N(u)), CH(O), CHc(u)
Output: CH(u), the channel assigned to u.
(1)function  CH(u) = ChannelSelect(X(u), X(N(u)), CH(O), CHc(u))
(2)CH1(u) ← Channels(BoolSum(X(N(u)∪u))⊕BoolSum(X(N(u))))  ⊳ Find the set of primary channels
of u that are secondary to all nodes in N(u).
(3)if  CH1(u)≠∅  then
(4)CH(u)=SelectAChannel(CH1(u),CHc(u))
(5)else
(6)CH2(u) ← Channels(X(u))∩CH(O)¯  ⊳ Find the set of available primary channels for u.
(7)if  CH2≠∅  then
(8)CH(u) = SelectAChannel(CH2(u),CHc(u))
(9)else
(10)CH3(u) ← Channels(X(u)) with the smallest row weight ⊳ Find the set of primary channels
with the least row weight
(11) CH(u) = SelectAChannel(CH3(u),CHc(u))
(12) end if
(13) end if
(14)end function
(15)function  CH(u) = SeclectAChannel(CHi(u), CHc(u))
(16) if  CHc(u)∈CHi(u)  then
(17) CH(u)=CHc(u)   ⊳ Verify whether its current channel belongs to CHi(u)
(18) else
(19) CH(u) ← RandomlyChooseOneFrom(CHi(u))
(20) end if
(21)end functionIntuitively,u should choose those channels not being used by any of its interferers. At the beginning, u should choose a channel that is secondary to N(u) from its primary channel set. If such a channel can not be found, choose a primary channel that is not used by N(u) currently. If all of the primary channels of u are used, a channel with the least row weight of N(u) should be chosen at last.The basic idea of Algorithm1 is sketched below.(1)
GivenX(u) and X(N(u)), BoolSum of X(N(u)∪{u}) and BoolSum of X(N(u)) are first calculated. Then the set of channels CH1 which are from the primary channel set of node u but secondary to all nodes in N(u) can be obtained. In addition, channels in CH1 cannot be used by N(u). If CH1≠∅, verify whether CHc(u)∈CH1 holds. If so, assign CHc(u) to CH(u); otherwise, randomly assign one channel of CH1 to u.(2)
IfCH1=∅, compute the set of channels CH2 which are primary to node u and currently not being used by N(u). If CH2≠∅, check whether CHc(u)∈CH2 holds. If so, assign CHc(u) to CH(u); otherwise, randomly choose one from CH2 to allocate to u.(3)
IfCH2=∅, calculate the set CH3 in its own primary channels, in order to get the channel with the least row weight of X(N(u)). Then if CHc(u)∈CH3, assign CHc(u) to CH(u); if not, randomly assign one channel of CH3 to u.Example 2.
Takes-disjunct code in ∗ as an example. Give a network with three nodes {x,y,z} whose codewords are, respectively, X(x)=X(2), X(y)=X(3), and X(z)=X(4) and whose current channels are, respectively, 3, 4, and 5. Then node u whose current channel is 1 joins the network and x, y, and z become u’s neighbors. According to Algorithm 1, u calculates CH1=∅, CH2={1,2}. Because u’s current channel 1∈{1,2}, CH(u)={1}, which means that channel 1 should be assigned to node u.Remark 3.
First, a node prefers its primary channels to its secondary channels. Second, after a node obtains the nonempty channel set (CH1, CH2, or CH3), it first checks whether its currently used channel is in the set. If yes, its currently used channel should be allocated to u instead of randomly choosing a new channel from the set.


## 4.3. Communication Range Control

Each road may have different vehicle densities due to nodes’ mobility. When the density is considerably high, the capacity of control channel is not adequate for a large amount of vehicles to access. At such a high density, a node only needs to transmit its information to the nodes close to itself. At this subsection, we propose an algorithm to control the transmission range of each node with a purpose of reusing the network space and decreasing the interference.The idea of dynamic transmission range control was first proposed by [7], which is based on vehicle’s stop time to estimate density and tune transmission range. In our algorithm, we use a more direct and lighter algorithm to achieve the objective. First, we define node density K as(9)K=Current  Number  of  NodesMaximum  Number  of  Nodes.In order to estimate the current number of nodes in a designated area, each node should count the nodes in its vicinity within the minimum transmission rangeRmin according to the information received from its neighbors. The maximum number of nodes can be estimated as follows. Assume that the safety driving distance Ds between two consecutive cars is known (it is got from observations and statics) and given the minimum transmission range, the maximum number of nodes within this range can be computed as Rmin∗L/Ds (L is the number of lanes obtained from the local digital map). Then(10)K=Current  Number  of  NodesRmin∗L/Ds.Therefore, the transmission range is calculated by the following equation:(11)TR=max⁡Rmax∗1-K,Rmin,where (i)
TR is the calculated transmission range,(ii)
Rmax is the maximum transmission range,(iii)
K is the ratio of the number of nodes to the maximum number of nodes that can be accommodated within the minimum transmission range area.In our algorithm the minimum transmission rangeRmin is defined in order to guarantee network connection. If the transmission range computed from (11) is smaller than Rmin, the computed one should be dropped and Rmin should be chosen.


## 5. Performance Analysis

Based on the channel allocation algorithm proposed in Section4, one can see that there are two cases which may cause collisions, as studied in [12]. First, when a node moves from one part of the network to another part, its currently used channel may conflict with other nodes’ channels. These nodes are going to be its neighbors, and this case is calledmerging collision as shown in Figure 3(a): node z is going into the two-hop area of x and they do not know each other’s current channel; therefore z may use the same channel as x, which may result in a merging collision. The other one is that when two nodes are already within the communication range of each other, they may access the same time slot simultaneously. This is calledaccess collision, illustrated in Figure 3(b): nodes x and z are in each other’s two-hop range, and they may access the same channel at the same time, causing the access collision.Figure 3
Collision cases.
(a)
Case of merging collisions
(b)
Case of access collisionsIn this section, we first derive the probability distribution of channel allocation and then analyze the probabilities of access collisions and merging collisions.


### 5.1. Probability Distribution of Channel Allocation

In this subsection, we derive the probability of a nodeu choosing a channel from CH1, CH2, and CH3, denoted as P(CH1), P(CH2), and P(CH3). N(u) is u’s complete interferer set and X(N(u)) is different from X(u). We start with the following theorem.Theorem 4.
IfNu≤s holds for a node u, then P(CH1)=1 for u.Proof.
According to the characteristic ofs-disjunct matrix, if Nu≤s, there is always a row in which X(u) is “1” but all the others are “0.” So X(u) can not be covered by the BoolSum(X(N(u))) and such a channel can always be found in this condition.Theorem 5.
IfNu<wu holds for a node u, then P(CH1)+P(CH2)=1 and P(CH3)=0 for u.Proof.
If the number ofu’s neighbors is less than the column weight of X(u), there is at least one of the primary channels not being used by N(u). Thus, P(CH1)+P(CH2)=1 and P(CH3)=0.Next we will give the probability upper bound ofP(CH1), when Nu>s. Let Nu be s′, and let t be the total number of codewords in X, namely, X. Let ri stand for the ith row weight of all the t codewords. The probability that the ith row of BoolSum(X(N(u))) is value “0” is(12)Prowi=0=t-s′ritri.On the contrary, the probability of the ith row of BoolSum(X(N(u))) being “1” is(13)Prowi=1=1-Prowi=0which means that there is at least one “1” in rowi for N(u).For a codeX with N rows, there are (mN) distinct patterns to choose m rows from X. Let (k∣m)(1≤k≤(mN)) denote the kth pattern of choosing m rows from X. The rows chosen are denoted by rowk1,rowk2,…,rowkm and the others are rowkm+1,…,rowkN. In the kth pattern, the probability that these m rows of BoolSum(X(N(u))) are all value “1” is denoted as P(all_onekm):(14)Pall_onekm=∏i=1mProwki=1·∏j=m+1NProwkj=0.The probability of X(u) being covered by BoolSum(X(N(u))) under the condition that BoolSum(X(N(u))) has m “1” is(15)Pcovered∣m=∑k=1NmPall_onekm·∏j=m+1Nt-s′-rkjt-s′.As m ranges from wmax to N, the probability that X(u) is covered by BoolSum(X(N(u))) is(16)Pcovered=∑m=wmaxNPcovered∣m,where wmax is the maximum column weight of codeword in X(N(u)). If X(u) isnot covered by BoolSum(X(N(u))), CH1≠∅. The probability that u can choose a channel from CH1 is(17)PCH1=1-Pcovered.IfX(u) is covered by BoolSum(X(N(u))), but all the primary channels of u is used by X(N(u)), its probability is(18)Pnot_all_used=∑m=wmaxNPcovered∣m·1-s′wumwu.The probability of CH2≠∅ is(19)PCH2=1-PCH1,s′<wuPnot_all_used,s′≥wu.At last, the probability that node u chooses a channel from CH3 is(20)PCH3=0,s′<wu1-PCH1-pCH2,s′≥wu.


### 5.2. Probability of Collisions

If a nodeu comes into a new part of the network with Nu nodes in u’s two-hop vicinity, the channel used by u may conflict with channels used by N(u). Let s′ denote Nu and assume that u is using its primary channel. According to our algorithm, there will be s′ channels currently being used by N(u). If there is a merging collision, u’s primary channels must overlap with the channels used by N(u) and the number of overlapping channels ranges from 1 to min{s′,wu}. The probability that there are i overlapping channels is(21)Poverlap=i=s′i·N-s′wu-iNwu.The merging collision occurs when u chooses a channel from one of the overlapping channels to transmit. Therefore the probability of merging collision is(22)PMergingCollision=∑i=1min⁡s′,wuPoverlap=i·iwu=∑i=1min⁡s′,wus′i·N-s′wu-iNwu·iwu.Next we compute the probability of access collisions. A nodeu may select a channel used by another node. Due to the feature of s-disjunct code, the number of overlapping channels ranges from 1 to wu-1 (assume the column weights of all the codewords of its neighbors are the same here, denoted by w); therefore, the probability is(23)PCollision=∑i=1w-1wiN-ww-i·iw2Nw.This probability is very small, and levels off to zero. When there are s′ neighbors who are updating channels at the same time, the collision probability of node u is(24)PAccessCollision=1-1-PCollisions′.Take a96×364 2-disjunct code with column weight 3 as an example. Figure 4(a) shows the probabilities that node u chooses a channel from CH1, CH2, and CH3, respectively, with the change of the number of neighbors. When the number of interferers is smaller than s, P(CH1) is 1. While Nu increases, P(CH1) decreases and P(CH2) and P(CH3) increase.Figure 4
Analysis result.
(a)
The probability thatu picks up a channel from CH1, CH2, and CH3, respectively
(b)
The probability of merging collision and access collisionFigure4(b) describes the probabilities of merging collisions and access collisions. We find that the probability of merging collision is increasing linearly, because when the number of node u’s interferers grows, the overlapping probability increases. Therefore, it chooses an overlapping channel with a larger probability. The collision probability is small when the number of neighbors is very small. In practice, every node should try to use its current channel unless the computed channel set forces it to change. Most of time, a node’s channel should not change frequently, and the number of nodes that change channels simultaneously is thus small. In conclusion, when N(u) is smaller than some threshold, it maintains a high probability of choosing a channel from CH1 and CH2 and thus results in a low collision probability.


## 5.1. Probability Distribution of Channel Allocation

In this subsection, we derive the probability of a nodeu choosing a channel from CH1, CH2, and CH3, denoted as P(CH1), P(CH2), and P(CH3). N(u) is u’s complete interferer set and X(N(u)) is different from X(u). We start with the following theorem.Theorem 4.
IfNu≤s holds for a node u, then P(CH1)=1 for u.Proof.
According to the characteristic ofs-disjunct matrix, if Nu≤s, there is always a row in which X(u) is “1” but all the others are “0.” So X(u) can not be covered by the BoolSum(X(N(u))) and such a channel can always be found in this condition.Theorem 5.
IfNu<wu holds for a node u, then P(CH1)+P(CH2)=1 and P(CH3)=0 for u.Proof.
If the number ofu’s neighbors is less than the column weight of X(u), there is at least one of the primary channels not being used by N(u). Thus, P(CH1)+P(CH2)=1 and P(CH3)=0.Next we will give the probability upper bound ofP(CH1), when Nu>s. Let Nu be s′, and let t be the total number of codewords in X, namely, X. Let ri stand for the ith row weight of all the t codewords. The probability that the ith row of BoolSum(X(N(u))) is value “0” is(12)Prowi=0=t-s′ritri.On the contrary, the probability of the ith row of BoolSum(X(N(u))) being “1” is(13)Prowi=1=1-Prowi=0which means that there is at least one “1” in rowi for N(u).For a codeX with N rows, there are (mN) distinct patterns to choose m rows from X. Let (k∣m)(1≤k≤(mN)) denote the kth pattern of choosing m rows from X. The rows chosen are denoted by rowk1,rowk2,…,rowkm and the others are rowkm+1,…,rowkN. In the kth pattern, the probability that these m rows of BoolSum(X(N(u))) are all value “1” is denoted as P(all_onekm):(14)Pall_onekm=∏i=1mProwki=1·∏j=m+1NProwkj=0.The probability of X(u) being covered by BoolSum(X(N(u))) under the condition that BoolSum(X(N(u))) has m “1” is(15)Pcovered∣m=∑k=1NmPall_onekm·∏j=m+1Nt-s′-rkjt-s′.As m ranges from wmax to N, the probability that X(u) is covered by BoolSum(X(N(u))) is(16)Pcovered=∑m=wmaxNPcovered∣m,where wmax is the maximum column weight of codeword in X(N(u)). If X(u) isnot covered by BoolSum(X(N(u))), CH1≠∅. The probability that u can choose a channel from CH1 is(17)PCH1=1-Pcovered.IfX(u) is covered by BoolSum(X(N(u))), but all the primary channels of u is used by X(N(u)), its probability is(18)Pnot_all_used=∑m=wmaxNPcovered∣m·1-s′wumwu.The probability of CH2≠∅ is(19)PCH2=1-PCH1,s′<wuPnot_all_used,s′≥wu.At last, the probability that node u chooses a channel from CH3 is(20)PCH3=0,s′<wu1-PCH1-pCH2,s′≥wu.


## 5.2. Probability of Collisions

If a nodeu comes into a new part of the network with Nu nodes in u’s two-hop vicinity, the channel used by u may conflict with channels used by N(u). Let s′ denote Nu and assume that u is using its primary channel. According to our algorithm, there will be s′ channels currently being used by N(u). If there is a merging collision, u’s primary channels must overlap with the channels used by N(u) and the number of overlapping channels ranges from 1 to min{s′,wu}. The probability that there are i overlapping channels is(21)Poverlap=i=s′i·N-s′wu-iNwu.The merging collision occurs when u chooses a channel from one of the overlapping channels to transmit. Therefore the probability of merging collision is(22)PMergingCollision=∑i=1min⁡s′,wuPoverlap=i·iwu=∑i=1min⁡s′,wus′i·N-s′wu-iNwu·iwu.Next we compute the probability of access collisions. A nodeu may select a channel used by another node. Due to the feature of s-disjunct code, the number of overlapping channels ranges from 1 to wu-1 (assume the column weights of all the codewords of its neighbors are the same here, denoted by w); therefore, the probability is(23)PCollision=∑i=1w-1wiN-ww-i·iw2Nw.This probability is very small, and levels off to zero. When there are s′ neighbors who are updating channels at the same time, the collision probability of node u is(24)PAccessCollision=1-1-PCollisions′.Take a96×364 2-disjunct code with column weight 3 as an example. Figure 4(a) shows the probabilities that node u chooses a channel from CH1, CH2, and CH3, respectively, with the change of the number of neighbors. When the number of interferers is smaller than s, P(CH1) is 1. While Nu increases, P(CH1) decreases and P(CH2) and P(CH3) increase.Figure 4
Analysis result.
(a)
The probability thatu picks up a channel from CH1, CH2, and CH3, respectively
(b)
The probability of merging collision and access collisionFigure4(b) describes the probabilities of merging collisions and access collisions. We find that the probability of merging collision is increasing linearly, because when the number of node u’s interferers grows, the overlapping probability increases. Therefore, it chooses an overlapping channel with a larger probability. The collision probability is small when the number of neighbors is very small. In practice, every node should try to use its current channel unless the computed channel set forces it to change. Most of time, a node’s channel should not change frequently, and the number of nodes that change channels simultaneously is thus small. In conclusion, when N(u) is smaller than some threshold, it maintains a high probability of choosing a channel from CH1 and CH2 and thus results in a low collision probability.


## 6. Simulations

### 6.1. Simulation Scenario and Parameters

We simulate our protocol in two scenarios by Matlab. One is a two-way road scenario with each direction having two lanes. The other is a city grid layout consisting of three horizontal and three vertical roads with each direction having only one lane, shown as in Figures5(a) and 5(b).Figure 5
Simulation scenario.
(a)
Highway scenario
(b)
City grid scenarioThe parameter settings are reported in Table1. For both scenarios, we validate our protocol on different densities. The highway road is divided into 7 segments with a length of 150m. Each segment has its own related codeword set consisting of 256 codewords. The city grid is divided into 9 segments with a dimension of 150 m × 150 m. Each segment has a codeword set of 256 codewords too. Each vehicle is generated randomly and travels at an average speed with a small fluctuation. In the highway scenario, when a vehicle reaches one end of the highway road, it reenters the road from the other end, in order to keep the same number of vehicles on the road during the simulation time. To prevent the merging collision when a vehicle reenters the road, we assume that a vehicle at a distance d to one end can communicate with vehicles within the distance (R-d) to the other end (R is the communication range and d<R). In the city grid scenario, any vehicle at the intersection randomly chooses a direction to travel, and it can communicate with other vehicles within its communication range of each direction. However, a node not at the intersection area of a street can only communicate with nodes within its transmission range of the same street, due to building obstacles.Table 1
Simulation parameters.
Parameter
Highway value
City value
Road length
1 km
430 m
Number of horizontal roads
—
3
Number of vertical roads
—
3
City block area
—
200 m × 200 m
Number of city blocks
—
4
Lane width
5 m
5 m
Lanes per direction
2
1
Segment area
150 m × 20 m
150 m × 150 m
Mean velocity
100 km/h
50 km/h
Velocity standard deviation
20 km/h
10 km/h
Number of vehicles
40~280 (step = 40)
150~600 (step = 50)
Modulation technique
QPSK
QPSK
Coding rate
1/2
1/2
Data rate per channel
6 Mbps
6 Mbps
Data rate per subchannel
0.125 Mbps
0.125 Mbps
Minimum transmission range
70 m
50 m
Maximum transmission range
150 m
150 m
Period time
100 ms
100 ms
Subchannel per period
96
96
Data packet size
300 bytes
300 bytes
Code amount per segment
256
256
Simulation time
120 s
120 sFollowing the DSRC standard, safety information is sent through the control channel and its frequency band is 10 MHz. The 10 MHz channel is divided into48 subchannels. Several modulation techniques and coding rates are suggested by the standard. However, previous work and industry experiments show that QPSK with 1/2 coding rate and 6 Mbps data rate perform better overall, and this is the default value in the current industry practice; thus such settings are adopted in our simulation study. The maximum transmission range is 150 m for both scenarios, and the minimum transmission range is set to 50 m.The maximum size of a safety message should not exceed 200 B according to the industry suggestion. In this paper we set the packet size to be 300 B to incorporate future applications with large message requirements. Transferring a 300 B message in a subchannel costs 19.2 ms. During the50 ms transmission time, only 2 messages can be transmitted; and thus 50 ms can be divided into 2 slots. Therefore the number of virtual subchannels in a period is 48×2=96.We construct a 96 × 2304s-disjunct code, which is assigned to 7 segments with each having 256 codewords in the highway scenario and to 9 segments with each having 256 codewords in the city grid scenario. From the previous test, we observe that 256 codewords are adequate for the nodes in a 150 m length road or a 150 m × 150 m area because such an area or road segment can accommodate at most 50~60 vehicles in practice. Our simulation time is set to 120 s. At the beginning of the simulation, each node is stationary until it gets its own channel. Then all the nodes start to move and timing starts. We divide 1 s into 10 periods and each vehicle sends one packet at each period. The wireless channels are ideal and the only reason of transmission failure is channel collision. We also implement VeMac [12] (τ=0 and τ=infinite) in the same road topologies and compare their performance with that of our design.Some metrics for evaluating the network performance are defined as follows.(a)
Success rate of Tx is the average ratio of successful transmissions to the total transmissions per period. Here a successful transmission is achieved when a node is transmitting at channel c; no other node in its two-hop neighborhood using the same channel c is transmitting.(b)
Success rate of Rx is the average ratio of successfully received packets to the total packets per period. The total packets include the successfully received packets and the dropped packets due to channel collisions for all nodes in the network.(c)
Rate of merging collisions is the average number of merging collisions per period.(d)
Rate of access collisions is the average number of access collisions per period.


### 6.2. Simulation Result

#### 6.2.1. Highway Scenario

Figures6(a) and 6(b) show the access collision rate and the merging collision rate of all the three protocols. When the number of vehicles is no more than 200, all the access collision rates are very low, no more than 5 collisions/period. But with the number of nodes increases from 200 to 280, the access collision rate for VeMac increases quickly, especially for the case of VeMac t=0.Figure 6
The collision rates in the highway scenario.
(a)
The access collision rate of the highway scenario
(b)
The merging collision rate of the highway scenarioIn Figure6(b), s-disjunct has the largest merging collision rate all the time. VeMac (t=infinite) has the lowest merging collision rate as a node can only use its own slot set of its driving direction in this protocol. When a merging collision occurs, s-disjunct protocol can use neighboring code information to choose a channel, so that the probability of access collisions is low. But if a merging collision occurs in VeMac, more access collisions may happen, due to its characteristic of randomly choosing channels. s-disjunct produces excellent results in terms of access collisions which drive the low total collision results. The total collision rate affects the success rate of Rx and Tx.As shown in Figures7(a) and 7(b), with the increase of the number of nodes in the network, the success rates for all protocols are decreasing, and 200 is an inflection point for this scenario. Under this threshold, the Tx success rate of s-disjunct is a little lower than the other two, with the Rx success rate almost the same. However, if the number of nodes is larger than 200, the Tx success rate and the Rx success rate of s-disjunct protocol are still kept higher than 95%, with the others dropped to as low as 81% and 72%. In terms of Rx and Tx success rates, we think that the Rx success rate is more significant than the Tx success rate. Therefore, s-disjunct protocol shows better scalability and performance in high node density case. In addition, the success rates of s-disjunct do not differ from those of the others too much when the vehicle density is low, which can be acceptable.Figure 7
The success rates of Rx and Tx in the highway scenario.
(a)
The success rate of Tx in highway
(b)
The success rate of Rx in highway


#### 6.2.2. City Grid Scenario

From both Figures8(a) and 8(b), one can see that our s-disjunct protocol has lower merging collision rate and access collision rate than VeMac protocols (t=0 and t=infinite). That is because nodes near junctions are tending to generate merging collisions when they meet nodes using the same slot set or switch to another street with the same slot set. But this is not the case in the highway scenario as there is no intersection. A higher merging collision rate causes a higher access collision rate, for instance, as high as 350 collisions/period and 400 collisions/period, especially in the high node density case. However, the access collision rate is kept lower than 10 collisions/period for s-disjunct protocol. Therefore counting both the access collisions and the merging collisions, our s-disjunct protocol suffers less collisions than the other two protocols.Figure 8
The collision rates in city grid.
(a)
The access collision rate of city grid
(b)
The merging collision rate of city gridFigures9(a) and 9(b) describe the Tx success rate and Rx success rate for the three protocols in the city grid scenario. The inflection point is about 350 vehicles. With the number of vehicles less than 350, the Tx success rates of the two VeMac protocols are slightly larger than that of s-disjunct and the Tx success rates for all the protocols are above 95%, while the Rx success rates are almost the same. But when the number of vehicles grows, the Tx and Rx success rates of s-disjunct are both kept above 95%. On the contrary, the ones for the VeMac protocols fall down quickly, reaching 75%. Therefore, for both scenarios, s-disjunct protocol performs well and the Rx success rate can be higher than 95%, even at the high vehicle density case. When the density is very high, it is hard to achieve the 95% PDR, but it can still outperform current protocols, such as VeMAC. This is a high improvement.Figure 9
The success rates of Rx and Tx in city grid.
(a)
The success rate of Tx in city grid
(b)
The success rate of Rx in city grid


## 6.1. Simulation Scenario and Parameters

We simulate our protocol in two scenarios by Matlab. One is a two-way road scenario with each direction having two lanes. The other is a city grid layout consisting of three horizontal and three vertical roads with each direction having only one lane, shown as in Figures5(a) and 5(b).Figure 5
Simulation scenario.
(a)
Highway scenario
(b)
City grid scenarioThe parameter settings are reported in Table1. For both scenarios, we validate our protocol on different densities. The highway road is divided into 7 segments with a length of 150m. Each segment has its own related codeword set consisting of 256 codewords. The city grid is divided into 9 segments with a dimension of 150 m × 150 m. Each segment has a codeword set of 256 codewords too. Each vehicle is generated randomly and travels at an average speed with a small fluctuation. In the highway scenario, when a vehicle reaches one end of the highway road, it reenters the road from the other end, in order to keep the same number of vehicles on the road during the simulation time. To prevent the merging collision when a vehicle reenters the road, we assume that a vehicle at a distance d to one end can communicate with vehicles within the distance (R-d) to the other end (R is the communication range and d<R). In the city grid scenario, any vehicle at the intersection randomly chooses a direction to travel, and it can communicate with other vehicles within its communication range of each direction. However, a node not at the intersection area of a street can only communicate with nodes within its transmission range of the same street, due to building obstacles.Table 1
Simulation parameters.
Parameter
Highway value
City value
Road length
1 km
430 m
Number of horizontal roads
—
3
Number of vertical roads
—
3
City block area
—
200 m × 200 m
Number of city blocks
—
4
Lane width
5 m
5 m
Lanes per direction
2
1
Segment area
150 m × 20 m
150 m × 150 m
Mean velocity
100 km/h
50 km/h
Velocity standard deviation
20 km/h
10 km/h
Number of vehicles
40~280 (step = 40)
150~600 (step = 50)
Modulation technique
QPSK
QPSK
Coding rate
1/2
1/2
Data rate per channel
6 Mbps
6 Mbps
Data rate per subchannel
0.125 Mbps
0.125 Mbps
Minimum transmission range
70 m
50 m
Maximum transmission range
150 m
150 m
Period time
100 ms
100 ms
Subchannel per period
96
96
Data packet size
300 bytes
300 bytes
Code amount per segment
256
256
Simulation time
120 s
120 sFollowing the DSRC standard, safety information is sent through the control channel and its frequency band is 10 MHz. The 10 MHz channel is divided into48 subchannels. Several modulation techniques and coding rates are suggested by the standard. However, previous work and industry experiments show that QPSK with 1/2 coding rate and 6 Mbps data rate perform better overall, and this is the default value in the current industry practice; thus such settings are adopted in our simulation study. The maximum transmission range is 150 m for both scenarios, and the minimum transmission range is set to 50 m.The maximum size of a safety message should not exceed 200 B according to the industry suggestion. In this paper we set the packet size to be 300 B to incorporate future applications with large message requirements. Transferring a 300 B message in a subchannel costs 19.2 ms. During the50 ms transmission time, only 2 messages can be transmitted; and thus 50 ms can be divided into 2 slots. Therefore the number of virtual subchannels in a period is 48×2=96.We construct a 96 × 2304s-disjunct code, which is assigned to 7 segments with each having 256 codewords in the highway scenario and to 9 segments with each having 256 codewords in the city grid scenario. From the previous test, we observe that 256 codewords are adequate for the nodes in a 150 m length road or a 150 m × 150 m area because such an area or road segment can accommodate at most 50~60 vehicles in practice. Our simulation time is set to 120 s. At the beginning of the simulation, each node is stationary until it gets its own channel. Then all the nodes start to move and timing starts. We divide 1 s into 10 periods and each vehicle sends one packet at each period. The wireless channels are ideal and the only reason of transmission failure is channel collision. We also implement VeMac [12] (τ=0 and τ=infinite) in the same road topologies and compare their performance with that of our design.Some metrics for evaluating the network performance are defined as follows.(a)
Success rate of Tx is the average ratio of successful transmissions to the total transmissions per period. Here a successful transmission is achieved when a node is transmitting at channel c; no other node in its two-hop neighborhood using the same channel c is transmitting.(b)
Success rate of Rx is the average ratio of successfully received packets to the total packets per period. The total packets include the successfully received packets and the dropped packets due to channel collisions for all nodes in the network.(c)
Rate of merging collisions is the average number of merging collisions per period.(d)
Rate of access collisions is the average number of access collisions per period.


## 6.2. Simulation Result

### 6.2.1. Highway Scenario

Figures6(a) and 6(b) show the access collision rate and the merging collision rate of all the three protocols. When the number of vehicles is no more than 200, all the access collision rates are very low, no more than 5 collisions/period. But with the number of nodes increases from 200 to 280, the access collision rate for VeMac increases quickly, especially for the case of VeMac t=0.Figure 6
The collision rates in the highway scenario.
(a)
The access collision rate of the highway scenario
(b)
The merging collision rate of the highway scenarioIn Figure6(b), s-disjunct has the largest merging collision rate all the time. VeMac (t=infinite) has the lowest merging collision rate as a node can only use its own slot set of its driving direction in this protocol. When a merging collision occurs, s-disjunct protocol can use neighboring code information to choose a channel, so that the probability of access collisions is low. But if a merging collision occurs in VeMac, more access collisions may happen, due to its characteristic of randomly choosing channels. s-disjunct produces excellent results in terms of access collisions which drive the low total collision results. The total collision rate affects the success rate of Rx and Tx.As shown in Figures7(a) and 7(b), with the increase of the number of nodes in the network, the success rates for all protocols are decreasing, and 200 is an inflection point for this scenario. Under this threshold, the Tx success rate of s-disjunct is a little lower than the other two, with the Rx success rate almost the same. However, if the number of nodes is larger than 200, the Tx success rate and the Rx success rate of s-disjunct protocol are still kept higher than 95%, with the others dropped to as low as 81% and 72%. In terms of Rx and Tx success rates, we think that the Rx success rate is more significant than the Tx success rate. Therefore, s-disjunct protocol shows better scalability and performance in high node density case. In addition, the success rates of s-disjunct do not differ from those of the others too much when the vehicle density is low, which can be acceptable.Figure 7
The success rates of Rx and Tx in the highway scenario.
(a)
The success rate of Tx in highway
(b)
The success rate of Rx in highway


### 6.2.2. City Grid Scenario

From both Figures8(a) and 8(b), one can see that our s-disjunct protocol has lower merging collision rate and access collision rate than VeMac protocols (t=0 and t=infinite). That is because nodes near junctions are tending to generate merging collisions when they meet nodes using the same slot set or switch to another street with the same slot set. But this is not the case in the highway scenario as there is no intersection. A higher merging collision rate causes a higher access collision rate, for instance, as high as 350 collisions/period and 400 collisions/period, especially in the high node density case. However, the access collision rate is kept lower than 10 collisions/period for s-disjunct protocol. Therefore counting both the access collisions and the merging collisions, our s-disjunct protocol suffers less collisions than the other two protocols.Figure 8
The collision rates in city grid.
(a)
The access collision rate of city grid
(b)
The merging collision rate of city gridFigures9(a) and 9(b) describe the Tx success rate and Rx success rate for the three protocols in the city grid scenario. The inflection point is about 350 vehicles. With the number of vehicles less than 350, the Tx success rates of the two VeMac protocols are slightly larger than that of s-disjunct and the Tx success rates for all the protocols are above 95%, while the Rx success rates are almost the same. But when the number of vehicles grows, the Tx and Rx success rates of s-disjunct are both kept above 95%. On the contrary, the ones for the VeMac protocols fall down quickly, reaching 75%. Therefore, for both scenarios, s-disjunct protocol performs well and the Rx success rate can be higher than 95%, even at the high vehicle density case. When the density is very high, it is hard to achieve the 95% PDR, but it can still outperform current protocols, such as VeMAC. This is a high improvement.Figure 9
The success rates of Rx and Tx in city grid.
(a)
The success rate of Tx in city grid
(b)
The success rate of Rx in city grid


## 6.2.1. Highway Scenario

Figures6(a) and 6(b) show the access collision rate and the merging collision rate of all the three protocols. When the number of vehicles is no more than 200, all the access collision rates are very low, no more than 5 collisions/period. But with the number of nodes increases from 200 to 280, the access collision rate for VeMac increases quickly, especially for the case of VeMac t=0.Figure 6
The collision rates in the highway scenario.
(a)
The access collision rate of the highway scenario
(b)
The merging collision rate of the highway scenarioIn Figure6(b), s-disjunct has the largest merging collision rate all the time. VeMac (t=infinite) has the lowest merging collision rate as a node can only use its own slot set of its driving direction in this protocol. When a merging collision occurs, s-disjunct protocol can use neighboring code information to choose a channel, so that the probability of access collisions is low. But if a merging collision occurs in VeMac, more access collisions may happen, due to its characteristic of randomly choosing channels. s-disjunct produces excellent results in terms of access collisions which drive the low total collision results. The total collision rate affects the success rate of Rx and Tx.As shown in Figures7(a) and 7(b), with the increase of the number of nodes in the network, the success rates for all protocols are decreasing, and 200 is an inflection point for this scenario. Under this threshold, the Tx success rate of s-disjunct is a little lower than the other two, with the Rx success rate almost the same. However, if the number of nodes is larger than 200, the Tx success rate and the Rx success rate of s-disjunct protocol are still kept higher than 95%, with the others dropped to as low as 81% and 72%. In terms of Rx and Tx success rates, we think that the Rx success rate is more significant than the Tx success rate. Therefore, s-disjunct protocol shows better scalability and performance in high node density case. In addition, the success rates of s-disjunct do not differ from those of the others too much when the vehicle density is low, which can be acceptable.Figure 7
The success rates of Rx and Tx in the highway scenario.
(a)
The success rate of Tx in highway
(b)
The success rate of Rx in highway


## 6.2.2. City Grid Scenario

From both Figures8(a) and 8(b), one can see that our s-disjunct protocol has lower merging collision rate and access collision rate than VeMac protocols (t=0 and t=infinite). That is because nodes near junctions are tending to generate merging collisions when they meet nodes using the same slot set or switch to another street with the same slot set. But this is not the case in the highway scenario as there is no intersection. A higher merging collision rate causes a higher access collision rate, for instance, as high as 350 collisions/period and 400 collisions/period, especially in the high node density case. However, the access collision rate is kept lower than 10 collisions/period for s-disjunct protocol. Therefore counting both the access collisions and the merging collisions, our s-disjunct protocol suffers less collisions than the other two protocols.Figure 8
The collision rates in city grid.
(a)
The access collision rate of city grid
(b)
The merging collision rate of city gridFigures9(a) and 9(b) describe the Tx success rate and Rx success rate for the three protocols in the city grid scenario. The inflection point is about 350 vehicles. With the number of vehicles less than 350, the Tx success rates of the two VeMac protocols are slightly larger than that of s-disjunct and the Tx success rates for all the protocols are above 95%, while the Rx success rates are almost the same. But when the number of vehicles grows, the Tx and Rx success rates of s-disjunct are both kept above 95%. On the contrary, the ones for the VeMac protocols fall down quickly, reaching 75%. Therefore, for both scenarios, s-disjunct protocol performs well and the Rx success rate can be higher than 95%, even at the high vehicle density case. When the density is very high, it is hard to achieve the 95% PDR, but it can still outperform current protocols, such as VeMAC. This is a high improvement.Figure 9
The success rates of Rx and Tx in city grid.
(a)
The success rate of Tx in city grid
(b)
The success rate of Rx in city grid


## 7. Conclusion

In this paper, we present an algorithm based ons-disjunct code to allocate communication channels to nodes in a VANET. A distributed code assignment algorithm is proposed in order for each node to get the corresponding codeword. We also design a communication range control algorithm to dynamically change the transmission range based on the node density of the network. Theoretical analysis and simulation results show that our protocol can achieve a very high transmission and reception rate at a low collision rate. In the future, we will consider the more practical scenario to validate the performance when communication channels might be affected by other factors (e.g., noise, fading and shadowing).



---

*Source: 286241-2015-08-30.xml*