Automatic Detection of Modulation Scheme using Convolutional Neural Networks

This paper summarizes the intelligent detection of modulation scheme in an incoming signal, build on convolutional neural network (CNN). It de-scribes the creation of training dataset, realization of CNN, testing and validation. The raw modulated signals are converted into 2D and put on to the network for training. The resulting prototype is adopted for detection. The results signify that the intended approach gives better prediction for the iden-tiﬁcation of modulated signal without need for any selective feature extraction. The system performance on noise is also evaluated and modelled.

intruder detection, intelligent transceiver etc. Automatic modulation classification (AMC) of the signal which is received is inevitable in such applications where it is considered to be an interim step between detector and demodulator. The operation of AMC relies on taking certain features from the signal received and then processing for classification. The main challenge behind it is that the received signal is affected by various noises in the channel. Several decades of research on AMC gives rise to many algorithms and all of these comes under the category of Likelyhood approach(LB) [2] [3] and Feature Based(FB) [4] [5] methods. The Likelyhood based approach utilizes the idea of computing the Likelyhood function of the modulated signal received and make the classification decision based on Maximum Likelyhood ratio test. The LB based algorithms are broadly classified to two classes : Average Likelihood Ratio Test (ALRT)-based and Hybrid Likelihood Ratio Test (HLRT)-based [6]. The differences that we can observe on the above two classes are the various techniques employed for calculating the Likelyhood functions and it in turn depends on how the data as well as the parameters which are not known to us such as channel information and noise variance are taken. In ALRT method data and the channel parameters are treated as random with known probability density function [7][8] [9] [10]. The limitation of this approach is that it's difficult to get prior information about the probability density function of channel parameters. On the other hand HLRT algorithms are more convenient as they consider only data as random and channel parameters as unknown [11] [12]. But both the LB methods face an issue of computational complexity which becomes a major drawback from implementation view point. The lower complexity in computation and better performance are the main attraction of feature based approach and this inputs the time domain,frequency domain and statistical features [13] [14][15] into a nonlinear or linear classifier. The variations in carrier phase, frequency deviation, signal variance, noise variance, signal timing in the received signal are considered to be the features in time domain [16] [17]. However they are only applicable to low level modulation schemes. Frequency domain mode figure out the energy distribution of signal as a feature, eradicated by way of DFT [18] . Nevertheless these analysis are inappropriate to educe statistical features from signals propagated through a channel which can be modelled by a non gaussian distribution. Aforementioned methods selects the features manually thereby it is not feasible to grab the finest signal aspects that spans over various dimensions. Taken in to account these factors, deep learning (DL) methods, which can naturally extract features have been chosen. In DL, network are trained with more samples, that helps to build a framework with appropriate weight updation where it can make precise judgement for predicting the output. The accuracy in classification of deep learning methods has proven dominant to other machine learning classifiers especially when the signal-tonoise ratio (SNR) is less. Establishing automatic intelligence for SDR, based on DL and evaluating performance of modulation classification under various SNR is the methodology of study here.

Methodology
The classification algorithm for modulation here relies on convolutional neural network (CNN) models. CNN models are data centric and their training needs large data sets. Preliminary step involves the synthetic data creation of six digital modulated signals. Then a network is built. The data is then used to train CNN. The resulting model is saved and used to predict the external test modulation data. The validation of the model is then carried off using these results.

Experiment
The various steps in the methodology are implemented using Python. The steps are 1. Synthetic data generation 2. Development of CNN classifier

Data Generation
The training, test and cross validation data are generated by the following procedure. Random 10000 bits were generated and applied to digital modulators (BPSK, QPSK, BFSK, BASK and QAM). The selection of modulation is also randomized by a random event generator. Gaussian noise of random variance in the range [−30, 10] db are added to the modulated signal to reproduce the channel noise. Each digitally modulated signal is then rendered into 50 × 200 two dimensional arrays and pickled to form the data set of 150, 000 samples. The set which is used for training and testing are created by taking 80 % and 20 % respectively of the total data set. The cross validation data set is selected from the whole data, ensuring that each modulation type has a representation in it.

Signal Model The general form of the signal embrace all modulation schemes being dealt with [28][29] is given by
where f c is the carrier frequency, θ is the phase at the receiver where f d represents the frequency deviation for the FSK modulation type. The received signal in AWGN channel [30] is given by: y[k] denotes the modulated signal and n[k] the additive white guassian noise. Since AWGN affects the modulated signal, it is imperative to understand its effect on the accuracy of classification.

Development of CNN classifier
A classical model for CNN [31] follows a multilayer architecture comprises of convolution layer, max pooling layer and added fully-connected layer. CNN layer takes inputs as component maps acquired from the past layer and make 2D convolution operations between those inputs and a pool of filters. Then it stacks the extracted features and transferred to the succeeding layer. The sparse connectivity convolution layer let us to input the data that owns larger dimensionality correlated to other neural networks. Subsequent layer is a max pooling layer, which progressively reduces the spatial dimension by decreasing the total parameters and computation [32] [33]. This layer plays an important role in reducing the overfitting of data. End layer is a fully-connected layer that works as a classifier in the entire CNN model. In this paper, modulation schemes employed by the signal received are classified through this end layer.
The custom CNN network created comprises of following layers The features are generated in CNN by taking weighted average of the convolution inputs and the learned weights, the result obtained is then passed through activation function [34]. The expression for this process is The activation function used in this research work is rectified linear units(RELU) [35] at every layer except the last layer.
In the last layer we used a Softmax activation function [36] that maps multiple neurons outputs into the interval (0,1). The mapping of output can be viewed as the probability that it belongs to a particular class. The operation of Softmax function can be modelled as where x is set of input values, x i represent i th element in the set of input values,k is the total number of input values To reduce the overfitting of data we used l2 regularization technique [37] in each convolution layer that makes slight variation in the learning algorithm thereby increasing the test accuracy to a great extent. The classifier is trained in Keras as Tensorflow backend. The optimizer and loss function used are ADAM optimizer and Categorical Loss Entropy function. The loss function helps to understand how the learned weights are performed on training sets and the ADAM optimizer in the network computes the adaptive learning rate for each parameter so that it improves the entire learning process

Training and Cross Validation
A data set of size 150, 000 is pickled and put on to train the CNN model developed with the help of Keras and Tensorflow modules. The hardware used is an HPCC with 2XIntel Xeon E5-2640 and NVIDIA Tesla k20M GPU. A cross-validation that contains samples of all possible modulations is pickled and used. 20 % of the training data are used as test data set. The trained model is saved as an HDF5 file. This saved model is employed to detect the modulation of external signals. The results of these tests are given below.

Results
To exemplify the performance of the CNN model created ,we trained the model using 150, 000 signals modulated by various schemes (BPSK, QPSK, QAM, FSK, FSK 4, BASK). All these samples possess same dimension( 50 × 200) and various SNR which lies in the interval [−30, 10] db. Fig. 4 shows the outcome of this samples during training as well as in validation, the obtained accuracy during this is nearly same that is around 88 % . The efficiency of classifier lies in its generalization ability on unseen data. For this we had transferred a test samples of around 30000 to the network. The results shows that we got a classification accuracy of 87.39 % which is close to our validation accuracy. The outcome clearly dictates that our network doesn't overfit the data. To explain the detailed classification accuracy of each modulation we had plotted the confusion matrix. The vertical column of the matrix shows the actual label of the testing signal whereas the horizontal row shows the predicted label gotten from the trained neural network. The data on the diagonal represents the accuracy of classification. Fig. 5 shows that the incorrectly labelled data are more while classifying BPSK and QPSK signals.
The detection of modulation is tested for noise robustness adding controlled amount of AWGN in the channel and the number of detection errors are computed for each SNR value. The probability of error is computed and plotted against SNR as shown in Fig. 6. The curve is similar to the probability of error in all digital modulation scheme. The probability of error (p e ) fits well with the model This model fits best with the experimental model for K 1 = 0.85, K 2 = 12.6 and M = 11.

Conclusion
This paper exhibits automatic modulation detection schemes bottomed on an intelligent network. The methodologies and techniques in image recognition using CNN models is adopted here in this study. One dimensional modulated signals are rendered in two dimensions and are used for training the CNN model. The outcome shows that CNN model performance developed is comparable with classical design approaches. It is observed that the suggested CNN based approach not only avoids the tedious task of identifying best features but also achieves challenging performance on modulation classification irrespective of the added noise level. The detection errors are models with complementary error function. Although the current CNN based approach not necessorily surpass existing works, there is still scope for improvement. Additionally, since the neural networks has pronounced influence on classification performance, it is better to focus on progressive DL models for modulation classification in the future.

Conflict of interest
Have no conflict of interest.