# Fast Scalable Architecture of a Near-ML Detector for a MIMO-QSM Receiver
## 3 Low Complexity Detection Algorithm
Therefore, the proposed method performed the search using the following modified Rx vector:  
\[\mathbf{y}^{(1)}=\mathbf{y}-\mathbf{h}^{(\hat{\ell}_{\Re}^{(l)})}s_{\Re}^{(l )},l=1,\cdots,N_{\Re}. \tag{9}\]  
The decision metrics \(\mathbf{d}_{2}\) required in the second part or the Near-ML proposal detector for the MIMO-QSM scheme can be established as follows:  
\[\mathbf{d}_{2}=\parallel\mathbf{y}^{(1)}-\mathbf{h}^{(\hat{\ell}_{\Im})} \cdot\hat{\mathbf{s}}_{\Im}\parallel_{F}^{2}, \tag{10}\]  
The complete Near-ML detector is described with detail in Algorithm 3. Each iteration produced a symbol estimation \(\left[\hat{\ell}_{R},\hat{s}_{R},\hat{\ell}_{\Im},\hat{s}_{\Im}\right]\) with distance \(d_{T}\). Symbol pairs \(\left[\mathbf{tuple}_{R},\hat{\ell}_{\Im},\hat{s}_{\Im}\right]\) whose distance \(d_{min}\) were not smaller than the previous ones were skipped. In each iteration, we used the criterion (\(V_{th1}=n_{R}\sqrt{\gamma}\) and \(V_{th2}=2V_{th1}\)). The detector used the metrics of the sphere detector to stop the search and discard branches of the tree that were not viable solutions because they exceeded the maximum radius of the detection sphere according to [15; 24]. With this modification, the number of branches for each level was adaptive and depended on the SNR and the channel. For these reasons, the proposed algorithm had a significantly reduced complexity. ```
0: Channel matrix \(\mathbf{H}\), modified received vector \(\mathbf{y}\), \(\mathbf{s}_{R}\), \(\mathbf{s}_{\Im}\)\(n_{T}\), \(n_{T}\), \(q\), \(N_{p}\), \(\gamma\), \(N_{R}\)
0: Optimum \(\left[\hat{\ell}_{R},\hat{s}_{R},\hat{\ell}_{\Im},\hat{s}_{\Im}\right]\)
1: Let \(d_{T}=\infty\)
2: Let \(V_{th1}=n_{R}\sqrt{\gamma}\) and \(V_{th2}=2V_{th1}\)
3: Execute the QSM real part decoding to obtain \(\mathbf{tuple}_{R}\), \(\left[\mathbf{d}_{R}\quad\mathbf{ord}_{R}\right]\)
4: Let \(lim=length(\mathbf{tuple}_{R})\)
5:for\(m=1:lim\)do
6: Let \((\hat{\ell}_{R}^{(m)},\hat{s}_{R}^{(m)})=\mathbf{tuple}_{R}(m)\)
7: Let \(\mathbf{y}^{(1)}=\mathbf{y}-\mathbf{h}^{\hat{s}}\hat{s}_{R}\)
8: Execute the QSM imaginary part decoding to obtain \([\hat{\ell}_{\Im},\hat{s}_{\Im}]\), \(d_{min}\)
9:if\(d_{min}<d_{T}\)then
10: Let \(d_{T}=d_{min}\)
11: Let \(\hat{\ell}_{R}=\ell_{R}^{(m)}\)
12: Let \(\hat{s}_{R}=s_{\Re}^{(m)}\)
13: Let \(\hat{\ell}_{\Im}=\ell_{\Im}\)
14: Let \(\hat{s}_{\Im}=s_{\Im}\)
15:if\(d_{min}<V_{th1}\)then
16: break
17:endif
18:elseif\(d_{T}>V_{th1}\) and \((V_{th2}<d_{min}<V_{th1})\)then
19:break
20:endif
21:endfor
22: Return \(\left[\hat{\ell}_{R},\hat{s}_{R},\hat{\ell}_{\Im},\hat{s}_{\Im}\right]\)
```  
**Algorithm 3** Complete Near-ML detector. It is also worth noting that in the proposed algorithm, it is possible to adjust the complexity/BER performance trade-off of the detector the maximum limit of the thresholds \(V_{th1}\) and \(V_{th2}\). The advantages of our proposal with respect to other similar schemes recently proposed were: It did not require calculating the QR decomposition; therefore, it was less complex. Additionally, it did not require using complex operations; therefore, it was most adequate for hardware implementation. In the next subsection, BER performance results and the detection complexity of the proposed scheme were compared to the conventional MIMO-QSM scheme for the ML detection algorithm. Furthermore, the BER performance and the complexity of the proposed low-complexity detection algorithm were analyzed.