## 4 NN-Based Joint Equalization and Detection
This consistency of flat fading is more conducive to the symbol detection [44]. According to the discussion above, there is a \(W_{b}\) in the range \((0,W_{\text{c}}]\), which decides the optimal \(N_{\text{c}}\), yielding  
\[W_{b}=N_{\text{c}}\Delta f, \tag{15}\]  
where \(\Delta f\) is the frequency interval of two contiguous subcarriers. The NN with input length \(N_{\text{c}}\) deals with blocks that all suffer from flat fading. Therefore, although the accurate \(W_{\text{c}}\) is difficult to find, its estimate can be an upper bound for finding the optimal input dimension for the network. Consequently, the input block size \(N_{\text{c}}\) can be quickly found by going through the coherence bandwidth of the estimated channel. Algorithm 1 shows the steps to find \(N_{\text{c}}\). \(N_{w_{\text{c}}}\) represents the number of subcarriers contained in the range of the empirical coherence bandwidth. The threshold \(C_{Th}\) is used to filter the paths with low power which does not affect the performance of the system. \(\text{I}_{\text{Th}}\) contains the indexes of the recognizable paths. BER\((\ \cdot\ )\) represents the process to calculate the BER. Because there is only one optimal  
Figure 5: Time and frequency response of a simple and a complex channel: (**a**) is the response of the channel, which contains the main path and one reflected path. (**b**) is the response of a complex channel, which includes many other paths besides the paths in (**a**). for each \(W_{\rm c}\) that varies slowly in a short duration in fixed locations, steps 7 to 13 can be conducted independently with offline training. After \(N_{\rm c}\) is decided, the input matrix is the combination of the symbol block and channel block. To input these complex symbols and channels to the real-value NN, the real and imaginary parts of the symbol and channel blocks are extracted and rearranged, which can be written as  
\[\mathbf{X}=\left[ \begin{array}{cccc}\mathrm{Re}\{R_{\rm b}^{1}(1)\}&\mathrm{ Im}\{R_{\rm b}^{1}(1)\}...&\mathrm{Re}\{R_{\rm b}^{1}(N_{\rm c})\}&\mathrm{ Im}\{R_{\rm b}^{1}(N_{\rm c})\}\\ &\vdots&&\vdots\\ \mathrm{Re}\{R_{\rm b}^{B}(1)\}&\mathrm{Im}\{R_{\rm b}^{B}(1)\}...&\mathrm{Re }\{R_{\rm b}^{B}(N_{\rm c})\}&\mathrm{Im}\{R_{\rm b}^{B}(N_{\rm c})\}\\ &\mathrm{Re}\{H_{\rm b}^{1}(1)\}&\mathrm{Im}\{H_{\rm b}^{1}(1)\}...&\mathrm{ Re}\{H_{\rm b}^{1}(N_{\rm c})\}&\mathrm{Im}\{H_{\rm b}^{1}(N_{\rm c})\}\\ &\vdots&&\vdots\\ \mathrm{Re}\{H_{\rm b}^{B}(1)\}&\mathrm{Im}\{H_{\rm b}^{B}(1)\}&...&\mathrm{ Re}\{H_{\rm b}^{B}(N_{\rm c})\}&\mathrm{Im}\{H_{\rm b}^{B}(N_{\rm c})\}\\ &=\left[\begin{array}{cc}\mathbf{R}_{\rm b}^{\rm ri}(i)&\hat{\mathbf{R}}_{ \rm b}^{\rm ri}(i)\end{array}\right]&\end{array} , \tag{16}\]  
where \(R_{\rm b}^{k}(n)\) and \(H_{\rm b}^{k}(n)\) are the \(n\)-th received symbol block and estimated channel block of \(k\)-th training batch. \(B\) is the batch size. Since \(H(n)\) is input directly, the network does not need to learn the changing channel characteristics [25]. Instead, a generative analytical process can be learned to be adaptive to any kind of channel. **Network configurations:** As Figure 4 shows, the single-layered network proposed in this paper contains a fully connected layer with \(N_{\rm L}\) neurons. To detect a symbol block, the input firstly multiples a weight vector \(\mathbf{W}_{\rm L}\), then adds bias vectors \(\mathbf{B}_{\rm L}\), yielding  
\[\mathbf{Y}_{\rm m}=g(\mathbf{X}^{\rm H}\mathbf{W}_{\rm L}+\mathbf{B}_{\rm L}), \tag{17}\]