# Quality of Service Based NOMA Group D2D Communications
## Appendix A Proof of Lemma 1  
In the case of GPP, when desired transmitter is at \(x_{0}\in\Phi_{GT}\), the \(\mathcal{L}_{\mathcal{I}}(s)\) is given by Equation (34) of [21]:  
\[\mathcal{L}_{\mathcal{I}}(s)=\Lambda_{1}\cdot\Lambda_{2}, \tag{10}\]  
where  
\[\Lambda_{1}=\exp\left\{2\pi\lambda_{\text{GT}}\int_{0}^{\infty} \left[\frac{1-a}{1+s^{r-a}}+\frac{a}{1+s^{r-a}}\cdot\int_{0}^{\infty}\int_{0}^ {2\pi}\frac{\tau f_{u}(\tau)d\psi}{1+s\left(r^{2}+r^{2}+2\tau\cos(\psi)\right) ^{-a/2}}d\tau-1\right]rdr\right\}, \tag{11}\]  
and  
\[\Lambda_{2}=\frac{1-a}{1+a}+\frac{2a}{1+a}\int_{0}^{\infty}\int_{0 }^{2\pi}\frac{\tau f_{u}(\tau)d\psi}{1+s\left(d^{2}+\tau^{2}+2d\tau\cos(\psi) \right)^{-a/2}}d\tau, \tag{12}\]  
where \(1-a\) and \(a\) are the probabilities of having one and two transmitters in a group, respectively.  
Now let us take \(X_{1}\) in Equation (11) as:  
\[X_{1} =\int_{0}^{\infty}\int_{0}^{2\pi}\frac{\tau f_{u}(\tau)d\psi}{1+s \left(r^{2}+\tau^{2}+2r\tau\cos(\psi)\right)^{-a/2}}d\tau\] \[=\frac{2}{R_{D}^{2}}\int_{0}^{R_{D}}\tau^{2}\underbrace{\int_{0}^ {2\pi}\frac{d\psi}{1+s\left(r^{2}+\tau^{2}+2r\tau\cos(\psi)\right)^{-a/2}}}_{X _{2}}d\tau, \tag{13}\]  
where \(f_{u}(\tau)=\frac{2\tau}{R_{D}^{2}}\) if \(0\leq\tau\leq R_{D}\).  
It is challenging to solve integral \(X_{2}\) in Equation (13). As such, we approximate it by applying the Gaussian-Chebyshev quadrature as [30]:  
\[X_{2}\approx\sum_{n=1}^{N}\frac{\varphi_{n}}{1+s\left(r^{2}+\tau^{2}+2r\tau \cos(\pi t_{n})\right)^{-\alpha/2}}, \tag{14}\]  
where \(\varphi_{n}=\pi\omega_{n}\sqrt{1-\theta_{n}^{2}}\), \(\omega_{n}=\frac{\pi}{N}\), \(\theta_{n}=\cos\left(\frac{2n-1}{2N}\pi\right)\), \(t_{n}=1+\theta_{n}\) and \(N\) is the complexity-accuracy tradeoff parameter.  
Based on Equation (A5), \(X_{1}\) can now be expressed as:  
\[X_{1}=\frac{2}{R^{2}}\int_{0}^{R_{D}}\sum_{n=1}^{N}\frac{\varphi_{n}\tau^{2}}{1+s \left(r^{2}+\tau^{2}+2r\tau\cos(\pi t_{n})\right)^{-\alpha/2}}d\tau.\] (A6)  
Note that it is challenging to solve Equation (A6) analytically. In order to obtain insightful results, we approximate it by applying Gaussian-Chebyshev quadrature as:  
\[X_{1}(r)\approx\sum_{v=1}^{V}\sum_{n=1}^{N}\frac{2R_{D}\varphi_{n}\omega_{v} \sqrt{1-\theta_{v}^{2}k_{v}^{2}}}{1+s\left(r^{2}+R_{D}^{2}k_{v}^{2}+2 rR_{D}k_{ v}^{2}\cos(\pi t_{n})\right)^{-\alpha/2}},\] (A7)  
where \(\omega_{v}=\frac{\pi}{\psi}\), \(\theta_{v}=\cos(\frac{2v-1}{2V}\pi)\), \(k_{v}=\frac{1}{2}(\theta_{v}+1)\) and \(V\) is the complexity-accuracy tradeoff parameter.  
Based on Equation (A7), \(\Lambda_{1}\) in Equation (A2) is re-written as:  
\[\Lambda_{1} =\exp\left\{2\pi\lambda_{\text{GT}}\int_{0}^{\infty}\left[\frac{1 -a}{1+sr^{-\alpha}}+\frac{aX_{1}(r)}{1+sr^{-\alpha}}-1\right]rdr\right\}\] \[=\exp\left\{-2\pi\lambda_{\text{GT}}\int_{0}^{\infty}\frac{a\left( 1-X_{1}(r)\right)+sr^{-\alpha}}{1+sr^{-\alpha}}\right\}.\] (A8)  
Next, we apply Gauss-Laguerre quadrature to approximate the integral in Equation (A8). Hence, \(\Lambda_{1}\) can be expressed after approximation as:  
\[\Lambda_{1}=e^{-2\pi\lambda_{\text{GT}}\sum_{p=1}^{p}\Omega_{p}\frac{a\left(1- X_{1}(\varphi_{p})\right)+\varphi_{p}^{-\alpha}}{1+sr_{p}^{-\alpha}}}.\] (A9)  
Following the same approximation procedure for \(X_{1}\) and applying Gaussian-Chebyshev quadrature twice, \(\Lambda_{2}\) in Equation (A3) is given as:  
\[\Lambda_{2}(d)=\frac{1-a}{1+a}+\frac{2a}{1+a}\sum_{j=1}^{S}\sum_{i=1}^{Q} \frac{\varphi_{i}\xi_{j}}{1+s\left(d^{2}+R_{D}^{2}z_{j}^{2}+2 dR_{D}z_{j}\cos( \pi x_{i})\right)^{-\alpha/2}},\] (A10)  
where \(\varphi_{i}=\pi\omega_{i}\sqrt{1-\eta_{i}^{2}}\), \(\omega_{i}=\frac{\pi}{Q}\), \(\eta_{i}=\cos(\frac{2i-1}{2Q}\pi)\), \(x_{i}=\eta_{i}+1\), \(\xi_{j}=2R_{D}\omega_{j}\sqrt{1-\Theta_{j}^{2}}z_{j}^{2}\), \(\Theta_{j}=\cos(\frac{2j-1}{2S}\pi)\), \(z_{j}=\frac{1}{2}(\Theta_{j}+1)\), \(\omega_{j}=\frac{\pi}{S}\) and \(Q\), \(S\) are the complexity-accuracy trade-off parameters.  
Finally, the result in Lemma1 is obtained by multiplying Equations (A9) and (A10).