comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Digital filter question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Digital filter question [message #3077 is a reply to message #3002] Fri, 04 November 1994 12:49 Go to previous messageGo to previous message
sgs is currently offline  sgs
Messages: 2
Registered: November 1994
Junior Member
MEL (larkum@optolab.unibe.ch) wrote:
: I can't understand description of DIGITAL_FILTER in the PV-Wave
: manual. I have some data with an annoying 50Hz mains signal that
: I'd like to try to filter out. The manual talks about the Nyquist
: Frequency as 1/2T, where T is the time elapsed between data samples.

: Well, I have data sampled at 20 kHz, so as far as I can tell,
: the Nyquist frequency for this data is 10 000. Am I right?
: Now what? (besides read a book on digital signal processing).
: What should my low and high frequencies be to set a bandpass
: filter around 50 Hz, expressing them as "fractions of the
: Nyquist frequency" as "numbers between 0 and 1".

For 20khz sample rate, the Nyquist frequency is 10khz, and the fraction
of nyquist frequency for 50 Hz is 50./10000. For a notch filter try
using:

freqlow = 55./10000. ; (note that high and low are reversed for notch)
freqhigh = 45./10000.; (and in order for bandpass)

Be sure to specify enough filter coefficients. I like to increase N and
refilter until the filtered data stops changing. The lower the
frequencies kept, the more coefficients needed. If you use an fft to
filter, rather than convolution, you can use a huge N with good cpu
performance. A good reference is "Numerical Recipies in C".

Steve Spray sgs@lmsc.lockheed.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Remember, IDL Ver 3.5, no handlers. must use IDL 3.6
Next Topic: Resetting a DRAW widget to have new size/scroll area...?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 16:24:36 PDT 2025

Total time taken to generate the page: 1.12001 seconds