# Energy-Efficient Hardware Implementation of an LR-Aided K-Best MIMO Decoder for 5G Networks
## 3 LR-Aided K-Best Decoder  
The Lenstra-Lenstra-Lovasz (LLL) algorithm is typically used to implement lattice reduction due to its relatively low complexity and good performance [5; 6]. This section explains how the LR technique based on the LLL algorithm can be combined with the K-Best detector. Given the MIMO model of \(\mathbf{y}=\mathbf{H}\mathbf{x}+\mathbf{n}\), the received signal of the MIMO system can be transformed in LR form as [16]:  
\[\mathbf{y}=\mathbf{H}\mathbf{T}\mathbf{T}^{-1}\mathbf{x}+\mathbf{n}=\widetilde {\mathbf{H}}\ \left(\mathbf{T}^{-1}\mathbf{x}\right)=\widetilde{\mathbf{H}}\,\mathbf{z}+ \mathbf{n} \tag{3}\]  
where \(\mathbf{T}\) is a unimodular matrix, which has a determinant of \(\pm 1\) and all the entries of \(\mathbf{T}\) are integers [5; 6]. The new channel matrix is represented as \(\widetilde{\mathbf{H}}=\mathbf{H}\mathbf{T}\). Multiplying \(\mathbf{T}\) with \(\mathbf{H}\) gives a more orthogonal and better-conditioned matrix \(\widetilde{\mathbf{H}}\) than the MIMO channel \(\mathbf{H}\)[16]. By adopting Equation (3), the MIMO system model is transformed from \(\mathbf{y}=\mathbf{H}\mathbf{x}+\mathbf{n}\) to \(\mathbf{y}=\widetilde{\mathbf{H}}\,\mathbf{z}+\mathbf{n}\). Therefore, the detector requires to detect \(\mathbf{z}=(\mathbf{T}^{-1}\mathbf{x})\) from the reduced-lattice constellation and then recovers the original constellation point by \(\hat{\mathbf{x}}=\mathbf{T}\mathbf{z}\). Note that \(\mathbf{z}\in\mathbb{Z}\) integer set. Both \(\mathbf{H}\mathbf{x}\) and \(\widetilde{\mathbf{H}}\mathbf{z}\) produce the same point in the lattice but \(\widetilde{\mathbf{H}}\) is more orthogonal than \(\mathbf{H}\) and gives more reliable estimation for the received signal \(\mathbf{y}\) at the receiver. In order to perform K-Best detection, the decoder finds the \(\mathbf{T}\) matrix from \(\mathbf{H}\) by performing LLL algorithm [15]. Then, the orthogonal \(\widetilde{\mathbf{H}}\) matrix is obtained by \(\widetilde{\mathbf{H}}=\mathbf{H}\mathbf{T}\). Then, similarly to the conventional K-Best detector, QR decomposition is performed for \(\widetilde{\mathbf{H}}\) so that \(\widetilde{\mathbf{H}}=\widetilde{\mathbf{Q}}\widetilde{\mathbf{R}}\), where \(\widetilde{\mathbf{R}}\) is an upper triangular matrix and \(\widetilde{\mathbf{Q}}\) is a unitary matrix. The size of both \(\widetilde{\mathbf{Q}}\) and \(\widetilde{\mathbf{R}}\) is \(2\mathrm{N_{r}}\times 2\mathrm{N_{t}}\), which is due to taking the real model into consideration. After QR decomposition, we can rewrite \(\mathbf{y}=\widetilde{\mathbf{H}}\,\mathbf{z}+\mathbf{n}\) as \(\mathbf{y}=\widetilde{\mathbf{Q}}\widetilde{\mathbf{R}}\,\mathbf{z}+\mathbf{n}\). Then, the ML process in Equation (1) is reshaped to represent the detected \(\hat{\mathbf{z}}\) as:  
\[\hat{\mathbf{z}}=\underset{\mathbf{z}\in\mathbb{Z}^{\mathrm{2N_{t}}}}{\arg \min}\,||\,\tilde{\mathbf{y}}-\widetilde{\mathbf{R}}\mathbf{z}\,||\,^{2} \tag{4}\]  
where \(\mathbf{z}\) is computed as: \(\mathbf{z}=(\mathbf{T}^{-1}\,\mathbf{x})\). \(\tilde{\mathbf{y}}\) is a shifted and scaled version of \(\mathbf{y}\) and it is computed as follows:  
\[\tilde{\mathbf{y}}=\widetilde{\mathbf{Q}}^{\mathbf{H}}\,\tilde{\mathbf{y}} \tag{5}\]  
\[\tilde{\mathbf{y}}=\frac{\left(\mathbf{y}-\mathbf{H}\,\mathbf{1}_{2\mathbf{N_ {t}}\times 1}\right)}{2} \tag{6}\]  
Afterwards, from Equation (4) the detector requires performing a tree search to detect \(\mathbf{z}\) and then recovers the original symbols by multiplying with \(\mathbf{T}\) after rescaling and re-shifting \(\hat{\mathbf{z}}\) as \(\hat{\mathbf{x}}=2\mathbf{T}\,(\hat{\mathbf{z}})+\mathbf{1}_{2\mathbf{N_{t}} \times 1}\), which can be expressed as [17]:  
\[\hat{\mathbf{x}}=2\mathbf{T}\,\underset{\mathbf{z}\in\mathbb{Z}^{\mathrm{2N_{ t}}}}{\arg\min}\,||\,\tilde{\mathbf{y}}-\widetilde{\mathbf{R}}\mathbf{z}\,||\,^{2}+1_{2 \mathrm{N_{t}}\times 1}, \tag{7}\]  
where \(1_{2\mathrm{N_{t}}\times 1}\) is a matrix of size \((2\mathrm{N_{t}}\times 1)\) with all entries one.