5.11 - Z Transform of an Impulse Response | FX Book Questions | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
5.11 - Z Transform of an Impulse Response
January 4, 2016 - 10:16 pm
Member Since: November 18, 2015
Forum Posts: 7
sp_UserOfflineSmall Offline

Hi - in section 5.11 it states: "In fact, this is exactly what the RackAFX software's audio analyzer does - it takes the impulse response of the filter and then runs a z transform on it to make the magnitude and phase plots..."

I've personally been interested in building an analyzer, particularly in showing a filter frequency response, and have been making a study of the one in RackAFX to prepare. Until reading this statement, I had expected the RackAFX analyzer (and any analyzer in general) would send an impulse test signal, measure the output, and then do a DFT on it to get the frequency response. So, a couple of questions on this:

1. As far as production code implementation, is taking the z transform of the impulse response and solving the transfer function preferred over taking the DFT? If so, why?

2. Additional research has showed me that there is a relationship between the DFT and the Z-Transform, but I haven't yet found a good source to understand this. Maybe you're going to say they are the same thing (or close enough that my 1st question is moot). Could anybody comment on this or point to a reference to help understand this better?

Thanks and Happy New Year!

January 5, 2016 - 1:50 am
Member Since: January 29, 2017
Forum Posts: 690
sp_UserOfflineSmall Offline

Hi Eegee

The analyzer takes the DFT of the input signal, not the z-transform directly. It was a bit of a stretch when making that statement and I should have re-worded it (sorry if it caused any confusion). The idea is that the z-transform of the impulse response will give you the same answer as the DFT when you evaluate the z-transform result at any of the DFT bin frequencies.

The new version of RAFX (6.6) now allows you to turn off the DFT normalization (see the FFT Controls section) and you can also export analyzer data as either a C++ or MATLAB array. With that, you should be able to compare your own DFT/FFT results. One of the only tricky things there is dealing with the windowing stealing some of the energy from the signal. You need to correct for the error this causes to make your magnitude responses come out correctly.

The second answer here is very succinct with the relationship of the z-transform and DFT:


- Will

January 5, 2016 - 3:00 am
Member Since: November 18, 2015
Forum Posts: 7
sp_UserOfflineSmall Offline

Thanks Will - I understand this better now. I haven't spent much time with RAFX 6.6 yet but will dive into it more later this week. I'm looking forward to playing with the export function.


January 5, 2016 - 11:42 pm
Member Since: November 18, 2015
Forum Posts: 7
sp_UserOfflineSmall Offline

I have another question on this.

Another idea I've been kicking around is an interactive filter designer where you drag around poles and zeros and see the frequency response of the filter updated in real time. Hopefully this will cement my understanding of all the concepts in teh book around filter design.

In this case, since the transfer function will be easy to get from the z-plane diagram, evaulating the z-transform directly would likely be a better way to get the freq response than running an impulse through a filter with that transfer function. To find a reasonable distribution of frequency points to evaluate at, it seems that knowing the bins for a 2^n DFT size is still optimal. So my questions:

1. Is my assumption correct that to display the best frequency response from a z-transform, I'd want to evaulate at each of the freq bins (I think this was implied in an earlier response by Will). Or would just iterating over frequencies up to fs be sufficient?

2. If knowing the bins is the right way to go, then it seems like I still have to:
a) Run an impulse thru the filter defined by the transfer function
b) Do a DFT of it to calculate the bins
c) Evaluate the transfer function at the center of every bin.

But wait - thinking out loud... I guess I don't have to take the DFT, but just decide what size I 'would have' used for the DFT, since the freq response would have 1/2 the samples in the DFT and I can then calculate the bins from knowing that:

ie - 1024 point DFT results in 513 bins which is a data point roughly every 85 hertz for a 44100 signal.

Am I headed in the right direction here?

January 7, 2016 - 1:48 am
Member Since: January 29, 2017
Forum Posts: 690
sp_UserOfflineSmall Offline


1. You don't have to use the bin frequencies to evaluate - in fact, you probably don't want to. The problem with the FFT is that the bin frequencies are linearly spaced so if you are doing a log plot (which is most useful) then you have poor resolution at low frequencies and too much resolution at high frequencies.

2. you don't need to run a FFT/DFT to calculate the bin frequencies; they are just fs/N where N = FFT length so for 44.1kHz and N = 1024, the bin frequencies are 43.066Hz and its multiples (86, 129, etc...) and 0 Hz counts as well.

3. your calculation of bin frequencies is off - you use the full FFT size not half of it.

There is a pretty nice discussion of interpreting the FFT results here:

See also App Note AN-2 here:

- Will

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 775

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 846

Posts: 3353

Moderators: W Pirkle: 690