how to find the noise frequency in ECG signal?

4 ビュー (過去 30 日間)
Daniel Niu
Daniel Niu 2022 年 12 月 5 日
回答済み: charan 2025 年 6 月 17 日
I perform the fft, but I still don't know which frequency is the noise except 1200 Hz. I also want to flter the noise using FIR filter. The lecturer said
there are three noise frequency.
I also want to confirm is it right that the 15 Hz is the main frequecny of the ECG signal?
Your help would be highly appreciated.
clear
load('coursework2ECG2022.mat')
plot(t,signalNoise1)
T=Ts;
Fs=fs;
L=size(t,2);
X=signalNoise1;
X = X - mean(X);
%FFT
Y = fft(X);
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
figure;plot(f,P1)
title('Single-Sided Amplitude Spectrum of X(t)')
xlabel('f (Hz)')
ylabel('|P1(f)|')

回答 (1 件)

charan
charan 2025 年 6 月 17 日
Hi,
1200 Hz is clearly one of the noise frequency. To get the remaining noise frequencies you can use the "maxk" function in MATLAB to find the indices of k largest peaks in the signal power. Use them to index the frequency vector to find out the frequencies corresponding to the peaks. Out of these peaks choose the top 3 frequencies which lie outside the possible frequency range of the ECG signal (noise frequencies are usually greater than 40Hz) to get the noise frequencies.
The peaks from this "maxk" function that lie in the frequency range of ECG signal(<40 Hz) give the main frequencies of the ECG signal. 15 Hz is one such frequency.
Once the noise frequencies are calculated you can use the "fir1" function to filter them.
The following links might be useful:

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by