# Multi-Dimensional Sparse-Coded Ambient Backscatter Communication for Massive IoT Networks
## 4 Two-Stage Detection
### Stage-2: Utilizing Sparse Code Structure  
In sparse codes, a low-complexity MPA [43; 44] can be used to detect \(N\) tags' data from \(\tilde{K}\) pilot signals using the iterative projection and expansion method as described in Figure 7. We first vectorize the received signals and channels of size \(L_{\text{PI}}\times K\) to generate the column vectors of \(\tilde{K}\times 1\) as follows:  
\[\bar{\mathbf{z}} =[\bar{z}_{1},\cdots,\bar{z}_{\tilde{K}}]^{T}=[\mathbf{z}_{1}^{T},\cdots,\mathbf{z}_{K}^{T}]^{T}\in\mathbb{C}^{\tilde{K}\times 1}, \tag{33}\] \[\bar{\boldsymbol{\psi}}_{n} =[\bar{\boldsymbol{\psi}}_{1,n},\cdots,\bar{\boldsymbol{\psi}}_{ \tilde{K},n}]^{T}=[\boldsymbol{\psi}_{1,n}^{T},\cdots,\boldsymbol{\psi}_{K,n}^ {T}]^{T}\in\mathbb{C}^{\tilde{K}\times 1}. \tag{34}\]  
To use the information projection method, we define the dimension indicator function (that outputs the indices of dimension from \(K_{1}\)-dimensional signal space) using the factor graph \(\mathbf{\hat{G}}=\{\bar{s}_{\tilde{k},n}\}_{\tilde{k}\in\{1,\cdots,\tilde{K} \},n\in\{1,\cdots,N\}}\) as follows:  
\[\Lambda(\tilde{k},n)=\left\lfloor\frac{\sum_{i=1}^{\tilde{k}}\bar{s}_{i,n}-1} {L_{\text{PI}}}\right\rfloor+1\in\{1,\cdots,K_{1}\}. \tag{35}\]  
Then, based on the low number of projections, an initial information on FN \(\tilde{k}=1,\cdots,\tilde{K}\) and the information from VN \(n\) to FN \(\tilde{k}\) can be assigned to  
\[\bar{f}_{\tilde{k}}\left(\{\bar{m}_{i}\}_{i\in\mathcal{I}_{\tilde {k}}}\right) =-\frac{1}{2\sigma_{n}^{2}}\left\|\bar{z}_{\tilde{k}}-\sum_{i\in \mathcal{I}_{\tilde{k}}}\bar{\boldsymbol{\psi}}_{\tilde{k},\tilde{k}}\bar{ \boldsymbol{\psi}}(\bar{m}_{i})\right\|^{2},\quad\text{where }\mathcal{I}_{\tilde{k}}=\left\{n|a_{n}\bar{s}_{\tilde{k},n}>0\right\}, \quad\bar{m}_{i}=1,\cdots,\tilde{M}, \tag{36}\] \[\text{I}_{n\to k}(m_{n}) =\ln ap_{n}(m_{n})=\frac{1}{M}, m_{n} =1,\cdots,M. \tag{37}\]  
In the next step, FN \(\tilde{k}\) passes the updated messages to its neighboring VNs with the intermediate variable which is given by  
\[\bar{\text{I}}_{\tilde{k}\to n}\left(\{\bar{m}_{i}\}_{i\in\mathcal{I}_{ \tilde{k}}}\right)=\bar{f}_{\tilde{k}}\left(\{\bar{m}_{i}\}_{i\in\mathcal{I}_{ \tilde{k}}}\right)+\sum_{i\in\mathcal{I}_{\tilde{k}}\setminus\{n\}}\bar{ \text{I}}_{i\to\tilde{k}}(\bar{m}_{i}), \tag{38}\]  
where \(\bar{\text{I}}_{n\to\tilde{k}}(\bar{m}),\ \bar{m}=1,\cdots,\tilde{M}\) denotes the projected information from VN \(n\) to FN \(\tilde{k}\). Then, we propose a generalized information projection and expansion method using the constellation mapping matrix \(\tilde{\mathbf{F}}\). Distinct features of the proposed method are the generalization of the projections and expansions [26; 27] for general values of \(M\) and \(K_{1}\) and support of the AmBC over the pilot sequences of length \(\tilde{K}=KL_{\text{PI}}\) in the OFDM carriers by newly introducing the function \(\Lambda(\tilde{k},n)\). The projected information related to the tags' reflection coefficient \(\mathbf{\tilde{b}}\) can be obtained by  
* **Reflection Coefficient Projection:** \[\bar{\text{I}}_{n\to\tilde{k}}(\bar{m})=\overset{\star}{\text{max}}\left(\{ \text{I}_{n\to\tilde{k}}(m)\}_{m\in\mathcal{P}(\bar{m})}\right),\quad\mathcal{P} (\bar{m})=\left\{m|\bar{f}_{m}(\Lambda(\tilde{k},n))=\overline{\tilde{b}}(\bar {m}),\quad m=1,\cdots,M\right\},\] (39) where \[\overset{\star}{\text{max}}(\delta_{1},\delta_{2})=\text{max}(\delta_{1}, \delta_{2})+\ln(1+e^{-|\delta_{2}-\delta_{1}|}).\] (40)  
From above, \(\mathcal{P}(\bar{m})\) denotes the index set of codewords projected toward the backscatter symbol index \(\bar{m}\).