# DCAR: DTN Congestion Avoidance Routing Algorithm Based on Tokens in an Urban Environment

Authors: Hezhe Wang; Hongwu Lv; Huiqiang Wang; Guangsheng Feng
Journal: Journal of Sensors
 (2017)

---

## Abstract

When a delay/disruption tolerant network (DTN) is applied in an urban scenario, the network is mainly composed of mobile devices carried by pedestrians, cars, and other vehicles, and the node’s movement trajectory is closely related to its social relationships and regular life; thus, most existing DTN routing algorithms cannot show efficient network performance in urban scenarios. In this paper, we propose a routing algorithm, called DCRA, which divides the urban map into grids; fixed sink stations are established in specific grids such that the communication range of each fixed sink station can cover a specific number of grids; these grids are defined as a cluster and allocated a number of tokens in each cluster; the tokens in the cluster are controlled by the fixed sink station. A node will transmit messages to a relay node that has a larger remaining buffer size and encounters fixed sink stations or the destination node more frequently after it obtains a message transmit token. Simulation experiments are carried out to verify the performance of the DCAR under an urban scenario, and results show that the DCAR algorithm is superior to existing routing algorithms in terms of delivery ratio, average delay, and network overhead.


---

## Body

## 1. Introduction

The concept of DTN [1] originated in the interplanetary network and refers to the source node and the destination node is not necessary to maintain a complete communication link, according to the node’s mobility to achieve a communication opportunity to complete the message transmission. As the research continues, DTN has played a crucial role in diverse application fields [2]; the main application includes the following: wildlife tracking network [3], vehicle network [4], marine sensor network [5], and urban environment network [6].DTN is characterized as highly partitioned, sparsely connected, and intermittently connected ad hoc networks [7]. In these challenging scenarios, end-to-end communication paths between node pairs are rarely available; thus, the process of a node transmitting a message must experience a higher delay [8]. In order to overcome these network characteristics, DTN adopts the method of “store-carry-forward” to transmit messages [9]. That is to say, messages are temporarily stored and carried by a node until an appropriate relay node arises [10]. For this reason, the movement trajectory of nodes is one of the crucial factors that affects the message delivery ratio, delay, and network overhead in the process of transmitting of messages.However, with the continuous development of low-cost mobile devices, mobile devices in people’s lives have been widely used, which has resulted in many urban applications of DTN [11]. However, existing routing algorithms such as epidemic routing [12], prophet routing [13], and spray and wait routing [14] can show efficient network performance in some specific scenarios. But they are not suitable for deployment in urban scenarios. Because the streets and other public places are fixed, the node density is relatively large, the movement trajectory of nodes depends on the habits of human life, and the network topology is constantly changing, real-time global network knowledge is difficult to obtain. Therefore, according to the characteristics of the urban scenario, proposing a DTN routing algorithm that is suitable for the urban scenario has been one of the key problems in the field of DTN.In this paper, we propose a DTN routing algorithm based on tokens. The algorithm divides the urban map into grids, and fixed sink stations are established in specific grids. The number of grids covered by the communication range of each fixed sink station is defined as a cluster, each cluster is allocated a number of tokens, and a node can transmit messages after it obtains a message transmit token. As the number of nodes that transmit messages at the same time is reduced, simultaneously, the buffer size and the frequency of encountering fixed sink stations or the destination node are fully considered during the routing process, thus avoiding the occurrence of congestion in the network.The rest of this paper is organized as follows. Section2 presents related works. In Section 3, the network model and design principles are described. The DCAR algorithm is presented in Section 4. Section 5 describes the simulation experiments and results. Finally, conclusions are summarized in Section 6.


## 2. Related Works

At present, a great deal of research has been presented on the DTN routing protocol, which divides into a single-copy and multiple-copy routing protocol based on the number of message copies in the network. In the single-copy routing protocol, the typical routing protocols are direct transmission routing [15] and first contact routing [16]. In the multiple-copy routing protocol, epidemic routing [12], prophet routing [13], and spray and wait routing [14] are more typical multiple-copy routing algorithms. However, the above algorithms are not suitable for deployment in urban scenarios. With the profound research of researchers, several VDTN routing protocols were proposed in [17–20]. These algorithms can show better performance when used in an urban scenario. However, in these algorithms, the composition of the mobile node mainly involves the node carried by the vehicle; pedestrians are rarely considered.Meanwhile, Ayaki et al. refer to the characteristics of DTN applied in the urban scenario; these are proposed to set some static nodes in the urban areas to collect real-time information so that nodes can determine their own position according to these static nodes and select the appropriate node as the next hop [21]. On this basis, Li et al. demonstrate that the node’s movement area and encountering opportunity are closely related to the geographic position at some particular time points; and it is appropriate to deploy some fixed stations for data sinks in urban areas, which can improve network performance. Thus, they proposed a DTN routing algorithm called the GeoGrid algorithm for urban scenarios [22]. Compared with traditional routing algorithms, it is more suitable for deployment in urban scenarios. However, under conditions of large node density, the algorithm makes it easy for the network to be congested.In this paper, we propose a DTN congestion avoidance routing algorithm. The algorithm uses fixed sink stations as a data collection and publishing center; simultaneously, they also have the function of controlling allocation and collection of tokens. The algorithm divides the urban map into grids; some fixed sink stations are established in specific grids such that the communication range of each fixed sink station can cover a specific number of grids. In these grids region, a number of tokens are allocated. These tokens are controlled by the fixed sink station, and any two stations will not cover the same grid. Successful message delivery behavior in the network occurs between nodes and fixed stations or the destination node of the message. Each node maintains a grid table and regularly updates with this grid table while transmitting. This allows nodes to record their transmit activity in each region. When a node has messages that are required to transmit, it must obtain a message transmit token. As a node can transmit messages after it obtains the token, realize the concurrent transmitting of the message in the network, to avoid the occurrence of congestion in the routing process.


## 3. Network Model and Design Principles

In this section, we first introduce the network model and then present the establishment principles of fixed sink stations and the calculation principles of the grid region.


### 3.1. Network Model

We model the network as a quadrupleNet=U,V,W,E. Among them, U is a set of fixed sink stations in the network, and V is a set of grids in the network. W is a set of nodes in the network; E is a set of connections between two nodes or a fixed sink station and a node. At instantaneous time t, the set of grids is covered by the communication range of the ith fixed sink station; that is, U(i)=Ui1,Ui2,…,Uiv; then, the total number of grids in the network is V=∑i=1UU(i)+U′; U′ is the set of grids that are not covered by the communication range of fixed sink stations. The set of nodes in jth grid is V(j)=Vj1,Vj2,…,Vjw; then, the total number of nodes in the network is W=∑j=1VV(j). Each node maintains a list Vir=(Nid,mlesize,pdest,pi,ungetT,Ψ), where Nid is the identifier of the node, mlesize is the remaining buffer of the node, pdest is the number of times that the node successfully transmits messages to their destination node or fixed sink stations, and pi represents the number of times that the node transmits any message to other nodes in every time interval. ungetT is the number of times that the node cannot obtain a message transmit token when it is required. Ψ is the two-dimensional grid matrix. List Vir is constantly updated over time.


### 3.2. Fixed Sink Station Based DTN

In order to adapt to the harsh environment of DTN, by referring to literature [22], we propose a new idea of fixed sink station establishment. In this paper, the location and the number of fixed sink stations can be changed, and a fixed sink station has the following three functions: (1) the first function acts as a data collection center or an Internet access point; (2) the second function is used to publish the collected information; (3) the third function is to control the allocation and collection of the token within the coverage of the fixed sink station. As shown in Figure 1, the mobile node A is under the coverage of fixed sink station D, allowing node A to deliver messages to fixed sink station D. If the fixed sink station D is located in area Aij, this delivery behavior implies node A once it arrived at area Aij.Figure 1
Distribution of fixed sink stations.In this paper, we assumed that each mobile node is equipped with a GPS module that can be utilized for position-locating and clock synchronization. At the same time, the position coordinates of the fixed sink stations and the size of the urban map are global information for the nodes in the network. We establish a fixed sink station that follows four principles:(1)
A fixed sink station is usually established in the large user node density area so that the fixed sink station can efficiently receive messages for mobile nodes.(2)
Any two fixed sink stations cannot directly transmit data to each other because two sink stations can communicate through the Internet rather than wirelessly.(3)
We define the number of grids covered by the communication range of each fixed sink station as a cluster, and any two fixed sink stations cannot cover the same grid.(4)
The fixed sink station can communicate with the mobile node that is covered by itself in any time; that is, when the fixed sink station receives a message from the mobile node, it can deliver the message to its destination node when the destination node is covered by itself. The mobile node can communicate with the fixed sink station when the distance between the node and the fixed sink station is less than its communication radius.


### 3.3. Calculation of Grid Region

In this paper, we divided the urban map intoW×W square grid regions. These grids can be represented as a two-dimensional matrix Ψ, which is shown as (1)Ψ=A00A01⋯A0nA10A11⋯A1n⋯⋯⋯⋯Am0Am1⋯Amn.From Figure1, we can see that the fixed sink station must be located in one of the square grid regions. For example, if the fixed sink station D located in A(ij) received a message, the delivering mobile node must have arrived in the grid near A(ij) or at the same grid. Then, the mobile node will record this grid by itself, and when it encounters another mobile node, they will know how this node arrived in the grid. In other words, the delivery capability of nodes is associated with the passing grid. The location information contains the geography longitude, latitude, and altitude. In real applications, the mobile node gets its own current grid through a series of calculations. To improve positioning precision, the location is determined using coordinate transformations. The calculating steps of current grid region are shown as follows.Step 1.
The method of literature [23] is used to obtain the geocentric coordinates of mobile nodes. In this study, the mobile node first obtains the geodetic coordinates of the nodes and transforms them into geocentric coordinates from the geodetic coordinates. In this process, the geocentric coordinate is established using the center of the Earth as the coordinate-origin, and theX–Y plane coincides with the equatorial plane of the Earth, and the positive direction of the Z-axis points to the North Pole. Let P represent the mobile node location. P′ is the projection position of P on theX–Y plane. Point P gets its own geodetic (λ,φ,h) from GPS, and then point P geocentric (x0,y0,z0) can be shown:(2)x0=Rcos⁡φ0cos⁡λ,y0=Rcos⁡φ0sin⁡λ,z0=Rsin⁡φ0,where φ0 represents the geocentric latitude of point P. λ represents the longitude, and R is the equivalent radius of the Earth. The relationship between the geodetic latitude φ and geocentric latitude φ0 is shown as follows:(3)cos⁡φ0=11+b4/a4+tgφ2,R=a1+b4/a4tgφ21+b2/a2tgφ2,where a represents the length axis of the Earth and b represents the short axis of the Earth. Using 1983 IUGG recommendation a=6378136m and b=6376751m. Thus, putting (3) into (2), we can obtain (x0,y0,z0) as shown:(4)x0=acos⁡λ1+b2/a2tgφ2,y0=asin⁡λ1+b2/a2+tgφ2,z0=a1+b2/a2+tgφ2×b2a2+tgφ2.Step 2.
The upper-left corner of the urban map is represented asP1, and a Cartesian coordinate is established by the P1. The positive X-axis points to the south and the positive Y-axis points to the east; the direction of Z-axis is the opposite of the direction of gravity. Furthermore, the geodetic coordinate (λ¯,φ¯,h¯) of P1 is global knowledge to all nodes, and its geocentric coordinate (x¯,y¯,z¯) can be derived by Step 1. From the literature [22], (2) is used to get the unit vector of theX-,Y-, andZ-axis; we can get theX-,Y-, andZ-axis unit vector matrix:(5)Φ=X→Y→Z→,
where(6)X→=sin⁡λ¯,-cos⁡λ¯,0,Y→=-cos⁡λ¯sin⁡φ¯,-sin⁡λ¯sin⁡φ¯,cos⁡φ¯,Z→=cos⁡λ¯cos⁡φ¯,sin⁡λ¯sin⁡φ¯,sin⁡φ¯.
Then, the locationX0,Y0,Z0 of mobile node P in the new Cartesian coordinate system can be described as(7)X0Y0Z0=ΦT-1×x¯-x0y¯-y0z¯-z0.Step 3.
When a mobile node’s delivery or transmitting behavior occurs in a grid, the node should update the current grid variableAij, which belongs to the matrix Ψ. After its own geodetic (λ,φ,h) is got from the GPS module, the calculation of the grid region is shown as(8)i=Y0ω,j=X0ω,where ω represents the width of the square grid. The value of ω depends on the node’s coverage radius. Using the above three steps, the mobile node can accurately calculate the grid region where they stay at the current time.


## 3.1. Network Model

We model the network as a quadrupleNet=U,V,W,E. Among them, U is a set of fixed sink stations in the network, and V is a set of grids in the network. W is a set of nodes in the network; E is a set of connections between two nodes or a fixed sink station and a node. At instantaneous time t, the set of grids is covered by the communication range of the ith fixed sink station; that is, U(i)=Ui1,Ui2,…,Uiv; then, the total number of grids in the network is V=∑i=1UU(i)+U′; U′ is the set of grids that are not covered by the communication range of fixed sink stations. The set of nodes in jth grid is V(j)=Vj1,Vj2,…,Vjw; then, the total number of nodes in the network is W=∑j=1VV(j). Each node maintains a list Vir=(Nid,mlesize,pdest,pi,ungetT,Ψ), where Nid is the identifier of the node, mlesize is the remaining buffer of the node, pdest is the number of times that the node successfully transmits messages to their destination node or fixed sink stations, and pi represents the number of times that the node transmits any message to other nodes in every time interval. ungetT is the number of times that the node cannot obtain a message transmit token when it is required. Ψ is the two-dimensional grid matrix. List Vir is constantly updated over time.


## 3.2. Fixed Sink Station Based DTN

In order to adapt to the harsh environment of DTN, by referring to literature [22], we propose a new idea of fixed sink station establishment. In this paper, the location and the number of fixed sink stations can be changed, and a fixed sink station has the following three functions: (1) the first function acts as a data collection center or an Internet access point; (2) the second function is used to publish the collected information; (3) the third function is to control the allocation and collection of the token within the coverage of the fixed sink station. As shown in Figure 1, the mobile node A is under the coverage of fixed sink station D, allowing node A to deliver messages to fixed sink station D. If the fixed sink station D is located in area Aij, this delivery behavior implies node A once it arrived at area Aij.Figure 1
Distribution of fixed sink stations.In this paper, we assumed that each mobile node is equipped with a GPS module that can be utilized for position-locating and clock synchronization. At the same time, the position coordinates of the fixed sink stations and the size of the urban map are global information for the nodes in the network. We establish a fixed sink station that follows four principles:(1)
A fixed sink station is usually established in the large user node density area so that the fixed sink station can efficiently receive messages for mobile nodes.(2)
Any two fixed sink stations cannot directly transmit data to each other because two sink stations can communicate through the Internet rather than wirelessly.(3)
We define the number of grids covered by the communication range of each fixed sink station as a cluster, and any two fixed sink stations cannot cover the same grid.(4)
The fixed sink station can communicate with the mobile node that is covered by itself in any time; that is, when the fixed sink station receives a message from the mobile node, it can deliver the message to its destination node when the destination node is covered by itself. The mobile node can communicate with the fixed sink station when the distance between the node and the fixed sink station is less than its communication radius.


## 3.3. Calculation of Grid Region

In this paper, we divided the urban map intoW×W square grid regions. These grids can be represented as a two-dimensional matrix Ψ, which is shown as (1)Ψ=A00A01⋯A0nA10A11⋯A1n⋯⋯⋯⋯Am0Am1⋯Amn.From Figure1, we can see that the fixed sink station must be located in one of the square grid regions. For example, if the fixed sink station D located in A(ij) received a message, the delivering mobile node must have arrived in the grid near A(ij) or at the same grid. Then, the mobile node will record this grid by itself, and when it encounters another mobile node, they will know how this node arrived in the grid. In other words, the delivery capability of nodes is associated with the passing grid. The location information contains the geography longitude, latitude, and altitude. In real applications, the mobile node gets its own current grid through a series of calculations. To improve positioning precision, the location is determined using coordinate transformations. The calculating steps of current grid region are shown as follows.Step 1.
The method of literature [23] is used to obtain the geocentric coordinates of mobile nodes. In this study, the mobile node first obtains the geodetic coordinates of the nodes and transforms them into geocentric coordinates from the geodetic coordinates. In this process, the geocentric coordinate is established using the center of the Earth as the coordinate-origin, and theX–Y plane coincides with the equatorial plane of the Earth, and the positive direction of the Z-axis points to the North Pole. Let P represent the mobile node location. P′ is the projection position of P on theX–Y plane. Point P gets its own geodetic (λ,φ,h) from GPS, and then point P geocentric (x0,y0,z0) can be shown:(2)x0=Rcos⁡φ0cos⁡λ,y0=Rcos⁡φ0sin⁡λ,z0=Rsin⁡φ0,where φ0 represents the geocentric latitude of point P. λ represents the longitude, and R is the equivalent radius of the Earth. The relationship between the geodetic latitude φ and geocentric latitude φ0 is shown as follows:(3)cos⁡φ0=11+b4/a4+tgφ2,R=a1+b4/a4tgφ21+b2/a2tgφ2,where a represents the length axis of the Earth and b represents the short axis of the Earth. Using 1983 IUGG recommendation a=6378136m and b=6376751m. Thus, putting (3) into (2), we can obtain (x0,y0,z0) as shown:(4)x0=acos⁡λ1+b2/a2tgφ2,y0=asin⁡λ1+b2/a2+tgφ2,z0=a1+b2/a2+tgφ2×b2a2+tgφ2.Step 2.
The upper-left corner of the urban map is represented asP1, and a Cartesian coordinate is established by the P1. The positive X-axis points to the south and the positive Y-axis points to the east; the direction of Z-axis is the opposite of the direction of gravity. Furthermore, the geodetic coordinate (λ¯,φ¯,h¯) of P1 is global knowledge to all nodes, and its geocentric coordinate (x¯,y¯,z¯) can be derived by Step 1. From the literature [22], (2) is used to get the unit vector of theX-,Y-, andZ-axis; we can get theX-,Y-, andZ-axis unit vector matrix:(5)Φ=X→Y→Z→,
where(6)X→=sin⁡λ¯,-cos⁡λ¯,0,Y→=-cos⁡λ¯sin⁡φ¯,-sin⁡λ¯sin⁡φ¯,cos⁡φ¯,Z→=cos⁡λ¯cos⁡φ¯,sin⁡λ¯sin⁡φ¯,sin⁡φ¯.
Then, the locationX0,Y0,Z0 of mobile node P in the new Cartesian coordinate system can be described as(7)X0Y0Z0=ΦT-1×x¯-x0y¯-y0z¯-z0.Step 3.
When a mobile node’s delivery or transmitting behavior occurs in a grid, the node should update the current grid variableAij, which belongs to the matrix Ψ. After its own geodetic (λ,φ,h) is got from the GPS module, the calculation of the grid region is shown as(8)i=Y0ω,j=X0ω,where ω represents the width of the square grid. The value of ω depends on the node’s coverage radius. Using the above three steps, the mobile node can accurately calculate the grid region where they stay at the current time.


## 4. DCAR Routing Algorithm

According to whether nodes are covered by fixed sink stations, the nodes in the network can be divided into two categories; thereby, there are two situations in the process of routing. Situation one is when nodes are dense and covered by fixed sink stations. In this situation, nodes can transmit messages after obtaining message transmit token; situation two is when nodes are sparse and nodes are not covered by fixed sink stations. In this situation, nodes can transmit messages that are not limited by tokens. Let us introduce each of these two situations in more detail.


### 4.1. The DCRA Routing Algorithm Used in Situation One

The DCRA routing algorithm in situation one mainly includes the following four pieces of content: allocation of the node’s identifier; allocation of token; selection of relay node; and selection of message.


#### 4.1.1. Allocation of Node’s Identifier

The identifier of any nodeA in the network is a triple Nid, where Nid=(u,v,w),u is the ID of a fixed sink station that covered node A, v is the ID of a grid region where it is staying, and w is the node ID in grid v. When a new node is added to arbitrary grid V(i), the DTN node ID allocation method is used to allocate a node ID for the new node. In this paper, the DTN node ID allocation method is defined as follows: for an arbitrary grid V(i), the node ID set is S={w1,w2,…,wk,…,w(n)}; if a new node joins the grid V(i), the node ID assigned to the new node is w(q)=max⁡(s)+1, where s∈S, and the identifier of all nodes will regularly update in a period T. The update principle is that the node ID is the largest in the current period, and it will be the smallest in the next period.


#### 4.1.2. Allocation of Token

We define the range covered by each fixed sink station as a cluster. Each cluster contains a fixed sink station, and each cluster consists of multiple grids. There are three kinds of tokens in a cluster: that is, message transmit token, probe token, and reserve token. The fixed sink station controls all the tokens within the grid, which is covered by itself, and regularly updates the number of tokens in a periodT. We will introduce the main functions of these three tokens in the following sections.The function of the message transmit token is to control node transmit messages; that is, a node must obtain a message transmit token before selecting the next hop node and other operations. When a node completes transmit messages, the fixed sink station will require the message transmit token to be collected. The number of messages transmit tokens that can be allocated in a cluster isITnode/α, where ITnode is the number of nodes in the cluster and α is the adjustment factor.The function of the probe token is to detect which nodes have messages that are required to be transmitted and request a message transmit token from the fixed sink station for the node. In a cluster, the number of probe tokens is one, and the fixed sink station monitors the probe token in real-time. The probe token in each cluster continuously probes whether the nodes in the grids have messages to be transmitted based on a cycle ascending order of the grid ID and the ID of nodes in the cluster (i.e., the node with the smallest grid ID and node ID will be detected after detecting the node with the largest grid ID and node ID). When a node has messages to be transmitted, if the cluster has idle message transmit tokens, the probe token requests a message transmit token from the fixed sink station to allocate to the current node for transmitting messages. Otherwise, the number of times that the node has not been given a message transmit token (i.e.,ungetT) is increased by one, and the probe token will continue detecting which node has messages that require transmitting. When the number of times that a node cannot obtain the message transmit token reaches the threshold value ΔP, a reserve token is requested from the fixed sink station for the node, allowing it to select the next hop node and other operations.Similarly, we can describe the function of the reserve token. The reserve token is allocated by the fixed sink station to a node to transmit messages when the number of times a node fails to obtain a message transmit token reaches a threshold value at the same time that no idle message transmit tokens exist within the cluster. The node can select the next hop node and other operations after obtaining a reserve token, and the number of reserve tokens is not limited.


#### 4.1.3. Selection of Relay Node

At time slott, node A in the grid Aij has messages that are to be transmitted, and it has obtained a message transmit token. If a fixed sink station or one of the destination nodes of messages is in its neighbor node set Nset, the messages are transmitted preferentially to the fixed sink station or the destination node. Otherwise, the utility value of any node in the neighbor set is calculated. ∀B∈Nset, (9)ΛB=α×pdestb∑i=0tpi+1-α×AijB∑i=0n∑j=0mAijB,where pdest(b) is the number of times the node B transmits messages to theirs destination nodes or fixed sink stations. pi represents the number of times that node B transmits messages to other nodes in every time interval. AijB represents B node’s transmit behavior in the grid Aij. When ΛB>ΛA, the node B will be one of the next hop nodes of node A.


#### 4.1.4. Selection of Message

Any messageτ in node A has a weight τA; when τA<τB, the message τ will be transmitted to node B. τA is calculated as follows:(10)τA=β×ρpABσ+1-β×LLrA,ρpABσ=ωAσtωAσt+ωBσt,LLrA=MlesizeAMtosizeA,where σ is the destination node of the message τ. ωAσ(t) represents the number of times that node A delivers messages to node σ or fixed sink stations in time t; MtosizeA is the total buffer size of node A. MlesizeA is the remaining buffer size of node A.


### 4.2. The DCRA Routing Algorithm Used in Situation Two

Because nodes are not covered by fixed sink stations, the major task of this situation is to transmit messages to a node that frequently encounters fixed sink stations or the destination node. So, nodeB will be selected as the relay node when Γa<Γb. Γa is calculated as follows:(11)Γa=α1×pdesta-encta+β1×encta,where pdest(a) is the number of times node A transmits messages to their destination nodes or fixed sink stations. enct(a) is the number of times that node A transmits messages to fixed sink stations and α1+β1=1.


## 4.1. The DCRA Routing Algorithm Used in Situation One

The DCRA routing algorithm in situation one mainly includes the following four pieces of content: allocation of the node’s identifier; allocation of token; selection of relay node; and selection of message.


### 4.1.1. Allocation of Node’s Identifier

The identifier of any nodeA in the network is a triple Nid, where Nid=(u,v,w),u is the ID of a fixed sink station that covered node A, v is the ID of a grid region where it is staying, and w is the node ID in grid v. When a new node is added to arbitrary grid V(i), the DTN node ID allocation method is used to allocate a node ID for the new node. In this paper, the DTN node ID allocation method is defined as follows: for an arbitrary grid V(i), the node ID set is S={w1,w2,…,wk,…,w(n)}; if a new node joins the grid V(i), the node ID assigned to the new node is w(q)=max⁡(s)+1, where s∈S, and the identifier of all nodes will regularly update in a period T. The update principle is that the node ID is the largest in the current period, and it will be the smallest in the next period.


### 4.1.2. Allocation of Token

We define the range covered by each fixed sink station as a cluster. Each cluster contains a fixed sink station, and each cluster consists of multiple grids. There are three kinds of tokens in a cluster: that is, message transmit token, probe token, and reserve token. The fixed sink station controls all the tokens within the grid, which is covered by itself, and regularly updates the number of tokens in a periodT. We will introduce the main functions of these three tokens in the following sections.The function of the message transmit token is to control node transmit messages; that is, a node must obtain a message transmit token before selecting the next hop node and other operations. When a node completes transmit messages, the fixed sink station will require the message transmit token to be collected. The number of messages transmit tokens that can be allocated in a cluster isITnode/α, where ITnode is the number of nodes in the cluster and α is the adjustment factor.The function of the probe token is to detect which nodes have messages that are required to be transmitted and request a message transmit token from the fixed sink station for the node. In a cluster, the number of probe tokens is one, and the fixed sink station monitors the probe token in real-time. The probe token in each cluster continuously probes whether the nodes in the grids have messages to be transmitted based on a cycle ascending order of the grid ID and the ID of nodes in the cluster (i.e., the node with the smallest grid ID and node ID will be detected after detecting the node with the largest grid ID and node ID). When a node has messages to be transmitted, if the cluster has idle message transmit tokens, the probe token requests a message transmit token from the fixed sink station to allocate to the current node for transmitting messages. Otherwise, the number of times that the node has not been given a message transmit token (i.e.,ungetT) is increased by one, and the probe token will continue detecting which node has messages that require transmitting. When the number of times that a node cannot obtain the message transmit token reaches the threshold value ΔP, a reserve token is requested from the fixed sink station for the node, allowing it to select the next hop node and other operations.Similarly, we can describe the function of the reserve token. The reserve token is allocated by the fixed sink station to a node to transmit messages when the number of times a node fails to obtain a message transmit token reaches a threshold value at the same time that no idle message transmit tokens exist within the cluster. The node can select the next hop node and other operations after obtaining a reserve token, and the number of reserve tokens is not limited.


### 4.1.3. Selection of Relay Node

At time slott, node A in the grid Aij has messages that are to be transmitted, and it has obtained a message transmit token. If a fixed sink station or one of the destination nodes of messages is in its neighbor node set Nset, the messages are transmitted preferentially to the fixed sink station or the destination node. Otherwise, the utility value of any node in the neighbor set is calculated. ∀B∈Nset, (9)ΛB=α×pdestb∑i=0tpi+1-α×AijB∑i=0n∑j=0mAijB,where pdest(b) is the number of times the node B transmits messages to theirs destination nodes or fixed sink stations. pi represents the number of times that node B transmits messages to other nodes in every time interval. AijB represents B node’s transmit behavior in the grid Aij. When ΛB>ΛA, the node B will be one of the next hop nodes of node A.


### 4.1.4. Selection of Message

Any messageτ in node A has a weight τA; when τA<τB, the message τ will be transmitted to node B. τA is calculated as follows:(10)τA=β×ρpABσ+1-β×LLrA,ρpABσ=ωAσtωAσt+ωBσt,LLrA=MlesizeAMtosizeA,where σ is the destination node of the message τ. ωAσ(t) represents the number of times that node A delivers messages to node σ or fixed sink stations in time t; MtosizeA is the total buffer size of node A. MlesizeA is the remaining buffer size of node A.


## 4.1.1. Allocation of Node’s Identifier

The identifier of any nodeA in the network is a triple Nid, where Nid=(u,v,w),u is the ID of a fixed sink station that covered node A, v is the ID of a grid region where it is staying, and w is the node ID in grid v. When a new node is added to arbitrary grid V(i), the DTN node ID allocation method is used to allocate a node ID for the new node. In this paper, the DTN node ID allocation method is defined as follows: for an arbitrary grid V(i), the node ID set is S={w1,w2,…,wk,…,w(n)}; if a new node joins the grid V(i), the node ID assigned to the new node is w(q)=max⁡(s)+1, where s∈S, and the identifier of all nodes will regularly update in a period T. The update principle is that the node ID is the largest in the current period, and it will be the smallest in the next period.


## 4.1.2. Allocation of Token

We define the range covered by each fixed sink station as a cluster. Each cluster contains a fixed sink station, and each cluster consists of multiple grids. There are three kinds of tokens in a cluster: that is, message transmit token, probe token, and reserve token. The fixed sink station controls all the tokens within the grid, which is covered by itself, and regularly updates the number of tokens in a periodT. We will introduce the main functions of these three tokens in the following sections.The function of the message transmit token is to control node transmit messages; that is, a node must obtain a message transmit token before selecting the next hop node and other operations. When a node completes transmit messages, the fixed sink station will require the message transmit token to be collected. The number of messages transmit tokens that can be allocated in a cluster isITnode/α, where ITnode is the number of nodes in the cluster and α is the adjustment factor.The function of the probe token is to detect which nodes have messages that are required to be transmitted and request a message transmit token from the fixed sink station for the node. In a cluster, the number of probe tokens is one, and the fixed sink station monitors the probe token in real-time. The probe token in each cluster continuously probes whether the nodes in the grids have messages to be transmitted based on a cycle ascending order of the grid ID and the ID of nodes in the cluster (i.e., the node with the smallest grid ID and node ID will be detected after detecting the node with the largest grid ID and node ID). When a node has messages to be transmitted, if the cluster has idle message transmit tokens, the probe token requests a message transmit token from the fixed sink station to allocate to the current node for transmitting messages. Otherwise, the number of times that the node has not been given a message transmit token (i.e.,ungetT) is increased by one, and the probe token will continue detecting which node has messages that require transmitting. When the number of times that a node cannot obtain the message transmit token reaches the threshold value ΔP, a reserve token is requested from the fixed sink station for the node, allowing it to select the next hop node and other operations.Similarly, we can describe the function of the reserve token. The reserve token is allocated by the fixed sink station to a node to transmit messages when the number of times a node fails to obtain a message transmit token reaches a threshold value at the same time that no idle message transmit tokens exist within the cluster. The node can select the next hop node and other operations after obtaining a reserve token, and the number of reserve tokens is not limited.


## 4.1.3. Selection of Relay Node

At time slott, node A in the grid Aij has messages that are to be transmitted, and it has obtained a message transmit token. If a fixed sink station or one of the destination nodes of messages is in its neighbor node set Nset, the messages are transmitted preferentially to the fixed sink station or the destination node. Otherwise, the utility value of any node in the neighbor set is calculated. ∀B∈Nset, (9)ΛB=α×pdestb∑i=0tpi+1-α×AijB∑i=0n∑j=0mAijB,where pdest(b) is the number of times the node B transmits messages to theirs destination nodes or fixed sink stations. pi represents the number of times that node B transmits messages to other nodes in every time interval. AijB represents B node’s transmit behavior in the grid Aij. When ΛB>ΛA, the node B will be one of the next hop nodes of node A.


## 4.1.4. Selection of Message

Any messageτ in node A has a weight τA; when τA<τB, the message τ will be transmitted to node B. τA is calculated as follows:(10)τA=β×ρpABσ+1-β×LLrA,ρpABσ=ωAσtωAσt+ωBσt,LLrA=MlesizeAMtosizeA,where σ is the destination node of the message τ. ωAσ(t) represents the number of times that node A delivers messages to node σ or fixed sink stations in time t; MtosizeA is the total buffer size of node A. MlesizeA is the remaining buffer size of node A.


## 4.2. The DCRA Routing Algorithm Used in Situation Two

Because nodes are not covered by fixed sink stations, the major task of this situation is to transmit messages to a node that frequently encounters fixed sink stations or the destination node. So, nodeB will be selected as the relay node when Γa<Γb. Γa is calculated as follows:(11)Γa=α1×pdesta-encta+β1×encta,where pdest(a) is the number of times node A transmits messages to their destination nodes or fixed sink stations. enct(a) is the number of times that node A transmits messages to fixed sink stations and α1+β1=1.


## 5. Simulation and Results

In order to better verify the efficiency of the DCAR algorithm, we will compare the algorithm with the epidemic routing algorithm [12], the prophet routing algorithm [13], and the GeoGrid routing algorithm [22] in terms of the message delivery ratio, average delay, and network overhead.


### 5.1. Simulation Environment

We use the opportunistic network environment (ONE) [24, 25] simulator to simulate the proposed algorithm. In order to simulate the urban environment, we set up public places such as schools, cinemas, parks, and other public places in the simulation. The specific parameters are shown in Table 1. There are four kinds of nodes in the simulation, including fixed sink stations, pedestrians, cars, and trams, as shown in Table 2.Table 1
Simulation parameters.
Parameter
Value
Word size
10000 m × 10000 m
Cluster size
1000 m × 1000 m
Simulation time
4 days
Urban scenario
Helsinki
Buffer size
10 M
Grid size
50 m
Package size
500 kB–2 MB
Package generation interval
10 s–20 s
Package TTL
600 min
Updates periodT
120 min
Threshold valueΔP
3Table 2
Assignment of nodes.
Node type
Number/group
Group
Pedestrians
50–350
3
Cars
6–8
2
Trams
4
1
Fixed sink stations
2
6


### 5.2. Results Comparison

#### 5.2.1. Delivery Ratio

The delivery ratio is the ratio of successful deliveries to generated messages within a given time period [26]. A routing algorithm with a good performance must have a high delivery ratio.Figure2(a) illustrates the changes in the message delivery ratio when the buffer size is varied from 5 to 30 M; with the increase in node buffer size from 5 M to 30 M, the delivery ratios of the epidemic algorithm and prophet algorithm gradually increase. The delivery ratios of the DCAR and GeoGrid algorithms are relatively stable during the period 5–30 M, and the delivery ratio of the DCAR is significantly greater than the three compared algorithms. Figure 2(b) depicts the changes in the message delivery ratio when the simulation time is varied from 30 to 150 h. It can be seen from Figure 2(b) that the delivery ratios of the epidemic and prophet algorithms are closely matched, and the delivery ratio of the GeoGrid algorithm is higher than both of them. However, in these four algorithms, the delivery ratio of the DCAR algorithm is significantly higher than the other three compared algorithms. Overall, the delivery ratio of the DCAR algorithm is higher than the epidemic algorithm, prophet algorithm, and GeoGrid algorithm; in the DCAR algorithm, nodes transmit messages are controlled by tokens and always transmit messages to a node that has a high possibility of encountering the destination node or fixed sink stations, therefor increasing the delivery ratio of the message.Figure 2
Delivery ratio with varying buffer size and simulation time.
(a)
(b)


#### 5.2.2. Average Delay

Average delay is the average time between a message being generated and successfully received by a fixed sink station or destination node.Figure3(a) illustrates the changes in the delay when the buffer size is varied from 5 to 30 M; as can be seen from Figure 3(a), on increasing the node buffer size, the message delays of all four algorithms increase. But the delay of the DCAR algorithm is considerably lower compared to the other three compared algorithms. Figure 3(b) displays the changes in the message delay when the simulation time is varied from 30 to 150 h; it can be seen from Figure 3(b) that the delays of all four algorithms are relatively stable during the period 30–150 h. The delays of the epidemic algorithm and prophet algorithm are closely matched, and the delay of the DCAR algorithm is obviously lower than the other three compared algorithms. Overall, the DCAR algorithm shows better performance in terms of delay; in the process of transmitting a message, the DCAR algorithm selects reasonable messages to transmit to a relay node, and thus the message can be transmitted to the destination node or a fixed sink station in a timely manner, therefore reducing the time that it stays in the network.Figure 3
Delay with varying buffer size and simulation time.
(a)
(b)


#### 5.2.3. Overhead

The overhead ratio reflects the network load to some extent. Network overhead is the ratio of the number of messages that are not successfully delivered to the destination node or fixed sink stations and the number of messages that are successfully delivered to the destination node or fixed sink stations. A better routing algorithm should have a lower overhead ratio.Figure4(a) illustrates the changes in the network overhead when the buffer size is varied from 5 to 30 M; as can be seen from Figure 4(a), when the buffer size increases from 5 to 30 M, the overheads of the four algorithms are all decreasing. But the network overhead of the GeoGrid algorithm and DCAR algorithm decreases to a relatively lesser extent. When the buffer size increases from 5 M to 30 M, the network overhead of the DCAR algorithm is less than that of the other three compared algorithms. Figure 4(b) depicts the changes in the overhead when the simulation time is varied from 30 to 150 h. During the simulation period 30–150 h, there are relatively fewer changes in the network overhead of all four algorithms; the overhead of the epidemic algorithm is the largest, whereas that of the DCAR algorithm is the least. In total, the network overhead of the DCAR algorithm is less than that of the other three compared algorithms. This is mainly because the node’s buffer is taken into account during the message transmitting process, and the DCAR algorithm transmits messages to a node which encounters fixed sink stations or the destination node more frequently after it obtains a message transmit token. Therefore, network overhead is decreased by reducing unnecessary copies of messages.Figure 4
Overhead with varying buffer size and simulation time.
(a)
(b)


## 5.1. Simulation Environment

We use the opportunistic network environment (ONE) [24, 25] simulator to simulate the proposed algorithm. In order to simulate the urban environment, we set up public places such as schools, cinemas, parks, and other public places in the simulation. The specific parameters are shown in Table 1. There are four kinds of nodes in the simulation, including fixed sink stations, pedestrians, cars, and trams, as shown in Table 2.Table 1
Simulation parameters.
Parameter
Value
Word size
10000 m × 10000 m
Cluster size
1000 m × 1000 m
Simulation time
4 days
Urban scenario
Helsinki
Buffer size
10 M
Grid size
50 m
Package size
500 kB–2 MB
Package generation interval
10 s–20 s
Package TTL
600 min
Updates periodT
120 min
Threshold valueΔP
3Table 2
Assignment of nodes.
Node type
Number/group
Group
Pedestrians
50–350
3
Cars
6–8
2
Trams
4
1
Fixed sink stations
2
6


## 5.2. Results Comparison

### 5.2.1. Delivery Ratio

The delivery ratio is the ratio of successful deliveries to generated messages within a given time period [26]. A routing algorithm with a good performance must have a high delivery ratio.Figure2(a) illustrates the changes in the message delivery ratio when the buffer size is varied from 5 to 30 M; with the increase in node buffer size from 5 M to 30 M, the delivery ratios of the epidemic algorithm and prophet algorithm gradually increase. The delivery ratios of the DCAR and GeoGrid algorithms are relatively stable during the period 5–30 M, and the delivery ratio of the DCAR is significantly greater than the three compared algorithms. Figure 2(b) depicts the changes in the message delivery ratio when the simulation time is varied from 30 to 150 h. It can be seen from Figure 2(b) that the delivery ratios of the epidemic and prophet algorithms are closely matched, and the delivery ratio of the GeoGrid algorithm is higher than both of them. However, in these four algorithms, the delivery ratio of the DCAR algorithm is significantly higher than the other three compared algorithms. Overall, the delivery ratio of the DCAR algorithm is higher than the epidemic algorithm, prophet algorithm, and GeoGrid algorithm; in the DCAR algorithm, nodes transmit messages are controlled by tokens and always transmit messages to a node that has a high possibility of encountering the destination node or fixed sink stations, therefor increasing the delivery ratio of the message.Figure 2
Delivery ratio with varying buffer size and simulation time.
(a)
(b)


### 5.2.2. Average Delay

Average delay is the average time between a message being generated and successfully received by a fixed sink station or destination node.Figure3(a) illustrates the changes in the delay when the buffer size is varied from 5 to 30 M; as can be seen from Figure 3(a), on increasing the node buffer size, the message delays of all four algorithms increase. But the delay of the DCAR algorithm is considerably lower compared to the other three compared algorithms. Figure 3(b) displays the changes in the message delay when the simulation time is varied from 30 to 150 h; it can be seen from Figure 3(b) that the delays of all four algorithms are relatively stable during the period 30–150 h. The delays of the epidemic algorithm and prophet algorithm are closely matched, and the delay of the DCAR algorithm is obviously lower than the other three compared algorithms. Overall, the DCAR algorithm shows better performance in terms of delay; in the process of transmitting a message, the DCAR algorithm selects reasonable messages to transmit to a relay node, and thus the message can be transmitted to the destination node or a fixed sink station in a timely manner, therefore reducing the time that it stays in the network.Figure 3
Delay with varying buffer size and simulation time.
(a)
(b)


### 5.2.3. Overhead

The overhead ratio reflects the network load to some extent. Network overhead is the ratio of the number of messages that are not successfully delivered to the destination node or fixed sink stations and the number of messages that are successfully delivered to the destination node or fixed sink stations. A better routing algorithm should have a lower overhead ratio.Figure4(a) illustrates the changes in the network overhead when the buffer size is varied from 5 to 30 M; as can be seen from Figure 4(a), when the buffer size increases from 5 to 30 M, the overheads of the four algorithms are all decreasing. But the network overhead of the GeoGrid algorithm and DCAR algorithm decreases to a relatively lesser extent. When the buffer size increases from 5 M to 30 M, the network overhead of the DCAR algorithm is less than that of the other three compared algorithms. Figure 4(b) depicts the changes in the overhead when the simulation time is varied from 30 to 150 h. During the simulation period 30–150 h, there are relatively fewer changes in the network overhead of all four algorithms; the overhead of the epidemic algorithm is the largest, whereas that of the DCAR algorithm is the least. In total, the network overhead of the DCAR algorithm is less than that of the other three compared algorithms. This is mainly because the node’s buffer is taken into account during the message transmitting process, and the DCAR algorithm transmits messages to a node which encounters fixed sink stations or the destination node more frequently after it obtains a message transmit token. Therefore, network overhead is decreased by reducing unnecessary copies of messages.Figure 4
Overhead with varying buffer size and simulation time.
(a)
(b)


## 5.2.1. Delivery Ratio

The delivery ratio is the ratio of successful deliveries to generated messages within a given time period [26]. A routing algorithm with a good performance must have a high delivery ratio.Figure2(a) illustrates the changes in the message delivery ratio when the buffer size is varied from 5 to 30 M; with the increase in node buffer size from 5 M to 30 M, the delivery ratios of the epidemic algorithm and prophet algorithm gradually increase. The delivery ratios of the DCAR and GeoGrid algorithms are relatively stable during the period 5–30 M, and the delivery ratio of the DCAR is significantly greater than the three compared algorithms. Figure 2(b) depicts the changes in the message delivery ratio when the simulation time is varied from 30 to 150 h. It can be seen from Figure 2(b) that the delivery ratios of the epidemic and prophet algorithms are closely matched, and the delivery ratio of the GeoGrid algorithm is higher than both of them. However, in these four algorithms, the delivery ratio of the DCAR algorithm is significantly higher than the other three compared algorithms. Overall, the delivery ratio of the DCAR algorithm is higher than the epidemic algorithm, prophet algorithm, and GeoGrid algorithm; in the DCAR algorithm, nodes transmit messages are controlled by tokens and always transmit messages to a node that has a high possibility of encountering the destination node or fixed sink stations, therefor increasing the delivery ratio of the message.Figure 2
Delivery ratio with varying buffer size and simulation time.
(a)
(b)


## 5.2.2. Average Delay

Average delay is the average time between a message being generated and successfully received by a fixed sink station or destination node.Figure3(a) illustrates the changes in the delay when the buffer size is varied from 5 to 30 M; as can be seen from Figure 3(a), on increasing the node buffer size, the message delays of all four algorithms increase. But the delay of the DCAR algorithm is considerably lower compared to the other three compared algorithms. Figure 3(b) displays the changes in the message delay when the simulation time is varied from 30 to 150 h; it can be seen from Figure 3(b) that the delays of all four algorithms are relatively stable during the period 30–150 h. The delays of the epidemic algorithm and prophet algorithm are closely matched, and the delay of the DCAR algorithm is obviously lower than the other three compared algorithms. Overall, the DCAR algorithm shows better performance in terms of delay; in the process of transmitting a message, the DCAR algorithm selects reasonable messages to transmit to a relay node, and thus the message can be transmitted to the destination node or a fixed sink station in a timely manner, therefore reducing the time that it stays in the network.Figure 3
Delay with varying buffer size and simulation time.
(a)
(b)


## 5.2.3. Overhead

The overhead ratio reflects the network load to some extent. Network overhead is the ratio of the number of messages that are not successfully delivered to the destination node or fixed sink stations and the number of messages that are successfully delivered to the destination node or fixed sink stations. A better routing algorithm should have a lower overhead ratio.Figure4(a) illustrates the changes in the network overhead when the buffer size is varied from 5 to 30 M; as can be seen from Figure 4(a), when the buffer size increases from 5 to 30 M, the overheads of the four algorithms are all decreasing. But the network overhead of the GeoGrid algorithm and DCAR algorithm decreases to a relatively lesser extent. When the buffer size increases from 5 M to 30 M, the network overhead of the DCAR algorithm is less than that of the other three compared algorithms. Figure 4(b) depicts the changes in the overhead when the simulation time is varied from 30 to 150 h. During the simulation period 30–150 h, there are relatively fewer changes in the network overhead of all four algorithms; the overhead of the epidemic algorithm is the largest, whereas that of the DCAR algorithm is the least. In total, the network overhead of the DCAR algorithm is less than that of the other three compared algorithms. This is mainly because the node’s buffer is taken into account during the message transmitting process, and the DCAR algorithm transmits messages to a node which encounters fixed sink stations or the destination node more frequently after it obtains a message transmit token. Therefore, network overhead is decreased by reducing unnecessary copies of messages.Figure 4
Overhead with varying buffer size and simulation time.
(a)
(b)


## 6. Conclusion

Because the existing DTN routing algorithms cannot be applied well in urban scenarios, we propose a DCAR algorithm. The algorithm establishes fixed sink stations as a data collection and publishing center; simultaneously, fixed sink stations also control the allocation and collection of tokens in the network. A node can transmit messages after it obtains a transmit token, thus realizing the concurrent transmission of messages. The algorithm can not only choose a node that has a larger remaining buffer size as the relay node for transmitting messages but also reduce the number of nodes of transmit messages at the same time, effectively avoiding congestion. Simulation results show that the DCAR algorithm shows better network performance in terms of the message delivery ratio, delay, and network overhead.



---

*Source: 6523076-2017-05-30.xml*