Electromagnetic Target Identification Method Based on Complex-Valued Attention Network
Through the complex value multi-head attention network model C-Attnsig and complex value residual network block, the problem of difficult to capture long-term context and time correlation of communication signals in the prior art is solved, and higher modulation recognition accuracy and noise immunity are achieved.
Patent Information
- Application Number
- CN202211350492.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-10-31
AI Technical Summary
The prior art is difficult to effectively capture the long-term context and time correlation of communication signals, and real-valued neural networks cannot effectively model the correlation between the real and imaginary parts of the signal, resulting in insufficient modulation classification accuracy.
The complex-valued multi-head attention network model C-Attnsig is used, combined with complex-valued residual network blocks, and the long-term context of the signal is captured through complex representation and multi-head attention mechanism, and the training process is optimized in parallel, and the complex-valued parameters are used to reduce system constraints and improve feature extraction capabilities.
It significantly shortens the training time and improves the accuracy of modulation recognition, especially performs better under low signal-to-noise ratio conditions, enhancing the noise resistance of the model.
Smart Images

Figure CN115758109B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method for modulating and identifying wireless communication signals, which is applicable to identifying the modulation modes of electromagnetic signals by using deep learning techniques. Background Art
[0002] Automatic modulation classification is a key technology for link adaptation systems, non-cooperative wireless communication systems, etc., and has a wide range of applications in civilian and military fields. Automatic modulation classification is used to label and understand the radio spectrum, bringing great convenience to dynamic spectrum access, spectrum interference monitoring, and radio fault detection. The development of Internet of Things technology and the wide application of wireless communication technology have led to an explosive growth of wireless communication data. Therefore, due to the high data rate, it is a difficult task to accurately classify the modulation by traditional algorithms. In the past few years, deep learning has replaced manual feature extraction and demonstrated powerful processing capabilities. In particular, complex-valued neural networks have received extensive attention in the field of signal processing due to their strong representation ability.
[0003] Communication systems tend to represent the amplitude and phase information of signals with complex numbers. However, most of the relevant literature on automatic modulation classification supports real-valued networks or uses simple complex-valued convolutional networks, both of which have inherent defects in the network structure. More specifically, real-valued neural networks regard the real and imaginary parts of signal data as independent. However, in fact, these two components are interdependent under any phase change caused by displacement effects. Therefore, complex-valued networks are more conducive to extracting the physical characteristics of signals. Secondly, existing methods usually use convolutional neural networks (CNNs) alone and cannot effectively model the temporal correlation between data from different time sampling points. In addition, recurrent neural networks commonly used to obtain temporal information, such as long and short time memory networks (LSTM), are difficult to train models and cannot perform global temporal context modeling. Summary of the Invention
[0004] To overcome the deficiencies of the prior art, the present invention provides an electromagnetic target identification method based on a complex-valued attention network. Aiming at the defects of the prior art, the object of the present invention is to propose a complex-valued multi-head attention model, named C-Attnsig, which can capture the long-term context of communication signals and be optimized in parallel to significantly shorten the training time. The complex-valued representation of the neural network can effectively detect and extract the correlation between the real and imaginary parts of the signal data. In addition, by replacing the bivariate real-valued parameters with univariate complex-valued parameters, the system constraints are stronger and the degrees of freedom of the solution space are smaller. At the same time, a C-ResNet block is proposed, which is a building block of a complex-valued residual network, converting a two-dimensional real-valued convolutional network into a one-dimensional complex-valued convolutional network.
[0005] The technical solutions adopted by the present invention to solve its technical problems include the following steps:
[0006] Step 1: Convert the communication signals received by the receiver into signal data in int16 format;
[0007] Step 2: Perform a Fourier transform on the signal data in Step 1, draw the spectrogram of the signal, and estimate the carrier frequency of the signal;
[0008] Step 3: Resample the signal data in Step 1 with four times the carrier frequency.
[0009] Step 4: Perform intermediate-frequency filtering on the signal obtained in Step 3 according to the carrier frequency estimated in Step 2;
[0010] Step 5: Perform power normalization on the signal after intermediate-frequency filtering;
[0011] Step 6: Divide the dataset after power normalization into a training set and a test set, design a deep complex-valued attention mechanism neural network, use the training set to train the deep complex-valued attention mechanism neural network, and then use the test set to feed into the trained deep complex-valued attention mechanism neural network for testing to obtain the corresponding digital signal modulation mode;
[0012] Step 7: Model testing
[0013] Input the test set divided in Step 6 into the trained model, judge the output category of the model and the label category of each data, and calculate the accuracy of the model on the test set.
[0014] The overall framework of the deep complex-valued attention mechanism neural network includes a feature extraction module, a temporal encoding module, and a classification module. The feature extraction module, the temporal encoding module, and the classification module are serially connected in sequence. Among them, the classification module includes a flatten layer, a concat layer, two fully connected layers, and a dropout layer. The four layers are serially connected. The Concat layer connects the real and imaginary components of the feature data generated by the previous neural network layer, and the dropout layer effectively reduces overfitting. The feature extraction module includes four one-dimensional complex-valued residual building blocks, which are serially connected. Among them, the one-dimensional complex-valued residual building block includes a one-dimensional complex-valued convolutional layer, a complex batch normalization layer, another one-dimensional complex-valued convolutional layer, and another complex batch normalization layer. The four network layers are serially connected.
[0015] In the feature extraction module:
[0016] 1) One-dimensional complex-valued convolutional layer: To simulate complex algorithms using real-valued algorithms internally, a complex vector s = x + iy is defined to represent the I / Q signal, and a complex convolutional kernel weight matrix W = A + iB is defined. The complex vector is convolved through the complex convolutional kernel:
[0017]
[0018] where A and B are the real and imaginary parts of the complex convolutional kernel weight matrix respectively, and x and y are the real and imaginary parts of the complex vector respectively. Then, the real and imaginary parts of the convolution result are obtained as follows:
[0019]
[0020]
[0021] 2) Complex batch normalization layer: Batch normalization is an important technology for optimizing data models. The real-valued batch normalization layer is expressed as:
[0022]
[0023] where and V are the mean and variance of a Batch of data respectively; γ and β are trainable parameters, and ∈ is a very small value to prevent the denominator from being zero.
[0024] However, for complex-valued neural networks:
[0025]
[0026] Learnable shift parameter β and scale parameter γ are set for complex batch normalization. The scale parameter γ is given by the following formula:
[0027]
[0028] The shift parameter γ among the shift parameters β and γ ri will be initialized to zero, while the scaling parameter γ in γ rr and γ ii will be initialized to
[0029] In the temporal encoding module, the purpose of the temporal encoding module is to capture the temporal dependence of the input features. The temporal encoding module consists of a complex-value multi-head attention (CMHA) sub-module and a complex-value feed-forward sub-module, which are connected in series. The complex-value multi-head attention network sub-module and the complex-value feed-forward network sub-module are respectively connected through residual connections, and layer normalization operations are respectively performed on the outputs of the two sub-modules through an add-and-normalize operation layer; in addition, three identical temporal encoding module structures are connected in series, and then connected in series with the classification module.
[0030] In the complex-value multi-head attention network sub-module, the complex-value attention algorithm is as Figure 2 shown, where MH is an ordinary MHA module; A and B are respectively the real part and the imaginary part of the input feature; first, the MHA mechanism is extended to the complex-value domain, and the complex-value query matrix, key matrix, and value matrix are respectively represented as Q C =HW Q 、K C =HW K and V C =HW V , for the complex-value input H = A + iB, and the real-value matrices W Q 、W K and W V , the complex-value attention is defined as:
[0031]
[0032] Then, calculate the multi-head attention mechanism for each expansion term in the formula, and the complex-value multi-head attention mechanism is further described as:
[0033] Complex-MultiHead(H,H,H)
[0034] =[MH(A,A,A)-MH(A,B,B)-MH(B,A,B)-MH(B,B,A)]+i[MH(A,A,B)+MH(A,B,A)+MH(B,A,A)-MH(B,B,B)]
[0035] =A′+iB′,
[0036] Among them, H is the complex-valued input feature of the CMHA module, MH(·) is a common MHA module, A and B are the real and imaginary parts of the input of the CMHA module, A' and B' are the outputs of the real and imaginary parts modules of the CMHA respectively, and MH(A, B, A) is described as:
[0037]
[0038] Among them, and represent weight matrices; h represents the number of heads, and W O is the output weight matrix. The complex-valued multi-head attention mechanism is used to generate different representation subspaces of the input sequence and utilize the dependencies between them. With H as the input, it is carried out under different linear mappings; the multi-head attention mechanism is considered to have strong feature extraction capabilities; the complex-valued multi-head attention operation of each head is described as:
[0039]
[0040] where d k represents the dimensions of Q and K, is to prevent the dot product value from being too large, and the Min-Max-Norm is described as:
[0041]
[0042] In the complex-valued feed-forward sub-module, the complex-valued input vector is and the complex-valued fully-connected network weight vector is W = A + iB, and the complex-valued fully-connected network layer is:
[0043]
[0044] where (·) represents the dot product operation;
[0045] The complex-valued feed-forward sub-module consists of two complex-valued fully-connected layers. The complex-valued feed-forward sub-module takes the output of the complex-valued multi-head attention mechanism sub-module as the input. The complex-valued feed-forward sub-module uses the ReLU activation function to break the non-linearity of the model. The complex-valued feed-forward sub-module is described as
[0046] FFN(x) = max(0, W1x + b1)W2 + b2,
[0047] where x is the output of the complex-valued multi-head attention mechanism sub-module, W1 and W2 are the network weights, and b1 and b2 are the network biases;
[0048] The input and output of two complex-valued feed-forward sub-modules are added through a residual connection, and then the obtained sum is normalized. Among them, the two feed-forward sub-network sub-modules are connected in series, and this operation is described as LayerNorm(x + SubModule(x)), where SubModule represents a complex-valued multi-head attention mechanism sub-module or a feed-forward network sub-module, LayerNorm represents a layer normalization operation, x is the input vector, and the time series encoding module has two addition and normalization sub-operation layers, which prevent degradation in the training of deep neural networks. In addition, the normalization operation can improve the training speed and stability.
[0049] The beneficial effect of the present invention is that due to the proposed complex-valued multi-head attention model, this model can capture the long-distance time context relationship of communication signals through the multi-head attention mechanism network and has been optimized in parallel, significantly shortening the training time. The complex representation of the neural network can effectively detect and extract the correlation between the real and imaginary parts of signal data. In addition, by representing a single-variable complex parameter instead of two real-valued variable parameters, the system has stronger constraints and fewer degrees of freedom in the solution space. Brief Description of the Drawings
[0050] Figure 1 It is a structural diagram of the deep complex-valued attention network model C-Attnsig proposed by the present invention.
[0051] Figure 2 It is a schematic structural diagram of the complex-valued multi-head attention mechanism.
[0052] Figure 3 It is a curve graph comparing the complex-valued attention mechanism network C-Attnsig with the corresponding real-valued attention network Attnsig based on the RadioML2016.10B dataset.
[0053] Figure 4 It is the accuracy confusion matrix of the proposed deep complex-valued attention mechanism network. Figure 4 (a) is the accuracy confusion matrix with SNR = -2dB. Figure 4 (b) is the accuracy confusion matrix with SNR = 16dB.
[0054] Figure 5 It is a performance comparison graph of the complex-valued attention mechanism network C-Attnsig and an advanced deep learning model for modulation recognition. Detailed Embodiments
[0055] The present invention will be further described below in conjunction with the drawings and embodiments.
[0056] As Figure 1As shown in the figure, an electromagnetic target identification method based on a complex-valued attention network. The experiment of the present invention uses the benchmark open-source dataset RML2016.10B.
[0057] Step 1: Modulation signal dataset
[0058] The experiment of the present invention uses the benchmark open-source dataset RML2016.10B. This dataset uses the software radio software GUN Radio to simulate various modulation signals in real life, including 10 modulation signals: 8PSK, BPSK, AM-DSB, QPSK, QAM16, QAM64, CPFSK, GFSK, 4PAM, and WBFM; the signal-to-noise ratio coverage ranges from -20dB to +18dB, with an interval of 2dB, the sampling length is 128, and the sample data volume is. All signal data are collected from the signal at a sampling rate of 4 samples per symbol and 1M / s. The received signal is affected by wireless channel defects. Each signal data is saved as a 2×128 matrix, and the two rows of data correspond to the in-phase part and the quadrature part of the complex signal sample respectively.
[0059] Step 2: Data annotation
[0060] The dataset contains 10 modulation methods, and each signal data is given an SNR and a modulation method label.
[0061] Step 3: Dataset division
[0062] To obtain the training set and the test set, the present invention adopts a random division method under a certain signal-to-noise ratio and a certain modulation method. That is, for the signals of each modulation type, 80% is randomly selected from the data of each signal-to-noise ratio value as the training set, and 20% is used as the test set.
[0063] Step 4: Build a network model and use the Pytorch deep learning framework to build the structure.
[0064] Step 5: Model training
[0065] The cross-entropy loss function is selected as the loss function of the deep neural network, and the Adam is selected as the optimization function of the deep neural network. The initial learning rate lr = 0.0001 is selected. The learning rate modulation strategy adopts StepLR to adjust the learning rate at equal intervals, the adjustment interval is 50 Epochs, and the adjustment multiple is 0.1.
[0066] When training for 100 Epochs, the accuracy of the test set reaches the highest. Select the neural network parameter value file saved at 100 Epochs for use when the deep neural network is in the test mode.
[0067] Step 6: Model testing
[0068] Input the partitioned test set into the trained model, judge the output category of the model against the label category of each data, and calculate the accuracy of the model on the test set.
[0069] To evaluate the performance of the complex-valued representation of the neural network, in the experiment, our model C-Attnsig was compared with the corresponding real-valued attention network Attnsig, as shown in the attached figure. At a relatively high signal-to-noise ratio (0 - 18 dB), the proposed complex-valued model improved the performance by 2 - 3% compared with the real-valued model. At a relatively low signal-to-noise ratio level (-20 - 0 dB), C-Attnsig produced a 2 - 2.2 dB gain compared with the corresponding real-valued network model Attnsig at the same accuracy. This indicates that the complex-valued model can better learn the time-frequency domain features of signal data and improve the noise resistance of the modulation recognition network.
[0070] Table 1 shows the structural parameters of the feature extraction module of the present invention:
[0071] Table 1
[0072]
[0073] The present invention uses the RadioML2016.10B dataset and compares the proposed model C-Attnsig with other latest models, including Complex DSN, Kryston 2020, GrrNet, and LSTM-REAM. The results are shown in the attached figure. The present invention is superior to other models at all SNRs, with the accuracy improved by 2 - 6%. Complex DSN and Kryston 2020 directly feed the original communication signals into the complex convolutional neural network, so they cannot effectively capture the temporal dependencies between data. In addition, GrrNet and LSTM-REAM are real-valued models using GRU and LSTM, so the correlation between the real and imaginary parts of the input signal data is destroyed. In addition, LSTM and GRU cannot effectively model the global time context and are difficult to train.
Claims
1. An electromagnetic target identification method based on a complex-valued attention network, characterized in that It includes the following steps: Step 1: Convert the communication signal received by the receiver into signal data in int16 format; Step 2: Perform Fourier transform on the signal data in Step 1, draw the frequency spectrum diagram of the signal, and estimate the carrier frequency of the signal; Step 3: Resample the signal data in Step 1 with four times the carrier frequency; Step 4: Perform intermediate frequency filtering on the signal obtained in Step 3 according to the carrier frequency estimated in Step 2; Step 5: Perform power normalization processing on the signal after intermediate frequency filtering; Step 6: Divide the data set after power normalization processing into a training set and a test set, design a deep complex-valued attention mechanism neural network, use the training set to train the deep complex-valued attention mechanism neural network, and then use the test set to feed into the trained deep complex-valued attention mechanism neural network for testing to obtain the corresponding digital signal modulation mode; The overall framework of the deep complex-valued attention mechanism neural network includes a feature extraction module, a temporal encoding module, and a classification module. The feature extraction module, the temporal encoding module, and the classification module are serially connected in sequence. Among them, the classification module includes a flatten layer, a concat layer, two fully connected layers, and a dropout layer. The four layers are serially connected. The Concat layer connects the real component and the imaginary component of the feature data generated by the previous neural network layer, and the dropout layer effectively reduces overfitting. The feature extraction module includes four one-dimensional complex-valued residual building blocks, and the four one-dimensional complex-valued residual building blocks are serially connected. Among them, the one-dimensional complex-valued residual building block includes a one-dimensional complex-valued convolutional layer, a complex batch normalization layer, another one-dimensional complex-valued convolutional layer, and another complex batch normalization layer. The four network layers are serially connected; In the temporal encoding module, the purpose of the temporal encoding module is to capture the time dependence of the input characteristics. The temporal encoding module consists of a complex-valued multi-head attention network sub-module and a complex-valued feed-forward sub-module, which are serially connected between them. The complex-valued multi-head attention network sub-module and the complex-valued feed-forward network sub-module are respectively connected through residual connections, and layer normalization operations are respectively performed on the outputs of the two sub-modules through an add-and-normalize operation layer; in addition, three identical temporal encoding module structures are serially connected together and then serially connected with the classification module; Step 7: Model testing Input the divided test set in Step 6 into the trained model, judge the output category of the model and the label category of each data, and calculate the accuracy of the model on the test set.
2. The electromagnetic target identification method based on a complex-valued attention network according to claim 1, characterized in that: In the feature extraction module, in order to simulate a complex algorithm using a real-valued algorithm internally in the one-dimensional complex-valued convolutional layer, a complex vector s = x + iy is defined to represent the I / Q signal, and a complex convolutional kernel weight matrix W = A + iB is defined, and the complex vector is convolved through the complex convolutional kernel: where A and B are respectively the real part and the imaginary part of the complex convolutional kernel weight matrix, and x and y are respectively the real part and the imaginary part of the complex vector. Then, the real part and the imaginary part of the convolution result are obtained as follows:
3. The electromagnetic target identification method based on a complex-valued attention network according to claim 1, wherein: The complex-valued batch normalization layer: Batch normalization is an important technique for optimizing data models. The real-valued batch normalization layer is expressed as: Among them and V are the mean and variance of a Batch of data respectively; γ and β are trainable parameters, and ∈ is a very small value to prevent the denominator from being zero; However, for complex-valued neural networks: Set learnable shift parameter b and scale parameter γ for complex batch normalization. The scale parameter γ is given by the following formula: The shift parameter γ among the shift parameters β and γ ri will be initialized to zero, while the scaling parameter γ in γ rr and γ ii will be initialized to 4. The electromagnetic target identification method based on a complex-valued attention network according to claim 1, wherein: In the complex-valued multi-head attention network sub-module, where MH is an ordinary MHA module; A and B are the real and imaginary parts of the input feature respectively; first, the MHA mechanism is extended to the complex value domain, and the complex-valued query matrix, key matrix, and value matrix are represented as Q C = HW Q , K C = HW K and V C = HW V , for the complex-valued input H = A + iB, and the real-valued matrices W Q , W K and W V , the complex-valued attention is defined as: Then, calculate the multi-head attention mechanism for each expansion term in the formula. The complex-valued multi-head attention mechanism is further described as: Complex-MultiHead(H,H,H) = [MH(A,A,A)-MH(A,B,B)-MH(B,A,B)-MH(B,B,A)] +i[MH(A,A,B)+MH(A,B,A)+MH(B,A,A)-MH(B,B,B)] = A'+iB', where H is the complex-valued input feature of the CMHA module, MH(·) is an ordinary MHA module, A and B are the real and imaginary parts of the input of the CMHA module, A' and B' are the outputs of the real and imaginary part modules of the CMHA respectively, and MH(A,B,A) is described as: Among them, and represent the weight matrix; h represents the number of heads, and W O is the output weight matrix; the complex-valued multi-head attention mechanism is used to generate different representation subspaces of the input sequence and utilize the dependencies between them. With H as the input, it is carried out under different linear mappings; the multi-head attention mechanism is considered to have strong feature extraction capabilities; the complex-valued multi-head attention operation of each head is described as: where d k represents the dimensions of Q and K, is to prevent the dot product value from being too large, and the Min - Max - Norm is described as:
5. The electromagnetic target identification method based on a complex-valued attention network according to claim 1, wherein: In the complex-valued feedforward sub-module, the complex-valued input vector is and the complex-valued fully-connected network weight vector is W = A + iB. The complex-valued fully-connected network layer is: where (×) represents the dot product operation; The complex-valued feed-forward sub-module consists of two complex-valued fully connected layers. The complex-valued feed-forward sub-module takes the output of the complex-valued multi-head attention mechanism sub-module as input. The complex-valued feed-forward sub-module uses the ReLU activation function to break the non-linearity of the model. The complex-valued feed-forward sub-module is described as FFN(x) = max(0, W1x + b1)W2 + b2, where x is the output of the complex-valued multi-head attention mechanism sub-module, W1 and W2 are network weights, and b1 and b2 are network biases; Add the input and output of the two complex-valued feed-forward sub-modules through residual connection, and then normalize the obtained sum; where the two feed-forward network sub-modules are connected in series. This operation is described as LayerNorm(x + SubModule(x)), where SubModule represents the complex-valued multi-head attention mechanism sub-module or the feed-forward network sub-module, LayerNorm represents the layer normalization operation, x is the input vector, and the time series encoding module has two addition and normalization sub-operation layers, which prevents degradation in the training of deep neural networks. In addition, the normalization operation can improve the training speed and stability.
Citation Information
Patent Citations
Feature extraction method and device based on voice signal time domain and frequency domain, and echo cancellation method and device
CN113870888A
Audio signal separation method and device, storage medium and electronic equipment
CN113921022A