how to filter 50Hz harmonics ?

15 次查看(过去 30 天)
Hi , im analyzing recorded signal , I've recorded the noise and the data separately , I've found that the data signal is a little bit noisy , when i made an fft to the noise signal , i've found that it included an dc component and harmonics of 50Hz , i've filtered the dc component using the mean subtraction , but have no idea how to filter the harmonics of 50 Hz , i can use notch to filter the 50Hz but how can i filter its harmonics . My data signal is 50 - 2500 Hz. here is the noise :
i've also include the mat file of the signal.

采纳的回答

Star Strider
Star Strider 2015-8-31
If you have the DSP System Toolbox, you can design a Comb Filter. All you need do is specify your normalised frequencies for the harmonics.
The Signal Processing Toolbox has dfilt.parallel that will do essentially the same operation, but you have to build the various filters yourself.
You can automate the filter design process in a loop. This is archive code for a different problem, but you can likely adapt it easily to your harmonics problem. The plot in figure(1) plots the passbands/stopbands:
Fs = 8200; % Samping Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency
pf = linspace(20,4000,17); % Passband Frequencies
cf = pf(1:end-1)+(pf(2)-pf(1))/2; % Centre Frequencies
for k1 = 1:length(cf)
[z(k1,:),p(k1,:),k(k1)] = butter(7, [pf(k1) pf(k1+1)]/Fn);
[sos{k1},g{k1}] = zp2sos(z(k1,:),p(k1,:),k(k1));
[h(k1,:),w(k1,:)] = freqz(sos{k1},512,Fs);
end
figure(1)
freqz(sos{1})
hold on
for k1 = 2:16
freqz(sos{k1})
end
hold off
My general filter design process is here.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Digital Filter Design 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by