# Machine Learning-Based 5G-and-Beyond Channel Estimation for MIMO-OFDM Communication Systems
## 3 Deep Learning-Based Channel Estimation
### Convolutional Neural Network-Based Channel Estimation  
CNN models have been proposed for image denoising algorithms and have been well studied by the image processing community. CNN models can be applied to learn the mapping from noisy images to clean images [39; 40], therefore mitigating noise in the images. In addition, due to the sharing of weights and biases, a CNN can reduce the number of parameters, which reduces the complexity of the system. Based on these ideas, we can use CNN to learn the mapping from noisy channels obtained by an LS estimator to the true channels. The structure of the proposed CNN-aided estimation is shown in Figure 6. As depicted in the figure, the proposed CNN consists of a 2D input layer, convolution layers, activation layers, and a linear layer. The 2D input layer takes the LS-estimated channel as an input, which is separated into the real part and image part and reshaped to a 2D matrix form. The channel matrix is then fed to the convolution layers. We denote by \(\mathcal{L}\) the set of convolution layers for CNN. Each convolution layer \(l\in\mathcal{L}\) includes \(c_{l}\) convolution kernels of size \(k_{l}\times k_{l}\) that are convolved with the layer input \(\mathbf{I}_{l}\in\mathbb{R}^{d_{l-1}\times a_{l-1}^{2}\times c_{l-1}}\), where \(a_{l-1}^{1}\) and \(a_{l-1}^{2}\) are the size of the \((l-1)\)-th convolution layer. The output of the \(l\)-th convolution layer \(\mathbf{O}_{l}\in\mathbb{R}^{a_{l}^{1}}\times a_{l}^{2}\times c_{l}\) is  
\[\mathbf{O}_{l}=\mathsf{Conv}(\mathbf{I}_{l},\mathbf{w}_{l})+\mathbf{b}_{l}, \quad l\in\mathcal{L}, \tag{32}\]  
where \(\mathbf{w}_{l}\in\mathbb{R}^{k_{l}\times k_{l}\times c_{l}}\) and \(\mathbf{b}_{1}\in\mathbb{R}^{a_{l}^{1}\times a_{l}^{2}\times c_{l}}\) are the weights and biases of the convolution kernel for the \(l\)-th convolution layer, respectively, and \(\mathsf{Conv}(\cdot,\cdot)\) is the convolution operator. For the proposed CNN model, after each convolution layer, we apply the well-known rectified linear unit (ReLU) activation layer, which is given as  
\[\mathsf{ReLU}(z)=\max(0,z). \tag{33}\]  
In particular, to train the CNN model, we first reshape the LS-estimated channel from all antennas into the matrix form \(\mathbf{\hat{H}}_{\text{LS}}^{n}\in\mathbb{C}^{N_{T}N_{R}\times N_{FFT}}\), separate it into a real part and image part, and then define a realization of the input for the training process as  
\[\mathcal{M}_{n-\text{CNN}}=\Big{\{}\mathsf{Re}\Big{\{}\left[\mathbf{\hat{H}}_ {\text{LS}}^{n}\right]\Big{\}},\mathsf{Im}\Big{\{}\left[\mathbf{\hat{H}}_{ \text{LS}}^{n}\right]\Big{\}}\Big{\}}. \tag{34}\]  
In a similar manner, the corresponding output of the CNN is formulated as  
\[\mathcal{O}_{n-\text{CNN}}=\Big{\{}\mathsf{Re}\Big{\{}\mathbf{\hat{H}}^{n} \Big{]},\mathsf{Im}\Big{\{}\mathbf{\hat{H}}^{n}\Big{\}}\Big{\}}, \tag{35}\]  
which contains the real and imaginary matrices of the channel estimates. The CNN model is trained to handle the following matrix mapping as  
\[\Big{(}\mathsf{Re}\Big{\{}\mathbf{\hat{H}}_{\text{LS}}^{n}\Big{\}},\mathsf{ Im}\Big{\{}\mathbf{\hat{H}}_{\text{LS}}^{n}\Big{\}}\Big{)}\rightarrow\Big{(} \mathsf{Re}\Big{\{}\mathbf{\hat{H}}^{n}\Big{\}},\mathsf{Im}\Big{\{}\mathbf{ \hat{H}}^{n}\Big{\}}\Big{)}. \tag{36}\]  
The purpose of applying the CNN model is to minimize the mean square error between the estimated and the true channels. Therefore, we use the loss function, which is defined as follows:  
\[\mathcal{L}_{\text{CNN}}(\mathcal{W},\mathcal{B})=\frac{1}{N}\sum_{n=1}^{N} \left\|\mathbf{\hat{H}}^{n}-\mathbf{H}^{n}\right\|_{F}^{2}, \tag{37}\]  
Figure 6: The illustration of the CNN-based channel estimation. where \(N\) is the number of realizations used for training, and \(\mathbf{H}^{n}\) is the actual channel in the matrix shape corresponding to \(\mathbf{H}^{n}\). \(\mathcal{W}\) and \(\mathcal{B}\) include all the weights and biases, respectively. During the training process, the weights and biases of the CNN will be updated by minimizing the loss function (37).