# Cooperative Downloading in Mobile Ad Hoc Networks: A Cost-Energy Perspective

Authors: He Li; Yang Yang; Xuesong Qiu; Zhipeng Gao; Guizhen Ma
Journal: International Journal of Distributed Sensor Networks
 (2016)

---

## Abstract

Cooperative downloading in mobile ad hoc networks is an effective way to improve the efficiency of downloading files. This work addresses the problem while distributing content to a group of mobile terminals (MTs) that cooperate during the download process by forming mobile ad hoc networks. However, the efficiency, cost, and energy consumption of cooperative downloading are sensitive by content distribution, which is a challenge to get the optimal in mobile ad hoc networks. This paper proposes a cost distribution (OCD) algorithm and a content distribution algorithm based on auction (OCDA) for mobile ad hoc networks based on relative location of nodes and local optimization theory. In order to make cooperative users take part when the downloading is beginning, several rounds of content distribution approach are designed based on users’ relative location in the cooperative ad hoc network. To satisfy users’ personal demands, the paper also designs a local optimization mechanism based on cost and energy. The simulation results show that the cost and content distribution method can achieve better performance, higher downloading efficiency, and lower energy consumption than the self-organized market algorithm (SOMA) and the average distribution algorithm (ADA).


---

## Body

## 1. Introduction

Mobile ad hoc networks (MANETs) are nodes self-organizing and self-managing in a distributed way. The networks consist of mobile nodes that communicate with each other. MANETs have some special characteristics, such as no center and dynamic topology [1].In the recent years, most research efforts have been put into MANETs, such as routing protocol and cooperative network security. Among these research fields, the nodes and cooperative networks have gained more attention as they overcome the limitations of single node capacity in MANETs. Cooperative downloading in MANETs is used as a way to improve the efficiency of information delivery among a group of mobile nodes. At present, almost mobile phones are equipped with the wireless communication modules (such as Wireless-Fidelity and Bluetooth) which allow the users to communicate with others located within one-hop communication range. Then, the messages will be disseminated and shared among a group of mobile phones users [2].Generally, mobile phone users watch the video or download the files from 4G (4th-generation wireless communications systems). This is comfortable for users with the development of 4G technology, however, to watch or download a video (i.e., 1 GB movie) that is luxury for most users. Cooperative method in this environment will be effective to reduce the cost. The users may form an alliance to download one movie and share with other users in this alliance. This can be used in the place such as railway station, subway, stadium, park, school, and other public places. These places provide opportunities for users to collaborate with each other through the spontaneous ad hoc interaction of diverse users [3] (e.g., watching a sports game in a stadium, waiting at a train station, watching a film in a park, and studying in a school).Cooperative downloading is an interesting paradigm that it is easy for implementation in modern multiple-interface (MTs) in the wireless communication [4]. Cooperative downloading as an effective way to reduce the costs and decrease the downloading time and the energy consumption has attracted an extensive research attention recently. The cooperative mobile-to-mobile file dissemination that is based on the uplink/downlink traffic imbalance in 3G wireless networks has been shown to decrease the file downloading time [5]. A cooperative file downloading scheme is proposed to share the burden of file downloading activities that several neighboring nodes act as proxies [6]. In [7], the collaborative urban computing (CUC) paradigm is present which supports serendipitous cooperation between a set of users physically located in an urban environment and all sharing a common goal.The collaborative stream among mobile users has been shown which can decrease the communications cost [8]. A cost model is built to encourage collaboration among users and a proper accounting scheme is introduced to support interactions [9]. The wireless cooperation approach, followed in the present paper, differs from the latter mainly for the instantaneous payoff (i.e., energy consumption gain) each user experiences in the collaborative cluster [4]. In [10], the cooperative framework is proposed which encompasses awareness of the potential gain of cooperation and adapts the choice of the content sharing strategy to different cooperative scenarios. One of the major goals of cooperative methods among the mobile phones is to decrease the energy consumption. The cooperative energy-efficient content distribution among a number of MTs has been shown which can decrease the energy consumption [11]. Recently, there are activity researches on energy consumption to reduce the energy consumption of mobile phone in the cooperative downloading systems. Many studies show that the high energy consumption of mobile phones will be one of the key limiting factors in future wireless communication systems [12–15]. The authors in [16, 17] minimize the total energy consumption of the MTs where they cooperatively multicast the content to each other by forming MANETs. Most of these works have designed energy-efficient content distribution protocols based only on few selected network parameters and not considering the costs and benefits of nodes.In this work, first, we divide the cooperative nodes into two groups (request group and downloading group) and use the negotiation way to form the groups. Then, a fair cost distribution approach is presented to the request group which considered the cost performance and the requirement. And we also present a local optimized approach that is based on the relative location and considered the cost-energy for cooperative content distribution to the downloading group. This paper is organized as follows. Related work is discussed in Section2. Section 3 presents the system model that includes assumption and defines topological structure and the formation of cooperative group. Section 4 describes the algorithm of OCD and OCDA. Simulation results and analysis of OCD and OCDA are present in Section 5. Finally, conclusions are drawn in Section 6.


## 2. Related Work

The previous work is discussed briefly as follows. Recently, to improve content downloading modalities, intense research activities are conducted through the multiple wireless network interfaces of the MTs. The users take the MTs with the different wireless network interfaces to associate with the same device owned by nearby users [18]. The cellular and short-range integration has been shown to improve the performance in the ad hoc network [19]. To minimize the streaming cost, the multimedia data among mobile devices are shared to use a CHUM (cooperating ad hoc networking to support messaging) method, in which one of the peers shares the multimedia content with other peers [20]. Then, a cooperative file downloading scheme is proposed to share the burden of file downloading through several neighboring nodes [6]. Similarly, another scheme [21] is proposed to download the parts of the content randomly from the base station (BS) and share them to their neighbors through long range (LR) link interface and short range (SR) link interface.In [10], the cooperative communication architecture has shown the energy consumption and transfer delay benefits. The energy consumption of wireless interface cards is measured from the host terminal in [22]. The total energy consumption is predicted to make these attached wireless cards more energy-efficient using an energy saving algorithm to choose the optimal interface. However, the optimal energy minimization in this scheme is not considered. In the recent years, energy-aware protocols for content distribution are gaining increasing attention such as in [12–16, 23]. The work in the [16] is an NP-hard problem to minimize the total energy consumption of the MTs. Because the transmit energy value is higher than the received energy value, the authors only consider the transmit energy value of the MTs. The authors in [24] subdivide the video stream into subsets and distribute the subsets equally to each MT according to the number of requesting MTs. The wireless local area network (WLAN) is used to send the subsets to each MT and Bluetooth is used to receive the remaining subsets. The collaboration method can reduce the energy consumption significantly. In [25], a content distribution algorithm is proposed to distribute the content fairly in P2P environment. It sends the equal parts of the content to each MT through LR by using the LTE and then MTs share the content through SR by using Bluetooth. The authors in [26] divide the video into substreams according to the interest by using a coding scheme. The substreams are downloaded by MTs through LR and then sent to the other cooperating MTs through SR. The simulation result of the code scheme to use the general packet radio service on LR and Bluetooth on SR shows that the energy consumption can reduce to 50% in two cooperating nodes.Literature [6] focuses on the large file downloading that let a client node request and the nearby nodes help to download the different pieces of the same file acting as proxies. The pieces of the file are downloaded by using the cellular and send the pieces of the file to the request node to use the Wi-Fi interfaces. However, the energy and costs of the nodes acting as proxies are not considered in this scheme. The authors in [27] take all MTs as a cooperating group and the formed group downloads parts of the content through LR and then forwards it to all other MTs through SR. In this paper, the implications and gains of the MTs in the group are also not discussed. The most present papers focus on the energy consumption and lack considering the cost reduction of the mobile users. In [9], a cost model is built to encourage collaboration among users and a proper accounting scheme is introduced to support interactions. Unlike the solution in [6, 27], the scheme in [9] allows the cooperating nodes to accumulate credits from the provider. Another scheme in [7] is present to support the downloading in an urban environment. The self-organized market algorithm (SOMA) is proposed to encourage the nodes to participate in the cooperating downloading. However, the optimal energy and cost minimization in these works are not considered. To the best of our knowledge, literature [7] is the only recent work that closely related to our work, so we will compare our scheme with the SOMA. In our work, we consider the cost and energy consumption and use the local optimal solution to distribute the content in mobile ad hoc network. The contributions of this paper can be summarized as follows:(i)
Formulating the cost and content distribution problem and presenting the optimal solution in iterative way.(ii)
Establishing the topology model that is based on the relative location.(iii)
Proposing a centralized cost distribution algorithm for the request nodes and a content distribution algorithm based on auction for the downloading nodes which approximates the optimal solution with improved performance.(iv)
Comparing the proposed scheme of the recent work and showing that the energy consumption and cooperative downloading time are reduced.


## 3. System Model

The traditional cooperative downloading networks are closed to other nodes and nodes leaving the networks will carry off parts of content that waste the network resource. The novel cooperative downloading scheme is proposed to use the nodes’ relative location to distribute the content. The advantage of this method can reduce the content lost when the mobile nodes leave the network and also can make the other nodes participate when the downloading is beginning.In our work, all nodes have Wi-Fi communication modules and can become hotspots that can get information from their neighbors. The nodes also can access the 4G server to get information. LTE-advanced 4G and Wi-Fi technology are combined in this scheme to cooperate downloading for mobile users. This can effectively reduce the cost and benefit for the cooperative nodes. The novel cooperative downloading scheme is depicted in Figure1. This system included three phases as follows:(i)
Form Group. The users through server form two groups (request group and downloading group).(ii)
Content Auction. The server auctions the content to cooperative downloading nodes.(iii)
Cooperative Downloading. The downloading group downloads the content and then delivers it to request group.Figure 1
The novel cooperative downloading scheme.


### 3.1. Assumptions and Definitions

The assumptions in this system are as follows:(i)
The location of each node is known by server through the Global Positioning System (GPS) service at any given time.(ii)
Each node is equipped with Wi-Fi module that has the capability of short-range wireless communication.The definitions in this paper are as follows:(i)
Request Node (RN). The node is actively or passively request the downloading task. Considered set of request nodes is called request group (RG).(ii)
Downloading Node (DN). The node is cooperative downloading from the server. Considered set of cooperative downloading nodes is called downloading group (DG).(iii)
Cooperative Downloading Network (CON). Cooperative downloading network is composed of the request group and downloading group. The size of the CON is the scope of all request nodes covered.(iv)
Stable Downloading Time (SDT). All request nodes and downloading nodes in this time will not leave the cooperative downloading network.


### 3.2. Topological Structure and Content Predistribution

The mobility of nodes is considered by this scheme because it will change the topology of cooperative networks. The nodes leaving or joining the networks frequently will waste the resource and reduce the efficiency of downloading. The topology of the network is shown in Figure2.Figure 2
The topology of the CON.Consider a set,I={i:1,2,…,m}, of the RG that is interested in downloading the file and similarly J={j:1,2,…,n} of the DG that agrees to participate in downloading together. The coverage radius of node i is denoted δi. The space distance between the node i and the other nodes is ζ(i,I∪J). The relative velocity between the node i and the other nodes is denoted vi,I∪J. The stable time is denoted as follows:(1)Tsd⁡=mini=1m⁡δi-ζi,I∪Jvi,I∪J,i∈I,ζi,i=0.In this scheme, if stable time is too short, the numbers of content distribution rounds will increase and then influence the efficiency of cooperative downloading. The relative stable time is introduced to avoid this kind of situation. The relative stable time is denoted asT¯sd⁡. The stable time can also be denoted as follows:(2)Tsd⁡=max⁡Tsd⁡,T¯sd⁡.The content distribution is designed based on SDT and distributed by several rounds. In the first round, the stable time is assumed asT(1)sd⁡ and the data transfer rate of DN j  (j∈J) is assumed as r(1)i. So the maximum content size of j can be calculated as follows:(3)c1j=r1jT1sd⁡.The first round of maximum content sizeC(1)1 can be calculated as follows:(4)C11=∑j=1nc1j=∑jnr1jT1sd⁡.The number of rounds of the content distribution is assumed asa; the total size of the file is assumed as C that can also be calculated as follows:(5)C=∑k=0aCkk=∑k=0a∑j=1nckj.


### 3.3. Cooperative Request Group (RG)

When request nodei needs to download information (i.e., files, video) that will send the cooperative downloading request to the server, after the server received the request, it will search the other potential cooperative request nodes according to its geographic location. The cooperative downloading request message is designed as Pi,max,di,Td,i,Ti,pri:(i)
Pi,max denotes maximum cost of the user i   (i∈I) that is willing to pay for the server.(ii)
di denotes the content downloading rate of the user i; its value is between [0,1]. 0 denotes the case when downloading task is not beginning and 1 denotes the case when the downloading task has completed.(iii)
Ti denotes actual time that the user i takes to complete the downloading task. It is known by user i and the server.(iv)
Td,i denotes maximum delay to complete downloading that the users i can endure. If Ti is bigger than Td,i, that means that the server cannot earn the full cost and needs to pay fine to users.(v)
pri denotes penalty rate that the server needs to pay fine to user i. If Td,i is bigger than Ti, that means that the server needs to base this penalty rate to pay fine to user i.After receiving the request, the server will ask the other user nodes if they want to participate in this RG according to request and other information (i.e., hobby, geographical location). The ask message will include the price of the downloading task. The pricePd is decided by the file size, popularity, network environment, and others. The price model of server is as follows:(6)Pd=pf+ηnr2R∗Tr.p
f is the based cost of the file, nr is the number of file downloading requests, R is the maximum number of file downloading requests, Tr is the time of file from appearing to now, η is the price control factor, and nr2/RTr is the popularity of the file. The users can decide if they are willing to participate in this RG according to this price and their interest.Figure3 shows the process of RG formed. User 1 as the request initiator sends request to server and then server proposes user 2, user 3, and user 4 to participate in this RG. User 3 and user 4 are not interested and reject to participate in this downloading task. At last, user 1 and user 2 will form the RG. The server will calculate the users’ cost of the RG and then reply to the users of the RG. The server will deduct the cost if the users accept the cost. If the users all reject, the request user will be the only node of RG and need to pay all cost of the file.Figure 3
The process of formed RG.


### 3.4. Cooperative Downloading Group (DG)

After request group formed, the next step is to form downloading group. The server will search the DNs according to the location of the RG. The server will ask the searched nodes if they want to participate in this DG to download the task through Wi-Fi or 4G. The ask message of server is designed asPj,max,cj,Td,j,Tj,prj:(i)
Pj,max denotes maximum cost of the server that is willing to pay for the DNs.(ii)
cj denotes the content size that the server distributed to user j of the DG.(iii)
Tj denotes actual time that user j of the DG takes to download cj. It is known by user j and the server.(iv)
Td,j denotes maximum delay that the server can accept to download cj. If Tj is bigger than Td,j, that means that user j of the DG cannot earn the full cost pjcj and needs to pay fine to the server.(v)
prj denotes penalty rate that the rate of user j needs to pay fine to the server. If Tj is bigger than Td,j, that means that the user j needs to base this penalty rate to pay fine to the server.After the userj received the ask message, the user will decide if he/she wants to participate in this DG according to this information. The benefits are used to motivate users to participate.


## 3.1. Assumptions and Definitions

The assumptions in this system are as follows:(i)
The location of each node is known by server through the Global Positioning System (GPS) service at any given time.(ii)
Each node is equipped with Wi-Fi module that has the capability of short-range wireless communication.The definitions in this paper are as follows:(i)
Request Node (RN). The node is actively or passively request the downloading task. Considered set of request nodes is called request group (RG).(ii)
Downloading Node (DN). The node is cooperative downloading from the server. Considered set of cooperative downloading nodes is called downloading group (DG).(iii)
Cooperative Downloading Network (CON). Cooperative downloading network is composed of the request group and downloading group. The size of the CON is the scope of all request nodes covered.(iv)
Stable Downloading Time (SDT). All request nodes and downloading nodes in this time will not leave the cooperative downloading network.


## 3.2. Topological Structure and Content Predistribution

The mobility of nodes is considered by this scheme because it will change the topology of cooperative networks. The nodes leaving or joining the networks frequently will waste the resource and reduce the efficiency of downloading. The topology of the network is shown in Figure2.Figure 2
The topology of the CON.Consider a set,I={i:1,2,…,m}, of the RG that is interested in downloading the file and similarly J={j:1,2,…,n} of the DG that agrees to participate in downloading together. The coverage radius of node i is denoted δi. The space distance between the node i and the other nodes is ζ(i,I∪J). The relative velocity between the node i and the other nodes is denoted vi,I∪J. The stable time is denoted as follows:(1)Tsd⁡=mini=1m⁡δi-ζi,I∪Jvi,I∪J,i∈I,ζi,i=0.In this scheme, if stable time is too short, the numbers of content distribution rounds will increase and then influence the efficiency of cooperative downloading. The relative stable time is introduced to avoid this kind of situation. The relative stable time is denoted asT¯sd⁡. The stable time can also be denoted as follows:(2)Tsd⁡=max⁡Tsd⁡,T¯sd⁡.The content distribution is designed based on SDT and distributed by several rounds. In the first round, the stable time is assumed asT(1)sd⁡ and the data transfer rate of DN j  (j∈J) is assumed as r(1)i. So the maximum content size of j can be calculated as follows:(3)c1j=r1jT1sd⁡.The first round of maximum content sizeC(1)1 can be calculated as follows:(4)C11=∑j=1nc1j=∑jnr1jT1sd⁡.The number of rounds of the content distribution is assumed asa; the total size of the file is assumed as C that can also be calculated as follows:(5)C=∑k=0aCkk=∑k=0a∑j=1nckj.


## 3.3. Cooperative Request Group (RG)

When request nodei needs to download information (i.e., files, video) that will send the cooperative downloading request to the server, after the server received the request, it will search the other potential cooperative request nodes according to its geographic location. The cooperative downloading request message is designed as Pi,max,di,Td,i,Ti,pri:(i)
Pi,max denotes maximum cost of the user i   (i∈I) that is willing to pay for the server.(ii)
di denotes the content downloading rate of the user i; its value is between [0,1]. 0 denotes the case when downloading task is not beginning and 1 denotes the case when the downloading task has completed.(iii)
Ti denotes actual time that the user i takes to complete the downloading task. It is known by user i and the server.(iv)
Td,i denotes maximum delay to complete downloading that the users i can endure. If Ti is bigger than Td,i, that means that the server cannot earn the full cost and needs to pay fine to users.(v)
pri denotes penalty rate that the server needs to pay fine to user i. If Td,i is bigger than Ti, that means that the server needs to base this penalty rate to pay fine to user i.After receiving the request, the server will ask the other user nodes if they want to participate in this RG according to request and other information (i.e., hobby, geographical location). The ask message will include the price of the downloading task. The pricePd is decided by the file size, popularity, network environment, and others. The price model of server is as follows:(6)Pd=pf+ηnr2R∗Tr.p
f is the based cost of the file, nr is the number of file downloading requests, R is the maximum number of file downloading requests, Tr is the time of file from appearing to now, η is the price control factor, and nr2/RTr is the popularity of the file. The users can decide if they are willing to participate in this RG according to this price and their interest.Figure3 shows the process of RG formed. User 1 as the request initiator sends request to server and then server proposes user 2, user 3, and user 4 to participate in this RG. User 3 and user 4 are not interested and reject to participate in this downloading task. At last, user 1 and user 2 will form the RG. The server will calculate the users’ cost of the RG and then reply to the users of the RG. The server will deduct the cost if the users accept the cost. If the users all reject, the request user will be the only node of RG and need to pay all cost of the file.Figure 3
The process of formed RG.


## 3.4. Cooperative Downloading Group (DG)

After request group formed, the next step is to form downloading group. The server will search the DNs according to the location of the RG. The server will ask the searched nodes if they want to participate in this DG to download the task through Wi-Fi or 4G. The ask message of server is designed asPj,max,cj,Td,j,Tj,prj:(i)
Pj,max denotes maximum cost of the server that is willing to pay for the DNs.(ii)
cj denotes the content size that the server distributed to user j of the DG.(iii)
Tj denotes actual time that user j of the DG takes to download cj. It is known by user j and the server.(iv)
Td,j denotes maximum delay that the server can accept to download cj. If Tj is bigger than Td,j, that means that user j of the DG cannot earn the full cost pjcj and needs to pay fine to the server.(v)
prj denotes penalty rate that the rate of user j needs to pay fine to the server. If Tj is bigger than Td,j, that means that the user j needs to base this penalty rate to pay fine to the server.After the userj received the ask message, the user will decide if he/she wants to participate in this DG according to this information. The benefits are used to motivate users to participate.


## 4. Algorithm Description

The mobile users in actual world are various and the demand is different, so, in this paper, we choose cost performance as a standard to distribute the cost fairly. All RNs have to send the demand information to server before RG is formed. The cost is distributed by the server according to the demand information.


### 4.1. Algorithm of Cost Distribution

The distribution vector of cost is assumed asPI(t)=(p1,p2,…,pm). In order to improve the different experience of users to download, cost performance is used as the utility function. It is defined as follows:(7)uipi=CpiTd,i.So the optimal cost distribution problem is to solve the following formula:(8)SYSTEM=maxpi≥0∑i=1muipis.t.∑j=1npi=Pdpi≤Pi,max⁡,i=1,2,…,m.The Lagrange function is constructed to solve the problem as follows:(9)LP,λ,μ=∑i=1muipi-λi∑i=1mpi-Pd-∑i=1mμiPi,max⁡-pi.The Karush-Kuhn-Tucker conditions are as follows:(10)pi∂L∂pi=pi-C4Td,ipi-3/2-λi+μi=0.So the cost distribution of the useri is as follows:(11)pi=C4μi-λi2Td,i3.However, if you want to solvepi you must know the Lagrange multiplier vectors λi and μi. The dual problem is used to earn the Lagrange multiplier vector in this paper. The dual problem of the original problem is as follows:(12)minλ≥0,μ⁡hλ,μ=minλ⁡∑i=1mpit-Pd+∑i=1mminμ⁡μiPi,max⁡-pit.The dual problem function is differentiable. The gradient iteration method is used to earn the Lagrange multiplier vector and the method is as follows:(13)λt+1=λt+Δt,i∑i=1mpit-Pd,μit+1=μit+Δt,ipi,max⁡-pit.Δ
(
t
,
i
) is the step length of iteration and decides the convergence of the algorithm. The algorithm of the cost distribution is as shown in Algorithm 1.Algorithm 1:Optimizer of cost distribution (OCD).
(1)Initialize  λ,μi,t,ε
The RNs send their pi,max to the server
The server gets the Pi,max=(p1,max,p2,max,…,pn,max)
(2) for (t=1; t++) do
(3)  The server calculate the formula (11) to get pi(t)
Then the server get the PI(t)=(p1(t),p2(t),…,pm(t))
(4)  if (∑i=1mpi(t)-Pd>0) then
(5)    λt+1=λ(t)+Δt,i∑i=1mpit-Pd
(6)  else  μi(t+1)=μi(t)+Δ(t,i)(pi,max-pi(t))
(7)  end if
(8)  if (∑i=1mui(t)-ui(t-1)≤ε) then
(9)  break
(10)end if
(11)end for
(12)return  PI(t)=(p1(t),p2(t),…,pm(t))It takes the request messagePi,max,di,Td,i,Ti,pri as the initialization and input parameters. Then, the server calculates PI(t) according to these parameters. The next step is to adjust parameters until the error meets the requirement.


### 4.2. Algorithm of Content Distribution Based on Auction

When the server earned the cost, it will distribute the content to DG. In this phase, the server will auction the content to the DNs. The content distribution is decided by the price, the energy, and the downloading ability in this algorithm.


#### 4.2.1. Content Distribution Problem

The cooperative downloading users’ personal demands are different and have different sensitivity to the benefits and the energy consumption when downloading the content. To meet the different requirements of DNs, the efficiency and energy consumption are considered to download the content. So the key point to this cooperative system is to distribute reasonably. The bid vectors of the cooperative downloading nodes are assumed asP(k)J(p1,p2,…,pn). The content is distributed by the server; the lower the bids of the cooperative downloading nodes are, the better it is for the server. The energy consumption is also considered, so the lower the energy consumption, the better the DNs.The all distributed cost of server isPS; the distributed costs of the round k are P(k)S=C(k)kPS/C. The utility function of the DG  J  (1,2,…,n) is UJ. The content size of the DG distributed in the k round is C(k)k. The distributed content size cj of the DN j is according to the bid of the DN j. The content distribution vector of the DG J in the k round is C(k)k=(c(k)1,c(k)2,…,c(k)n). The DN j sends the bid p(k)j to server and then the server distributes the content c(k)j(pj) to the DN j in the k round. The energy consumption in the k round is E(k)j(c(k)j). The optimal content distribution problem is to solve the following formula:(14)mincj≥0∑j=1npkjckjEkjckj(15)s.t.∑j=1nckj=Ckk(16)∑j=1npkjckj≤Pks(17)Tkj≤Tksd⁡.In formula (17), T(k)sd⁡ is the stable time and T(k)j is the actual time that user j takes to download c(k)j in the k round. In formula (14), the utility function of the DN j in the k round is pkj(cj)E(k)j(cj(k)). However, the unit of benefits and energy consumption is different and it will lead the result irrationality so that the dimensionless processing is needed. The dimensionless processes are as follows:(18)pkjckj=pkj′ckjCkpks,(19)Ejkckj=Ekj′ckjmax⁡Ekjckj.In formula (18), pkj′ckj is the actual value and pkjckj is the dimensionless value. In formula (19), Ekj′ckj is the actual value and Ekjckj is the dimensionless value.


#### 4.2.2. Energy Consumption Model

The energy consumption of DNj that received the content from server to use Wi-Fi is denoted as E(k)wr,j. The size of the Wi-Fi packet and the head of packet are denoted as lw and hw, so the size of content that the DN j received is c(k)j/(lw-hw). The DN j received the a packet will return an ACK confirm packet to server, the energy consumption of ACK packets is not considered because they are too small compared with the data packets. So E(k)wr,j=ckjewr,j/r(k)wr,j(lw-hw), r(k)wr,j is the Wi-Fi downloading data rate, and ewr,j is the unit energy consumption of the DN j downloading the content through the Wi-Fi.The energy consumption of DNj that received the content from server to use 4G is denoted as E(k)l,j. The size of the 4G packet and the head of packet are denoted as ll and hl, so the amount of data that the DN j received is c(k)j/(ll-hl). So E(k)l,j=ckjel,j/r(k)l,j(ll-hl), r(k)l,j is the 4G downloading data rate, and el,j is the unit energy consumption of DN j downloading the content through the 4G.The energy consumption of DNj transmits the content to RG to use Wi-Fi that is denoted as E(k)wt,j. So E(k)wt,j=ckjewt,j/r(k)wt,j(lw-hw), r(k)wt,j is the Wi-Fi data transmission rate, and ewt,j is the unit energy consumption of the DN j that transmits the content through Wi-Fi. The energy consumption model of DN j is defined as follows:(20)Ekj=αkjEkwr,j+βkjEkl,j+Ekwt,j.The ratio of DNj that used the Wi-Fi to download is defined as α(k)j, the ratio of DN j that used the 4G to download is defined as β(k)j, and α(k)j+β(k)j=1.


#### 4.2.3. Content Distribution Model

T
(
k
)
j
(
c
j
) denotes the downloading time of the distributed content c(k)j. In this model, the DG downloads the content and then sends it to RG immediately, so the downloading time of the distributed content c(k)j can be calculated as Tkjcj=αkjckj/rkwr,j+β(k)jc(k)j/r(k)l,j. The Lagrange function is constructed to solve the problem that is as follows:(21)LC,P,λ,μ=∑j=1npkjEkj-λ∑j=1nckj-Ckk-μ0∗Pks-∑j=1npkjckj-∑j=1nμjTksd⁡-Tkj.The Karush-Kuhn-Tucker condition is as follows:(22)2pkjEkjckj-λk-μk0pkj-μkjαkrwr,j+βkrl,j=0.So the content distribution of the DNj is as follows:(23)ckj=λk+μk0∗pkj-μkjαk/rkw,j+βk/rkl,j2pkjαewr,j/rwr,jlw-hw+2pkjβel,j/rl,jll-hl+2pkjewt,j/rwt,jlw-hw.However, if you want to solvecj you must know the Lagrange multiplier vectors λj and μj. The dual problem is used to earn the Lagrange multiplier vector in this paper. The dual problem of the original problem is as follows:(24)maxλk⁡λk∑j=1nckjt-Ckk+maxμk0⁡μk0∑j=1nPkst-pkjtckjt+maxμkj⁡∑j=1nμkjTd,s-αkckjtrwr,j-βkckjtrl,j.The dual problem functions are differentiable so the gradient iteration method is used to earn the Lagrange multiplier vector and the method is as follows:(25)λkt+1=λtk+Δkt,j∑j=1nckjt-Ckk,(26)μk0t+1=μk0t+Δkt,jPkst-∑j=1npkjt∗ckjt,(27)μkjt+1=μkjt+Δkt,jTkd,s-ckjtαkrw,j+βkrl,j.Aftert iteration, Δ(k)(t,j)≥0 is the step length of iteration and decides the convergence of the algorithm. The algorithm of the content distribution is as follows.The first step of Algorithm2 is to initialize the parameters. Then, the server calculate C(k)J(t) according to λk(0), μ(k)0(0), μ(k)j(0), ε(0), and p(k)j(0) that are received from the DNs. Second, the server used the utility function to judge if  C(k)J(t) conforms to the error requirement. If  C(k)J(t) does not meet the error requirement, the server will send C(k)J(t) to DNs; otherwise, it will also return C(k)J(t) as the end content distribution result. Third, the DNs adjust P(k)J(t+1) according to the received C(k)J(t) and send P(k)J(t+1) to the server. Steps 5 to 10 are continuing to cycle until the error to meet the requirement.Algorithm 2:Optimizer of the content distribution based on auction (OCDA) run on the server.
(1)Initialize  λ(0)(k), μ0(0)(k), μj(0)(k), ε(0)
The DNs send their pj(0)(k) to the server
The server gets the PJ(0)k=(p10k,p20k,…,pn(0)k)
(2)for (t=1; t++) do
(3)   Calculate the formulas (25), (26), (27) and (23)
The server gets the CJ(t)(k)
(4)   if (∑j=1n[pj(t)(k)∗Ej(t)(k)-pj(t-1)(k)∗Ej(t-1)(k)]>ε) then
(5)   if (∑j=1mpj(t)-Pd>0) then
(6)     The server sends the CJ(t)(k) to the DN j
The DNs receive the CJ(t)(k) and adjust PJ(t+1)(k)
(7)     pj(t+1)(k)=pj(t)(k)+Δ(t,j)(k)(pj(t)(k)-pd,j(k))
(8)   else  pj(t+1)(k)=pj(t)(k)+Δ(t,j)(k)(pj(t)(k)-pd,s(k))
(9)   end if
(10)   The DNs send the  PJ(t+1)(k) to the server
(11)   else break
(12)   end if
(13)end for
(14)return  PJ(t+1)(k), CJ(t)(k)


## 4.1. Algorithm of Cost Distribution

The distribution vector of cost is assumed asPI(t)=(p1,p2,…,pm). In order to improve the different experience of users to download, cost performance is used as the utility function. It is defined as follows:(7)uipi=CpiTd,i.So the optimal cost distribution problem is to solve the following formula:(8)SYSTEM=maxpi≥0∑i=1muipis.t.∑j=1npi=Pdpi≤Pi,max⁡,i=1,2,…,m.The Lagrange function is constructed to solve the problem as follows:(9)LP,λ,μ=∑i=1muipi-λi∑i=1mpi-Pd-∑i=1mμiPi,max⁡-pi.The Karush-Kuhn-Tucker conditions are as follows:(10)pi∂L∂pi=pi-C4Td,ipi-3/2-λi+μi=0.So the cost distribution of the useri is as follows:(11)pi=C4μi-λi2Td,i3.However, if you want to solvepi you must know the Lagrange multiplier vectors λi and μi. The dual problem is used to earn the Lagrange multiplier vector in this paper. The dual problem of the original problem is as follows:(12)minλ≥0,μ⁡hλ,μ=minλ⁡∑i=1mpit-Pd+∑i=1mminμ⁡μiPi,max⁡-pit.The dual problem function is differentiable. The gradient iteration method is used to earn the Lagrange multiplier vector and the method is as follows:(13)λt+1=λt+Δt,i∑i=1mpit-Pd,μit+1=μit+Δt,ipi,max⁡-pit.Δ
(
t
,
i
) is the step length of iteration and decides the convergence of the algorithm. The algorithm of the cost distribution is as shown in Algorithm 1.Algorithm 1:Optimizer of cost distribution (OCD).
(1)Initialize  λ,μi,t,ε
The RNs send their pi,max to the server
The server gets the Pi,max=(p1,max,p2,max,…,pn,max)
(2) for (t=1; t++) do
(3)  The server calculate the formula (11) to get pi(t)
Then the server get the PI(t)=(p1(t),p2(t),…,pm(t))
(4)  if (∑i=1mpi(t)-Pd>0) then
(5)    λt+1=λ(t)+Δt,i∑i=1mpit-Pd
(6)  else  μi(t+1)=μi(t)+Δ(t,i)(pi,max-pi(t))
(7)  end if
(8)  if (∑i=1mui(t)-ui(t-1)≤ε) then
(9)  break
(10)end if
(11)end for
(12)return  PI(t)=(p1(t),p2(t),…,pm(t))It takes the request messagePi,max,di,Td,i,Ti,pri as the initialization and input parameters. Then, the server calculates PI(t) according to these parameters. The next step is to adjust parameters until the error meets the requirement.


## 4.2. Algorithm of Content Distribution Based on Auction

When the server earned the cost, it will distribute the content to DG. In this phase, the server will auction the content to the DNs. The content distribution is decided by the price, the energy, and the downloading ability in this algorithm.


### 4.2.1. Content Distribution Problem

The cooperative downloading users’ personal demands are different and have different sensitivity to the benefits and the energy consumption when downloading the content. To meet the different requirements of DNs, the efficiency and energy consumption are considered to download the content. So the key point to this cooperative system is to distribute reasonably. The bid vectors of the cooperative downloading nodes are assumed asP(k)J(p1,p2,…,pn). The content is distributed by the server; the lower the bids of the cooperative downloading nodes are, the better it is for the server. The energy consumption is also considered, so the lower the energy consumption, the better the DNs.The all distributed cost of server isPS; the distributed costs of the round k are P(k)S=C(k)kPS/C. The utility function of the DG  J  (1,2,…,n) is UJ. The content size of the DG distributed in the k round is C(k)k. The distributed content size cj of the DN j is according to the bid of the DN j. The content distribution vector of the DG J in the k round is C(k)k=(c(k)1,c(k)2,…,c(k)n). The DN j sends the bid p(k)j to server and then the server distributes the content c(k)j(pj) to the DN j in the k round. The energy consumption in the k round is E(k)j(c(k)j). The optimal content distribution problem is to solve the following formula:(14)mincj≥0∑j=1npkjckjEkjckj(15)s.t.∑j=1nckj=Ckk(16)∑j=1npkjckj≤Pks(17)Tkj≤Tksd⁡.In formula (17), T(k)sd⁡ is the stable time and T(k)j is the actual time that user j takes to download c(k)j in the k round. In formula (14), the utility function of the DN j in the k round is pkj(cj)E(k)j(cj(k)). However, the unit of benefits and energy consumption is different and it will lead the result irrationality so that the dimensionless processing is needed. The dimensionless processes are as follows:(18)pkjckj=pkj′ckjCkpks,(19)Ejkckj=Ekj′ckjmax⁡Ekjckj.In formula (18), pkj′ckj is the actual value and pkjckj is the dimensionless value. In formula (19), Ekj′ckj is the actual value and Ekjckj is the dimensionless value.


### 4.2.2. Energy Consumption Model

The energy consumption of DNj that received the content from server to use Wi-Fi is denoted as E(k)wr,j. The size of the Wi-Fi packet and the head of packet are denoted as lw and hw, so the size of content that the DN j received is c(k)j/(lw-hw). The DN j received the a packet will return an ACK confirm packet to server, the energy consumption of ACK packets is not considered because they are too small compared with the data packets. So E(k)wr,j=ckjewr,j/r(k)wr,j(lw-hw), r(k)wr,j is the Wi-Fi downloading data rate, and ewr,j is the unit energy consumption of the DN j downloading the content through the Wi-Fi.The energy consumption of DNj that received the content from server to use 4G is denoted as E(k)l,j. The size of the 4G packet and the head of packet are denoted as ll and hl, so the amount of data that the DN j received is c(k)j/(ll-hl). So E(k)l,j=ckjel,j/r(k)l,j(ll-hl), r(k)l,j is the 4G downloading data rate, and el,j is the unit energy consumption of DN j downloading the content through the 4G.The energy consumption of DNj transmits the content to RG to use Wi-Fi that is denoted as E(k)wt,j. So E(k)wt,j=ckjewt,j/r(k)wt,j(lw-hw), r(k)wt,j is the Wi-Fi data transmission rate, and ewt,j is the unit energy consumption of the DN j that transmits the content through Wi-Fi. The energy consumption model of DN j is defined as follows:(20)Ekj=αkjEkwr,j+βkjEkl,j+Ekwt,j.The ratio of DNj that used the Wi-Fi to download is defined as α(k)j, the ratio of DN j that used the 4G to download is defined as β(k)j, and α(k)j+β(k)j=1.


### 4.2.3. Content Distribution Model

T
(
k
)
j
(
c
j
) denotes the downloading time of the distributed content c(k)j. In this model, the DG downloads the content and then sends it to RG immediately, so the downloading time of the distributed content c(k)j can be calculated as Tkjcj=αkjckj/rkwr,j+β(k)jc(k)j/r(k)l,j. The Lagrange function is constructed to solve the problem that is as follows:(21)LC,P,λ,μ=∑j=1npkjEkj-λ∑j=1nckj-Ckk-μ0∗Pks-∑j=1npkjckj-∑j=1nμjTksd⁡-Tkj.The Karush-Kuhn-Tucker condition is as follows:(22)2pkjEkjckj-λk-μk0pkj-μkjαkrwr,j+βkrl,j=0.So the content distribution of the DNj is as follows:(23)ckj=λk+μk0∗pkj-μkjαk/rkw,j+βk/rkl,j2pkjαewr,j/rwr,jlw-hw+2pkjβel,j/rl,jll-hl+2pkjewt,j/rwt,jlw-hw.However, if you want to solvecj you must know the Lagrange multiplier vectors λj and μj. The dual problem is used to earn the Lagrange multiplier vector in this paper. The dual problem of the original problem is as follows:(24)maxλk⁡λk∑j=1nckjt-Ckk+maxμk0⁡μk0∑j=1nPkst-pkjtckjt+maxμkj⁡∑j=1nμkjTd,s-αkckjtrwr,j-βkckjtrl,j.The dual problem functions are differentiable so the gradient iteration method is used to earn the Lagrange multiplier vector and the method is as follows:(25)λkt+1=λtk+Δkt,j∑j=1nckjt-Ckk,(26)μk0t+1=μk0t+Δkt,jPkst-∑j=1npkjt∗ckjt,(27)μkjt+1=μkjt+Δkt,jTkd,s-ckjtαkrw,j+βkrl,j.Aftert iteration, Δ(k)(t,j)≥0 is the step length of iteration and decides the convergence of the algorithm. The algorithm of the content distribution is as follows.The first step of Algorithm2 is to initialize the parameters. Then, the server calculate C(k)J(t) according to λk(0), μ(k)0(0), μ(k)j(0), ε(0), and p(k)j(0) that are received from the DNs. Second, the server used the utility function to judge if  C(k)J(t) conforms to the error requirement. If  C(k)J(t) does not meet the error requirement, the server will send C(k)J(t) to DNs; otherwise, it will also return C(k)J(t) as the end content distribution result. Third, the DNs adjust P(k)J(t+1) according to the received C(k)J(t) and send P(k)J(t+1) to the server. Steps 5 to 10 are continuing to cycle until the error to meet the requirement.Algorithm 2:Optimizer of the content distribution based on auction (OCDA) run on the server.
(1)Initialize  λ(0)(k), μ0(0)(k), μj(0)(k), ε(0)
The DNs send their pj(0)(k) to the server
The server gets the PJ(0)k=(p10k,p20k,…,pn(0)k)
(2)for (t=1; t++) do
(3)   Calculate the formulas (25), (26), (27) and (23)
The server gets the CJ(t)(k)
(4)   if (∑j=1n[pj(t)(k)∗Ej(t)(k)-pj(t-1)(k)∗Ej(t-1)(k)]>ε) then
(5)   if (∑j=1mpj(t)-Pd>0) then
(6)     The server sends the CJ(t)(k) to the DN j
The DNs receive the CJ(t)(k) and adjust PJ(t+1)(k)
(7)     pj(t+1)(k)=pj(t)(k)+Δ(t,j)(k)(pj(t)(k)-pd,j(k))
(8)   else  pj(t+1)(k)=pj(t)(k)+Δ(t,j)(k)(pj(t)(k)-pd,s(k))
(9)   end if
(10)   The DNs send the  PJ(t+1)(k) to the server
(11)   else break
(12)   end if
(13)end for
(14)return  PJ(t+1)(k), CJ(t)(k)


## 4.2.1. Content Distribution Problem

The cooperative downloading users’ personal demands are different and have different sensitivity to the benefits and the energy consumption when downloading the content. To meet the different requirements of DNs, the efficiency and energy consumption are considered to download the content. So the key point to this cooperative system is to distribute reasonably. The bid vectors of the cooperative downloading nodes are assumed asP(k)J(p1,p2,…,pn). The content is distributed by the server; the lower the bids of the cooperative downloading nodes are, the better it is for the server. The energy consumption is also considered, so the lower the energy consumption, the better the DNs.The all distributed cost of server isPS; the distributed costs of the round k are P(k)S=C(k)kPS/C. The utility function of the DG  J  (1,2,…,n) is UJ. The content size of the DG distributed in the k round is C(k)k. The distributed content size cj of the DN j is according to the bid of the DN j. The content distribution vector of the DG J in the k round is C(k)k=(c(k)1,c(k)2,…,c(k)n). The DN j sends the bid p(k)j to server and then the server distributes the content c(k)j(pj) to the DN j in the k round. The energy consumption in the k round is E(k)j(c(k)j). The optimal content distribution problem is to solve the following formula:(14)mincj≥0∑j=1npkjckjEkjckj(15)s.t.∑j=1nckj=Ckk(16)∑j=1npkjckj≤Pks(17)Tkj≤Tksd⁡.In formula (17), T(k)sd⁡ is the stable time and T(k)j is the actual time that user j takes to download c(k)j in the k round. In formula (14), the utility function of the DN j in the k round is pkj(cj)E(k)j(cj(k)). However, the unit of benefits and energy consumption is different and it will lead the result irrationality so that the dimensionless processing is needed. The dimensionless processes are as follows:(18)pkjckj=pkj′ckjCkpks,(19)Ejkckj=Ekj′ckjmax⁡Ekjckj.In formula (18), pkj′ckj is the actual value and pkjckj is the dimensionless value. In formula (19), Ekj′ckj is the actual value and Ekjckj is the dimensionless value.


## 4.2.2. Energy Consumption Model

The energy consumption of DNj that received the content from server to use Wi-Fi is denoted as E(k)wr,j. The size of the Wi-Fi packet and the head of packet are denoted as lw and hw, so the size of content that the DN j received is c(k)j/(lw-hw). The DN j received the a packet will return an ACK confirm packet to server, the energy consumption of ACK packets is not considered because they are too small compared with the data packets. So E(k)wr,j=ckjewr,j/r(k)wr,j(lw-hw), r(k)wr,j is the Wi-Fi downloading data rate, and ewr,j is the unit energy consumption of the DN j downloading the content through the Wi-Fi.The energy consumption of DNj that received the content from server to use 4G is denoted as E(k)l,j. The size of the 4G packet and the head of packet are denoted as ll and hl, so the amount of data that the DN j received is c(k)j/(ll-hl). So E(k)l,j=ckjel,j/r(k)l,j(ll-hl), r(k)l,j is the 4G downloading data rate, and el,j is the unit energy consumption of DN j downloading the content through the 4G.The energy consumption of DNj transmits the content to RG to use Wi-Fi that is denoted as E(k)wt,j. So E(k)wt,j=ckjewt,j/r(k)wt,j(lw-hw), r(k)wt,j is the Wi-Fi data transmission rate, and ewt,j is the unit energy consumption of the DN j that transmits the content through Wi-Fi. The energy consumption model of DN j is defined as follows:(20)Ekj=αkjEkwr,j+βkjEkl,j+Ekwt,j.The ratio of DNj that used the Wi-Fi to download is defined as α(k)j, the ratio of DN j that used the 4G to download is defined as β(k)j, and α(k)j+β(k)j=1.


## 4.2.3. Content Distribution Model

T
(
k
)
j
(
c
j
) denotes the downloading time of the distributed content c(k)j. In this model, the DG downloads the content and then sends it to RG immediately, so the downloading time of the distributed content c(k)j can be calculated as Tkjcj=αkjckj/rkwr,j+β(k)jc(k)j/r(k)l,j. The Lagrange function is constructed to solve the problem that is as follows:(21)LC,P,λ,μ=∑j=1npkjEkj-λ∑j=1nckj-Ckk-μ0∗Pks-∑j=1npkjckj-∑j=1nμjTksd⁡-Tkj.The Karush-Kuhn-Tucker condition is as follows:(22)2pkjEkjckj-λk-μk0pkj-μkjαkrwr,j+βkrl,j=0.So the content distribution of the DNj is as follows:(23)ckj=λk+μk0∗pkj-μkjαk/rkw,j+βk/rkl,j2pkjαewr,j/rwr,jlw-hw+2pkjβel,j/rl,jll-hl+2pkjewt,j/rwt,jlw-hw.However, if you want to solvecj you must know the Lagrange multiplier vectors λj and μj. The dual problem is used to earn the Lagrange multiplier vector in this paper. The dual problem of the original problem is as follows:(24)maxλk⁡λk∑j=1nckjt-Ckk+maxμk0⁡μk0∑j=1nPkst-pkjtckjt+maxμkj⁡∑j=1nμkjTd,s-αkckjtrwr,j-βkckjtrl,j.The dual problem functions are differentiable so the gradient iteration method is used to earn the Lagrange multiplier vector and the method is as follows:(25)λkt+1=λtk+Δkt,j∑j=1nckjt-Ckk,(26)μk0t+1=μk0t+Δkt,jPkst-∑j=1npkjt∗ckjt,(27)μkjt+1=μkjt+Δkt,jTkd,s-ckjtαkrw,j+βkrl,j.Aftert iteration, Δ(k)(t,j)≥0 is the step length of iteration and decides the convergence of the algorithm. The algorithm of the content distribution is as follows.The first step of Algorithm2 is to initialize the parameters. Then, the server calculate C(k)J(t) according to λk(0), μ(k)0(0), μ(k)j(0), ε(0), and p(k)j(0) that are received from the DNs. Second, the server used the utility function to judge if  C(k)J(t) conforms to the error requirement. If  C(k)J(t) does not meet the error requirement, the server will send C(k)J(t) to DNs; otherwise, it will also return C(k)J(t) as the end content distribution result. Third, the DNs adjust P(k)J(t+1) according to the received C(k)J(t) and send P(k)J(t+1) to the server. Steps 5 to 10 are continuing to cycle until the error to meet the requirement.Algorithm 2:Optimizer of the content distribution based on auction (OCDA) run on the server.
(1)Initialize  λ(0)(k), μ0(0)(k), μj(0)(k), ε(0)
The DNs send their pj(0)(k) to the server
The server gets the PJ(0)k=(p10k,p20k,…,pn(0)k)
(2)for (t=1; t++) do
(3)   Calculate the formulas (25), (26), (27) and (23)
The server gets the CJ(t)(k)
(4)   if (∑j=1n[pj(t)(k)∗Ej(t)(k)-pj(t-1)(k)∗Ej(t-1)(k)]>ε) then
(5)   if (∑j=1mpj(t)-Pd>0) then
(6)     The server sends the CJ(t)(k) to the DN j
The DNs receive the CJ(t)(k) and adjust PJ(t+1)(k)
(7)     pj(t+1)(k)=pj(t)(k)+Δ(t,j)(k)(pj(t)(k)-pd,j(k))
(8)   else  pj(t+1)(k)=pj(t)(k)+Δ(t,j)(k)(pj(t)(k)-pd,s(k))
(9)   end if
(10)   The DNs send the  PJ(t+1)(k) to the server
(11)   else break
(12)   end if
(13)end for
(14)return  PJ(t+1)(k), CJ(t)(k)


## 5. Simulation Results and Analysis

There is only a source of content distribution in this simulation model. In order to be close to the reality that users have different downloading demand, this model set up a variety of nodes that have different sensitivity to the expenses and downloading time. In our simulation, the MAC protocol of Wi-Fi is 54 Mbps 802.11 g and LTE-advanced 4G is 100 Mbps. The average downloading speed of Wi-Fi is assumed as 1.8 MB/s and 4G is 6.0 MB/s. The energy consumed on the reception is following the experimental measurements in the work [28]. The results have shown that the energy consumption during reception on the SR is 0.925 joules/sec and LR is 1.8 joules/sec. So the energy consumed per unit size is calculated according to the model work [28]. The simulation parameters are presented in Table 1.Table 1
Simulation parameters.
Parameter
Value
Transmission rate of Wi-Fi
54 Mbps
Transmission rate of 4G
100 Mbps
The suspended timetp
1 s
The coverage radiusδi
50 m
The relative stable timeT¯sd
5 s
Unit energy consumption during reception on the Wi-Fiewr,j
0.50 Joules/MB
Unit energy consumption during reception on the 4Gel,j
0.30 Joules/MB
The size of downloading data fileC
1024 MB
The price of the filePd
400
The step length of iteration in OCDΔ(t,i)
0.1/t
The step length of iteration in OCDAΔ(t,i)
0.01/tTo assess the performance of the proposed scheme, a 100 m × 100 m area is selected and the nodes of DG use the rand direction model to move. After the system starts, the nodes from the initial positions randomly select a direction at the speed ofv to move. When the nodes reach the boundary, they will suspend tp time and then randomly select next direction to move to in the area. The motion will be repeated until the end of downloading. The speeds of the DNs vj are between 0 m/s and 5 m/s. The fifty times motion state is selected to calculate the average sum energy consumption and average downloading time. In order to verify the performance and convergence of the algorithm OCD and OCDA two group experiments are carried out. The first group experiment is mainly to verify the convergence and performance of the algorithm OCD. The second group experiment is to verify the convergence and performance of the algorithm OCDA and mainly to compare with the SOMA algorithm [7] and the average distribution algorithm.


### 5.1. The Convergence and Performance of the OCD

The four nodes of RG are used to assess the performance of the OCD. Figure4(a) shows the cost distribution with iteration in this algorithm. Pi,max of the RNs are assumed as PRN1,max=80, PRN2,max=100, PRN3,max=160, and PRN4,max=200. Td,i of the RNs are assumed as Td,1=3600 s, Td,2=2400 s, Td,3=1800 s, and Td,4=1200 s. When Pi,max is higher, the cost distribution is higher. It shows the fair distribution of cost. However, the cost distribution is not linear because Td,i is considered in this algorithm. The lower Pi,max and the longer Td,i, the lower the cost distribution. The distribution cost of the RNs is stabilized at about 58, 86, 124, and 165. The cost distribution algorithm in the iteration is stabilized after about 12 times.Figure 4
(a) The cost distribution of RG with the iterations. (b) The cost distribution includes selfish node in RG with the iterations.
(a)
(b)Figure4(b) shows the cost distribution with iteration that includes selfish nodes in this algorithm. In this simulation, the RN4 is the selfish node and set P4,max=40, Td,i=1200 s, and the other set is the same. The distribution cost of the RNs is stabilized at about 74, 102, 142, and 73. However, the cost distribution in the figure of RN4 is more than 40. In this condition, the server will ask the RN4 if he/she is willing to accept the cost. So the selfish node will not earn lower cost than 40. The cost distribution algorithm in this condition in the iteration is stabilized after about 15 times.Figure5(a) shows the cost distribution compared with the SOMA algorithm and the ADA algorithm. The ADA distributes PI(t) averagely so the costs of the RNs are the same. The SOMA distributes the cost based on the battery charge level and signal strength level. The OCD considers the demand of the nodes to distribute the cost. Reducing the time Td,i, the cost distribution of the RNs to use the OCD algorithm is increasing. However, the cost distribution of the RNs to use the ADA algorithm is the same and that to use the SOMA algorithm is random.Figure 5
(a) The cost distribution of RG compared with the three algorithms. (b) The cost distribution includes selfish node of RG compared with the three algorithms.
(a)
(b)Figure5(b) shows the cost distribution includes selfish nodes of RN4 in this algorithm. The cost distributions of the RNs to use the ADA and SOMA algorithm are the same as in Figure 5(a). The RN4 cost distribution is the selfish node, however, the cost is not lower than Pi,max=40. In this condition, the distributed cost of the other three nodes is a little higher as shown in Figure 5(a). The cost of the other nodes is also lower than their Pi,max and is in the tolerated scope.


### 5.2. The Convergence and Performance of the OCDA

Figure6(a) shows the content distribution algorithm compared with the five nodes of the DG. Pj,max of the DNs are assumed as pDN1,max=0.35, pDN2,max=0.4, pDN3,max=0.45, pDN4,max=0.5, and pDN5,max=0.6. The server distributes the content about 33 MB to the DN1 and DN2 in the first round. And the server distributes the content about 62 MB to the DN3, DN4, and DN5 in the first round. In the simulation, we want to get the local optimum according to the fast negotiation. The content distribution algorithm in the iteration is stabilized after about 18 times, so the convergence speed is fast.Figure 6
(a) The content distribution of DG with the iterations. (b) The bids of DG with the iterations.
(a)
(b)In Figure6(b), with the number of iteration increasing, the bids of the two nodes (DN1 and DN2) are stabilized at 0.45 and 0.42. It is because their energy consumption is higher and their downloading data rate is lower. So the server that distributes the content is about 33 MB to the DN1 and DN2 in the first round. The bids of the other three nodes (DN3, DN4, and DN5) are stabilized at 0.26, 0.25, and 0.23. The server that distributes the content is about 62 MB in the first round. The content distributions of the DN3, DN4, and DN5 are more than the DN1 and DN2, that is, because of their higher downloading data rate, lower bids, and lower energy consumption.Figure7(a) shows the energy consumption compared with the SOMA algorithm and ADA algorithm. The ADA distributes the content averagely so the energy consumption of DN1, DN2 is the same and of the DN3, DN4, and DN5 is the same. The SOMA distributes the content which does not consider the energy consumption, so the energy consumption of the five DNs is different. The OCDA considers the energy consumption of DNs to distribute the content, so the energy consumption of the five DNs is relative equilibrium.Figure 7
(a) The energy consumption of the five DNs compared with the three algorithms. (b) The profits of the five DNs compared with the three algorithms.
(a)
(b)Figure7(b) shows the comparison of the profits of the five DNs in the three algorithms. The profits of ADA are also the same and SOMA is different. The sum profits of OCDA are lower than ADA and SOMA which means the server needs to pay less to the DG. The profits of OCDA are relative equilibrium compared with the SOMA and ADA.Figure8(a) shows comparison of the average sum energy consumption in case of the downloading ratio using Wi-Fi. With the ratio of downloading increasing, the sum energy consumption is also increasing. The average sum energy consumption of OCDA is 3.44% lower than ADA and is 2.70% lower than SOMA. It is means that our algorithm has less average energy consumption than the other two algorithms. Figure 8(b) shows comparison of the average downloading times in case of the downloading ratio using Wi-Fi. The average downloading time of OCDA is 2.10% less than ADA and is 15.51% less than SOMA. It is obvious that our algorithm has less average downloading time than the other two algorithms.Figure 8
(a) The average sum energy consumption compared with the three algorithms. (b) The average downloading time compared with the three algorithms.
(a)
(b)Figure9(a) shows comparison of the average sum energy consumption in the case of the different average speeds. The average sum energy consumption goes up along with the nodes speed increase. However, the average energy consumption of ADA and OCDA begins to decline at the speed vj which is 4 m/s. With the speed increasing, the repeated downloading contents are decreasing because the nodes in the network time are also decreasing, so the sum energy consumption is reduced.Figure 9
(a) The sum energy consumption compared with the three algorithms. (b) The average downloading time compared with the three algorithms.
(a)
(b)Figure9(b) shows comparison of the average downloading times in case of the different average speed. The average downloading time goes up along with the nodes speed increasing. However, the average downloading time at the speed 2 m/s is less than that at 1 m/s. This is because Td,i is set as 5 s and as the speed increasing, the repeated downloading contents are decreasing because the nodes in the network time are also decreasing, so the downloading time is reduced. As in Figure 9(b), the average downloading time of OCDA is less than ADA and SOMA at most of the time. It is obvious that our algorithm has less average downloading time than the other two algorithms at the speed vj increased from 2 m/s to 5 m/s.Figure10 shows comparison of the average downloading time in case of the different number of cooperative downloading nodes. The average downloading time is slowed down with the number of increased DNs. With the increase of downloading nodes, the curve is smooth and the drop is reduced, that is, because the content transfer accounts for the main part of the downloading. In Figure 10, the OCDA and SOMA algorithm have less average downloading time than the ADA algorithms and our algorithm also has a slight advantage compared with the SOMA.Figure 10
The average downloading time compared with the three algorithms.


## 5.1. The Convergence and Performance of the OCD

The four nodes of RG are used to assess the performance of the OCD. Figure4(a) shows the cost distribution with iteration in this algorithm. Pi,max of the RNs are assumed as PRN1,max=80, PRN2,max=100, PRN3,max=160, and PRN4,max=200. Td,i of the RNs are assumed as Td,1=3600 s, Td,2=2400 s, Td,3=1800 s, and Td,4=1200 s. When Pi,max is higher, the cost distribution is higher. It shows the fair distribution of cost. However, the cost distribution is not linear because Td,i is considered in this algorithm. The lower Pi,max and the longer Td,i, the lower the cost distribution. The distribution cost of the RNs is stabilized at about 58, 86, 124, and 165. The cost distribution algorithm in the iteration is stabilized after about 12 times.Figure 4
(a) The cost distribution of RG with the iterations. (b) The cost distribution includes selfish node in RG with the iterations.
(a)
(b)Figure4(b) shows the cost distribution with iteration that includes selfish nodes in this algorithm. In this simulation, the RN4 is the selfish node and set P4,max=40, Td,i=1200 s, and the other set is the same. The distribution cost of the RNs is stabilized at about 74, 102, 142, and 73. However, the cost distribution in the figure of RN4 is more than 40. In this condition, the server will ask the RN4 if he/she is willing to accept the cost. So the selfish node will not earn lower cost than 40. The cost distribution algorithm in this condition in the iteration is stabilized after about 15 times.Figure5(a) shows the cost distribution compared with the SOMA algorithm and the ADA algorithm. The ADA distributes PI(t) averagely so the costs of the RNs are the same. The SOMA distributes the cost based on the battery charge level and signal strength level. The OCD considers the demand of the nodes to distribute the cost. Reducing the time Td,i, the cost distribution of the RNs to use the OCD algorithm is increasing. However, the cost distribution of the RNs to use the ADA algorithm is the same and that to use the SOMA algorithm is random.Figure 5
(a) The cost distribution of RG compared with the three algorithms. (b) The cost distribution includes selfish node of RG compared with the three algorithms.
(a)
(b)Figure5(b) shows the cost distribution includes selfish nodes of RN4 in this algorithm. The cost distributions of the RNs to use the ADA and SOMA algorithm are the same as in Figure 5(a). The RN4 cost distribution is the selfish node, however, the cost is not lower than Pi,max=40. In this condition, the distributed cost of the other three nodes is a little higher as shown in Figure 5(a). The cost of the other nodes is also lower than their Pi,max and is in the tolerated scope.


## 5.2. The Convergence and Performance of the OCDA

Figure6(a) shows the content distribution algorithm compared with the five nodes of the DG. Pj,max of the DNs are assumed as pDN1,max=0.35, pDN2,max=0.4, pDN3,max=0.45, pDN4,max=0.5, and pDN5,max=0.6. The server distributes the content about 33 MB to the DN1 and DN2 in the first round. And the server distributes the content about 62 MB to the DN3, DN4, and DN5 in the first round. In the simulation, we want to get the local optimum according to the fast negotiation. The content distribution algorithm in the iteration is stabilized after about 18 times, so the convergence speed is fast.Figure 6
(a) The content distribution of DG with the iterations. (b) The bids of DG with the iterations.
(a)
(b)In Figure6(b), with the number of iteration increasing, the bids of the two nodes (DN1 and DN2) are stabilized at 0.45 and 0.42. It is because their energy consumption is higher and their downloading data rate is lower. So the server that distributes the content is about 33 MB to the DN1 and DN2 in the first round. The bids of the other three nodes (DN3, DN4, and DN5) are stabilized at 0.26, 0.25, and 0.23. The server that distributes the content is about 62 MB in the first round. The content distributions of the DN3, DN4, and DN5 are more than the DN1 and DN2, that is, because of their higher downloading data rate, lower bids, and lower energy consumption.Figure7(a) shows the energy consumption compared with the SOMA algorithm and ADA algorithm. The ADA distributes the content averagely so the energy consumption of DN1, DN2 is the same and of the DN3, DN4, and DN5 is the same. The SOMA distributes the content which does not consider the energy consumption, so the energy consumption of the five DNs is different. The OCDA considers the energy consumption of DNs to distribute the content, so the energy consumption of the five DNs is relative equilibrium.Figure 7
(a) The energy consumption of the five DNs compared with the three algorithms. (b) The profits of the five DNs compared with the three algorithms.
(a)
(b)Figure7(b) shows the comparison of the profits of the five DNs in the three algorithms. The profits of ADA are also the same and SOMA is different. The sum profits of OCDA are lower than ADA and SOMA which means the server needs to pay less to the DG. The profits of OCDA are relative equilibrium compared with the SOMA and ADA.Figure8(a) shows comparison of the average sum energy consumption in case of the downloading ratio using Wi-Fi. With the ratio of downloading increasing, the sum energy consumption is also increasing. The average sum energy consumption of OCDA is 3.44% lower than ADA and is 2.70% lower than SOMA. It is means that our algorithm has less average energy consumption than the other two algorithms. Figure 8(b) shows comparison of the average downloading times in case of the downloading ratio using Wi-Fi. The average downloading time of OCDA is 2.10% less than ADA and is 15.51% less than SOMA. It is obvious that our algorithm has less average downloading time than the other two algorithms.Figure 8
(a) The average sum energy consumption compared with the three algorithms. (b) The average downloading time compared with the three algorithms.
(a)
(b)Figure9(a) shows comparison of the average sum energy consumption in the case of the different average speeds. The average sum energy consumption goes up along with the nodes speed increase. However, the average energy consumption of ADA and OCDA begins to decline at the speed vj which is 4 m/s. With the speed increasing, the repeated downloading contents are decreasing because the nodes in the network time are also decreasing, so the sum energy consumption is reduced.Figure 9
(a) The sum energy consumption compared with the three algorithms. (b) The average downloading time compared with the three algorithms.
(a)
(b)Figure9(b) shows comparison of the average downloading times in case of the different average speed. The average downloading time goes up along with the nodes speed increasing. However, the average downloading time at the speed 2 m/s is less than that at 1 m/s. This is because Td,i is set as 5 s and as the speed increasing, the repeated downloading contents are decreasing because the nodes in the network time are also decreasing, so the downloading time is reduced. As in Figure 9(b), the average downloading time of OCDA is less than ADA and SOMA at most of the time. It is obvious that our algorithm has less average downloading time than the other two algorithms at the speed vj increased from 2 m/s to 5 m/s.Figure10 shows comparison of the average downloading time in case of the different number of cooperative downloading nodes. The average downloading time is slowed down with the number of increased DNs. With the increase of downloading nodes, the curve is smooth and the drop is reduced, that is, because the content transfer accounts for the main part of the downloading. In Figure 10, the OCDA and SOMA algorithm have less average downloading time than the ADA algorithms and our algorithm also has a slight advantage compared with the SOMA.Figure 10
The average downloading time compared with the three algorithms.


## 6. Conclusions

This work presented a study of cooperative downloading in mobile ad hoc networks. In this paper, a cost distribution algorithm and a content distribution algorithm are proposed for MANETs by optimizing the cost and energy consumption. In order to incentivize more users to participate in the cooperative downloading system, we use virtual money mechanism to form the cooperative downloading group. The OCD algorithm is proposed which considers the cost performance to decide the cost fairly to the nodes of RG. The OCDA algorithm is proposed which considers the benefits and energy consumption to distribute the downloading content to the nodes of DG. The simulation experiment shows that the cost distribution is fair and content distribution has higher downloading efficiency and lower energy consumption.



---

*Source: 3028642-2016-03-17.xml*