## 2 Materials and Methods
### Deep Neural Network-Based Channel Estimation and Signal Detection
#### 2.5.3 Model Training  
The OFDM modulation and the wireless channel are viewed as black boxes when training the models. The channel can be Rayleigh fading or the realistic channels. With these channel models, the training data can be obtained by simulation. When the transmitted symbols and the corresponding OFDM frame are formed with a sequence of pilot symbols, a random data sequence is generated in each simulation. The channel models are used to simulate the current random channel. The received OFDM signal is gained based on the  
Figure 3: The architecture of the OFDM system with deep learning-based channel estimation and signal detection.  
OFDM frames experiencing the present channel distortion, including the channel noise. The training data comprise the received signal and the original transmitted data. The received data of the pilot block and one data block are the input of the deep learning model. To minimize the difference between the output of the neural network and the transmitted data is the main goal when training the model. The L2 loss function is expressed as [10]  
\[L_{2}=\frac{1}{N}\sum_{k}\bigg{(}\hat{S}(k)-S(k)\bigg{)}^{2}, \tag{19}\]  
where \(\hat{S}(k)\) represents the estimated data and \(S(k)\) represents the original data, which is also the transmitted symbol in this case.  
The DNN model consists of five layers, three of which are hidden layers. The numbers of neurons in each layer are 256, 500, 250, 120, and 16, respectively. Among them, the input number corresponds to the number of real parts and imaginary parts of 2 OFDM blocks that contain the pilots and transmitted symbols. This input number can be changed based on the number of OFDM blocks that we want to train and the number of subcarriers. Here, assuming that the number of subcarriers is 64, the input number is twice the multiplication of OFDM blocks and the number of subcarriers dimension, which results in 256. Every 16 bits of the transmitted data are clustered and predicted based on a single model trained independently, which is then concatenated for the final output. The ReLu function is used as the activation function in most layers, but the Sigmoid function is applied in the last layer to map the output to the interval [0, 1] [10].  
The LSTM architecture consists of five layers. The first one is the sequence input layer consisting of sequence data, 256. The input number corresponds to the multiplication of the number of 2 OFDM blocks that contain the pilots and transmitted symbols and the number of subcarriers, which is assumed to be 64. This input number can be changed based on the number of OFDM blocks that we want to train and the number of subcarriers. Next, the LSTM layer comprises 16 hidden units. Then, fully connected layers and a Softmax layer are followed. Every 16 bits of the transmitted data are clustered and classified based on a single model trained independently, which is then collected for the final output. Finally, the output is the classification layer. The Sigmoid function is applied in the last layer to map the output to the interval [0, 1] [11].