1. Introduction
A direct sequence spread spectrum signal has good anti-interference performance, low interception probability and other excellent characteristics, and it is widely used in military and civil communication systems such as identification of friend or foe, satellite communication, indoor wireless communication, WIFI, etc. However, these characteristics will also make signal detection and parameter estimation more difficult in non-cooperative situations. The estimation of the spreading code period is fundamental to the estimation of other parameters in non-cooperative DSSS signal processing. The period estimation of spread spectrum codes will be explored in this paper.
With the continuous development of signal detection technology and parameter blind estimation technology, the methods for blind estimation of DSSS signal spread spectrum code (also known as PN code) period are also constantly improving. Currently, the mature PN (Pseudo-Noise, PN) code period estimation methods that have been studied mainly include the correlation method, cepstrum method, power spectrum method, power spectrum reprocessing method [
1], and correlation entropy method [
2]. Some researchers studied existing DSSS signal-processing techniques and proposed an autocorrelation estimator to estimate the PN code period. Dong and Hu [
3] proposed a delay multiplication-based estimation method for the pseudo-random sequence estimation of long pseudo-random code direct spread spectrum signals, which can not only estimate the pseudo-random code sequence but also estimate the information code period and its synchronization information. Some researchers proposed an estimation method that combines delay multiplication with correlation spectrum analysis based on the periodicity of the peaks that appear after the delay multiplication of direct spread spectrum signals, and they achieved the estimation of a symbol period with direct spread spectrum signals. The cepstrum method mainly uses logarithmic operation to make the frequency domain spectral lines of the direct spread spectrum signal more obvious and easy to detect, thereby improving detection performance. Some researchers achieved the period detection of direct spread spectrum signals by using power spectrum averaging to reduce the impact of pulse noise on detection performance. Some researchers proposed a narrow window autocorrelation cepstrum estimation method based on the classical cepstrum method, and they proposed a new peak search strategy based on least squares fitting to address the case of peak misdetection, further improving estimation performance. Some researchers solved the problem of difficult estimation of the pseudo-code period of the direct spread spectrum signal in multipath environments and calculated the power spectrum of the DSSS signal once again. They found that the spike pulses at the integer multiple of the spreading code period in the secondary power spectrum were much more pronounced than those in the primary power spectrum. By detecting the distance between these spike pulses, the estimation of the pseudo-code period of the direct spread spectrum signal in multipath environments was achieved. Bai et al. proposed a period estimation method for power spectrum reprocessing to address the challenge of weak direct spread spectrum signal period estimation under strong narrowband interference [
4]. This method first uses the overlapping window FFT algorithm to transform the received signal into the frequency domain for strong narrowband interference cancellation and then performs period estimation. On the basis of previous research, Yu et al. proposed an estimation method for power spectrum reprocessing based on wavelet decomposition [
5], which improves the estimation performance in low signal-to-noise ratio situations. Sheng et al. [
1] proposed an improved estimation method for power spectrum reprocessing to address issues such as peak energy leakage and false peak interference by modifying segment lengths, overlapping segments, and extracting non-adjacent peaks. Some researchers studied the relationship between the correlation entropy of direct spread spectrum signals and the period of pseudo-code, and they proposed an estimation method based on delay multiplied correlation entropy. Experiments have shown that the performance of this method is superior to cepstrum and correlation methods.
Deep learning is an important method of artificial intelligence technology, which has been applied in various fields such as image processing [
6,
7,
8], speech recognition [
9], emotion recognition [
10], text processing [
11], and social services [
12,
13,
14,
15]. In the field of signal processing, deep learning is mainly used in intelligent receivers [
16], signal debugging method recognition [
17,
18], radar signal classification [
19], image-based radio signal recognition [
20], and other aspects. Chen et al. proposed a new deep learning framework for signals [
21], which can directly input signals into the network without pre-extracting features. He et al. [
22] proposed a Residual Network (ResNet) in 2016 to address the problem of gradient explosion after network model deepening, which can make the network model deeper. After the ResNet model was proposed, it has been widely applied in fields such as image recognition [
23,
24] and signal processing [
25]. Jin and Kim proposed a PN code length estimation based on deep learning for the first time [
26], using a basic CNN network to achieve PN code length estimation for direct spread spectrum signals with lengths of 16, 32, 64, and 128. However, this method has poor estimation performance in low signal-to-noise ratios and cannot achieve an estimation of other commonly used PN code lengths.
In this paper, we propose a PN code period estimation method using a 1D CNN-ResNet to address the issues of peak leakage and false peaks in traditional spread spectrum code period estimation methods such as the power spectrum method and cepstrum method under low signal-to-noise ratio conditions. The main idea of this method is to change the calculation of the spreading code period to the calculation of the spreading code length based on the fact that the spreading code period is equal to the spreading code length multiplied by the chip width. On this basis, the problem of estimating the spreading code period of DSSS signals modulated by commonly used spreading code lengths 127, 255, 511, 1023, and 2047 is modeled as a multi-class spreading code length problem, and the ResNet network is used to achieve the length estimation of the spreading code and then, based on their relationship, implement spread spectrum code period estimation. During the network training, directly using the I and Q channel data of these types of direct spread spectrum signals as dual-channel inputs to train the network enables distinguishing the spread spectrum code length of the input signal.
Transforming the period estimation of the PN code into a multi-classification problem, as the length of the PN code can only be , in this paper, and proposing a CNN-ResNet based model to estimate the DSSS signal on the basis of previous research.
Generating the DSSS signals in a Gaussian channel with PN code periods of 127, 255, 511, 1023, and 2047, which serve as training and testing data sets. The model is then trained by BPSK-modulated signals.
Analyzing the estimation performance of the model under different SNRs in a simulation experiment and studying the PN code period estimations at the SNR of −10 and −8 dB through the confusion matrix.
Testing the trained model to examine the DSSS signal modulated by QPSK. The model can also effectively estimate the PN code period of the QPSK-DSSS signal. The result proves that the model in this paper has strong generalization of the period estimation of the spreading code.
The rest of this paper is structured as follows.
Section 2 presents the signal model and proposes the method for the period estimation of PN codes based on the CNN-ResNet model.
Section 3 details the simulation experiment and result analysis, and
Section 4 concludes the content of the paper and discusses future work directions.
3. Simulation Experiment and Result Analysis
3.1. Dataset Production
First, the original information sequence is randomly generated; then, it is encoded with m-sequences of different lengths generated through the linear displacement register, and finally, the encoded signal is modulated with the BPSK modulation method to obtain the direct-sequence spread spectrum signals. The length of each signal is 8192, and the real and imaginary parts are the data of the I and Q channels. The I/Q channels are used as the channel dimensions of the dataset. Therefore, the size of a single sample in the dataset is . The lengths of the m sequences used are 127, 255, 511, 1023, and 2047, respectively, with a signal-to-noise ratio range of [−20:2:10] dB. Under each signal-to-noise ratio, 200 sample signals of different spread spectrum code lengths are generated and combined together to form a complete dataset, allowing the trained individual network to adapt to different signal-to-noise ratios. Before training, the entire dataset needs to be unordered and then divided into training and testing sets in a 3:1 ratio.
3.2. Training Environment and Process
The model training is completed on a computer with a CPU model of Intel(R) Core(TM) i7-10875H @ 2.30 GHz (Intel, Santa Clara, CA, USA), with a running memory of 32 GB and a GPU model of NVIDIA GeForce RTX2060 (NVIDIA, Santa Clara, CA, USA). The network training parameters are shown in
Table 2. There are two dropout parameters, with a dropout value of 0.15 between the two convolutional layers in each residual module and a dropout value of 0.17 between the different residual modules.
Figure 4a,b, respectively, show the change of the accuracy and loss function on the training set and test set during the training of the ResNet-based CNN network. It can be seen from
Figure 4a that after training 23 epochs, the accuracy on the training set and the test set has reached 75%, which means the rate of convergence of the model is fast. After the final training, the model achieved an accuracy rate of 87.34% on the training set and 80.70% on the test set. Due to the fact that the signal-to-noise ratio of the dataset used for model training and testing during the training process ranges from −20 to 10 dB, the performance of the network model is relatively poor at low signal-to-noise ratios, resulting in a decrease in overall accuracy. The accuracy of the model under different signal-to-noise ratios was specifically demonstrated in subsequent experimental results analysis.
3.3. Estimation Performance Analysis under Different Signal-to-Noise Ratios
In order to verify the performance of the network model in estimating the spread spectrum code length of DSSS signals under different signal-to-noise ratios, the selected spread spectrum code lengths are 127, 255, 511, 1023 and 2047. The signal-to-noise ratio range is [−20, 0] dB; with each increase of 2 dB, the modulation method adopts BPSK modulation. A total of 100 direct spread spectrum signals with different spreading code lengths were generated for each signal-to-noise ratio.
Separate tests were conducted on direct spread spectrum signals with different spreading code lengths under different signal-to-noise ratios, and the test results are shown in
Figure 5. From
Figure 5, it can be seen that the estimated recall rate continues to increase as the signal-to-noise ratio increases. When the signal-to-noise ratio is higher than −13 dB, the recall rate of the estimated result reaches over 50%. When the signal-to-noise ratio reaches −8 dB or above, the recall rate of the estimated result reaches over 90%.
Due to the identical length of each direct spread spectrum signal, the longer the selected spread spectrum code, the shorter the length of the original information sequence contained in the spread spectrum signal. Observing the ranking of the recall rate from high to low corresponding to the length of the spread spectrum code at the same signal-to-noise ratio in
Figure 5, it is found that this ranking result is not completely the same, and there is no obvious pattern. Therefore, it can be explained that the recall rate of estimating the length of the spread spectrum code using this model is independent of the length of the original information sequence contained in the direct spread spectrum signal. At the same time, it can be found in
Figure 5 that at −14 dB and −12 dB, the recall rates of different spread spectrum code length estimates differ greatly. A specific analysis will be made through the confusion matrix in
Section 3.5.
3.4. Estimation Performance Analysis under QPSK Modulation Mode
The modulation method of the direct spread spectrum signal in the dataset used in the training of the network model in this article is BPSK. Here, the QPSK-modulated direct spread spectrum signal is used to verify the generalization ability of the network model.
Figure 6 shows the change in recall rate of the direct spread spectrum signal modulated by QPSK in the signal-to-noise ratio range of −20 to 0 dB, using the model proposed in this paper for spreading code length estimation. The spread spectrum code lengths of the direct spread spectrum signals selected in the experiment are 127, 255, 511, 1023 and 2047; the signal-to-noise ratio increases by 2 dB each time.
It can be seen from
Figure 6 that the network model is also suitable for QPSK DSSS signals. The recall rate of PN code length estimation for QPSK DSSS signals modulated with different lengths of PN codes steadily increases with the increase of signal-to-noise ratio. When the signal-to-noise ratio is higher than −6 dB, the recall rate of the estimated results of the model in this paper reaches over 90%. At −4 dB, the recall rate reaches 100%, which reduces the overall estimation performance of the model by 2 dB compared to the BPSK-DSSS signals.
By observing the ranking of the corresponding spread spectrum code length for each same signal-to-noise ratio recall rate from high to low, it is found that this ranking result is not completely the same and there is no obvious pattern. Therefore, similar to the previous section, the recall rate of the model’s estimation results remains unaffected by the length of the original information sequence contained in the signal under QPSK modulation.
3.5. Confusion Matrix Analysis
Figure 7a,b show the confusion matrix of BPSK-modulated DSSS signals with different PN code lengths at −12 dB and −14 dB,
Figure 7c,d show the confusion matrix of QPSK-modulated DSSS signals with different PN code lengths at −8 dB and −10 dB, and the diagonal value in the confusion matrix represents the recall rate. Observing the sum of two numbers with opposite row and column numbers in the first row and the first column of these four images in
Figure 7, it can be found that the model in this paper is most likely to confuse the two cases with PN code lengths of 127 and 1023 in most cases, indicating that the network still needs further strengthening in extracting different features of these two signals. It can be found from the data of the diagonal of the Confusion matrix in
Figure 7 that the recall rate of the estimated result of the spread spectrum code lengths of 127 and 255 is the lowest; this result illustrates that they are the most difficult to be accurately estimated. Observing
Figure 7a,b, it can be observed that in the case of a low signal-to-noise ratio, direct spread spectrum signals with PN code lengths of 255, 511, 1023, and 2047 are most likely to be misjudged as PN code lengths of 127 when using BPSK modulation. At the same time, the probability of a signal with PN code lengths of 127 being misjudged as PN code lengths of 1023 increases the fastest as the signal-to-noise ratio decreases. By comparing
Figure 7a–d, it can be observed that the total probability of DSSS signals with different PN code lengths being misjudged as adjacent PN code lengths increases as the signal-to-noise ratio decreases.
3.6. Comparison of Estimation Performance between Different Methods
This section compares and analyzes the performance of the ResNet-based spread spectrum code period estimation method with the power spectrum reprocessing method and the cepstrum method in the traditional spread spectrum code period estimation methods through simulation experiments. The DSSS signal in this experiment contains a 65-bit information code with a length of 127 spreading codes. The spreading code sequence type is an m sequence with a modulation method of BPSK. The noise is Gaussian white noise, and the signal-to-noise ratio range is [−20, 0] dB. The two methods perform 100 simulated reality tests under a single signal-to-noise ratio, and the information codes in each experiment are randomly generated. If there is a relative error, the estimation result is considered correct. The curve of the probability of correctly estimating the period of the spread spectrum code with respect to the signal-to-noise ratio obtained through simulation experiments is shown in
Figure 8.
From
Figure 8, it can be seen that the correct estimation probability of the spread spectrum code period by all three methods increases continuously with the increase of signal-to-noise ratio. At the same time, it can be found that the power spectrum reprocessing method and the cepstrum method have completely failed below −14 dB and cannot estimate the correct spread spectrum code period, while the method proposed in this paper still has a probability of 0.50 to estimate the correct spread spectrum code period. At −6 dB, the correct estimation probability of the proposed method reaches 1, while the correct estimation probability of the power spectrum reprocessing method and the cepstrum method are only 0.72 and 0.86, respectively, which are 0.28 and 0.14 away from the proposed method. The correct estimation probability of the power spectrum reprocessing method reaches 0.88 at 0 dB, while the correct estimation probability of the proposed method has already reached 0.88 at −9 dB. Therefore, the overall estimation performance of the proposed method is improved by 9 dB compared to the power spectrum reprocessing method. Similarly, our method improves the estimation performance by 4 dB compared to the cepstrum method.
3.7. Discussion
With a vision toward exploring new frontiers in the estimation of the PN code period, this paper transformed it into a classification problem of DSSS signals with different spreading code periods, leveraging the power of a 1D CNN-ResNet. Upon training and verifying the model using BPSK modulation, the model was then put to the test with QPSK-modulated signals, and the estimation performance was analyzed through metrics such as loss function, precision rate, recall rate, and confusion matrix.
The model achieved an accuracy rate of 87.34% on the training set and 80.70% on the test set. Due to the fact that the signal-to-noise ratio of the dataset used for model training and testing during the training process ranges from −20 to 10 dB, the performance of the network model is relatively poor at low signal-to-noise ratios, resulting in a decrease in overall accuracy. In addition, we designed a comparative experiment between the proposed algorithm, the power spectrum reprocessing algorithm and the cepstrum algorithm, and the results showed that the overall estimation performance of our method was improved by 9 dB and 4 dB compared to the power spectrum reprocessing method and the cepstrum method. Although the model was proved to be effective, as the overall performance of QPSK and BPSK-modulated signals differs by 2 dB, there remains room for improvement. Furthermore, it is regrettable that the data used in the above studies were generated through simulation and we did not use actual spread spectrum signals for experiments; thus, the practicality of the proposed method cannot be confirmed yet.