# [Q] How can the chirp-z transform be used in resampling?

Started by March 11, 2004
```DSP Gurus:

I'm familiar with the classic interpolate-filter-decimate approach to
multirate DSP.  I've heard that the chirp-z transform can be used to
resample a signal also.  Can anyone provide additional information or
references (other than Google search results)?

Thanks,
OUP
```
```"One Usenet Poster" <me@my.computer.org> wrote in message
news:1052b8jauoi1417@corp.supernews.com...
> DSP Gurus:
>
> I'm familiar with the classic interpolate-filter-decimate approach to
> multirate DSP.  I've heard that the chirp-z transform can be used to
> resample a signal also.  Can anyone provide additional information or
> references (other than Google search results)?
>
> Thanks,
> OUP

Read the latest (or perhaps a month old) Embedded Programming Magazine. You
can find an online version at www.embedded.com.
It had a nice article on this topic for the uninitiated.
BTW, I'm not sure if I'd say that the Chirp-Z is useful for resampling. An
alternative to the FFT as well as for some specific applications like
time-frequency analysis is what I'd describe it's use in general terms.

Cheers

```
```"One Usenet Poster" <me@my.computer.org> wrote in message
news:1052b8jauoi1417@corp.supernews.com...
> DSP Gurus:
>
> I'm familiar with the classic interpolate-filter-decimate approach to
> multirate DSP.  I've heard that the chirp-z transform can be used to
> resample a signal also.  Can anyone provide additional information or
> references (other than Google search results)?

Well, one well-known technique for interpolation is to do an FFT, pad the
signal with zeros in the frequency domain, and then use the IFFT to get the
interpolated signal.  Using the chirp-z transform to perform FFTs and IFFTs
with arbitrary lengths would make it convenient to do this for odd sampling
rate ratios, as in converting between 44100 and 48000 Hz, or stretching
audio by small amounts to keep a video sync.

That's not a terriffic advantage, but off the top of my head, I can't think
of any other way to use chirp-z for resampling.

```
```Matt Timmermans wrote:
...
> "One Usenet Poster" wrote:
> > DSP Gurus:
> >
> > I'm familiar with the classic interpolate-filter-decimate approach to
> > multirate DSP.  I've heard that the chirp-z transform can be used to
> > resample a signal also.  Can anyone provide additional information or
> > references (other than Google search results)?
>
> Well, one well-known technique for interpolation is to do an FFT, pad the
> signal with zeros in the frequency domain, and then use the IFFT to get the
> interpolated signal.

Although what you write is of course correct, this method doesn't
strike me as very optimal in any sense. You have to take care of block
effects when processing streams, it has high code complexity (FFT vs.
FIR or polynomial interpolation), and fractional sample rate changes
come at extremely high processing cost (as opposed to polyphase
filtering approach).

> Using the chirp-z transform to perform FFTs and IFFTs
> with arbitrary lengths would make it convenient to do this for odd sampling
> rate ratios, as in converting between 44100 and 48000 Hz, or stretching
> audio by small amounts to keep a video sync.

Isn't it the other way round: One uses FFTs to calculate chirp-z
transforms?

And a fractional rate change like 44100 -> 48000 would require an
upsampling by factor 160 first, followed by downsampling by a factor
of 147. This means you have to take an IFFT of the signal at a
sampling rate of 7 MHz. Hardly convenient for real-time processing.

> That's not a terriffic advantage, but off the top of my head, I can't think
> of any other way to use chirp-z for resampling.

I think the chirp-z transform has no real-world application in
resampling. Parameters like quality and processing time are much
better controlable with polyphase filtering or polynomial
interpolation, at much lower code complexity.

Regards,
Andor
```
```"Andor" <an2or@mailcircuit.com> wrote in message
> Matt Timmermans wrote:
> Although what you write is of course correct, this method doesn't
> strike me as very optimal in any sense. You have to take care of block
> effects when processing streams, it has high code complexity (FFT vs.
> FIR or polynomial interpolation), and fractional sample rate changes
> come at extremely high processing cost (as opposed to polyphase
> filtering approach).

Yes, there are lots of situations in which that method of resampling is
inapplicable or impractical.

> Isn't it the other way round: One uses FFTs to calculate chirp-z
> transforms?

Both ways:  You chirp-z to do a weird-length FFT.  The chirp-z is based on
convolution, which you implement with a power-of-2-length FFT/IFFT.

> I think the chirp-z transform has no real-world application in
> resampling. Parameters like quality and processing time are much
> better controlable with polyphase filtering or polynomial
> interpolation, at much lower code complexity.

I would tend to think the same thing, except that I remember reading more

```
```Hi!

I hope I'm not disturbing.
..

>
>"Andor" <an2or@mailcircuit.com> wrote in message
>> Matt Timmermans wrote:
>> Although what you write is of course correct, this method doesn't
>> strike me as very optimal in any sense. You have to take care of block
>> effects when processing streams, it has high code complexity (FFT vs.
>> FIR or polynomial interpolation), and fractional sample rate changes
>> come at extremely high processing cost (as opposed to polyphase
>> filtering approach).
>
>Yes, there are lots of situations in which that method of resampling is
>inapplicable or impractical.
>
>> Isn't it the other way round: One uses FFTs to calculate chirp-z
>> transforms?
>
>Both ways:  You chirp-z to do a weird-length FFT.  The chirp-z is based
on
>convolution, which you implement with a power-of-2-length FFT/IFFT.
>

I could be wrong, but isn't 'weird-length FFT' some contradiction? Isn't
this a regular DFT, and a power-of-2-DFT is an FFT and the the
chirp-z-transformation can be used to calculate some, let's call it,
N-to-M DFT, with some N+M+1 < 2^k-FFT?

>> I think the chirp-z transform has no real-world application in
>> resampling. Parameters like quality and processing time are much
>> better controlable with polyphase filtering or polynomial
>> interpolation, at much lower code complexity.
>
>I would tend to think the same thing, except that I remember reading
more
>
>
>
>

best regards,
Thomas
```
```>Hi!
>
>I hope I'm not disturbing.
>Maybe this is also interesting for you:
If you want to know how to use CZT for auditory analysis of speech/music
signals, please have a look to following article:

An auditory spectral analysis model using the chirp z-transform
Kates, J.;
Signal Processing], IEEE Transactions on
Volume 31,  Issue 1,  Feb 1983 Page(s):148 - 156

Summary: In this paper we discuss a new signal-processing approach to
implementing an auditory processing model. The model is based on auditory
physiology and psychophysics; it uses constant-bandwidth analysis below
500 Hz and constant-Q analysis above 500 Hz.....

Have a nice day,

Robert
>
>>
>>"Andor" <an2or@mailcircuit.com> wrote in message
>>> Matt Timmermans wrote:
>>> Although what you write is of course correct, this method doesn't
>>> strike me as very optimal in any sense. You have to take care of
block
>>> effects when processing streams, it has high code complexity (FFT vs.
>>> FIR or polynomial interpolation), and fractional sample rate changes
>>> come at extremely high processing cost (as opposed to polyphase
>>> filtering approach).
>>
>>Yes, there are lots of situations in which that method of resampling is
>>inapplicable or impractical.
>>
>>> Isn't it the other way round: One uses FFTs to calculate chirp-z
>>> transforms?
>>
>>Both ways:  You chirp-z to do a weird-length FFT.  The chirp-z is based
>on
>>convolution, which you implement with a power-of-2-length FFT/IFFT.
>>
>
>
>
>I could be wrong, but isn't 'weird-length FFT' some contradiction? Isn't
>this a regular DFT, and a power-of-2-DFT is an FFT and the the
>chirp-z-transformation can be used to calculate some, let's call it,
>N-to-M DFT, with some N+M+1 < 2^k-FFT?
>
>
>
>>> I think the chirp-z transform has no real-world application in
>>> resampling. Parameters like quality and processing time are much
>>> better controlable with polyphase filtering or polynomial
>>> interpolation, at much lower code complexity.
>>
>>I would tend to think the same thing, except that I remember reading
>more