# Two-Step Multiuser Equalization for Hybrid mmWave Massive MIMO GFDM Systems
## 4 Receiver Design
### Hybrid Analog-Digital Equalizer
#### 4.3.2 Analog Part of the Hybrid Equalizer  
For the analog part, the hybrid MU linear equalizer is optimized by minimizing the mean square error between the hybrid approach and the full digital counterpart. In the analog equalizer, the MU interference is not considered, and only the power of desired users is maximized, that is, an MRC-based approach is implemented in the analog part, as we can see in the optimization problem in Equation (27). For that, we consider a sequential procedure wherein we select one equalizer vector at a time, up to a total of \(N_{rx}^{RF}\) selected vectors. Let \(\mathbf{w}_{a,r}\in\mathbb{C}^{N_{rx}}\) be the equalizer vector of the \(p\)th RF chain, such that \(\mathbf{W}_{a,p}=[\mathbf{w}_{a,1},\ldots,\mathbf{w}_{a,p}]\in\mathbb{C}^{N_{rx }\times p}\), and define \(\mathbf{W}_{ad,l,p}=\mathbf{W}_{d,l,p}\mathbf{W}_{a,p}^{H}\), with \(\mathbf{W}_{d,l,p}=[\mathbf{w}_{d,1},\ldots,\mathbf{w}_{d,l,p}]\in\mathbb{C}^ {\mathbb{L}\times p}\).  
Where \(\mathbf{w}_{d,l,p}\in\mathbb{C}^{U}\). Because \(\mathbf{W}_{d,l,p}=[\mathbf{W}_{d,l,p-1},\mathbf{w}_{d,l,p}]\) and \(\mathbf{W}_{a,p}=[\mathbf{W}_{a,p-1},\mathbf{w}_{a,p}]\), the hybrid equalizer at the \(p\)th step is given by  
\[\mathbf{W}_{ad,l,p}=\mathbf{W}_{ad,l,p-1}+\mathbf{w}_{d,l,p}\mathbf{w}_{a,p}^{ H},\ p=1,\ldots,N_{rx}^{RF}. \tag{28}\]  
From Equation (A1), \(\mathbf{W}_{res,l,p}=\mathbf{\Omega}_{d}\overline{\mathbf{W}}_{d,l,p}\mathbf{ W}_{a,p}^{H}\mathbb{E}[\mathbf{y}_{1}\mathbf{y}_{1}^{H}]-\mathbf{\Omega}_{d} \mathbf{H}_{l}^{H}\), and replacing Equation (28) in objective function of Equation (27), the optimization problem simplifies to  
\[\begin{array}{ll}\mathbf{w}_{a,p}=&\text{arg min}\sum\limits_{l=0}^{NM-1} \left\|\mathbf{w}_{d,l,p}\mathbf{w}_{a,p}^{H}-\mathbf{W}_{res,l,p-1}\right\|_ {F}^{2}\\ &\text{s.t.}\ \mathbf{w}_{a,p}\in\mathcal{F}_{a,p}\,\end{array} \tag{29}\]  
where \(\mathcal{F}_{a,p}\) denotes the set of feasible analog vectors for step \(p\). From the Karush-Kuhn-Tucker (KKT) conditions, we can obtain the vector \(\mathbf{w}_{d,l,p^{\prime}}\) and replacing it in the objective function of Equation (29), we obtain  
\[\sum\limits_{l=0}^{NM-1}\left\{\underbrace{\mathbf{W}_{res,l,p-1}\big{(} \mathbf{W}_{res,l,p-1}\big{)}^{H}}_{\text{Independent of the }\mathbf{w}_{a,p}}-\underbrace{\mathbf{W}_{res,l,p-1}\mathbf{w}_{a,p}\big{(} \mathbf{w}_{a,p}\big{)}^{H}\big{(}\mathbf{W}_{res,l,p-1}\big{)}^{H}}_{\text{ Correlation that involves }\mathbf{w}_{a,p}}\right\}. \tag{30}\]  
In Equation (30) we can identify two terms: the first one where we can see that is independent of \(\mathbf{w}_{a,p}\); and the second one is a correlation involving \(\mathbf{w}_{a,p}\). Then, Equation (29) is equivalent to the maximization of the second term. Considering a dictionary-based approach, where \(\mathbf{w}_{a,p}\) is selected from a dictionary given by  
\[\mathbf{A}_{rx}=[\mathbf{A}_{rx,1},\ldots,\mathbf{A}_{rx,U}]\in\mathbb{C}^{N _{rx}\times N_{el}N_{ny}U}, \tag{31}\]  
where  
\[\mathbf{A}_{rx,u}=\bigg{[}\mathbf{a}_{rx,u}\Big{(}\phi_{1}^{u}-\phi_{1,1}^{u }\Big{)},\ldots,\mathbf{a}_{rx,u}\Big{(}\phi_{N_{el}}^{u}-\phi_{N_{el},N_{ny} }^{u}\Big{)}\bigg{]}, \tag{32}\]  
The optimization problem Equation (29) simplifies to  
\[n_{opt,p}=\text{argmax}_{r=1,\ldots,N_{el}N_{ny}U}\sum\limits_{l=0}^{NM-1} \bigg{[}\mathbf{A}_{rx}^{H}\mathbf{W}_{res,l,p-1}^{H}\mathbf{W}_{res,l,p-1} \mathbf{A}_{rx}\bigg{]}_{r,r}, \tag{33}\]  
where \(\mathbf{w}_{a,p}=\mathbf{A}_{rx}^{(n_{opt,p})}\).  
The proposed algorithm is summarized in the Algorithm 1. First, we initialized the analog and residue matrices, and then there is a loop where, in each iteration, we select a vector until the total of \(N_{rx}^{RF}\). In the loop, the vector is first selected considering the criteria of line 4, which we add to our set of selected vectors in line 5. After that, computing a temporary digital matrix and a normalization constant in line 6 and 7, respectively. Finally, in line 8, we update the residue matrix.