# Co-Efficient Vector Based Differential Distributed Quasi-Orthogonal Space Time Frequency Coding
## 2 Distributed Space-Time-Frequency Coding
### Space Time Frequency Coding at the Relay Nodes
Specifically, it is assumed that \(J\) relay nodes are programmed to multiply their relay matrix by the decoded signal \([\widetilde{\boldsymbol{x}}_{k,p,t,n}(1),\ldots,\widetilde{\boldsymbol{x}}_{k,p,t,n}(\Gamma)]^{T}\) while the remaining \(P-J\) relay nodes are programmed to multiply their relay matrix by the conjugate of the received signal \([\widetilde{\boldsymbol{x}}_{k,p,t,n}(1)\stackrel{{*}}{{,}} \ldots,\widetilde{\boldsymbol{x}}_{k,p,t,n}(\Gamma)\stackrel{{*}}{{ }}]^{T}\). Thus, in the \(k\)th block, the \(p\)th relay node transmits a \(\Gamma\times 1\) vector \(\boldsymbol{t}_{k,p}\) given by:  
\[\boldsymbol{t}_{k,p}=\sqrt{\frac{E_{C}}{E_{S}+1}}\boldsymbol{M}_{p}\widetilde{ \boldsymbol{x}}_{k},\widetilde{\boldsymbol{x}}_{k}\in\left\{\left[\widetilde{ \boldsymbol{x}}_{k,p,t,n}(1),\ldots,\widetilde{\boldsymbol{x}}_{k,p,t,n}( \Gamma)\right]^{T},\left[\widetilde{\boldsymbol{x}}_{k,p,t,n}(1)\stackrel{{ *}}{{,}}\ldots,\widetilde{\boldsymbol{x}}_{k,p,t,n}(\Gamma)\stackrel{{ *}}{{}}\right]^{T}\right\} \tag{4}\]  
Since each \(p\)th relay node transmits the data vector \(\boldsymbol{t}_{k,p}\) to the destination on \(\Gamma=N_{b}T_{b}\) sub-carriers/time slots, then all the \(P\) relay nodes can jointly achieve a diversity of order \(P\Gamma\) at the destination. Assuming the relay nodes are synchronized at symbol level such that the nodes can transmit simultaneously, the signal received at the destination in the \(k_{th}\) block after CP removal and FFT demodulation is given by:  
\[\mathbf{y}_{k,i}=\sum_{p=1}^{P}\mathbf{t}_{k,p}\odot g_{k,p}+\mathbf{z}_{k,i},i=1,2,\ldots,\Gamma \tag{5}\]  
where \(\mathbf{y}_{k,i}=[y_{k,i}(1),\ldots,y_{k,i}(\Gamma)]^{T}\), \(\mathbf{g}_{k,p}=[g_{k,p,t,n}(1),\ldots,g_{k,p,t,n}(\Gamma)]^{T}\), and \(\mathbf{z}_{k,i}=[z_{k,i}(1),\ldots,z_{k,i}(\Gamma)]^{T}\) is the zero-mean complex Gaussian noise term with covariance \(N_{0}I_{\Gamma}\). The frequency response of the channel at the \(n\)th sub-carrier between the \(p\)th relay node and the destination during the \(t\)th time slot is denoted by \(g_{k,p,t,n}(i)=\sum_{l=0}^{L_{RD}-1}g_{p,t}(l)e^{-j\pi ln/N}=\mathbf{g}_{p,t}{}^{T}\bm {\omega}\). The average SNR of the channel between the \(p_{th}\) relay node and the destination is given by \(\mathrm{Y}_{RD}=E_{C}/N_{0}\). Substituting for \(\mathbf{t}_{k,p}\) in (4), (5) becomes:  
\[\mathbf{y}_{k,i}=\sum_{p=1}^{P}\sqrt{\frac{E_{C}E_{S}N_{C}}{E_{S}+1}}\mathbf{M}_{p} \widetilde{\mathbf{x}}_{k}\odot\mathbf{g}_{k,p}+\mathbf{z}_{k,i},i=1,2,\ldots,\Gamma \tag{6}\]  
The signal received at the destination in the \(k\)th block can be written in compact form as:  
\[\mathbf{Y}_{k}=\sqrt{\rho}\mathbf{X}_{k}\mathbf{G}_{k}+\mathbf{Z}_{k} \tag{7}\]  
where \(\rho=\frac{E_{C}E_{S}N_{C}}{E_{S}+1}\), \(\mathbf{Y}_{k}=[\mathbf{y}_{k,1},\ldots,\mathbf{y}_{k,\Gamma}]\in\mathbb{C}^{\Gamma\times \Gamma}\), \(\mathbf{y}_{k,i}=[y_{k,i}(1),\ldots,y_{k,i}(\Gamma)]^{T}\), \(\mathbf{X}_{k}=[\mathbf{M}_{1}\widetilde{\mathbf{x}}_{k},\ldots,\mathbf{M}_{j}\widetilde{\mathbf{x }}_{k},\mathbf{M}_{j+1}\widetilde{\mathbf{x}}_{k}^{*},\ldots,\mathbf{M}_{P}\widetilde{\mathbf{ x}}_{k}^{*}]\in\mathbb{C}^{\Gamma\times P}\), \(\mathbf{G}_{k}=[\mathbf{g}_{k,1},\ldots,\mathbf{g}_{k,\Gamma}]\in\mathbb{C}^{P\times \Gamma}\), \(\mathbf{g}_{k,i}=[\mathbf{g}_{k,t,n}(1),\ldots,\mathbf{g}_{k,t,n}(P)]^{T}=\left(\mathbf{I}_{P} \otimes\mathbf{\omega}^{T}\right)\mathbf{g}.\mathbf{g}=[\mathbf{g}_{1,t}(0),\ldots,\mathbf{g}_{1,t} (L-1),..,\mathbf{g}_{P,t}(0),\ldots,\)\(g_{P,t}(L-1)]^{T}\), and \(\mathbf{Z}_{k}=[\widetilde{\mathbf{z}}_{k,1},\ldots,\widetilde{\mathbf{z}}_{k,\Gamma}]\in \mathbb{C}^{\Gamma\times\Gamma}\),\(\mathbf{z}_{k,i}=[\mathbf{z}_{k,i}(1),\ldots,\mathbf{z}_{k,i}(\Gamma)]^{T}\). The \(P\times\Gamma\) quasi-orthogonal channel matrix \(\mathbf{G}_{k}\) captures the channel coefficients between the \(P\) relay nodes and the destination.