10:16 pm

November 18, 2015

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!

1:50 am

January 29, 2017

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:

https://www.quora.com/What-is-the-connection-between-the-DFT-and-the-Z-transform

- Will

11:42 pm

November 18, 2015

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?

1:48 am

January 29, 2017

Hi EG

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:

http://www.willpirkle.com/foru.....ft-object/

See also App Note AN-2 here:

http://www.willpirkle.com/Down.....ingFFT.pdf

- Will

Most Users Ever Online: 36

Currently Online:

5 Guest(s)

Currently Browsing this Page:

1 Guest(s)

Top Posters:

Skyler: 48

Derek: 41

Peter: 41

Frodson: 40

clau_ste: 39

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 495

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 511

Posts: 1966

Newest Members:

CoraDias, Edoardo, knooierd, daniel, Merril Bradshaw, BillPlunkett, Pajczur, michaelwayneharwood, RickM, rainbow windModerators: W Pirkle: 187

Administrators: Tom: 66, JD Young: 80, Will Pirkle: 0, W Pirkle: 187