NOTCHCOMB

Purpose:

Designs a notch comb filter in direct form.

Syntax:

(b, a) = NOTCHCOMB(k, bw, Ab, fs)

k

-

An integer, the notch filter order. The order is equal to fs/fo where fs is the sample frequency and fo is the fundamental notch filter frequency. Defaults to 10.

bw

-

A real, the bandwidth of each notch. The bandwidth is equal to (fo/(fs/2))/Q where Q is the Q factor of the filter. Defaults to k * 2 / 35.

Ab

-

An optional real, the dB level for bandwidth bw. Defaults to 10*log10(.5) or -3 dB.

fs

-

Optional real, the sample rate of the filter. Defaults to 1.0.

Returns:

The numerator and denominator coefficients of the notch filter in direct form.

Example:

fs = 1800; fo = 60; Q = 10;

(b, a) = notchcomb(fs/fo, (fo/(fs/2))/Q, -3, fs);

 

W1: mag(zfreq(b, a, 16*1024))

 

 

 

A notch comb filter is designed with a sample rate of 1800 Hz. The notch frequency is 60 Hz and the Q factor is 10 for a notch bandwidth of 0.00667. The coefficients are returned in direct form.

 

W1 displays the magnitude response of the filter.

 

The filter removes multiples of 60 Hz line noise from the input data.

 

Remarks:

NOTCHCOMB returns the filter coefficients in direct form.

 

The filter order k specifies the number of notch frequencies over the range 0 to fs. The specific notch frequencies are located at F(n) = (n * fs) / k.

 

The transfer function if the notch comb filter is:

 

Notch Transfer Function

 

where the gain is determined so as to normalize the filter output to unity gain.

 

See NOTCHFILT to design and filter data with a notch comb filter.

See Also:

FILTEQ

NOTCHFILT

 

References:

[1]

Sophocles J. Orfanidis

 

Introduction To Signal Processing

 

Prentice-Hall, 1989