{'fraction_non_alphanumeric': 0.030298273155416014, 'fraction_numerical': 0.008751962323390894, 'mean_word_length': 4.722209746238491, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Real-World Considerations for Deep Learning in Wireless Signal Identification Based on Spectral Correlation Function

This paper proposes a convolutional neural network (CNN) model which utilizes the spectral correlation function (SCF) for wireless radio access technology identification without any prior information about bandwidth and/or the center frequency. The sensing and classification methods are applied to the baseband equivalent signals. Two different approaches are elaborated. The proposed method is implemented in two different settings; in the first setting, signals are jointly sensed and classified. Sensing and classification are conducted in a sequential manner in the second setting. The performance of both approaches is discussed in detail. The proposed method eliminates the threshold estimation processes of classical estimators. It also eliminates the need to know the distinct features of signals beforehand. Over-the-air real-world measurements are used to show the robustness and the validity of the proposed method and various wireless signals are successfully distinguished from each other without any a priori knowledge. The over-the-air real-world measurements are also shared in the format of SCF. The performance of SCF-based identification is compared with the cases when fast Fourier transform and amplitude-phase representation are used as the training inputs for CNN. The comparative performance of the proposed method is quantified by precision, recall, and F1-score metrics. Moreover, a setup to compare the performance of the proposed approach with classical cyclostationary features detection (CFD) is prepared. Measurement results indicate the superiority of the proposed method against CFD, especially at the low signal-to-noise ratio regime.


I. INTRODUCTION
In addition to being an established method for spectrum sensing in cognitive radio domain, cyclostationary feature detection (CFD) is also utilized to distinguish generic modulation techniques such as M-PSK, M-FSK, and M-QAM [1]. When the radio access technology (RAT) identification is considered [2], second order cyclostationarity is employed This manuscript has been submitted for the possible publication in the IEEE Transactions on Cognitive Communications and Networking (TCCN). It is currently under review.
K. Tekbıyık for classification of Long-Term Evolution (LTE) and Global System for Mobile communications (GSM) signals [3]. Later, a tree-based classification approach is proposed to identify GSM, cdma2000, universal mobile telecommunications system (UMTS), and LTE signals [4]. These classical identification techniques depend on extracting the underlying features using likelihood-based techniques and statistical decision mechanisms. Therefore, their decision parameters such as thresholds and the number of required samples need to be adjusted in an adaptive manner under dynamically changing real-life conditions [5].
Recently, deep learning (DL) has been proposed as a solution to the parameter adaptation issues of classical techniques. This stems from the known ability of DL techniques in extracting the intrinsic features of given inputs through a convolutional process. The use of DL based approaches eliminates the need for a statistical decision mechanism at the end of the identification process. Along this line, the recent study shows that DL methods outperform classical approaches in signal detection in the spectrum [6]. Furthermore, convolutional neural networks (CNNs) are trained with high-order statistics of single carrier signals for modulation classification [7].
A CNN classifier is used for modulation and interference identification for industrial scientific medical (ISM) bands by utilizing fast Fourier transform (FFT), amplitude-phase representation (AP) and in-phase/quadrature (I/Q) features for training [8]. Another study [9] focuses on the protocol classification in ISM band by utilizing fully connected neural networks. As another example of the application of DL to signal classification, long short term memory (LSTM) is deployed for modulation classification and identification of digital video broadcast (DVB), Tetra, LTE, GSM, wide-band FM (WFM) signals by using AP and FFT magnitude for training [10]. Recently, DL networks are used to identify the cellular communication signals in Rayleigh fading channels [11]. The classification performance of the proposed model is high, however, it employs synthetic data generated by using Matlab. In the real channels, there are numerous phenomenons, which further complicate the signal characteristics. It is also worth mentioning that research is now available in the literature on how signal classifiers perform when exposed to possible adversarial attacks. For example, in [12], it is shown using different databases that adversarial attacks reduce the performance of the signal classifier.
In our previous study [ to train and test the support vector machine (SVM). In the study, spectral correlation function (SCF) is utilized as feature vector. Even though SVM gives high performance by using SCF of signals, the computation of SCF is complex owing to the bi-frequency mapping in FFT accumulation method (FAM). Therefore, the hardware cost and consumption of time is considerable. In this study, a new CNN method, which is trained utilizing the SCFs of wireless without bi-frequency mapping, is proposed for spectrum sensing and signal identification. Thus, such an approach leads to reduction in terms of complexity when compared to the previous works and can be utilized either to decide whether the signal is present or not or to distinguish GSM, UMTS, and LTE signals from each other. The superiority of SCF as a training feature is shown by comparing its performance against AP and FFT. The performance of the proposed method is also compared with cyclostationary features detection (CFD), which requires the cyclic frequencies as a priori information. The comparison is done based on realworld measurements taken during an extensive measurement campaign conducted at different locations with varying environmental conditions in terms of the channel fading statistics and signal-to-noise ratio (SNR) levels. The dataset composed real-world measurements is also shared in [14] in the format of SCF, which is the main method used in this study. The identification results indicate the superiority of the proposed method over the aforementioned ones. Although the utilization of SCF based CNNs to identify wireless RATs without any a priori information is the main contribution of this paper, the scope of this work can be extended to the identification of any signal, which exhibits cyclostationary features.
The remainder of this paper is structured as follows. Background information on the system model, cyclostationary analysis and CNNs is presented in Section II. The proposed CNN model is given in Section III. The problem statement is discussed in Section IV. The details of the dataset used in this study are drawn in Section V. Section VI presents the classification performance of the proposed method. The concluding remarks are provided in Section VII.

II. BACKGROUND
As all process is carried out in the baseband, firstly we need to define the complex baseband equivalent of the received signal, r(t). When the presence of fading environment with thermal noise, it can be given as where ω(t) denotes the complex additive white Gaussian noise jω Q (t) as both ω I (t) and jω Q (t) being C ∼ N (0, σ 2 N /2) and j = √ −1; the complex baseband equivalent of the transmitted signals is denoted as x(t); and ρ(t) stands for the impulse response for the time-invariant wireless channel because of extremely short observation time for a signal.
Depending on the idle or busy state of the mobile propagation channel of radio frequency (RF) spectrum with the presence of the transmitted signal, the signal detection by utilizing deep learning methods can be shown as a binary hypothesis test H 0 and H 1 are the hypotheses respect to presence of noise only and the unknown signal, respectively. Therefore, the problem statement can be stated as identification of the presence of the unknown signal x(t) and ω(t) and classify the unknown transmitted signal.

A. Cyclostationarity
Cyclostationary signal processing leads to extracting hidden periodicities in a received signal, r(t). Since these periodicities (e.g., symbol periods, spreading codes, and guard intervals) exhibit unique characteristics for different signals, they provide the necessary information for identification. Thus, the unknown signals x(t) can be identified by using cyclostationary features to obtain the statistical characteristics of r(t) in the presence of ω(t) and multipath fading without a priori information. A nonlinear transformation, second-order cyclostationarity of a signal can be expressed as where s τ (t) is the autocorrelation of r(t). Assuming that the autocorrelation function is periodic with T 0 for second-order cyclostationary signals, a Fourier series expansion of s τ (t) is where R α r (τ ) is the cyclic autocorrelation function (CAF) and α values are the cyclic frequencies.
The Fourier transform of the CAF for a fixed α is given with the cyclic Wiener relation [1] S r (f ) = where S r (f ) is called as SCF which is equal to the power spectral density (PSD) when α is zero.
The computational complexity of calculating SCF is relatively high. However, this complexity can be decreased by using the FAM based on time smoothing via FFT [15]. FAM estimates the SCF as where R T (n, f ) denotes the complex demodulates which is the N -point FFT of r(n) passed through a Hamming window and can be computed by where a(n) and g c (n) are both data tapering windows. The block diagram of FAM is depicted in Fig. 1. The symbols N , T s , and L denotes the channelization length, sampling period, and sample size of hopping blocks, respectively. The ratio between the number of total samples and L is employed as the length of second FFT, whose length is denoted as P . The FAM has six implementation steps. These steps are respectively channelization, windowing, N -point FFT, complex multiplication, P -point FFT and bi-frequency mapping.
The most computationally complex step among them is bifrequency mapping. Therefore, as will be detailed in the later, the bi-frequency mapping is omitted and the matrix before this step is used as a feature. In the study, the unit rectangle and Hamming windows are employed as g c (n) and a(n), respectively. Fig. 2 illusrates SCFs results in bi-frequency plane, which are estimated by FAM algorithm for GSM, UMTS, and LTE. Please note that the bi-frequency mapping step is bypassed to reduce the complexity and time consumption in the FAM algorithm. As a result, the input matrix, X SCF k , to be fed into classifier model is given as In this paper, we use the Keras library in Python for training and running the CNNs. Similar to the other existing machine learning classifiers, this library does not support complexvalued classification. Therefore, the use of the SCF is restricted to its magnitude, as shown in (8).

B. Amplitude-Phase
The amplitude and phase values of time-domain I/Q data can be used to establish a real-valued classification feature matrix, X AP k . This feature matrix is composed of the amplitude and phase vectors of the received signal samples. So, X AP k is defined as 2 and x φ = arctan( rq ri ) denote the amplitude and phase vectors, respectively.

C. Fast Fourier Transform
The characteristics of signals in frequency domain can be employed as discriminating classification features. The FFT of the received signal is used to obtain a real-valued classification feature matrix where F(·) stands for the FFT of the received signals; f re and f im are real and imaginary parts of f , respectively.

D. Convolutional Neural Networks
CNN is a class of deep neural networks which is mainly employed in image classification and recognition. Still, it has been recently extended to several application areas. CNNs have two stages: feature extraction and classification. In feature extraction, a convolutional layer is followed by a pooling layer. In the convolution layer, the feature matrix is convolved with different filters to obtain convolved feature map as follows where w p,l is the element at p-th row and l-th column of the m × n filter matrix, and X k [·, ·] denotes the elements of feature matrix convolved by w p,l . The convolution layer is followed by the pooling layer to reduce computational complexity and training time, and control over-fitting due to the fact that pooling layer makes the activation less sensitive to feature locations [16]. The u × v maximum pooling operation is described as where 1 ≤ a ≤ u and 1 ≤ b ≤ v. The output of the pooling layer is a 3-D tensor. This output is then reshaped into a 1-D vector. This vector is fed to the dense (fully-connected) layers for the final classification decision. The overall block diagram for the proposed CNN model is depicted in Fig. 5. It is customary to quantify the performance of a classifier model in terms of the precision (Π), recall (Ψ), and F 1score performance metrics. The precision metric quantifies how much positive results are actually positive, the recall provides information on how much true positives are identified correctly as positive, and F 1 -score gives an overall measure for the accuracy of a classifier model since it is the harmonic average of precision and recall. These metrics are given as where ξ, υ, and µ denote the numbers of true positive, false positive, and false negative, respectively.

IV. PROBLEM STATEMENT
We consider two cases for the use of proposed CNN model: CASE1: First, a CNN classifier based on the proposed model is trained with four different classes (i.e., spectrum without any signal (AWGN), GSM, UMTS, and LTE). Then for a given frequency band as shown in Fig. 3, cyclic spectrum is constructed depending on the procedures described in Section II-A. The constructed cyclic spectrum is fed to the CNN classifier, which is already trained with four possible inputs. Finally, the classification is made.
CASE2: In this case a two-stage approach is adopted; at the first stage a CNN detector (the same CNN model defined in Section II-D is utilized for both detection and classification for the sake of simplicity) is utilized to decide whether a signal exists in the given band or not by training the CNN by two classed one comprised of GSM, UMTS, and LTE signals and the second AWGN. Thus in the first stage a decision is made about whether a signal exists in the spectrum or not as in the case of classical spectrum sensing. If the decision is made that there is an information bearing signal in the given band, second stage is activated utilizing a CNN classifier, which is trained with three classes (i.e., GSM, UMTS, and LTE) and finally a decision is made for the class of the signal occupying the spectrum.
Please note that the classification refers to identification of the signals, and at the detection part of the approach H 1 and H 0 refers to the existence and non-existence of a signal over the spectrum based on binary hypothesis testing. Both CASE1 and CASE2 are illustrated in Fig. 4.
Firstly, we can define the accuracy for CASE1, P CASE1 as: where χ k denotes the label array of the transmitted signals and k represents the label of the classes AWGN, GSM, UMTS, and LTE, respectively.χ k is array for the predicted classes of the received signals. In a short, P CASE1 stands for the accuracy of four-classes classification problem. For CASE2, it is required to define two independent accuracy functions: the sensing accuracy, P S CASE2 and the classification accuracy, P C CASE2 , which are defined as P S CASE2 = P (χ S = 1|H 1 ) + P (χ S = 0|H 0 ), χ S is the prediction regarding to presence of a signal in the spectrum. χ k is the predictions for the classification part of CASE2. χ S is defined for the transmitted signal as: The overall accuracy for CASE2 can be introduced in terms of P S CASE2 and P C CASE2 by The wireless propagation channels are different as seen in Fig. 7. The received power and phase of the signals are affected by the shadowing, multipath fading and path loss. The figure denotes that the received signals have different power as well as different amplitude levels. Also, the distribution of the received power changes for each recorded signal since the measurements have been taken at different locations and time for various bands. Furthermore, Fig. 8 illustrates the phase distribution of the received signals. It is seen that the phase of received signals are distributed almost uniformly in between −π and π radians. These samples give the impression of Rayleigh-like fading behavior due to amplitude and phase distributions of received signals. This result is expected when considering the measurement area and the locations of transmitters and receivers.
We want to emphasize that the dataset does not include bandwidth and carrier frequency of any signal as a feature. Thus, this dataset allows cognitive radios to perform opportunistically in any region of the spectrum.
The dataset is shared in [14] in the format of SCF, which is the main method used in this study. Since we used 16384 I/Q samples, the data dimension is 8193 × 16 for each signal.

VI. CLASSIFICATION PERFORMANCE ANALYSIS
We evaluate the performance of the proposed classification model as tested over a comprehensive dataset of wireless mobile communications signal. Our dataset is composed of GSM, wideband code division multiple access (WCDMA) for UMTS and LTE signals which are recorded over-theair at the different locations with unique conditions in terms of the number of channel taps, and fading, as noted in Section V. Sample power spectra of these signal types, obtained with the Welch's method, are shown in Fig. 3. Training and test sets contain 9000 and 6000 signals for each waveform. The I/Q signal length is 16384. CNN is trained and tested on a workstation computer with Intel Xeon(R) CPU E5 − 2630v3@2.40GHz × 16 central processing unit (CPU), 64GB RAM and GeForce GTX 1070 graphics processing unit (GPU). The average training time per epoch is approximately 18s for SCF feature where both FFT and AP take 2.3s per epoch; however, both FFT and AP cannot show an acceptable classification performance, P C CASE2 . Firstly, we focus on the results for CASE1. As stated before, CASE1 refers to four-classes classification problem. As shown in Fig. 9, the test accuracy of the model exceeds 90% at 11dB SNR. It takes a maximum accuracy value of 92% at 15dB. The confusion matrices related to CASE1 are depicted in Fig. 10. At low SNR levels, the model mostly recognizes the signals such that there is no signal in the spectrum. This situation is viewed in Fig. 10(a). This phenomena calls an idea to divide the problem into two parts: firstly sense, then classify. In this case, we analyse both CNN detector and CNN classifier (see Fig. 4). For the sensing part of the architecture, noise signals are labeled as 0 and the rest of the set is labeled as 1. The detection results are plotted in Fig. 9. The detection accuracy follows 96% at almost all SNR values.
By assuming the signal is present in the spectrum, it is investigated how the CNN classifier performs in the classification part of CASE2. At this stage, it is observed that the classification accuracy exceeds 90% at 3dB SNR. It gives the best performance, 98.5%, at 9dB and it is remained up to 15dB. It is seen in Fig. 11(a) that even at low SNR regime, the classifier can identify GSM signals with high accuracy; however, the precision is low. Unlike GSM signals, the classifier has difficulty in recognition of UMTS and LTE signals. It is clearly observed in Fig. 11(b) and Fig. 11(c) that both the accuracy and precision of the classifier enhance as the SNR value increases.
As seen in Fig. 9, the CNN-based classifier shows a superior performance compared to SVM-based classifier, which has been proposed in our previous work [13], under the conditions of the classification part of CASE2. The CNN-based classifier both employs less costly feature due to omitting bifrequency mapping and performs with higher accuracy than SVM classifier.
The results for CASE2 were given up to this point in parts. Now, we can examine the overall performance of CASE2. Obviously, there is a loss of performance due to some misdetection in the sensing phase. Both the detection rate in the sensing stage and the accuracy in the classification stage are high at 3dB and thereafter, so overall performance does not suffer a significant loss. As shown in Fig. 9, the overall performance of CASE2 is far superior to that of CASE1. Especially at low SNR levels, the signals remaining after first detecting and separating noise from the signal set by the CNN  detector can be classified with much better performance. In this way, the performance is higher in CASE2. However, it should be noted that CASE2 is more costly than CASE1 in terms of training time and the number of models. Obviously, CASE2 can be predicted to perform much better than CASE1 in the presence of a jammer or interference signal which they show Gaussian characteristics.

A. Investigation of the Impact of Different Features
Furthermore, we compare the performance of features AP and FFT with SCF. The features are used as detailed in Section II. The results of this test are presented in Table II. The average performances also indicate that SCF outperforms FFT and AP for all SNR levels. Assuming that these two are used along with I/Q as the main features for training, these results show significant gains for real-world signals especially above 5dB SNR level. It is observed that AP performs better than FFT. Although the cost of computing both features is far behind the SCF, they are far from delivering the desired performance. In our previous study [13], the analysis based on t-distributed stochastic neighbor embedding (t-SNE) results showed that SCF better separates signal vectors in space. The results of this study are in line with the previous analysis.

B. Comparison with A Classical Method
Besides signal classification, the proposed CNN model can be used for spectrum sensing. We investigated the sensing performance of the model by training a CNN-based spectrum occupancy detector trained over 600 pure noise signals and 600 noisy WCDMA signals for each SNR value. Then, the model is tested with 400 pure noise signals and 400 noisy WCDMA signals for each SNR level and sensing results are acquired. Furthermore, for comparison purposes, we implement a CFAR detector utilizing classical CFD [18] to identify WCDMA signals and the same dataset is also used for CFAR detector. Please note that UMTS signals are deliberately selected due to their known dominant SCF characteristics stemming from cyclic spreading codes. The results of this test are given in Fig. 12. In view of these results, it is clearly seen that the CNN-based detector outperforms the CFAR detector at all SNR regimes. For example, the sensing performance of the CNN-based detector is 91.75% at 3dB while the probability of detection for the CFAR detector are 45.6% and 59.4% for the selected false alarm rates as 0.05 and 0.1, respectively.

C. Comparison with Existing Deep Learning Networks
The existing DL networks are employed to classify the cellular communication signals. We employed convolutional long short term memory fully connected deep neural network (CLDNN) [19] and LSTM [20] models.These models are originally used in modulation classification. Without any change in the models, input matrix, and input vector as proposed in the papers are employed in the study. CLDNN takes a 2 × 128 matrix which composes of amplitude and phase values for each I/Q sample. On the other hand, LSTM model utilizes a vector reshaped version of the matrix used in CLDNN. Therefore, the length of the vector is 256. Its first half includes in-phase components while the rest of the vector is quadrature components. Other details are found in [19,20]. The precision, recall, and F 1 -score are given in Table III. It shows that CLDNN and LSTM decide that the received signal is UMTS whatever it actually is. Even though LSTM and CLDNN can be trained in a short time by using I/Q vector and matrix, using I/Q vector and matrix give poor classification performance.
VII. CONCLUSION In this study, two approaches are introduced to sense and identify cellular communication signals. Firstly, an approach investigated for joint sensing and classification. The test results exhibit that two steps approach performs better than the joint approach. Furthermore, test results that are based on real-world measurements indicate SCF as a superior feature for the identification of wireless mobile communications signals for DL models. Moreover, under the stringent channel condition, CNN provides better spectrum sensing performance than classical CFD without using any a priori information. These results imply that the utilization of DL networks in cognitive radio technology allows a more robust system design. In subsequent studies, the performance of the model proposed in this study can be examined against adversarial attacks and efforts can be made to develop various methods to strengthen its resistance to this type of attack.