discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] notch filter


From: cswiger
Subject: [Discuss-gnuradio] notch filter
Date: Mon, 18 Oct 2004 15:53:38 -0400 (EDT)

Gang - A notch filter seems pretty easy to setup using a fir filter
for delays. Seems inexpensive in CPU time.

Example, audio sampling rate 32000 and a notch freq of 1Khz:

        sampling_freq = 32000
        fg = gr.flow_graph ()

        # notch filter frequency = ( 1 / ( delays * unit_delay ) /2
        # where unit_delay = 31.25 uSec for 32000 sampling rate

        # in the following we use 16 delays for a notch of 1Khz

        taps = [1]              # tap for original signal undelayed
        for i in range(1,16):
           taps = taps + [0]
        taps = taps + [1]       # signal delayed 16 * 31.25 uSec

        src0 = audio_source (sampling_freq)   # line in

        notch = gr.fir_filter_fff (1, taps)

        dst = audio.sink (samping_freq)       # line out

        fg.connect (src0, notch)
        fg.connect (notch, dst)


That's it. Do the math for other sampling rates and notch frequencies.

Do I understand that a 'comb' filter is just many notches? like

taps = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]  ??

would, I suppose, notch 4Khz, 2Khz, 1333.333Khz and 1Khz with taps at
4,8,12,16 * 31.25 uSec.

--Chuck






reply via email to

[Prev in Thread] Current Thread [Next in Thread]