# Notch comb filter coefficients

Started by May 21, 2010
```Hi all.
I've found in MATLAB help that a notching comb filter has following
tranfser function:

H(z) = b*(1+z^(-N))/(1+a*z^(-N))

where N is the number of notches. How to determine coefficients a and b
with respect to real-world parameters such as sampling frequency, notch
frequency and notch bandwidth/resp. attenuation?
I don't have the filter toolbox and therefore not the 'iircomb' function. A
quick search on the web did yield nothing useful and it's not explained in
MATLAB help.

```
```ombz wrote:
> Hi all.
> I've found in MATLAB help that a notching comb filter has following
> tranfser function:
>
> H(z) = b*(1+z^(-N))/(1+a*z^(-N))
>
> where N is the number of notches. How to determine coefficients a and b
> with respect to real-world parameters such as sampling frequency, notch
> frequency and notch bandwidth/resp. attenuation?
> I don't have the filter toolbox and therefore not the 'iircomb' function. A
> quick search on the web did yield nothing useful and it's not explained in
> MATLAB help.
>

Why don't you play a bit -- change the values of a and b, and look at
the response on a Bode plot?  Perhaps it'll give you an idea of what you
want.

Note that this isn't the only comb filter, too.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
```
```On Fri, 21 May 2010 09:18:21 -0500, "ombz"
<andreas.weiskopf@n_o_s_p_a_m.gmail.com> wrote:

>Hi all.
>I've found in MATLAB help that a notching comb filter has following
>tranfser function:
>
>H(z) = b*(1+z^(-N))/(1+a*z^(-N))
>
>where N is the number of notches. How to determine coefficients a and b
>with respect to real-world parameters such as sampling frequency, notch
>frequency and notch bandwidth/resp. attenuation?
>I don't have the filter toolbox and therefore not the 'iircomb' function. A
>quick search on the web did yield nothing useful and it's not explained in
>MATLAB help.
>
Hi,
the following web page gives what you
call "real-world parameters" in an example:

http://www.mathworks.com/access/helpdesk/help/toolbox/filterdesign/ref/iircomb.html

As Tim said, there are other comb filters,
such as the FIR comb filter:

H1(z) = b*(1+z^(-N))

H1(z) doesn't have as narrow notches as does
your H(z), but H1(z) requires fewer computations

Good luck,
[-Rick-]

```
```On Fri, 21 May 2010 09:18:21 -0500, "ombz"
<andreas.weiskopf@n_o_s_p_a_m.gmail.com> wrote:

>Hi all.
>I've found in MATLAB help that a notching comb filter has following
>tranfser function:
>
>H(z) = b*(1+z^(-N))/(1+a*z^(-N))
>
>where N is the number of notches. How to determine coefficients a and b
>with respect to real-world parameters such as sampling frequency, notch
>frequency and notch bandwidth/resp. attenuation?
>I don't have the filter toolbox and therefore not the 'iircomb' function. A
>quick search on the web did yield nothing useful and it's not explained in
>MATLAB help.
>

Oops!,
I just remembered that you don't have the
"iircomb()" code.  So my first reply didn't

[-Rick-]

```
```@Tim
another type of notch filter. But the one from MATLAB looks simpler. So, of
course I will play around with the coefficients since I still don't know
the answer yet - thank you.

@Rick
Thank you. I know the FIR comb filter. But I need to have narrow notches,
so I've chosen IIR.

>On Fri, 21 May 2010 09:18:21 -0500, "ombz"
><andreas.weiskopf@n_o_s_p_a_m.gmail.com> wrote:
>
>>Hi all.
>>I've found in MATLAB help that a notching comb filter has following
>>tranfser function:
>>
>>H(z) = b*(1+z^(-N))/(1+a*z^(-N))
>>
>>where N is the number of notches. How to determine coefficients a and b
>>with respect to real-world parameters such as sampling frequency, notch
>>frequency and notch bandwidth/resp. attenuation?
>>I don't have the filter toolbox and therefore not the 'iircomb' function.
A
>>quick search on the web did yield nothing useful and it's not explained
in
>>MATLAB help.
>>