# How to choose a windowing function when performing a Chirp $\mathcal Z$-transform?

I've got some data sampled at 32 Hz. The only interesting stuff is happening between about 0-8 Hz and I've got to do real time batch processing and detect events with a delay of no more than a second. So that means I can only perform FFTs with 32 bins or less, to remedy the lack of resolution I'm using a Chirp $\mathcal Z$-transform (czt in Matlab).

I was wondering if there were special considerations to be made when you choose a windowing function on the original time data before when performing a CZT instead of an FFT?

• Processing delay isn't necessarily equal to the length of the DFT that you use if you overlap consecutive transforms in time. How long in time duration are the features that you're trying to detect? – Jason R Jul 24 '12 at 3:09
• They're about one second long so about 32 samples. – Ashutosh Jul 24 '12 at 4:56
• There's always a chance I don't really need to be using a Chirp Z-Transform as part of my spectral analysis, regardless of that decision. I'm quite interested in understanding how once ought to deal with windowing data (if its necessary) when using CZT. – Ashutosh Jul 24 '12 at 5:06
• As far as I know, the chirp-$z$ transform is an efficient mechanism for calculating DFTs of inconvenient sizes. Since you're getting at the same result, I would imagine that the concerns for selecting window functions would be similar or identical. Perhaps if you give more insight as to what you're doing some tradeoffs would become clear. – Jason R Jul 25 '12 at 1:55
• this is John BG: Do you think it would be possible for you to supply 'the signal' you are testing, or a portion of it? Could you just directly paste 10 seconds as comment 2x32(Hz)x10. Or show the graph with clear Voltage Current reference and time stamps, so readers can extract the samples from the graph? – John Bofarull Jul 3 '18 at 10:43

When we add the window function to the definition of the DFT we get

$$X(k) = \sum_{n=0}^{N-1} w[n]x[n] e^{-j \omega n}$$ with $\omega_k= \frac{2\pi k}{N}, k\in \mathbb{Z} ,$ $w[n]$ the window function and $x[n]$ the data. The multiplication of the data $x[n]$ with the window function $w[n]$ in the time domain corresponds to a convolution in the frequency domain.

The CZT and the FFT are basically just different ways to compute this sum. Each algorithm has its advantages and disadvantages. The FFT is fast, the CZT is more flexible. If you use both algorithms to compute the same coefficients $X(k)$ you get the same results. So, in this case, the window choice considerations should be the same for CZT and FFT.

So far I can answer only have of the original question: If the CZT is used to compute the same frequency bins as delivered by the FFT, there is no difference with respect to window selection.

Note1: Are you aware of the issues regarding frequency resolution of different DFT algorithms, as discussed e.g. in this thread ? The frequency resolution topic is the same for "CZT vs. FFT" as for "zero padding of FFT" or for "Goertzel vs. FFT".

Note2: This was the basic message of my original post.

If the CZT is used to compute the DFT on a finer frequency resolution, things are more complicated. In this thread the effect on the DFT is discussed. To make it short, the CZT interpolates the DFT. This interpolation makes window selection more involved.

If (as intended by the OP) the CZT is used to interpolate the DFT at a finer frequency resolution, the underlying maths remain the same, however the different frequency resolution must be kept in mind.

This is illustrated in a very simple example. The first figure shows the absolute values of a rectangular window. The FFT (without zero padding or similar things) computes the DFT right at frequencies where the window is zero, here marked in orange. With finer frequency resolution this changes, as shown in the next figure. This may (as in the example) introduce additional leakage.

• As I'm new to stackexchange I can't comment your question. As this is offtopic, I leave my comment here: – snowflake Feb 26 '16 at 21:31
• ... If you use the CZT to improve the frequency resolution, this does not give you more information about the signal content than a FFT. You'll find several questions here on stackexchange on that topic (sorry for the double comment. My edit was to slow, I didn't know about the five minute rule) – snowflake Feb 26 '16 at 21:37
• FFT is $O(NlogN)$ algorithm to compute DFT, which is $O(n^2)$. FFT(DFT) calculates equidistant points on circle in Z-plane. CZT calculates points on spiral arc (mainly, it can be even more flexible). So degrading spiral to circle of radius $1$ gives the special case of CZT which is DFT (and afaik CZT requires $3$ FFTs so it is still faster than pure DFT). Are you sure the window works exactly the same for both? P.S. I am not the downvoter you are looking for, but some things just made me write the comment. – Evil Jun 10 '16 at 3:25