# Two-Way Multi-Antenna Relaying with Simultaneous Wireless Information and Power Transfer
## 3 PSR Protocol
### PS-DF-STC Scheme  
For the MA phase, the description of the signal transmissions from the end nodes T\({}_{1}\) and T\({}_{2}\) to the relay node R can be done as in the PS-DF scheme, i.e., Equations (2)-(4). The aforementioned ZF estimation and bit-level NC also follow. The corresponding average BER (i.e., \(\overline{P}_{\rm{e,ir}}\) where \(i=1,2\)) is therefore the same as Equation (9). However, instead of transmitting the same composite bit sequence \(b_{r}:=\hat{b}_{1}\oplus\hat{b}_{2}\) simultaneously via \(M\) antennas in the BC phase, the relay node performs space-time block coding [21] for this sequence, as outlined in [29]. Specifically, let **B** be the space-time block-codedcomposite bit matrix whose dimension is \(M\times L\), where \(L\) is the block length of the corresponding space-time block code. If \(N\) consecutive composite bits, i.e., \(b_{\rm r}[k],b_{\rm r}[k+1],...,b_{\rm r}[k+N-1]\), are transmitted with this matrix, then the code rate is \(N/L\). In this paper, we concentrate on the space-time block-coded composite bit matrices with the full code rate, i.e., \(L=N\). Such matrices for two, three, and four antennas are shown in Table 1.  
As a result, the sampled received (baseband) signal at the end node \(\mathrm{T}_{i}\)\((i=1,2)\) in the BC phase can be expressed as:  
\[ \begin{array}{cccccccc}\left[\begin{array}{cccc}y_{i}[k]&y_{i}[k+1]&\cdots& y_{i}[k+N-1]\end{array}\right]=&\sqrt{\mathrm{P}_{\rm r}}\Big{[}\begin{array}{ ccccc}x_{\rm r}[k]&x_{\rm r}[k+1]&\cdots&x_{\rm r}[k+N-1]\end{array}\Big{]} \mathbf{H}\\ &&+\Big{[}\begin{array}{cccc}n_{i}[k]&n_{i}[k+1]&\cdots&n_{i}[k+N-1]\end{array} \Big{]}\end{array}  \tag{19}\]  
where \(\mathbf{H}\) is exemplified in Table 1, and \(n_{i}\sim CN\big{(}0,\sigma_{\rm a}^{2}+\sigma_{\rm c}^{2}\big{)}\) includes the antenna and signal-conversion AWGNs at the corresponding time instants. Following [30] and assuming that \(\{h_{i,m}\}_{m=1}^{M}\) are known at \(\mathrm{T}_{i}\), an estimate of \(\left[ \begin{array}{cccc}x_{\rm r}[k]&x_{\rm r}[k+1]&\cdots&x_{\rm r}[k+N-1] \end{array} \right]\) can be obtained as  
\[\left[ \begin{array}{cccc}\hat{x}_{\rm r}[k]&\hat{x}_{\rm r}[k+1]&\cdots&\hat {x}_{\rm r}[k+N-1]\end{array} \right]=\mathrm{Re}\Big{[} \begin{array}{cccc} y_{i}[k]&y_{i}[k+1]&\cdots&y_{i}[k+N-1]\end{array} \Big{]}\mathbf{H}^{\rm H}. \tag{20}\]  
It is straightforward to show that the instantaneous SNR of \(\hat{x}_{\rm r}\) at \(\mathrm{T}_{i}\) is:  
\[ \begin{array}{ll}\gamma_{\rm ri}&=\frac{P\sum\limits_{m=1}^{M}\left|h_{i,m} \right|^{2}}{\sigma_{\rm a}^{2}+\sigma_{\rm c}^{2}}\\ &=\frac{\eta\rho M\big{(}\rho\sigma^{2}+\sigma_{\rm a}^{2}\big{)}\sum\limits_{ m=1}^{M}\left|h_{i,m}\right|^{2}}{\sigma_{\rm a}^{2}+\sigma_{\rm c}^{2}}.\end{array}  \tag{21}\]  
Defining \(\vartheta:=\sum\limits_{m=1}^{M}\left|h_{i,m}\right|^{2}\) and using (p. 48, [27]) and (Section \"Related distributions\", [31]), the PDF of \(\vartheta\) can be expressed as:  
\[f_{\vartheta}(x)=\frac{x^{M-1}}{\Gamma(M)\sigma^{2M}}\exp\Big{(}-\frac{x}{ \sigma^{2}}\Big{)};\;x\geq 0. \tag{22}\]  
From Equations (21) and (22), we have:  
\[ \begin{array}{ll}f_{\gamma_{\rm ri}}(x)=&\frac{\big{(}\sigma_{\rm a}^{2}+ \sigma_{\rm c}^{2}\big{)}^{M}}{\Gamma(M)\sigma^{2M}\big{(}\eta\rho M\big{(} \sigma^{2}+\sigma_{\rm a}^{2}\big{)}\big{)}^{M}}x^{M-1}\\ &\times\exp\biggl{(}-\frac{\sigma_{\rm a}^{2}+\sigma_{\rm c}^{2}}{\eta\rho M \sigma^{2}\big{(}\rho\sigma^{2}+\sigma_{\rm a}^{2}\big{)}}x\biggr{)};\;x\geq 0.\end{array}  \tag{23}\]