[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frequency response of a complex IIR filter



I have code here which you can use :
http://packages.debian.org/squeeze/libgtfb0-dev

however it is in C++ - and it is higher order then what you mention.
I am a little confused by what you write below ...
Aren't you after a real time domain signal ?

The history of the Gammatone goes back to short term integrals of neural spike trains (Joannesma) I am not sure of the significance of the phase - as the Gammatone was a nice mathematical choice (at the time) for fitting data which is both nonlinear and state dependent.

The Gammachirp came along afterwards ... was very computationally complex, however attempted to match the experimental data more closely ... it varied filter shape with time ... I seem to remember having the C++ code for that lying around ... if I haven't released it yet!

Matt

On 27/01/12 01:02, Piotr Holonowicz wrote:


Hi all!
I am trying to make a digital implementation of the One Zero Gammatone Filterbank (OZGF), however, I need the output to be complex instead of real. I have converted the filter equations by R. Lyon with the partial fraction expansion obtaining two conjugate poles, then treated it with the bilinear transform. The final stage is the coupled form of a complex IIR. In order to check the implementation, I would like to plot the frequency response of a single filter channel (= a cascade of three low-pass biquads + one bandpass biquad). But here is where I got a bit puzzled - for a real domain filter,  the way to do it is to plot the magnitude and the phase of the FFT of the impulse response. How to do it however, with a complex output u+jv (<=> r exp (jw0)) ? My intuition says it might be done by computing y= r exp (w0) and then computing abs(fft(y)) and angle(fft(y)). Is this the correct way to do it or shall I treat the real and the imaginary output separately - in that case how to interpret the outcome?
I enclose the python prototype code, it requires only the numpy/scipy and the matplotlib(pylab) to run.
I'll be very thankful for help.
Best
Piotr Holonowicz

PhD candidate at Music Technology Group
Universitat Pompeu Fabra
Barcelona,Spain