# An Improved CZT Algorithm for High-Precision Frequency Estimation
## 3 Improved CZT Algorithm
### Approximate Solution of the Bias Correction Factor \(\mu\)  
As \(\theta\) approaches 0, there exists \(\sin(\theta)\approx\theta\). Therefore, when \(MN\) is large, (15) can be approximated to:  
\[ \begin{array}{l}\mu\approx\frac{X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{ CZT}}}(k_{m}+1)\exp\!\left(2\pi\frac{q(N-1)}{MN}\right)\frac{(\delta-1)}{ \delta}}{X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{CZT}}}(k_{m}-1)\exp\! \left(-j2\pi\frac{q(N-1)}{MN}\right)\frac{(\delta+1)}{\delta}}\\ =\frac{X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{CZT}}}(k_{m}+1)\exp\!\left( 2\pi\frac{q(N-1)}{MN}\right)+X_{\text{\tiny{CZT}}}(k_{m}+1)\exp\!\left(\!j2 \pi\frac{q(N-1)}{MN}\right)\frac{1}{\delta}}{X_{\text{\tiny{CZT}}}(k_{m})-X_ {\text{\tiny{CZT}}}(k_{m}-1)\exp\!\left(-j2\pi\frac{q(N-1)}{MN}\right)-X_{ \text{\tiny{CZT}}}(k_{m}-1)\exp\!\left(-j2\pi\frac{q(N-1)}{MN}\right)\frac{1} {\delta}}\end{array}  \tag{19}\]  
From (12) and (14), the following can be obtained:  
\[ \begin{array}{l}X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{CZT}}}(k_{m}+1 )\exp\!\left(j2\pi\frac{q(N-1)}{MN}\right)\\ =a_{0}\exp\!\left(j2\pi\varphi_{0}\right)\times\exp\!\left(j2\pi\!\left(\frac{q \delta(N-1)}{MN}\right)\right)\times\left(\frac{\sin\!\left(\pi\frac{2q\delta }{M}\right)}{\sin\!\left(\pi\frac{2q\delta}{MN}\right)}-\frac{\sin\!\left(\pi \frac{2q(N-1)}{MN}\right)}{\sin\!\left(\pi\frac{2q(N-1)}{MN}\right)}\right) \end{array}  \tag{20}\]  
From (12) and (13), the following can be obtained:  
\[ \begin{array}{l}X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{CZT}}}(k_{m}-1 )\exp\!\left(-j2\pi\frac{q(N-1)}{MN}\right)\\ =a_{0}\exp\!\left(j2\pi\varphi_{0}\right)\times\exp\!\left(j2\pi\!\left(\frac{q \delta(N-1)}{MN}\right)\right)\times\left(\frac{\sin\!\left(\pi\frac{2q \delta}{M}\right)}{\sin\!\left(\pi\frac{2q\delta}{MN}\right)}-\frac{\sin\!\left( \pi\frac{2q(N-1)}{MN}\right)}{\sin\!\left(\pi\frac{2q(N-1)}{MN}\right)}\right) \end{array}  \tag{21}\]  
When \(MN\) is large, (20) and (21) can be, respectively, approximated as follows:  
\[X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{CZT}}}(k_{m}+1)\exp\!\left(j2\pi \frac{q(N-1)}{MN}\right)\approx 0 \tag{22}\]  
\[X_{\text{\tiny{CZT}}}(k_{m})-X_{\text{\tiny{CZT}}}(k_{m}-1)\exp\!\left(-j2 \pi\frac{q(N-1)}{MN}\right)\approx 0 \tag{23}\]  
Substituting (22) and (23) into (19), \(\mu\) is approximated as follows:  
\[\hat{\mu}\approx-\frac{X_{\text{\tiny{CZT}}}(k_{m}+1)\exp\!\left(j2\pi\frac{q (N-1)}{MN}\right)}{X_{\text{\tiny{CZT}}}(k_{m}-1)\exp\!\left(-j2\pi\frac{q(N-1 )}{MN}\right)}\approx-\frac{X_{\text{\tiny{CZT}}}(k_{m}+1)}{X_{\text{\tiny{CZT }}}(k_{m}-1)}\cos\!\left(4\pi\frac{q(N-1)}{MN}\right) \tag{24}\]  
Substituting (24) into (18), the approximation of \(\delta\) can be derived as follows:  
\[\hat{\delta}=\arctan\!\left(\frac{\left(\hat{\mu}+1\right)\cos\!\left(\pi\frac{ q}{M}\right)}{\left(\hat{\mu}-1\right)\sin\!\left(\pi\frac{q}{M}\right)}\right)\frac{M}{2q\pi} \tag{25}\]Substituting \(\delta\) into (11), the frequency \(\hat{f}_{c}\) is estimated as follows:  
\[\hat{f}_{c}=\big{(}k_{p}-q\big{)}\frac{f_{s}}{N}+\big{(}k_{m}+\hat{\delta}\big{)} \frac{2 qf_{s}}{NM} \tag{26}\]  
It can be seen that the frequency estimate of the improved CZT method in (26) is obtained by correcting the frequency estimate of the CZT method in (10) using the frequency bias \(\hat{\delta}\). Therefore, the proposed improved CZT algorithm can obtain a higher frequency estimation accuracy than the basic CZT algorithm. The improved CZT algorithm is summarized in Algorithm 1. Moreover, the computational complexity of various methods is shown in Table 1.  
```
0: the sampled signal \(x(n)\), \(n=0\), \(1\), \(\cdots\), \(N-1\);  Set the initial parameters \(q\) and \(M\) of CZT.