# Vector Approximate Message Passing Based OFDM-IM Detection for Underwater Acoustic Communications
## 3 Proposed Method
### Modification for Invalid SAPs and Constellation Detection  
After \(\hat{\mathbf{x}}\) each group is estimated, the invalid SAPs appear like the case in LLR detection. Instead of discarding the non-existent SAPs as wrong results, modifications are required to reduce the performance loss. Firstly, we sort the power amplitudes of \(\hat{\mathbf{x}}\) in an ascending order and obtain the indices sequence \(\tilde{\mathcal{I}}=\{i_{0},i_{1},\cdots,i_{n-1}\}\), then the non-zero index group \(\mathcal{I}=\{i_{0},\cdots,i_{k-1}\}\) is guaranteed by the \(k\) indices with the largest values in \(\tilde{\mathcal{I}}\). The step is important especially for low SNR cases due to the noise effects greatly blur the boundaries between noise and signal subspace.  
However, the member \(\mathcal{I}\) may be out of the scope of \(\mathcal{J}\). To minimize the effects of error detection, the value in the index group is checked to choose the closest one in \(\mathcal{J}\). The choice criterion is to minimize the Euclidean distance between \(\mathcal{I}\) with the Table space, i.e., \(\underset{c=1,\cdots,|\mathcal{J}|}{\arg\min}\|\mathcal{I}-\mathcal{J}_{c}\| _{2}^{2}\). It is worth noting that symbols \(\hat{\mathbf{x}}=\big{\{}\hat{x}_{j}\big{\}}_{j=i_{0}}^{i_{k-1}}\) are simultaneously equalized and they have been located on the decision region of the constellation symbols. They are easily recovered using one-step ML symbol detection given by  
\[\hat{x}_{j}=\underset{s_{q}\in\mathcal{S}}{\arg\min}\big{\|}\hat{x}_{j}-s_{q} \big{\|}_{2}^{2},j=i_{0},\cdots,i_{k}. \tag{21}\]  
Besides the VAMP with SVD transform in Algorithm 1, here we present the whole process considering the message passing of Figure 2, and the VAMP with LMMSE step is shown in Algorithm 2.  
```
0: Received signal of each group \(\mathbf{y}\in\mathbb{C}^{n\times 1}\), measurement matrix \(\mathbf{H}\in\mathbb{C}^{n\times n}\), Maximum iteration number \(T\), denoising function \(\eta(\cdot)\), noise precision \(\gamma_{w}\),activated subcarrier number \(k\)
0: Recovered index data \(\mathcal{I}\) and equalized symbols \(\hat{\mathbf{x}}\)
1: Initialization: \(t=0,\mathbf{r}_{0}\), \(\gamma_{0}\geq 0\)
2:while\(t<T\)do
3:\(\hat{\mathbf{x}}_{1t}=\eta(\mathbf{r}_{1t},\gamma_{1t})\)
4:\(\alpha_{1t}=\big{\langle}\eta^{t}(\mathbf{r}_{1t},\gamma_{1t})\big{\rangle}\)
5:\(\beta_{1t}=\gamma_{1t}/\alpha_{1t}\)
6:\(\gamma_{2t}=\beta_{1t}-\gamma_{1t}\)
7:\(\mathbf{r}_{2t}=\frac{\beta_{1t}\alpha_{1t}-\gamma_{1t}\alpha_{1t}}{\gamma_{2t}}\)
8:\(\hat{\mathbf{x}}_{2t}=\big{(}\gamma_{w}\mathbf{H}^{H}\mathbf{H}+\gamma_{2t} \mathbf{I}\big{)}^{-1}\big{(}\gamma_{w}\mathbf{H}^{H}\mathbf{y}+\mathbf{r}_{ 2t}\gamma_{2t}\big{)}\)
9:\(\alpha_{2t}=\frac{\gamma_{2t}}{\alpha_{2t}}*\text{trace}\big{[}\big{(}\gamma _{w}\mathbf{H}^{H}\mathbf{H}+\gamma_{2t}\mathbf{I}\big{)}^{-1}\big{]}\)
10:\(\beta_{2t}=\frac{\gamma_{2t}}{\alpha_{2t}}\)
11:\(\gamma_{1t,t+1}=\beta_{2t}-\gamma_{2t}\)
12:\(\mathbf{r}_{1t,t+1}=(\beta_{2t}\hat{\mathbf{x}}_{2t}-\gamma_{2t}\hat{\mathbf{x }}_{2t})/\gamma_{1t,t+1}\)
13:endwhile
14: Sort \(s\in\mathcal{I}=sort(\hat{\mathbf{x}}^{\prime}\), \(ascend^{\prime})\) and estimated indices \(\mathcal{I}=\tilde{\mathcal{I}}(n-k+1:n)\)
15:if\(\mathcal{I}\
otin\mathcal{J}\)then
16: Update \(\mathcal{I}\) as \(\mathcal{J}_{c}\) with the minimum ED in \(\mathcal{J}\)
17:endif
18:\(\hat{x}_{j}=\underset{s_{q}\in\mathcal{S}}{\arg\min}\Big{\|}\hat{x}_{j}-s_{q} \Big{\|}_{2}^{2},j\in\mathcal{I}\)
```  
**Algorithm 2** Vector AMP-based OFDM-IM detection (LMMSE Version)