# Timing and Frequency Synchronization Using CAZAC Sequences for OFDM Systems
## 4 Materials and Methods
### Frequency Offset Estimation Method  
According to the above timing synchronization algorithms, the \(m\) correlation peak value of \(Corr(n)\) can be obtained as follows: \(\textit{Peak}(i),i=1,2,\cdots,m\). Next, \(N_{\text{F}}-m\) zeros are filled behind these \(m\) peaks, and then the \(N_{\text{F}}\)-point FFT operation is performed on the  
Figure 7: The flowchart of the accumulated correlation peak detection (ACPD) algorithm.  
resulting sequence, and the FFT results are used for frequency estimation. The obtained sequence can be represented as \(Corr_{\text{FFT}}(k)=\text{FFT}([Peak(1\ldots m);zeros(1\ldots N_{\text{F}}-m)])\), \(0\leq k\leq N_{\text{F}}-1\).  
Since the accuracy of the FFT frequency estimation algorithm is not high enough, it can only be used for coarse estimation [40]; however, we use the quadratic interpolation frequency estimation algorithm to solve this problem. The quadratic interpolation algorithm is based on the coarse estimation of the FFT algorithm, and it uses the two values on both sides of the maximum value to perform fine estimation, according to the interpolation formula.  
According to the FFT algorithm, we can obtain the maximum value \(Corr_{\text{FFT}}(k_{\text{FFT}})\) of the spectrum energy and its corresponding frequency point \(k_{\text{FFT}}\). At the same time, we can obtain two values \(Corr_{\text{FFT}}(k_{\text{FFT}}-1)\) and \(Corr_{\text{FFT}}(k_{\text{FFT}}+1)\) on both sides of the maximum value \(Corr_{\text{FFT}}(k_{\text{FFT}})\), and their corresponding frequency points \(k_{\text{FFT}}-1\) and \(k_{\text{FFT}}+1\). From these three points, we can construct a quadratic curve \(z=ak^{2}+bk+c\) and then substitute the three points into \(z\) to obtain the coefficients \(a\), \(b\), and \(c\). By calculating the maximum value \(Corr_{\text{FFT}}(k_{\text{max}})\) of curve \(z\) and its corresponding frequency point \(k_{\text{max}}\), we can obtain a more accurate frequency estimation value \(\hat{f}_{\text{int}}\). We can easily obtain the formula for \(k_{\text{max}}\) as  
\[k_{\text{max}}=k_{\text{FFT}}+\frac{3 Corr_{\text{FFT}}(k_{\text{FFT}}-1)-4 Corr _{\text{FFT}}(k_{\text{FFT}})+Corr_{\text{FFT}}(k_{\text{FFT}}+1)}{2 Corr_{ \text{FFT}}(k_{\text{FFT}}-1)-4 Corr_{\text{FFT}}(k_{\text{FFT}})+2 Corr_{ \text{FFT}}(k_{\text{FFT}}+1)}-1, \tag{12}\]  
which is the relative offset position of the maximum due to the frequency offset.  
As in the FFT algorithm, the absolute offset position of the maximum due to frequency offset is  
\[k_{\text{CFO}}=k_{\text{max}}-N_{\text{F}}/2, \tag{13}\]  
and then the estimated value of the frequency offset can be obtained as  
\[\hat{f}_{\text{int}}=\frac{k_{\text{CFO}}}{N\cdot N_{\text{F}}}\cdot f_{s}, \tag{14}\]  
where \(N\) is the length of the ZC sequences, \(N_{\text{F}}\) is the FFT operation points, and \(f_{s}\) is the sampling frequency.  
The schematic diagram of the quadratic interpolation algorithm is shown in Figure 8.  
Since \(k_{\text{max}}\in[0,N_{\text{F}})\), we can obtain \(-N_{F}/2\leq k_{\text{CFO}}<N_{\text{F}}/2\). By combining this with Equation (14), we can obtain the frequency offset estimation range as \(\hat{f}_{\text{int}}\in\left[-\frac{f_{s}}{2N},\frac{f_{s}}{2N}\right)\), where \(N\) is the length of the ZC sequences in the preamble.  
Figure 8: The schematic diagram of the quadratic interpolation algorithm.