Automatic ECG peak detection with FFT

조회 수: 7 (최근 30일)
Charles Morgan
Charles Morgan 2020년 1월 9일
댓글: Cris LaPierre 2020년 1월 9일
Hi everyone,
I am trying to do an automatiuc detection of Hearth Rate with ECG sample.
I try to use FFT and IFFT, and a FIR filtered to eliminate low frequencies (50Hz) but after, I can't detect peaks of the signal.
I need to find locals maxima of my set of data but I don't know how to do that.
I will be grateful if you can help me with this problem.
load ECG109;
ECG = ECG109;
fresult=fft(ECG);
fresult(1 : round(length(fresult)*5/Fe))=0;
fresult(end - round(length(fresult)*5/Fe) : end)=0;
corrected = real(ifft(fresult)); % IFFT
% Low frequencies filter (50Hz)
Fn = Fe/2;
FIR = fir1(48,[49.7 50.3]/Fn,'stop');
ECG_filtered = filter(FIR,1,corrected);
subplot(2,1,1)
plot(ECG_filtered)
ECG_filtered
peaks = findpeaks(ECG_filtered,'DoubleSided')
  댓글 수: 1
Cris LaPierre
Cris LaPierre 2020년 1월 9일
There's somethign wrong with you mat file. I get the following error when I try to load it.
Error using load
Unable to read MAT-file C:\Users\...\ECG109.mat. Not a binary MAT-file. Try load -ASCII to read as text.

댓글을 달려면 로그인하십시오.

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 1월 9일
Do you have the Signal Processing Toolbox? If so, look into the findpeaks function.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by