You are on page 1of 26

What is an ECG

The Cardiac Conduction System


CHAPTER-2
ECG Signal Processing Detection of R-peaks

Calculating heart beat

1
What is an ECG?
 Also known as an electrocardiogram or an EKG, an ECG is a test that detects and records the strength and timing of the
electrical activity in your heart.

 This information is recorded on a graph that shows each phase of the electrical signal as it travels through your heart.

 The electrical signal begins in the sinoatrial node (1) which is located in the right atrium and travels to the right and left atria,
causing them to contract and pump blood into the ventricles.

 This electrical signal is recorded as the P wave on the ECG. The PR Interval is the time, in seconds, from the beginning of the
P wave to the beginning of the QRS complex.

 The electrical signal passes from the atria to the ventricles through the
atrioventricular (AV) node (2). The signal slows down as it passes
through this node, allowing the ventricles to fill with blood.

 This slowing signal appears as a flat line on the ECG between the
end of the P wave and the beginning of the Q wave.

 The PR segment represents the electrical conduction through the


atria and the delay of the electrical impulse in the atrioventricular
node.
 After the signal leaves the AV node it travels along a pathway called
the bundle of His (3) and into the right and left bundle branches (4, 5).

 The signal travels across the heart’s ventricles causing them to


contract, pumping blood to the lungs and the body. This signal is
recorded as the QRS waves on the ECG.

 Because these waves occur in rapid succession they are usually


considered together as the QRS complex.

 The ventricles then recover to their normal electrical state, shown as


the T wave. The muscles relax and stop contracting, allowing the atria
to fill with blood and the entire process repeats with each heartbeat.

 The ST segment connects the QRS complex and the T wave and
represents the beginning of the electrical recovery of the ventricles

 The QT interval represents the time during which the ventricles are
stimulated and recover after the stimulation. This interval shortens at a
faster heart rate and lengthens at a slower heart rate.
Electro-cardiogram (ECG) – Detection of R-peaks

Content
• How ECG is recorded?
• Why the ECG occurs?
• Detecting R-peaks and measuring the heart rate of a person using
MATLAB.
ECG Introduction

• The heart muscles contract and


expand to generate signals that is
recorded as ECG.

• ECG is the measured electrical


activity of the heart.
ECG Introduction

• This electrical activity and be measured


by placing electrodes at specific points on
the skin.
ECG Introduction

• An Ideal ECG looks like this


and it keeps repeating itself.
• We will try to detect the R-
peaks in this lecture.
R-peaks detection in MATLAB
• The ECG signal we
are going to work
with looks like this.
R-peaks detection in MATLAB
• A closer look at the
signal
Steps for Detection
1. Remove low frequency components
1. Change to frequency domain using fft
2. Remove low frequency components
3. Back to time domain using ifft

2. Find local maxima using windowed filter

3. Remove small values, store significant ones

4. Adjust filter size and repeat 2,3


1. Input

2. After removing low frequency


components.

3. Using a windowing filter

4. Thresholding

5. Using the adjusted filter


Final result of Algorithm
Calculating heart beat
• Heart Beat Rate in (beats/second) can
be calculated by the formula:

Rate= 60*sampling rate/(R-R interval)


Reading a Discrete ECG Signal from a file
Plot ECG Database In Matlab
Plot 10 Minute ECG Database In Matlab
Mean, Variance, STD, Histogram of ECG Signal
Computing Signal-to-Noise Ratio (SNR) in MATLAB
Computing Heart Beat per from ECG Signal Minute in Matlab

You might also like