Deep Complex-valued Convolutional Neural Network for Drone Deep Complex-valued Convolutional Neural Network for Drone Recognition Based on RF Fingerprinting Recognition Based on RF Fingerprinting

—Drones-aided ubiquitous applications play more and more important roles in our daily life. Accurate recognition of drones is required in aviation management due to their potential risks and even disasters. Radio frequency (RF) ﬁngerprinting-based recognition technology based on deep learning is considered as one of the effective approaches to extract hidden abstract features from RF data of drones. Existing deep learning-based methods are either a high computational burden or low accuracy. In this paper, we propose a deep complex-valued convolutional neural network (DC-CNN) method based on RF ﬁngerprinting for recognizing different drones. Compared with existing recognition methods, the DC-CNN method has the advantages of high recognition accuracy, fast running time and small network complexity. Nine algorithm models and two datasets are used to represent the superior performance of our system. Experimental results show that our proposed DC-CNN can achieve recognition accuracy of 99.5% and 74.1% respectively on 4 and 8 classes of RF drone datasets.


I. INTRODUCTION
Today, drones or unmanned aerial vehicles (UAVs) have been used to improve our daily life. Due to the fast development of embedded devices and wireless communications, drones have become cheaper and more powerful. For example, drones can not only make outstanding contributions in civil areas such as logistics and agriculture, but also play an important role in responding to search and rescue in emergency disasters [1]- [3]. Drones have become an integral part of our rapid development of society. However, the widespread use of drones without government regulation may cause many risks related to people's security and privacy. For example, drones are used by some people to eavesdrop on people's wireless communication data from long distances [4]. Therefore, relevant authorities have considered the safety and privacy issues involved in drones and efficient identification and detection of drone signals need to be adopted [5].
Radio frequency (RF) fingerprinting-based recognition technology [6]- [10] is a classification technology based on the physical layer measurements. RF fingerprinting plays an important role in the recognition and detection of drones to accurately identify a variety of internet of things (IoT) devices [11]. Because the inherent characteristics and specifications of different IoT devices (e. g., radio frequency) are not completely consistent, RF fingerprinting technology detects and identifies different devices by extracting subtle differences. In addition, the process of RF fingerprinting recognition usually includes two steps: training and classification [12]- [14], which are shown in Fig. 1. First, we use the RF data receiver to collect RF data from different IoT devices, such as non-linear phase changes and frequency offsets. Subsequently, the RF fingerprinting characteristics of each device were extracted and stored in our database [15]. Second, we can identify and classify the signals of unknown devices according to the prepared RF fingerprinting database obtained in the first step. M. Ezuma et al. [16]used k-nearest neighbor (KNN) classifier to detect and classify RF signals from different UAV controllers. However, there is an upper limit to the recognition accuracy of RF fingerprinting based on traditional algorithms and we urgently need better technology with higher recognition performance [17].
Deep learning-aided algorithms [18] are widely used in the field of wireless communications because of their efficient feature extraction and recognition capabilities [19]- [29]. Convolutional neural network (CNN) has achieved excellent performance for improving the classification accuracy of automatic modulation classification (AMC). H. Gu et al. [30] proposed a new AMC method combined with two CNNs trained on different datasets and achieved higher identification accuracy. In addition, the use of deep learning algorithms in RF fingerprint recognition technology has also achieved many outstanding results. For example, L. Peng et al. [31] utilized differential constellation trace figure (DCTF) and CNN algorithm to achieve high 99% recognition accuracy on 54 Zigbee devices. RF fingerprinting technology based on deep learning has achieved high classification accuracy based on deep realvalued networks. The RF signals sent by wireless devices combine in-phase and quadrature components. Compared with deep real-valued network, deep complex-valued network [32] extracts more abstract data from drone RF signals (the RF signals transmitted from drones), which helps to achieve higher classification accuracy. Inspired by this, this paper proposes a DC-CNN based RF recognition technology to detect different drone signals. Unlike most RF technologies that use realvalued CNN model, our proposed algorithm model is based on deep complex-valued network, which extracts the hidden features of drone signals with high accuracy in comparison with real-valued CNN. The main contributions of this article are summarized as follows: • We propose a drone recognition technology based on DC-CNN model with improved classification performance within two given independent drone signal datasets. • Our study considers three different types of drones under different operating modes. We use two RF signal receivers to receive the high and low frequency signal data of the drone and the entire RF spectrum is obtained by performing discrete fourier transform (DFT) on these signal data. • We present nine different models compare and evaluate classification performance to show the superior performance of DC-CNN model. We comprehensively evaluate the performance of each algorithm and found that the proposed DC-CNN model is superior to the other algorithm models. The remainder of the paper is organized as follows: Section III introduces our proposed drone recognition system design and some basic theory of deep complex-valued network. Then, Section IV provides architecture of two algorithm models and their training steps. The implementation of datasets and simulation results of our drone recognition methods are described in Section V. Finally, the paper is concluded in Section VI.

II. RELATED WORKS
In this section, we first introduce some traditional transmitter device identification methods based on statistical learning. Then, we focus on RF fingerprinting identification methods based on automatic feature extraction (such as neural networks).

A. Traditional Transmitter Device Identification Methods
The traditional transmitter device identification methods are all based on detecting the unique properties of different transmitters. As we all know, the transmitter sends instantaneous signal when it starts or stops receiving RF signal data. During this short period of time (usually a few microseconds), the capacitive load is charged or discharged. In [33], the authors proposed a transmitter classification method based on instantaneous signals and they used a multifractal segmentation method with the same transient concept. Segmentation technology extracts important features from instantaneous signals and generates compact multi-element models. It was shown by computer simulation that the use of temporal features extracted by the random neural network classifier achieves an classification accuracy of about 90%. What's more, it is important that although the authors use neural networks for final classification, they determine the characteristics of instantaneous signals based on experience, so we consider it to be a traditional method of RF fingerprinting identification. In [34], the authors proposed another transmitter classification method based on instantaneous signals. The KNN discrimination method was used for device identification. This method used instantaneous signals for spectrum feature selection. The author identified a total of 8 RF signal transmitters, achieving 97% accuracy at 30 dB signal-to-noise ratio (SNR) and 66% accuracy at 0 dB SNR. The above are some traditional transmitter identification methods, which mainly classify transmitters based on the RF signal characteristics of the transmitter. However, because these characteristics depend on the protocol adopted by the device, any change in the protocol will change the characteristics results, which could make it difficult for traditional methods to identify devices between different types of transmission protocols.

B. Automatic Feature Extraction based RF Fingerprinting Techniques
In recent years, more and more researchers have studied to combine automatic feature extraction with RF fingerprinting techniques. All traditional methods used for RF fingerprinting lack flexibility. These methods require human involvement to determine the features to be extracted (such as instantaneous signals) and design specific algorithms for those features. Automatic feature extraction techniques (such as neural networks) can explore the abstract features of RF data and make classification accuracy higher. In [35], in order to identify the cognitive communication networks, the authors used CNN model from deep learning algorithms to recognize and identify the signals of seven ZigBee devices. The recognition accuracy of this can reach 92.29% under high SNR conditions. However, this algorithm performed poorly at low SNR conditions. In [36], the authors proposed an autoencoder-based indoor location method within deep learning algorithms. This algorithm used an auto-encoder to achieve high-precision positioning capability within RF data collected from the smartphones. As the training data set increases, the positioning accuracy became more accurate.

III. SYSTEM DESIGN AND COMPLEX-VALUED NETWORK THEORY
The design of our proposed drone recognition system used in this paper is shown in Fig. 2. The signal targets we studied include three different types of running drone signals (drone activities) and noise signals in the space without drones (background activities). We first use the RF receiver to collect the drone or background activities signal at multiple times. Then, we pre-process the RF data collected from the RF receiver and make the signal sample size of all drone signal classes consistent. Importantly, DC-CNN and various algorithm models are used to train and test these drone signal samples, respectively. Finally, we evaluate the classification performance of all algorithm models in order to verify the superiority of our proposed DC-CNN algorithm.

A. Deep Complex-valued Network
Since most of the electromagnetic wave signals are in complex-valued form, comparing to real-valued networks, the deep complex-valued network is able to extract abstract information from the in-phase and quadrature parts of the signal. Therefore, it is particularly important to introduce the theory of deep complex-valued network in RF research and two complex-valued network concepts used in this article is explained.
1) Complex-valued convolution operation: As we all know, the core part of CNN is convolution operation, which can extract various abstract features from network input and reduce network parameters. Similarly, complex-valued convolution operation is also the core part of DC-CNN and it can be implemented by superposing multiple real-valued convolution operations. The process of complex-valued convolution operation between complex-valued feature map M and the complex-valued convolution kernel K is shown in Fig. 3. As we can see from the figure, the green part M R represents the real part of M , the blue part K R represents the real part of K, the red part M I represents the imaginary part of M and the yellow part K I represents the imaginary part of K. After the complex-valued convolution operation is completed, the output of feature map is still divided into real and imaginary parts. Finally, we can get the complete complex-valued convolution calculation function as 2) Complex-valued weight initialization: Complex-valued weight initialization can effectively reduce the disappearance of gradients and accelerate the convergence of complexvalued neural network. A complex-valued weight W can be expressed in polar or matrix coordinates: Among them, θ and |W | are the phase and modulus value of W respectively. The variance of W is defined as: When W is center-symmetrically distributed about 0, the variance of W is simplified as E |W | 2 . On the other hand, the variance of |W | can be expressed as: In summary, we can define the variance of W as: If the modulus value of |W | obeys the Rayleigh distribution, the mathematical expectation and variance of |W | are calculated as follows:   σ is the parameter of Rayleigh distribution. Bringing function (6) into function (5), we can get the variance of W as: Through this formula we can implement the modulus value initialization of the complex-valued weight W . In addition, the phase initialization of W can be done by choosing uniformly distributed values obeying [−π, π].

IV. ALGORITHM MODEL AND IMPLEMENTATION
In this section, we focus on two deep learning algorithm models. We first introduce an existing classification algorithm model: convolutional, long short-term memory, fully connected deep neural network (CLDNN), which incorporates three classic deep learning algorithm models. Next, we will elaborate the DC-CNN algorithm proposed in this paper for drone detection, which is extended from deep real-valued CNN (DR-CNN). Finally, the architecture of other deep learning algorithm and specific training steps is described.

A. Architecture of CLDNN
CLDNN combines the advantages of three deep learning algorithm models: CNN, long short-term memory (LSTM) and deep neural network (DNN). The architecture of CLDNN model is depicted in Fig. 4. Besides the input and output layers, the CLDNN model also includes convolutional part, LSTM part and fully connected (FC) part. The sample size of the drone dataset used in this paper is 2 × 2048, which is also the size of input layer. This model has two convolutional layers, one LSTM layer and three FC layers. The size of convolutional kernel in the first convolution layer is 2 × 4, and that in the second convolutional layer is 1 × 8. In order to better extract features, the number of convolutional kernels in the two convolutional layers is 128 and 64 respectively and the only LSTM layer has 256 neurons. In addition, the activation functions of all convolutional layers and LSTM layer are both ReLU and Dropout layer is behind each of them in order to reduce over fitting and accelerate network convergence. Whats more, the number of neurons in the three FC layers is 256, 128 and M, which is the type of drones to be distinguished. By connecting the FC layer with the Sof tmax activation function, we can output the predicted probability of the target drone and finally realize the drone recognition.

B. Architecture of DC-CNN
Unlike CLDNN model, the proposed DC-CNN algorithm model in this paper is based on the fusion of traditional CNN and deep complex-valued network. The architecture of DC-CNN model used in drone detection is depicted in Fig. 5. Besides the input and output layers, our proposed DC-CNN model also includes complex-valued convolutional part and complex-valued FC part, who use the theory of complexvalued convolution operation and complex-valued weight initialization described in IV. The sample size of the drone dataset used in this paper is 2 × 2048, which is also the input size in our proposed model. Furthermore, our proposed DC-CNN model has two complex-valued convolutional layers and three complexvalued FC layers. The size of complex-valued convolutional kernel in the first complex-valued convolution layer is 16, and that in the second complex-valued convolutional layer is 8. In order to better extract features, the number of complex-valued convolutional kernels in the two complex-valued convolutional layers is 128 and 64 respectively and all complex-valued convolution layers use one-dimensional complex-valued convolution (cConv1D). Additionally, the activation functions of complex-valued convolutional layers are complex-valued ReLU (cReLU ) and Dropout layer is behind each of them in order to reduce overfitting and accelerate network convergence. Whats more, the number of neurons in the three complex-valued FC layers is 256, 128 and M, which is the type of drones to be distinguished. By connecting the complexvalued FC layer with one Sof tmax activation function, we can output the predicted probability of the target drone and finally realize drone detection.

C. Architecture of Other Deep Learning Algorithm models
The rest of deep learning algorithms used in this paper contain DR-CNN (Conv2D), DR-CNN (Conv1D), fully connected neural network (FCN) and LSTM models, whose architecture is shown in Tabs. I.

D. Drone Recognition Algorithm Steps
The entire proposed intelligent drone recognition algorithm steps is presented. Algorithm 1 lists the pseudo-code of our proposed algorithm based on RF fingerprinting.

Algorithm 1 The proposed DC-CNN based drone recognition method.
Input: IQ samples with the size of 2 × 2048; Output: The best algorithm model for drone detection method; 1: Select IQ samples in drone datasets and mix them randomly; 2: Initialize the complex-valued neural network weight parameter W ; 3: Divide all drone datasets into training sets and testing sets within 7 : 3; 4: Send the IQ samples to different deep neural network for training.
The structure and parameters of CLDNN algorithm model is shown in Fig. 4 and that of DC-CNN is shown in Fig. 5; 5: Test and verify data in multiple times in order to obtain average recognition accuracy and each samples running GPU-time in every algorithm models; 6: Evaluate various indicators of each algorithm and achieve best algorithm for drone recognition method; 7: return the best algorithm model.

E. Experiment Setup
Extensive experiments are performed in order to evaluate the classification performance of our proposed DC-CNN model. The hardware platform that we use is one RF signal collector and one computer, which includes two operating systems: W indow10 and U buntu16.04.1 − Linux. Further, the computer contains 8 IntelXeonE3(x86 64) central processing units (CPUs) and 4 N V IDIAGT X1080T i graphics processing units (GPUs), which can efficiently handle various matrix multiplication and convolution operations. On one hand, the Windows system mainly uses M AT LABR2019a software to preprocess RF drone data. On the other hand, the Linux system mainly uses Spyder software for training and testing deep learning algorithm models. In addition, we use Keras2.2.2 software library based on P ython3.7.1 language to complete constructing deep learning models.

V. RESULTS AND DISCUSSION
In this section, the performance of our proposed DC-CNN algorithm model is demonstrated and analyzed using two different drone datasets. We compared a total of 9 different machine learning or deep learning algorithms, all of which are training within independent training and testing datasets. We comprehensively evaluate all algorithms in classification accuracy, sample running time, model size and so on. Details will be shown as below.

A. Dataset Description
Similar to most deep learning based RF fingerprinting research, we use two RF receivers to receive high-frequency and low-frequency signals during multiple drones are running. Portable computer is used to perform DFT to the RF data collected from two RF receivers and connect them together to form the entire drone RF spectrum. We use a two independent RF fingerprinting based drone datasets for training and testing.
In Table II, we provide all details of drone datasets used in our simulation experiment. Dataset 1 contains 4 classes of drone data: background activities, drone 1 activities, drone 2 activities and drone 3 activities. Dataset 2 contains RF data collected by two kinds of drones in 4 different running modes, whose total is 8 classes of drone data. In addition, the size of each class of RF samples is 2 × 2048 and its number is 1100, which means that there are 4,400 samples in dataset 1 and 8,800 samples in dataset 2.

B. Accuracy of Different Algorithms within Two Datasets
As shown in Table III, we compared the classification accuracy of nine algorithms in total, which are DC-CNN, CLDNN, DR-CNN (Conv2D), DR-CNN (Conv1D), FCN, LSTM, random forest (RF), decision tree (DT) and support vector machine (SVM). First, we are concerned that the recognition accuracy of three machine learning algorithms (RF, DT, and SVM) is lower for both dataset 1 and dataset 2. FCN model has more than 30% higher recognition accuracy than LSTM model. When training on dataset 1, the recognition accuracy of first four algorithms in Table I are all higher than 90%. In addition, compared to classic deep learning algorithms (CNN, FCN, LSTM), DC-CNN and CLDNN model are more capable of identifying different drone RF signals. It is particularly important that DC-CNN model proposed in this paper achieves the best recognition accuracy in two datasets, which are 99.5% and 74.1%, respectively.
In order to further explore the relationship between different datasets and the recognition algorithms, we draw the following figure. As shown in Fig. 6, all 9 algorithm models are used to distinguish between dataset 1 who containing 4400 samples and dataset 2 who containing 8800 samples. We can clearly find that as the number of classification samples increases, the recognition accuracy decreases, which is under expectations. The downward trend of each algorithm is basically the same, except the recognition results of DR-CNN (Conv1D) and DR-CNN (Conv2D). In addition, the accuracy of most algorithms decreases in a non-linear manner. For example, the recognition accuracy of DC-CNN model in 4 classes is 99% and drop to 74% in 8 classes. Compared with deep learning algorithms, the accuracy of machine learning algorithms drops faster.  Fig. 7 depicts the running GPU-time required for each algorithm to identify a single drone sample and the total parameters contained in that algorithm model. It can be seen from the figure that the number of parameters included in one model is not directly related to its GPU-time. For CLDNN model, its GPT-time is similar to that of DR-CNN model, but the total model parameters are 4 times that of DR-CNN model. Further, we can conclude that although the recognition accuracy of CLDNN is higher than most other algorithms, this is obtained at the cost of too many model parameters and running time. In addition, we can clearly see that the total model parameters of DC-CNN model are roughly the same as those of three classic deep learning algorithms, but the GPU-time of DC-CNN model is much less than them. In summary, we can conclude that even if the complex-valued network has the same parameters as the real-valued network, the complex-valued network has lower processing time and faster recognition speed.

D. Confusion Matrix of DC-CNN Model in Different Datasets
Subsequently, we show the confusion matrices of our proposed DC-CNN model within different datasets in Fig. 8. These percentage matrices can apparently reflect some details which cannot be seen above. Fig. 8(a) represents dataset 1 (4 classes) and Fig. 8(b) represents dataset 2 (8 classes). By observing the diagonals of all the confusion matrices, we can see the recognition performance of our algorithm model for each class. Firstly, we find that the CLDNN model can accurately identify each type of drone signal in dataset 1. Even in the worst case, the classification accuracy of background activities signals can achieve 98.5%. What's more, for dataset 2, the name of each class is composed of M and two numbers, the first number indicating drone model and the second number indicating the running mode of drone. For example, the meaning of M12 is the signal received by the first drone in mode 2. Therefore, we can easily understand that DC-CNN model is difficult to identify the signal of the second drone in mode 3 (M23), whose identification accuracy is only 4.88%. This is also the main reason for the decline in the accuracy of DC-CNN model within dataset 2.

E. Additive Evaluation of DC-CNN Model in Different Datasets
Finally, we evaluate the performance of DC-CNN algorithm model in two datasets from other aspects. The additive performance evaluation indicators which we used in this paper are P recision, Recall and F 1 score. The definitions of precision and recall are as follows: Among them, TP, FP and FN indicate true positive, false positive and false negative respectively. The value of F 1 score is determined by the values of P recision and Recall whose definition is: As shown in Fig. 9, blue is the P recision value, green is the Recall value and red curve represents F 1 score for each class. The values of these three evaluation indicators in Fig. 9(a) are all above 98%, which shows that DC-CNN model has excellent performance in identifying the drone dataset 1. In addition, we can clearly see from Fig. 9(b) that these three indicators of DC-CNN in drone dataset 2 also perform very well in most classes. However, the recognition performance of M23 class seems to be worse, whose Recall and F 1 score value even not reach 10%. Moreover, we observe that the P recision value of M13 and the Recall value of M24 are only about 50%, which is the focus of our next research and improvement.

VI. CONCLUSION
In this paper, we have proposed a new drone recognition method based on DC-CNN. Unlike conventional DR-CNN methods, our proposed DC-CNN method can extract more hidden features from drone RF signals who have inphase and quadrature parts. We used nine different drone recognition algorithm models who were trained separately on two independent datasets and evaluate their performance in classification, GPU-time and parameters. The experimental results show that the classification accuracy of DC-CNN model to identify dataset 1 is 99.5%, and that of dataset 2 is 74.1%. Simulation results prove that our proposed algorithm is obviously performs well than other existing deep learningbased drone recognition algorithm. In future work, we will consider further optimizing network parameters and running time.