# Clipping Noise Compensation with Neural Networks in OFDM Systems
## 2 Clipping Noise Compensation
Since the effect of clipping noise is spread over all subcarriers, a four-layer fully connected NN that exchanges information among all subcarriers is considered. The hyperbolic tangent (Tanh) is chosen as the activation function for its zero-centered property. The number of nodes is selected by trial and error to be three times the size of the input data. For example, there are 384 nodes in the hidden layer for an input data vector of 128 entries. MSE is used as the training criterion because the task can be viewed as a regression problem, and the ADAM optimizer [24] is applied with predefined learning rates (the initial value is 0.00006) for updating the weights. The depth of the NN is also determined by trials. In the end, four layers are used to present the BER performance. However, to present the interpretation of the weight matrices, a three-layer NN is used for a simpler presentation, though its BER performance is typically 0.1 dB worse than that of a four-layer NN. The data are generated and split into training and testing sets. The input data are normalized to unit variance and the Xavier initialization scheme [25] is deployed to improve the convergence. Tensorflow [26] is used for the training sessions, but since it does not support complex number operations, the complex-valued OFDM symbols are split into real parts and imaginary parts. The equalized OFDM symbol on the \(k\)-th subcarrier \(Z_{k}\) is represented as  
\[\overline{Z}_{2k}=\text{Re}(Z_{k});\,\overline{Z}_{2k+1}=\text{Im}(Z_{k}). \tag{5}\]  
The environment settings for the data generation are as follows: OFDM symbols with \(N=64\) subcarriers and a 16-tap cyclic prefix are used, and the modulation is 16 QAM since the clipping effect on four QAM is not prominent. To demonstrate that the proposed scheme is indeed insensitive to channel conditions, the training and testing data sets are generated with different channels. A six-tap Rayleigh fading channel (the channel length is less than the length of cyclic prefix \(L=16\)) with an exponential power delay profile (PDP) is used for training the data, while an AWGN channel and a six-tap Rayleigh fading channel with uniform PDP are used for testing data. Finally, clipping ratios range from 1.0 (severe) to 1.3 dB (mild). The hyperparameters of the NN model are as follows. The training set has 1.2 million data records, and four hundred thousand more are used for testing. The number of nodes in one hidden layer is 384. Approximately 1000 epochs, which denote the number of iterations to train through the entire dataset, are needed for the model to converge. The batch size, the number of data records used for training in one iteration, is 512. The reconstructed signal by the NN, denoted as \(\left[X_{r,0},\,\cdots,\,X_{r,k},\cdots,X_{r,N-1}\right]^{T}\), is in the frequency domain. It can be directly passed on for QAM demodulation, or it can be refined further by a post-processing procedure inspired by the DAR algorithm [17]. The reconstructed signal is transformed and inspected in the time domain and two observations are made. First, the reconstruction can be improved further by cleaning up the frequency domain signal. This can be done by making a decision on \(X_{r,k}\) before transforming it into the time domain [17]. That is, a better version of the time domain reconstructed signal, call it \(x_{r}[n]\), can be obtained by  
\[x_{r}[n]=\frac{1}{\sqrt{N}}\sum_{k=0}^{N-1}\text{D}[X_{r,k}|e^{j2\pi mk/N}, \quad 0\leq n\leq N-1. \tag{6}\]  
where D\(\{\cdot\}\) means making a decision to the nearest QAM constellation point. The second observation is that the clipped part of the original \(x[n]\) is reconstructed by \(x_{r}[n]\) with great success. However, for the unclipped part, \(x_{r}[n]\) can sometimes be distorted much away from \(x[n]\). To cope with this issue, \(x_{r}[n]\) is compared to the clipping threshold to establish the estimated range of the unclipped part.