Implementing FFT-z—frequently referred to in digital signal processing (DSP) as the Chirp-z Transform (CZT) or Chirp Transform Algorithm (CTA)—allows you to compute the z-transform of a signal at a specific subset of points on a spiral contour or custom section of the unit circle.
Unlike a standard Fast Fourier Transform (FFT) which samples the entire unit circle uniformly, FFT-z gives your project arbitrary frequency spacing and high-resolution zooming capabilities without needing to increase your original input sample size. It achieves this while maintaining an efficient complexity.
This step-by-step guide explains how to implement the FFT-z algorithm from scratch or integrate it into your next software project. Step 1: Define the Spiral Parameters
To calculate the custom spectrum, you must first define where the evaluation path starts and how it travels through the z-plane. You need to establish four core mathematical parameters: N: The length of your input signal time block.
M: The number of output frequency bins you want to calculate (this does not have to equal N). A: The starting point in the complex z-plane, defined as
, where A₀ is the initial radius and θ₀ is the starting phase angle.
W: The complex step multiplier determining the spiral pitch and frequency step, defined as
, where W₀ scales the radius at each step and φ₀ defines the frequency bin spacing. Step 2: Apply Blue’s Trick (Chirp Reformulation)
The primary mathematical bottleneck of a custom z-transform is that it doesn’t natively fit into an FFT structure. To fix this, you must apply a mathematical identity known as Blue’s Trick (substituting the index product nk with the identity
This allows you to rewrite the standard z-transform equation into a linear convolution of two distinct sequences, which can then be computed rapidly using standard forward and inverse FFTs. Step 3: Construct the Three Working Sequences
To compute the convolution, initialize three arrays in your code: The Modulated Input ( ): Multiply your original signal samples by the chirp modulation factor:
y[n]=x[n]⋅A−n⋅Wn22,0≤n
): Generate a temporary filter kernel sequence of length L (where L ≥ N + M – 1, rounded up to the nearest power of 2 for optimal FFT speeds):
v[k]=W−k22v open bracket k close bracket equals cap W raised to the negative the fraction with numerator k squared and denominator 2 end-fraction power Ensure you structure
to support circular convolution by configuring the negative indices correctly inside the zero-padded array. Zero Padding: Pad both the array and the
array with trailing zeros until they reach the target length L. Step 4: Perform Fast Convolution via Standard FFT
With the arrays padded, execute the core frequency-domain multiplication:
Compute the Forward FFT of the modulated input array: Y = FFT(y).
Compute the Forward FFT of the chirp filter kernel: V = FFT(v).
Multiply the two resulting frequency arrays element-by-element:
Compute the Inverse FFT (IFFT) of the product array to return to the time domain: g = IFFT®. Step 5: Post-Modulate for Final Frequency Output
The resulting array g contains the convolved data, but it requires a final phase adjustment. Extract the first M elements of the array and multiply them by a trailing chirp factor to yield your final high-resolution spectrum,
X(zk)=g[k]⋅Wk22,0≤k Depending on your project’s performance constraints, you have two primary ways to deploy this logic: Option A: Leveraging Open-Source Libraries (“Buy”) If you are looking for production-ready, highly optimized code, do not write this entirely from scratch.
Leave a Reply