# Hybrid Precoding Design for Wireless Fading Channels
## 3 Proposed Hybrid Precoding
### Non-Linear OSLP Design
 \tag{25}\]  
By substituting \(\beta_{2}=\sqrt{\frac{P_{2}}{||\mathbf{x}_{2}||^{2}}}=\sqrt{\frac{P_{2}}{|| \mathbf{V}_{12}\mathbf{f}_{2}||^{2}}}=\sqrt{\frac{P_{2}}{||\mathbf{f}_{2}||^ {2}}}\) in this equation and using the relationship \(\mathbf{V}_{12}^{H}\mathbf{V}_{12}=\mathbf{I}_{K}\), the following equation can be obtained:  
\[J_{2}=\|\mathbf{A}_{2}\mathbf{H}_{2}\mathbf{V}_{12}\mathbf{f}_{2}-\overset{ \star}{\mathbf{s}}_{2}\|^{2}+\frac{\sigma_{2}^{2}}{P_{2}}\text{tr}\Big{(} \mathbf{A}_{2}\mathbf{A}_{2}^{H}\Big{)}\mathbf{f}_{2}^{H}\mathbf{f}_{2}. \tag{26}\]  
To simplify the equation, if we define \(\mathbf{B}\triangleq\mathbf{A}_{2}\mathbf{H}_{2}\mathbf{V}_{12}\) and \(\gamma\ =\ \text{tr}\Big{(}\mathbf{A}_{2}\mathbf{A}_{2}^{H}\Big{)}\), \(J_{2}\) can be expressed as follows:  
\[J_{2}=\|\mathbf{B}\mathbf{f}_{2}-\overset{\star}{\mathbf{s}}_{2}\|^{2}+\frac {\sigma_{2}^{2}}{P_{2}}\gamma\ \mathbf{f}_{2}^{H}\mathbf{f}_{2}. \tag{27}\]Now, if we design the precoding vector, \(\mathbf{f}_{2}\), and the CIR weight vector, \(\mathbf{\theta}\), to minimize \(J_{2}\), the optimization problem can be expressed as follows:  
\[\min_{\mathbf{f}_{2},\ \mathbf{\theta}}\ \ \ \left\|\mathbf{B}\mathbf{f}_{2}- \widetilde{\mathbf{s}}_{2}\right\|^{2}+\frac{\sigma_{z}^{2}}{P_{2}}\gamma\ \mathbf{f}_{2}^{H}\mathbf{f}_{2}. \tag{28}\]  
To find a solution to this optimization problem, we first design \(\mathbf{f}_{2}\) so that the differentiation of \(J_{2}\) by \(\mathbf{f}_{2}^{\ast}\) is \(\mathbf{0}\):  
\[\frac{\partial}{\partial\ \mathbf{f}_{2}^{\ast}}J_{2}=\mathbf{B}^{H}\mathbf{B} \mathbf{f}_{2}-\mathbf{B}^{H}(\mathbf{s}_{2}+\mathbf{R}\mathbf{\theta})+\frac {\sigma_{z}^{2}\gamma}{P_{2}}\mathbf{f}_{2}=\mathbf{0}. \tag{29}\]  
The solution to this equation can be obtained as follows:  
\[\mathbf{f}_{2,\text{opt}}=\left(\mathbf{B}^{H}\mathbf{B}+\frac{\sigma_{z}^{2 }\gamma}{P_{2}}\mathbf{I}_{K\times K}\right)^{-1}\mathbf{B}^{H}(\mathbf{s}_{ 2}+\mathbf{R}\mathbf{\theta}). \tag{30}\]  
Meanwhile, using only the parts related to \(\mathbf{\theta}\) in \(J_{2}\), another optimization problem to find the optimal solution for \(\mathbf{\theta}\) can be expressed as follows:  
\[\min_{\mathbf{\theta}\ \geq\ 0}\ \ ||\mathbf{B}\ \mathbf{f}_{2}-(\mathbf{s}_{2}+ \mathbf{R}\mathbf{\theta})||^{2}. \tag{31}\]  
After substituting \(\mathbf{f}_{2,\text{opt}}\) into this equation and then manipulating the equation, it can be written as follows:  
\[\min_{\mathbf{\theta}}\ \ \|\left\{\mathbf{B}(\mathbf{B}^{H}\mathbf{B}+\frac{ \sigma_{z}^{2}\gamma}{P_{2}}\mathbf{I}_{K\times K})^{-1}\mathbf{B}^{H}- \mathbf{I}_{J\times J}\right\}(\mathbf{s}_{2}+\mathbf{R}\mathbf{\theta})\|^{ 2}. \tag{32}\]  
In this equation, if we define \(\mathbf{C}\equiv\mathbf{B}(\mathbf{B}^{H}\mathbf{B}+\frac{\sigma_{z}^{2} \gamma}{P_{2}}\mathbf{I}_{K})^{-1}\mathbf{B}^{H}-\mathbf{I}_{J}\) and \(\mathbf{d}\equiv-\mathbf{C}\mathbf{s}_{2}\), Equation (32) can be simply expressed as follows:  
\[\min_{\mathbf{\theta}\ \geq\ 0}\ \ \|\ \mathbf{CR}\mathbf{\theta}-\mathbf{d}\ \|^{ 2}. \tag{33}\]  
Since this problem is a non-negative least-squares problem, \(\mathbf{\theta}\) can be easily obtained using the optimization function _lsqnonneg_ in the MATLAB 2019 program.