# Analysis and Design of Rateless Two-way Relay Networks Based on a Multiply-and-Forward Scheme
## 3 Analysis on Uncoded TWRN  
### AF Scheme  
In the traditional AF scheme, relay node R adds the received signals from nodes A and B together at the third stage and we have  
\[\mathbf{x_{R}}=\rho_{\mathrm{AF}}(\mathbf{y_{AR}}+\mathbf{y_{BR}}) \tag{11}\]  
where \(\rho_{\mathrm{AF}}\) denotes the normalization factor in the AF scheme, so that  
\[\rho_{\mathrm{AF}}^{2}\mathrm{E}\Big{[}\|\mathbf{y_{AR}}+\mathbf{y_{BR}}\|_{2 }^{2}\Big{]}=1 \tag{12}\]  
Substituting (6) and (7) into (12), we can further derive  
\[\rho_{\mathrm{AF}}=\sqrt{\frac{1}{\Big{(}\big{|}h_{\mathrm{A,R}}\big{|}^{2}+ \big{|}h_{\mathrm{B,R}}\big{|}^{2}\Big{)}P+2\sigma_{\mathrm{n}}^{2}}} \tag{13}\]  
Due to the similarity of signal processing at nodes A and B, we take source node A for example to describe the processing in details. Employing (6), (7), (9) and (11), the received signal at node A is given by  
\[\mathbf{y_{RA}}=\rho_{\mathrm{AF}}h_{\mathrm{A,R}}^{2}P\mathbf{x_{A}}+\rho_{ \mathrm{AF}}h_{\mathrm{A,R}}h_{\mathrm{B,R}}P\mathbf{x_{B}}+\rho_{\mathrm{AF} }h_{\mathrm{A,R}}\sqrt{P}\mathbf{n_{R}}+\mathbf{n_{RA}} \tag{14}\]  
where \(\mathbf{n_{R}}\) represents the sum of white Gaussian distributed noise \(\mathbf{n_{AR}}\) and \(\mathbf{n_{BR}}\), which implies that all elements in \(\mathbf{n_{R}}\) are independently and identically distributed by \(\mathcal{N}\Big{(}0,2\sigma_{\mathrm{n}}^{2}\Big{)}\). Given that the channel state information is well known to both receivers, node A can subtract its own source signal from the received one and get  
\[\mathbf{y^{\prime}}_{\mathrm{RA}}=\rho_{\mathrm{AF}}h_{\mathrm{A,R}}h_{ \mathrm{B,R}}P\mathbf{x_{B}}+\rho_{\mathrm{AF}}h_{\mathrm{A,R}}\sqrt{P} \mathbf{n_{R}}+\mathbf{n_{RA}} \tag{15}\]  
For a coded system, node A can further employ the belief propagation (BP) algorithm to decode the source information \(\mathbf{x_{B}}\) from (15). Moreover, the received SNR at node A derived from (15) is given by  
\[\gamma_{\mathrm{A}}^{\mathrm{AF}}=\frac{h_{\mathrm{A,R}}^{2}h_{\mathrm{B,R}}^ {2}P^{2}}{\Big{(}3h_{\mathrm{A,R}}^{2}P+h_{\mathrm{B,R}}^{2}P+2\sigma_{\mathrm{ n}}^{2}\Big{)}\sigma_{\mathrm{n}}^{2}} \tag{16}\]  
Similarly, the received SNR at node B is given by  
\[\gamma_{\mathrm{B}}^{\mathrm{AF}}=\frac{h_{\mathrm{A,R}}^{2}h_{\mathrm{B,R}}^ {2}P^{2}}{\Big{(}h_{\mathrm{A,R}}^{2}P+3h_{\mathrm{B,R}}^{2}P+2\sigma_{\mathrm{ n}}^{2}\Big{)}\sigma_{\mathrm{n}}^{2}} \tag{17}\]  
With the given channel state information \(h_{\mathrm{A,R}}\) and \(h_{\mathrm{B,R}}\), the symbol error ratio (SER) for an uncoded BPSK-modulated symbol can be yielded according to the received SNR [26], taking source symbol \(\mathbf{s_{B}}\) at node A, for example:  
\[P_{\mathrm{SER,A}}^{h_{\mathrm{A,R}}h_{\mathrm{B,R}}}=\frac{1}{\pi}\int_{0}^{ \pi/2}\exp\left(-\frac{\gamma_{\mathrm{A}}^{\mathrm{AF}}}{2\sin^{2}\theta} \right)d\theta \tag{18}\]  
Furthermore, the mean SER can be derived considering Rayleigh fading channels, i.e.,  
\[P_{\mathrm{SER,A}}^{\mathrm{AF}}=\frac{1}{\pi}\int_{0}^{\pi/2}M_{\gamma_{ \mathrm{A}}^{\mathrm{AF}}}\bigg{(}\frac{1}{2\sin^{2}\theta}\bigg{)}d\theta \tag{19}\]  
where \(M_{\gamma_{\mathrm{A}}^{\mathrm{AF}}}(\tau)\) denotes the moment generating function (MGF) of variable \(\gamma_{\mathrm{A}}^{\mathrm{AF}}\), i.e.,  
\[M_{\Gamma}(\tau)=\int_{-\infty}^{+\infty}\exp(-\Gamma\tau)p(\Gamma)d\Gamma \tag{20}\]and \(p(\Gamma)\) denotes the probability density function of \(\Gamma\). In particular, Lemma 1 introduces a more simplified expression of \(M_{\Gamma}(\tau)\) in the high SNR regime. **Lemma 1**. : _([27]) When \(\Gamma\) can be expressed as the harmonic mean of two exponential distributed random variables with parameters \(p_{1}\) and \(p_{2}\), respectively, the MGF in the sufficiently high SNR regime can be approximated as_  
\[\rho_{\mathrm{AF}}^{2}\mathrm{E}\Big{[}\|\mathbf{y_{AR}}+\mathbf{y_{BR}}\|_{2 }^{2}\Big{]}=1 \tag{12}\]0  
Accordingly, the mean SER of a BPSK-modulated AF-TWRN is introduced in the following theorem. **Theorem 1**.