Sampling frequency F_s = 1000 Hz, N = 256 samples and M = 256 CZT output points are fixed. The input signal is x[n] = sin(2π f_1 n/F_s) + sin(2π f_2 n/F_s).
While paused, moving a slider updates the results immediately.
Time signal (top) / CZT contour in the z-plane (left) / full-band DFT with the zoom window (top right) / CZT zoom resolving the close peaks (bottom right). The zoom window sweeps automatically.
The chirp-Z transform (CZT) is a generalized DFT that samples M points along a logarithmic spiral in the z-plane:
$$X[k] = \sum_{n=0}^{N-1} x[n]\,A^{-n}\,W^{nk}, \qquad k = 0,1,\dots,M-1$$where $A = A_0 e^{j\theta_0}$ and $W = W_0 e^{-j\phi_0}$. For a zoom DFT:
$$A = e^{j\,2\pi f_\text{start}/F_s}, \qquad W = e^{-j\,2\pi (f_\text{end}-f_\text{start})/(M\,F_s)}$$This gives the frequency response at M equally spaced points over $[f_\text{start}, f_\text{end}]$. The DFT divides 0 to F_s into N bins (the one-sided spectrum 0 to F_s/2 has N/2 points), so the resolutions are:
$$\Delta f_\text{DFT} = \frac{F_s}{N}, \qquad \Delta f_\text{CZT} = \frac{f_\text{end}-f_\text{start}}{M}$$With the defaults (F_s = 1000, N = M = 256, f_start = 90, f_end = 120) the DFT gives 3.91 Hz/bin and the CZT 0.117 Hz/bin, about 33 times finer.