• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Filter response curve
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filter response curve


  • Subject: Re: Filter response curve
  • From: Evan Balster <email@hidden>
  • Date: Tue, 17 Jan 2017 11:30:47 -0600

I must disagree.  The cleanest way to compute the transfer function, is to compute the transfer function, directly — you'll get an exact answer, with minimal computational expense.

If I have a filter defined as:

y[t] = b0*x[t]
  + b1*x[t-1] + b2*x[t-2]
  - a1*y[t-1] - a2*y[t-2];

This corresponds to a transfer function:

H(z) = (b0 + b1*z^-1 + b2*z^-2) / (1 + a1*z^-1 + a2*z^-2)

(Note that "a" coefficients become negative.)

If I want to find the response of that filter to a frequency of 1000 hz, where the sample-rate is 10000 hz, I compute this Z-function for the corresponding complex frequency:

z = e^(i*2pi*f/S)
... = e^(i*2pi*1000/10000)
... = cos(2pi*.1) + i*sin(2pi*.1)

Pass that number through the transfer function H(z) above, and you'll get an exact answer for whatever frequency you like.


There's a lot of misinformation floating around about this topic, and I imagine it's because people are put off by complex numbers and Z-domain math.  It isn't as spooky as it looks!

– Evan Balster
creator of imitone

On Tue, Jan 17, 2017 at 10:35 AM, Richard Dobson <email@hidden> wrote:
The cleanest way is to feed a single "unit impulse" through the filter and store the output, which is by definition the impulse response (assuming this is a standard LTI filter). Then take the FFT of the impulse response to get the transfer function, which is the response curve you are looking for. The unit impulse is exactly what the name says - a single sample of full amplitude followed by silence.

Richard Dobson


On 16/01/2017 20:20, Waverly Edwards wrote:
May I ask what ways are there to get the response curve of a filter?  My
current method is to pass a white noise source through the filter and
write the output to disk, then read the disk output into Audacity and
plot the output.

This is the only way that I’ve come up which makes sense as I believe
Audacity is using some form of Fourier Transform on the data.  I’ve been
looking at the vDSP functions for FFT.  This is the direction that I am
headed, using FFT but even though I don’t know any other way, I feel
this must be using a sledgehammer to kill a mosquito.



Any thoughts on this?



Thank you,





W.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Filter response curve
      • From: Richard Dobson <email@hidden>
References: 
 >Filter response curve (From: Waverly Edwards <email@hidden>)
 >Re: Filter response curve (From: Richard Dobson <email@hidden>)

  • Prev by Date: Re: Filter response curve
  • Next by Date: Re: Filter response curve
  • Previous by thread: Re: Filter response curve
  • Next by thread: Re: Filter response curve
  • Index(es):
    • Date
    • Thread