# Doubts about Notch filter design

I am following the process that is described in this question: Transfer function of second order notch filter , I want to create a notch filter with the band suppressed equal to $$f_c = 4000$$ Hz, so using $$\omega_n= f_c / f_s$$, ($$f_s = 48000$$), I obtained the $$\omega_n = \frac{\pi}{6}$$, then using the exact same formula, with $$a =0.8$$. The pole-zero graph I get has the zero in $$1$$ and a pole in $$0.8$$, is this correct?? I am getting the half of the filter since the filter is centered in $$0$$ and not in $$4000$$ Hz.

As far as I know it must be centered in the wn I have (based on $$f =4000$$ Hz), but I am not sure why it is centered in $$0$$, or how to center it in the desired frequency. I get a pole zero graph like this one, with zeros in $$1$$ and poles in $$0.8$$.

• Which formula did you use? Did you see that the first formula in the accepted answer is a filter with a notch at DC? Could it be that you used that formula? – Matt L. Nov 27 '18 at 16:07
• Related: this answer – Matt L. Nov 27 '18 at 16:59
• Hello Matt I used H(z) = k * (z^2-2cos(wn)z +1) / (z^2-2acos(wn)z +a^2) – ImperialF7 Nov 27 '18 at 17:09
• How can you then get only one zero and one pole? That equation clearly has two poles and two zeros. – Matt L. Nov 27 '18 at 17:15
• If you get real-valued double zeros and poles then $\cos(\omega_n)$ must be equal to $1$, which can't be the case with $\omega_n=\pi/6$. – Matt L. Nov 27 '18 at 17:17

This Octave / Matlab code gives you a 2nd ord notch filter at $$\omega_n = \pi/6$$

r = 0.99;          % notch radius (closer to 1 stiffer)
wn = pi/6;         % notch radian frequency...

% Create the 2nd order NOTCH filter coefficients b() and a()
b = r*conv([1,  -exp(j*wn)],[1,  -exp(-j*wn)]);
a = conv([1,  -r*exp(j*wn)],[1,  -r*exp(-j*wn)]);

figure,freqz(b,a,2048);


with the following result: