Professional Documents
Culture Documents
Session – 2019
Prerit Kavthekar-EN17EL301106
Resham Rajpal-EN17EL301114
Pranjal Gehlot-EN17EL301104
Electrical activity of the heart is called ECG i.e. Electrocardiogram.
Many methods have been tried to analyze the ECG automatically through
software like Neural Networks, Digital Signal Processing, FFTs and Wavelet
Transforms.
Here we have used the MATLAB software to use an ECG database and calculate
heart beat using proper MATLAB program code.
THEORY
To study the effect of implanted pacemakers Size and position of heart chambers
enlargement of the heart due to high blood pressure Presence of any damage in heart muscle cells
Analysis of ECG Signal
• ECG signal like any other signal can be processed in 2 domains- time and frequency.
• Time Domain Analysis-
- P,Q,R,S,T and U are specific waveforms identified in time domain of ECG signal.
-The heart rate can be calculated by locating 2 successive QRS complex.
METHODOLOGY
1. Download a sample ECG database from the physionet website. (www.physionet.org)
2. Gather data from the files like the sampling frequency, type of signal, gain, base and
unit.
3. Plotting of the ECG is done through a code displayed on the next slide.
4. Now write the code in order to calculate the beats per minute in matlab in the new
script window.
5. You can see the results of your code next to your command window.
PROGRAM CODE
clc;
load('100m.mat')
ECGsignal=(val-1024)/200;fs=360;
t=(0:length(ECGsignal)-1)/fs;
plot(t, ECGsignal)
beat_count=0;
for k=2:length(ECGsignal)-1
if(ECGsignal(k)>ECGsignal(k-1) && ECGsignal(k)>ECGsignal(k+1) && ECGsignal(k)>-5)
beat_count=beat_count+1;
end
end
% [peaks locs]=findpeaks(ECGsignal,'minpeakheight',-5);
% beat_count=length(peaks);
fs=360;
N=length(ECGsignal);
duration_in_sec=N/fs;
duration_in_min=duration_in_sec/60;
BPM=beat_count/duration_in_min;
RESULT
• We have taken the database of patient having Arrhythmia disease and in this
case we have taken out BPM=13 .
• This means that the heart rate of the person is very less than that of a normal
human.
• Arrhythmias occur when the electrical signals to the heart that coordinate
heartbeats are not working properly.
• For instance, some people experience irregular heartbeats, which may feel
like a racing heart or fluttering.
CONCLUSION
• After filtering of the ECG signal to remove noise present in it, the signal is then passed to
A/D convertor. The A/D convertor allows up to 11 simultaneous inputs and supports a
sampling rate of 32KHz.
• Modify the RC filters in the filter stage to ensure better discrimination of the frequencies
that are outside the passband.
FUTURE SCOPE
• Increase the use of this equipment for capturing other bioelectrical signals such as
electroencephalographic and electromygraphic.
• Implement a tool to validate algorithms of detection of QRS complex, based on MIT DB.
• Classification systems can also be developed (hardware) which include detection of other
cardiac abnormalities al0ng with the present ones to generate a robust ECG classifier.
• For eg. Effort can be done to identify the l0cation of Myocardial Infarction(heart attack).