Interference at the 50Hz mains frequency and its harmonics can be a nuisance for high gain amplifiers used in measurement systems. Show that 50Hz and its harmonics at 100Hz and 150Hz can be suppressed using a filter whose transfer function is :
Solution
Check that
for
.
So the response has nulls (zeros) at these 4 digital frequencies. So we want a digital frequency
of
to correspond to a frequency of 150Hz. So the sampling frequency must be 300Hz.
Use zplane to plot the positions of the poles and zeros of H(z). Recall from our simple band rejection filter how a complex conjugate pair of zeros on the unit circle gives a null response at a particular frequency.
num=[1 0 0 0 0 0 -1];
den=[1];
zplane(num,den);
title('Circles are zeros of H(z)=(z^6-1)/z')
Use freqz to plot the magnitude and phase responses :
num=[1 0 0 0 0 0 -1];
den=[1];
[H,q]=freqz(num,den,512);
mag=abs(H);
phase=angle(H);
plot(q,mag,'.');
title(' Multiple notch filter - use 300Hz sampling')
xlabel(' Digital Frequency')
ylabel(' Magnitude Response')
The equivalent DE is found as follows :
Take the inverse z-transform :