# Hybrid Active-Passive Reconfigurable Intelligent Surface for Cooperative Transmission Systems
## Appendix A The CDF Derivation of SNR for HAPR Systems
\] (A23)  
And then using the Equation (1.111) in [28],  
\[(b+t)^{m_{S}+q-1}=\sum_{r=0}^{m_{S}+q-1}\binom{m_{S}+q-1}{r}t^{r}b^{m_{S}+q-1-r}\] (A24)  
Bringing (A24) into (A23), we get  
\[\sum_{q=0}^{m_{D}-1}\sum_{r=0}^{m_{S}+q-1}\binom{m_{S}+q-1}{r}\frac{Y_{S}^{m_{S }}Y_{D}^{q}b^{m_{S}+q-1}}{\Gamma(m_{S})q!a^{m_{S}+q}}e^{-\frac{Y_{S}b+Y_{D}}{a} }\int_{-b}^{ax_{2}-b}t^{r-q}e^{-\frac{Y_{S}}{a}t-\frac{Y_{D}b}{a}t^{-1}}dt\] (A25)By dividing \([-b,ax_{2}-b]\) into \(n_{2}\) equal parts and using (A16), the approximate expression of the integral in (A25) can be obtained as  
\[\int_{-b}^{ax_{2}-b}t^{r-q}e^{-\frac{Y_{S}}{\pi}t-\frac{Y_{D}b}{\pi}t^{-1}}dt \approx S_{n_{2}}=\frac{ax_{2}}{6n_{2}}\Bigg{\{}f_{t}(-b)-f_{t}(ax_{2}-b)+\sum_ {l=1}^{n_{2}}\left[4f_{t}\left(t_{l+\frac{1}{2}}\right)+2f_{t}(t_{l})\right] \Bigg{\}}\] (A26)  
where \(f_{t}(t)=t^{r-q}e^{-\frac{Y_{S}}{\pi}t-\frac{Y_{D}b}{\pi}t^{-1}}\). Bringing (A22), (A25), and (A26) into (A21), the approximate expression for \(I_{2}\) is written as  
\[I_{2}=\frac{\gamma(m_{S},Y_{S}x_{2})}{\Gamma(m_{S})}-\sum_{q=0}^{m_{D}-1}\sum _{r=0}^{m_{S}+q-1}\binom{m_{S}+q-1}{r}\frac{Y_{S}^{m_{S}}Y_{D}^{q}b^{m_{S}+q-1 }}{\Gamma(m_{S})q!a^{m_{S}+q}}e^{-\frac{Y_{S}b+Y_{D}}{a}}S_{n_{2}}\] (A27)  
Finally, we solve for the integral of the third region,  
\[I_{3}=\int_{x_{2}}^{\infty}dx\int_{0}^{\frac{c}{\gamma}}f(x,y)dy=\frac{Y_{S}^ {m_{S}}Y_{D}^{m_{D}}}{\Gamma(m_{S})\Gamma(m_{D})}\int_{x_{2}}^{\infty}x^{m_{S }-1}e^{-Y_{S}x}dx\int_{0}^{\frac{c}{\gamma}}y^{m_{D}-1}e^{-Y_{D}y}dy\] (A28)  
The integral solution of \(I_{3}\) is the same process as that of \(I_{1}\). Using Equation (3.381.1) and Equation (8.353.6) in [28] first, we obtain  
\[I_{3}=\frac{Y_{S}^{m_{S}}}{\Gamma(m_{S})}\left(\int_{x_{2}}^{\infty}x^{m_{S}- 1}e^{-Y_{S}x}dx-\sum_{q=0}^{m_{D}-1}\frac{(Y_{D}c)^{q}}{q!}\int_{x_{2}}^{ \infty}x^{m_{S}+q-1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}dx\right)\] (A29)  
The first integral in (A29) is solved using Equation (3.381.3) in [28] as  
\[\int_{x_{2}}^{\infty}x^{m_{S}-1}e^{-Y_{S}x}dx=Y_{S}^{-m_{S}}\Gamma(m_{S},Y_{S }x_{2})\] (A30)  
The second integral is equivalent to  
\[\int_{x_{2}}^{\infty}x^{m_{S}+q-1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}dx=\int_{0}^{ \infty}x^{m_{S}+q-1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}dx-\int_{0}^{x_{2}}x^{m_{S}+q -1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}dx\] (A31)  
Using the integral of \((0,\infty)\) in Equation (3.471.9) in [28], the solution is  
\[\int_{0}^{\infty}x^{m_{S}+q-1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}dx=2\bigg{(}\frac{Y _{D}c}{Y_{S}}\bigg{)}^{\frac{m_{S}-q}{2}}K_{m_{S}-q}\bigg{(}2\sqrt{Y_{S}Y_{D}c }\bigg{)}\] (A32)  
By dividing \([0,x_{2}]\) into \(n_{3}\) equal parts and using (A16), the approximate expression for the integral of this interval can be obtained as  
\[\int_{0}^{x_{2}}x^{m_{S}+q-1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}dx\approx S_{n_{3}}= \frac{x_{2}}{6n_{3}}\left\{-f_{x}(x_{2})+\sum_{l=1}^{n_{3}}\left[4f_{x}\left(x _{l+\frac{1}{2}}\right)+2f_{x}(x_{l})\right]\right\}\] (A33)  
where \(f_{x}(x)=x^{m_{S}-q-1}e^{-Y_{S}x-\frac{Y_{D}c}{x}}\). Combining (A30), (A32), (A33), and (A29), we can obtain the approximation of the \(I_{3}\) integral  
\[\sum_{q=0}^{m_{D}-1}\sum_{r=0}^{m_{S}+q-1}\binom{m_{S}+q-1}{r}\frac{Y_{S}^{m_{S }}Y_{D}^{q}b^{m_{S}+q-1}}{\Gamma(m_{S})q!a^{m_{S}+q}}e^{-\frac{Y_{S}b+Y_{D}}{a} }\int_{-b}^{ax_{2}-b}t^{r-q}e^{-\frac{Y_{S}}{a}t-\frac{Y_{D}b}{a}t^{-1}}dt\]0 (A34)  
We add (A18), (A27), and (A24), and then collate them to obtain the CDF of SNR, which is (32). The compound Simpson algorithm adopted here can allow the result to reach an accuracy of \(\frac{1}{2}\times 10^{-6}\)[29].