0% found this document useful (0 votes)
12 views12 pages

Document From Kaviraj

The report details the development of an ECG heart monitoring system using MATLAB to analyze and interpret ECG signals for effective heart health monitoring. It outlines the methodology including data collection, signal preprocessing, feature extraction, heart rate calculation, and visualization of results. The project demonstrates the potential of ECG systems in real-time health monitoring and emphasizes the importance of technology in healthcare.

Uploaded by

jadonkaviraj867
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views12 pages

Document From Kaviraj

The report details the development of an ECG heart monitoring system using MATLAB to analyze and interpret ECG signals for effective heart health monitoring. It outlines the methodology including data collection, signal preprocessing, feature extraction, heart rate calculation, and visualization of results. The project demonstrates the potential of ECG systems in real-time health monitoring and emphasizes the importance of technology in healthcare.

Uploaded by

jadonkaviraj867
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

REPORT ON ECG HEART MONITORING SYSTEM

NAME – KAVIRAJ JADON

REGISTRATION. NO.—12320324

ROLL NO.-36

SUBJECT—DIGITAL SIGNAL PROCESSING

DATE OF SUBMISSION- 21 APRIL 2025

INSTITUTION NAME – LOVELY PROFESSIONAL UNVERSITY


INTRODUCTION
Heart diseases are one of the leading causes of death around the world, which makes it really
important to keep a close check on how our heart is functioning. One of the most common and
effective ways to do this is by using ECG, or electrocardiography. An ECG is a simple, painless
test that records the electrical activity of the heart and helps doctors understand whether the
heart is beating normally or if there's something wrong, like an irregular rhythm or a
blockage.The ECG signal basically shows how the heart beats over time. It’s usually recorded by
placing small sensors (called electrodes) on the chest or limbs. These sensors pick up the
electrical signals generated each time the heart contracts and relaxes. When these signals are
plotted on a graph, they form waves—like the P wave, QRS complex, and T wave—each
representing different parts of the heartbeat. Analyzing these waves can give a lot of useful
information, such as whether a person might have arrhythmia, a heart attack, or other heart-
related problems. In my project, I am using MATLAB to work with ECG signals. MATLAB is a
powerful tool for analyzing data and has a lot of built-in functions that make it easier to clean
up ECG signals, remove noise, detect peaks, and measure things like heart rate and variability.
For example, if the signal has too much noise (like from muscle movements or poor electrode
placement), we can apply filters to clean it up and make the actual heart signal more clear.
After that, we can extract key features from the signal—like the time between heartbeats—to
check for any irregularities. Another good part of ECG monitoring systems these days is that
they can be connected to phones or the internet. This means doctors can get updates in real-
time and take action if they see something abnormal. It’s a big step forward in how healthcare
works—less need to visit hospitals all the time, and more focus on preventing problems before
they get serious. To sum it up, ECG heart monitoring systems are super useful in today’s world.
They help in tracking the heart’s activity, finding issues early, and saving lives. And with the help
of tools like MATLAB, we can take these systems even further—making them smarter, faster,
and more reliable. To conclude it , ECG heart monitoring systems are super useful in today’s
world. They help in tracking the heart’s activity, finding issues early, and saving lives. And with
the help of tools like MATLAB, we can take these systems even further—making them smarter,
faster, and more reliable.
OBJECTIVE
[1] The goal of the project is to build a system that can help us to
analyze the ECG signals to help in monitoring the health of heart more
effectively.

[2] To understand how ECG signals works and how they tell us about
the heart health.

[3] Using MATLAB for analyzing the ECG data by filtering out the noise
and detecting important aspects of heart.

[4] To build a system of ECG signals analysis that can help us identify
irregular problems related to heart.

[5] To explore how ECG systems can be used in real –time heart health
monitoring.

[6] To get real life experience in signal processing and apply it to a


medical applications.

[7] To learn how the technology can help us in early detection of heart
related problems and take required actions.
METHODOLOGY
STEP 1: DATA COLLECTION

First of all we need the data from like csv file or open source database because .dat file need Waveform
Database which is not supported by 2015 version of MATLAB. This data will help us for testing purposes
on software.

STEP 2: PREPROCESSING THE SIGNAL

We need filters like bandpass filters and notch filters for cleaning the signal because in real world ECG
signals have noise which is caused by muscle movement or power line interference {50 to 60 hz} or poor
electrode placement. Noise can hide the R- peak or distort the signal. Filtering can give us the accurate
detection of heartbeats.

Bandpass filter—removes the low frequency drift and high frequency drift.

Notch filter—removes the power line interference.

STEP 3: FEATURE EXTRACTION

After the signal is noise free or cleaned, we extract the features from ECG waveform like P WAVE, QRS
COMPLEX, T WAVE AND RR INTERVAL.

STEP 4: HEART RATE CALCULATION

The time difference between the R- peaks is called the RR interval. The formula for to calculate the heart
rate is HEART RATE=60/RR INTERVALS (IN SEC).

This formula can help us to find out whether the person has slow heartbeat (bradycardia) , fast
heartbeat (tachycardia) or a normal heart rate.

STEP 5: HEART RATE VARIABILITY AND ABNORMALITY DETECTION

Heart rate variability [HRV] is the variation in time between heartbeats. Sudden or uncertain changes in
HRV can be a sign of stress, arrhythmia or the heart conditions.

In this, we analyze the RR INTERVALS for unusual patterns like skipped beat or irregular spacing between
QRS complexes.

STEP 6: SIGNAL VISUALIZATION

In this, we plot the ECG signal and highlight the detected features (e.g. R- PEAKS) using MATLAB

STEP 7: INTERPRETATION AND CONCLUSION

In this final step, we study the analysis of the result and interpret what the data means.
FLOWCHART
CODE FOR MATLAB
clc;

clear;

close all;

fs = 500; % Sampling frequency (Hz)

t = 0:1/fs:10; % 10 seconds duration

ecgSignal = 1.2*sin(2*pi*1.2*t) + 0.25*randn(size(t));

low_cutoff = 0.5; % Hz

high_cutoff = 40; % Hz

[b, a] = butter(2, [low_cutoff high_cutoff]/(fs/2), 'bandpass');

filtered_ecg = filtfilt(b, a, ecgSignal);

minPeakHeight = 0.5 * max(filtered_ecg);

minPeakDist = 0.4 * fs;

[peakVals, locs_R] = findpeaks(filtered_ecg, 'MinPeakHeight', minPeakHeight, ...

'MinPeakDistance', minPeakDist);

RR_intervals = diff(locs_R) / fs;

heart_rate = 60 ./ RR_intervals;

avg_heart_rate = mean(heart_rate);

% Plot 1: Raw vs Filtered ECG


figure;

subplot(2,1,1);

plot(t, ecgSignal);

title('Raw ECG Signal');

xlabel('Time (s)');

ylabel('Amplitude');

subplot(2,1,2);

plot(t, filtered_ecg);

title('Filtered ECG Signal');

xlabel('Time (s)');

ylabel('Amplitude');

% Plot 2: Filtered ECG with R-peaks

figure;

plot(filtered_ecg);

hold on;

plot(locs_R, filtered_ecg(locs_R), 'ro', 'MarkerFaceColor','r');

title(['ECG Signal with R-peaks | Avg HR: ' num2str(avg_heart_rate, '%.2f') ' bpm']);

xlabel('Sample Number');

ylabel('Amplitude');

legend('Filtered ECG','R-peaks');

fprintf('--- ECG Analysis Summary ---\n');

fprintf('Total beats detected: %d\n', length(locs_R));


fprintf('Average Heart Rate: %.2f bpm\n', avg_heart_rate);

fprintf('Min HR: %.2f bpm | Max HR: %.2f bpm\n', min(heart_rate), max(heart_rate));

save('ecg_results.mat', 'filtered_ecg', 'locs_R', 'heart_rate', 'avg_heart_rate');


OBSERAVATIONS

From above we can observe that –

The red dots are marking the R-peaks . This indicates that R-peaks detection is working.

Heart rate is 72.72 bpm which is normal resting heart rate range (60-100 bpm).

The ECG waveform is clean and periodic which is achieved by bandpass filters.

The x –axis is marked as “sample number” which can be converted into sampling frequency by
using the t= (0:length (ecg)-/fs;

The project helped us understanding the working raw data of ECG processing and
interpretation .
CONLUSION
In this project, I successfully used MATLAB to analyze ECG signals and monitor
heart health. Starting from raw ECG data, I applied filtering techniques to clean
the signal and then used an algorithm to detect R-peaks — the sharp spikes that
occur with every heartbeat. These R-peaks helped us calculate the heart rate,
which came out to be around 72.72 beats per minute — a healthy, normal value
for a resting heart. The red dots marking the R-peaks made it easy to visualize
how well the detection worked, and the overall waveform showed clear,
repeating patterns of the heart's electrical activity. This kind of analysis is useful
not just for learning, but also as a base for more advanced applications like
detecting irregular heartbeats or building a live monitoring system using sensors.
Overall, the project showed how MATLAB can be a powerful tool for turning raw
biosignals into meaningful insights about heart health in a simple
and effective way.

This project not only helped in understanding how ECG signals work, but also gave
a hands-on experience in using MATLAB for real-world biomedical applications.
One of the most satisfying parts was seeing how a bunch of data points could be
cleaned up, processed, and turned into something that actually tells us about a
person’s heart. It was interesting to learn how even small peaks in the signal can
carry so much important information. Working on this also gave a better
understanding of concepts like signal filtering, peak detection, and heart rate
variability, which are often taught in theory but rarely felt so real. It also showed
how powerful and practical tools like MATLAB can be when applied to health
monitoring. This has opened up ideas for future work, like maybe developing a
mobile-based real-time ECG system or adding machine learning to detect heart
abnormalities. Most importantly, the project gave a sense of how technology and
healthcare can come together to potentially make life-saving tools.
GRAPHS
REFERENCE
GOOGLE SCHOLARS

Study and Analysis of ECG Signal Using MATLAB & LABVIEW as Effective Tools M. K. Islam, A. N. M. M.
Haque, G. Tangim, T. Ahammad, and M. R. H. Khondokar, Member, IACSIT

MATHWORKS FOR SIMULATION AND FLOWCHART

You might also like