## 4 Simulation and Analysis
### Simulations
#### 4.1.1 Determine the Number of Observations for MLE  
In statistics, MLE is a method of estimating the parameters of a statistical model. And the estimation accuracy of parameter using MLE is closely related to the number of signal observations used for one estimation. In general, the accuracy of the MLE parameter estimation increases with the number of observations used. Therefore, it is necessary to first analyze how many observations is suitable for one MLE in the carrier loop. The algorithm proposed uses coherent integration results as the MLE observations. We use the loss of lock probability as a standard reference criteria to evaluate the number of observations. The relationship between loss of lock probability and SNR using different observations is shown in Figure 6. The numbers in the legend in Figure 6 represent the values of \(N\). The positioning signal adopts Gold codes and the simulation parameters are listed in Table 1.  
Figure 6 shows the correspondence between the loss of lock probability and SNR of the proposed algorithm when \(N=15\), \(N=30\), and \(N=45\). It can be seen from the results that as the number of sample observations (denoted as \(N\)) gradually increases, the anti-noise ability of the proposed algorithm gradually increases, which means the loss of lock probability with same SNR gradually decreases. The result in Figure 6 is reasonable. Because the value of SNR in experiments is really low, the influence of noise under weak signals will be greater than the different number value of \(N\), which is the main factor. We took a piece of data at low SNR to illustrate the problem in TC-OFDM system. Also, 500 Monte Carlo simulations are made to give RMS of frequency error with different sample observations. The results are shown in Figure 7.  
Figure 7 gives the RMS frequency tracking error performance curve for the proposed algorithm with different \(N\) values. The numbers in the legend in Figure 7 represent the values of \(N\). From the results, it can be seen that when the SNR is less than \(-35\) dB, the larger of N, the higher frequency estimation accuracy of the MLE&KF. The reason is that the larger number of sample observations leads to the MLE with higher frequency resolution. However, the noise power gradually decreases with the increase of SNR. When the SNR is greater than \(-35\) dB, an excessively large value of \(N\) will lead to excessive steady state error. Therefore, the error curve corresponding to \(N=45\) will be degraded. In addition, Figure 7 also compares the error performance curve of MLE&KF with EKF.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Slot time, \(T_{F}\) & 25 ms \\ Sample rate & 4.4 \\ Intermediate frequency, \(f_{F}\) & 0 Hz \\ Data bit transition & Random \\ Coherent integration time, \(T_{obs}\) & 1.6 ms \\ Predefined threshold, Pre\_Thres & 0.02 \\ Iteration maximum numbers, Iter\_Max & 15 \\ Signal to noise ratio, SNR & \(-45\) dB—\(20\) dB \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation parameters.  
Figure 6: The Relationship between Loss of Lock Probability and SNR.  
From the comparison results, it can be found that the performance of the frequency tracking error of the MLE&KF designed for the optimal estimation and filtering algorithm is significantly improved than the performance of the EKF based on the sub-optimal filtering algorithm. According to the above analysis, observations with \(N=30\) are used to make a reasonable statistical sample observations.