Filtering of 60Hz noise signal - output not expected
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Scott Norton
le 5 Fév 2016
Commenté : Star Strider
le 6 Fév 2016
I'm trying to figure out why this stopband filter to remove 60Hz noise makes things worst.
d=designfilt('bandstopiir','FilterOrder',20','HalfPowerFrequency1',58,'HalfPowerFrequency2',62,'SampleRate',31500);
fvtool(d)

As you can see the response looks like what I would expect. However, upon applying it to my signal, the 60Hz harmonic looks worst:
out = filter(d,SAMPLE);
figure;plot(tt,SAMPLE,'r',tt,out,'b');xlabel('Time (sec)');ylabel('Amplitude (counts');
legend({'SAMPLE','out (filtered)'});

Even the power density plots imply that the 60Hz signal and surrounding frequencies were actually amplified:
[pSAMPLE,fSAMPLE]=periodogram(SAMPLE,[],length(SAMPLE),31500);
[pOut,fOut]=periodogram(out, [], length(out), 31500);
figure;plot(fSAMPLE,20*log10(abs(pSAMPLE)),'r',fOut,20*log10(abs(pOut)),'b');xlabel('Frequency (Hz)');ylabel('dB')

Now admittedly, I'm very new to DSP processing. But, can anyone point out what I'm doing wrong? Shouldn't the periodogram of the filtered signal essentially be SAMPLE's periodogram multipled by the filter (fvtool) response? Thanks for any help! -Scott
0 commentaires
Réponse acceptée
Star Strider
le 6 Fév 2016
Your filter order may be too high. I would use the 60 Hz notch filter example in the documentation: Remove the 60 Hz Hum from a Signal.
4 commentaires
Star Strider
le 6 Fév 2016
My pleasure!
I learnt about filtfilt a while ago when I tried to design a Gaussian filter (phase-neutral analog design) only to learn that it was not phase-neutral as a discrete filter, and that filtfilt made all discrete filters phase-neutral. In my (admittedly not humble) opinion, filtfilt is a huge bonus in getting the Signal Processing Toolbox, and worth getting it for filtfilt alone!
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Digital Filtering dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!