how to filter 50Hz harmonics ?

조회 수: 4 (최근 30일)
cob
cob 2015년 8월 31일
답변: Star Strider 2015년 8월 31일
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에서 Signal Generation, Analysis, and Preprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by