# A Carrier-Based Gardner Timing Synchronization Algorithm for BPSK Signal in Maritime Communication
## 4 Simulation  
To evaluate the effectiveness of the CB-Gardner algorithm, a simulation was performed using Matlab R2017b. The transmitted signal was a BPSK single-carrier signal that passed through an additive white Gaussian noise (AWGN) channel and had artificially Doppler added to simulate the signal distortion caused by the Doppler effect and local crystal frequency offset. In our method, the received signal was processed by the CB-Gardner algorithm, after which the output signal underwent down-conversion and matched filtering. The method differed from the traditional Gardner method where these two procedures were inverted. Finally, equalization was performed, and the bit error rate (BER) was calculated. The transmitted signal consisted of both pilot and data. The pilot was an m-sequence of length 511, and the data consisted of \(N\) symbols, with both the pilot and data modulated with BPSK. For the Gardner algorithm, the receiver needs to perform CFO estimation and compensation before applying the Gardner algorithm. The CFO estimation method used in this paper is as follows: assume that the maximum CFO is \(\pm f_{\triangle max}\) all frequency offsets between \(f_{c}-f_{\triangle max}\) and \(f_{c}+f_{\triangle max}\) are traversed with an interval of \(f_{d}\), and then frequency compensation is performed. After that, the m-sequence part of the received signal is correlated with the local m-sequence signal, and the CFO is estimated as the frequency offset resulting in the maximum correlation peak. When the CB-Gardner is used, the passband signal is directly fed into it, and the receiver-side process is much simpler because CB-Gardner eliminates both the frequency offset and the sampling bias. Although the carrier signal is not affected by multipaths in the AWGN channel, residual frequency offset still exists when using the Gardner algorithm due to the inaccuracy of the estimated CFO, which can lead to an increasing phase shift of the symbols. The phase-locked loop of the equalizer is utilized to eliminate the residual phase distortion of the symbols. Therefore, it is necessary to use an equalization method when implementing the Gardner algorithm. For the sake of fairness, the CB-Gardener also employs equalization, which uses a decision-feedback equalizer based on root recursive least squares [34]. Since the CB-Gardner requires multiple sampling points in each carrier cycle of the carrier signal for error detection, this method is suitable for medium-wave communication scenarios with relatively low frequencies. To simulate the medium-wave communication system at sea, the simulation parameters were set as follows: the number of symbols \(N\) is 10,000, the sampling rate \(F_{s}\) is 2.4 MHz, the symbol rate \(F_{b}\) is 100 k, the carrier frequency \(f_{c}\) is 0.4 MHz, the roll-off factor of the forming filter \(\alpha\) is 0.2, the filter length is 40, and the feedforward and feedback filter lengths of the equalizer are 5 and 4. The number of simulations is set to 4000. The added frequency offset is measured in \(PPM\) (parts per million), i.e.,  
\[\frac{PPM}{10^{6}}=\delta=f_{\triangle}/f_{c} \tag{27}\]  
First, we set the SNR of the passband signal to 25 dB and varied the \(PPM\) from \(-\)32,000 to 32,000 with an interval of 4000. Figure 8 shows the simulated BER variation curves for different \(PPM\) when using the Gardner algorithm and the CB-Gardner algorithm. As shown in the figure, the BER is almost 0.5 when \(PPM\geq 8000\) or \(PPM\leq-\)12,000 when using the Gardner algorithm, indicating that the communication system cannot work at all. For the CB-Gardner, however, the communication system fails when \(PPM\geq 28\),000 or \(PPM\leq-\)32000. Therefore, the CB-Gardner can resist a maximum \(PPM\) of about \(\pm 28,000\), which is much larger than the corresponding \(\pm 8000\) value for the Gardner. For the Gardner algorithm, its BER is much less than \(10^{-4}\) when \(-8000\leq PPM\leq 4000\).