# Cognitive Interference Alignment Schemes for IoT Oriented Heterogeneous Two-Tier Networks
## 3 Cognitive Interference Alignment Schemes Design
### Interference Nulling Based Cognitive IA
To null the overall interference in (19), the FBS should project the received signal into the subspace spanned by the eigenvectors corresponding to the smallest \(d_{k}\) eigenvalues of \(\mathbf{O}_{k}\). Hence, in the original channel, the decoder, \(\mathbf{U}_{k}\), can be expressed as:  
\[\mathbf{U}_{k}=\big{[}v_{\mathbf{O}_{k},1},v_{\mathbf{O}_{k},2},\cdots,v_{ \mathbf{O}_{k},d_{k}}\big{]}, \tag{23}\]  
Whose columns are the first \(d_{k}\) eigenvectors of \(\mathbf{O}_{k}\) in ascending order. In the reciprocal channel, we update the precoder, \(\overset{\leftarrow}{\mathbf{V}_{k}}\), with the \(\mathbf{U}_{k}\) determined in the original channel, then the reciprocal decoder, \(\overset{\leftarrow}{\mathbf{U}_{k}}\), can be obtained similarly as:  
\[\overset{\leftarrow}{\mathbf{U}_{k}}=\bigg{[}v_{\overset{\leftarrow}{ \mathbf{O}_{k},1}},v_{\overset{\leftarrow}{\mathbf{O}_{k},2}},\cdots,v_{ \overset{\leftarrow}{\mathbf{O}_{k},d_{k}}}\bigg{]}, \tag{24}\]  
where \(\overset{\leftarrow}{\mathbf{U}_{k}}\) is composed of the \(d_{k}\) eigenvectors of the reciprocal interference covariance, \(\overset{\leftarrow}{\mathbf{O}_{k}}\). This process iterates in such a way until it converges. ```
1. Input: \(\mathbf{H}_{k,i}\): Co-tier channel; \(\mathbf{g}_{k,p}\): Cross-tier channel; \(\mathbf{G}_{p,k}\): Cognitive interference channel; \(P_{k}\): Transmit power. 2. Step I:  Calculate LQ decomposition of \(\mathbf{G}_{p,k}=\mathbf{L}_{k}\mathbf{Q}_{k}\) for \(k=1,\ 2,\ \cdots,\ K\). Construct the linear precoder \(\mathbf{W}_{k}\) as the last \(N\) columns of the unitary matrix \(\mathbf{Q}_{k}\) as (15). 3. Initialize:  Let \(\tilde{\mathbf{H}}_{k,i}=\mathbf{H}_{k,i}\mathbf{W}_{i}\), start with arbitrary unitary matrix \(\mathbf{\widehat{V}}_{k}\) that satisfies \(\mathbf{\widehat{V}}_{k}\mathbf{\widehat{V}}_{k}^{H}=\mathbf{I}_{k}\) for each IoT node. 4. Step II:  Compute interference covariance matrix in original channel as: \[\mathbf{O}_{k}=\sum_{i=1,j\
eq k}^{K}P_{k}\tilde{\mathbf{H}}_{k,i}\mathbf{ \widehat{V}}_{i}\mathbf{\widehat{V}}_{i}^{H}\tilde{\mathbf{H}}_{k,i}^{H}+P_{ p}\mathbf{g}_{k,p}\mathbf{g}_{k,p}^{H}.\]  Compute the original decoder at the \(k\)-th receiver as the first \(d_{k}\) eigenvectors of \(\mathbf{O}_{k}\): \[\mathbf{U}_{k}=\big{[}\mathbf{v}_{\mathbf{O}_{k},1},\ \mathbf{v}_{\mathbf{O}_{k},2},\ \cdots,\ \mathbf{v}_{\mathbf{O}_{k},d_{k}}\big{]},\quad for\ \ k=1,\ 2,\ \cdots,\ K.\]  Consider the reciprocal channel and update all the precoder \(\mathbf{\widehat{V}}_{k}^{\leftarrow}=\mathbf{U}_{k}\) for \(k=1,\cdots,K\). Then compute reciprocal interference covariance matrix as: \[\mathbf{\widehat{O}}_{k}=\sum_{i=1,j\
eq k}^{K}P_{k}\overset{\leftarrow}{ \mathbf{H}}_{i,k}\mathbf{\widehat{V}}_{i}\mathbf{\widehat{V}}_{i}^{\leftarrow H \leftarrow H}.\]  Similarly, compute the reciprocal decoder at the \(k\)-th reversed receiver as the first \(d_{k}\) eigenvectors of \(\mathbf{O}_{k}\): \[\mathbf{\widehat{U}}_{k}^{\leftarrow}=\bigg{[}\mathbf{v}_{\mathbf{\widehat{O} }_{k},1},\mathbf{v}_{\mathbf{\widehat{O}}_{k},2},\cdots,\mathbf{v}_{\mathbf{ \widehat{O}}_{k},d_{k}}\bigg{]},\ for\ \ k=1,\ 2,\ \cdots,\ K.\]
```
5. Reverse the communication channel and update the decoder as \(\mathbf{\widehat{V}}_{k}=\mathbf{\widehat{U}}_{k}\), for \(k=1,\ 2,\ \cdots,\ K\). 6. Loop:  
7. Converge: **Else: Return** the precoder and decoder \(\mathbf{V}_{k}=\mathbf{W}_{k}\mathbf{\widehat{V}}_{k}\) and \(\mathbf{U}_{k}\). **Algorithm 1** Interference nulling based cognitive interference alignment (IN-CIA) (\(\mathbf{H}_{k,i}\), \(\mathbf{G}_{p,k}\), \(\mathbf{g}_{k,p}\), \(P_{k}\))