# Energy Efficient IoT Data Collection in Smart Cities Exploiting D2D Communications
## 4 The Novel D2D-Based Energy Efficient IoT Data Collection
### The Proposed D2D-EE Solution Step by Step  
The proposed D2D-EE solution foresees the implementation of the steps described below and reported in the message diagram in Figure 3.  
**Cell-mode CQI collection**: The eNodeB collects the cell-mode CQI feedbacks from all IoT devices willing to upload some data, _i.e._, \(c_{k},\forall k\in\mathcal{K}\) (note that this step is required also for any conventional solution for the devices to get access to the LTE eNodeB). **D2D-mode CQI collection**: The eNodeB collects also the \(c_{i,j}\) values from all UEs \(i,j\in\mathcal{K}\), \(i\
eq j\); this information will be used to discover the UEs in mutual coverage for a D2D link. In particular, the eNodeB computes a D2D CQI matrix (DCM) (an example is reported in Table 2) based on the \(c_{i,j}\) values for all the links between the devices (we have always \(c_{i,j}=0\)). Standard procedures are adopted for the CQI estimation and the rate at which the D2D channel conditions are updated can be very low [50] which induces a non-critical cost of the D2D channel quality acquisition procedure and the DCM computation. A \(c_{i,j}=0\) value in the DCM indicates that a D2D link cannot be activated between devices \(i\) and \(j\). Figure 3: Message diagram for the proposed D2D cluster-based IoT data uploading. **Aggregator selection and cluster formation**: The information from the DCM, coupled with uplink CQI levels for all devices will be used by the eNodeB to cluster all devices in a set \(\mathcal{S}=\left\{s_{1},\ldots,s_{S}\right\}\) of mutually disjoint clusters \(s_{i}=\left\{s_{1}^{i},\ldots,s_{|s_{i}|}^{i}\right\}\), such that \(s_{i}\cap s_{i^{\prime}}=\emptyset\) for \(i\
eq i^{\prime}\) and \(\bigcup\limits_{i=1}^{S}s_{i}=\mathcal{K}\). Let \(\mathcal{A}=\left\{a_{1},\ldots,a_{S}\right\}\) be the set of _aggregators_ in the network. The association of the devices to a cluster and the aggregator selection follows the solution described in Section 4.2. In particular, adopting a Round Robin policy for the resource allocation at the aggregators, the _mutual inter-cluster interference_ is excluded. **D2D link configuration**: For each cluster \(s_{i}=\left\{s_{1}^{i},\ldots,s_{|s_{i}|}^{i}\right\}\in\mathcal{S}\), the eNodeB will define the resources and the MCS level to be used on the D2D links towards the aggregator. The D2D transmitter operates in half-duplex mode in which it cannot transmit and receive at the same time. In addition, all the devices performing a D2D connection have to remain active the time needed to upload their data to the aggregator. When all data from the cluster are received by the aggregator, this will forward the data to the eNodeB. The radio resources allocated to the D2D links within a cluster can follow a Round Robin policy where the available resources are the \(r_{a}\) resources allocated to the respective aggregator. These resources are equally shared among the devices in a single cluster so that each D2D communication link in the cluster can use no more than \(r^{d}=\left\lceil r_{a}/|s_{i}|\right\rceil\) RBs. Based on the \(r^{d}\) RBs available on a single D2D link, the following energy efficient configuration will be implemented on each of the D2D links within the cluster:  
* select for each RB number \(n=[1,r^{d}]\) the optimal MCS, _i.e._, \(MCS_{r^{d}}^{*}\) maximizing the TBS utilization, according to Equation (5): \[MCS_{r^{d}}^{*}=\underset{MCS}{\text{arg}\,\text{max}} \left(\frac{D}{TBS(MCS,r^{d})}\right)\] \[\text{s.t.}\ D\leq TBS(MCS,r^{d})\] (5) where \(TBS(MCS,r^{d})\) is the TBS determined by the MCS and the number of allocated resources \(r^{d}\).