# Energy Efficiency of D2D Multi-User Cooperation
## 3 Analysis of System Energy Efficiency
### System Energy Efficiency  
In order to analyze the energy efficiency of the whole cooperation process of sharing data \(L\), we have to sum up the energy consumption of each link according to the cooperation scheme analyzed in Section 2. We suppose that cluster head \(S\) divides data \(L\) into \(n\) data packets and share with \(K\) D2D users within the cluster. The length of each data packet is \(D_{d}\) and \(L=\sum\limits_{d=1}^{n}D_{d}\). \(S\) broadcasts data packet \(D_{d}\) to \(x_{d}\) D2D users first and then these \(x_{d}\) D2D users will be the relaying D2D users to relay data packet to the rest of \(K-x_{d}\) D2D users. There are two types of links within a cluster including head-to-member links and member-to-member links, namely, \(S-to-U_{m}\) and \(U_{m}-to-U_{j}\). The outage probabilities of \(S-to-U_{m}\) and \(U_{m}-to-U_{j}\) can be expressed as:\[P_{m-out}=\left\{ \begin{array}{l}1-\exp\left(-\frac{2\frac{B_{d}}{T_{m}-1}}{T_{m}} \cdot\lambda\right),R\geq\frac{2D_{d}}{\tau_{m-th}}\\ 1-\exp\left(-\frac{2\frac{2D_{d}}{T_{m-th}B_{m}}-1}{T_{m}}\cdot\lambda\right),R\leq\frac{2D_{d}}{\tau_{m-th}}\\ \overline{r}_{m}=\frac{P_{0}m_{m}}{N_{0}B_{m}},d\in(1,\cdot\cdot\cdot,n),m\in( 1,\cdot\cdot\cdot,x_{d})\end{array} \right. \tag{10}\]  
\[P_{j-out}^{m}=\left\{ \begin{array}{l}1-\exp\left(-\frac{2\frac{B_{d}}{T_{m}-1 }}{T_{j}}-1\cdot\mu\right),R\geq\frac{2D_{d}}{\tau_{j-th}^{m}}\\ 1-\exp\left(-\frac{2\frac{2D_{d}}{T_{j-th}B_{j}}}{T_{j}}\cdot\mu\right),R\leq \frac{2D_{d}}{\tau_{j-th}^{m}}\\ \overline{r}_{j}^{m}=\frac{P_{0}w_{j}^{m}}{N_{0}B_{j}^{m}},d\in(1,\cdot\cdot \cdot,n),m\in(1,\cdot\cdot\cdot,x_{d}),j\in(x_{d}+1,\cdot\cdot\cdot,K)\end{array} \right. \tag{11}\]  
Hence the energy consumption of \(S\) sending data packet \(D_{d}\) to D2D user \(U_{m}\) can be expressed as \(E_{m}=2D_{d}\cdot E_{m-bit}/(1-P_{m-out})+E_{mp}\), where \(E_{mp}\) is the energy consumption of \(U_{m}\) for processing data packet \(D_{d}\). Thus, the total energy consumption of \(S\) for broadcasting data \(D_{d}\) to \(x_{d}\) D2D users can be expressed as:  
\[{}_{d}E_{S\to U}=\sum_{m=1}^{x_{d}}E_{m}=\sum_{m=1}^{x_{d}}\left(\frac{2D_{d} \cdot E_{m-bit}}{1-P_{m-out}}+E_{mp}\right) \tag{12}\]  
The energy consumption of D2D user \(U_{m}\) for sending data packet \(D_{d}\) to D2D user \(U_{j}\) can be expressed as \(E_{j}^{m}=2D_{d}\cdot E_{j-bit}^{m}/\left(1-P_{j-out}^{m}\right)+E_{jp}\), where \(E_{jp}\) is the energy consumption of \(U_{j}\) for processing data packet \(D_{d}\). The total energy consumption of \(K\) D2D users for sharing data packet \(D_{d}\) should be analyzed in two situations:  
**A. **\(a=1,0\leq b<x_{d}\). According to the adjacency matrix of the paired D2D users of \(G_{1}(Y_{1},N_{1})\), the corresponding energy consumption matrix can be expressed as:  
\[E=\left[ \begin{array}{ccc}E_{1}^{1}&\cdots&E_{b}^{1}\\ \cdots&\cdots&\cdots\\ E_{1}^{x_{d}}&\cdots&E_{b}^{x_{d}}\end{array} \right]_{(x_{d}\cdot b)} \tag{13}\]  
where \(E_{j}^{m}\) is the energy consumption for relaying data packet from \(U_{m}\) to \(U_{j}\). \(E_{j}^{m}=0\) means that \(U_{m}\) does not relay the data packet to \(U_{j}\). There is only one member bigger than zero in each column and up to one member who is bigger than zero in each row. Furthermore, there are \(b\) rows where there is only one member bigger than zero in each row and the rest of \(x_{d}-(K-x_{d})\) are all zeros. In other words, if \(E_{j}^{m}\
eq 0\) and \(E_{n}^{i}\
eq 0\) only when \(m\
eq i\) and \(j\
eq n\). The total energy consumption of cooperation between \(Y_{1}\) and \(N_{1}\) can be expressed as:  
\[{}_{d}^{1}E_{U\to U}=\sum_{m=1}^{x_{d}}\sum_{j=1}^{K-x_{d}}E_{j}^{m} \tag{14}\]  
where \(E_{j}^{m}=0\) only when \(a_{m,j}=0\). **B. **\(a>1,0\leq b<x_{d}\). D2D users will be paired by using Kuhn-Munkres algorithm for \(a+1\) times. The adjacency matrixes of the paired D2D users can be expressed as:  
\[{B_{g}}^{\prime}=\left[