Indivdual Seminar (Iot)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

K. L. E.

SOCIETY’S

K. L. E. INSTITUTE OF TECHNOLOGY
Department of Electronics and Communication
Engineering

CERTIFICATE
This is to certify that the seminar work entitled “An energy efficient wearable
smart IoT system to predict cardiac arrest” is a bonafide work carried out by
Shivani N Shatoji(2KE18EC078) in partial fulfillment for the award of degree of
Bachelor of Engineering in Electronics and Communication Engineering,
K.L.E Institute of Technology under the Visvesvaraya Technological
University, Belagavi during the academic year 2021-2022.it is certified that all
corrections/suggestions indicated for internal assessment have been incorporated
in the report deposited in the department library. The seminar report has been
approved as it satisfies the academic requirement in respect of seminar work
prescribed for the said degree.

Guide HOD Principal


(Mr. Mahaveer C.) (Dr. Manu T. M.) (Dr. B. S. Anami)

Name of Examiners Signature with date

1.

2.

i
DECLARATION

I, Shivani N. Shatoji (2KE18EC078), student of VIII Semester B.E.,


in Electronics and Communication Engineering, K.L.E. Institute of
Technology, Hubballi, hereby declare that the seminar work has been
carried out by me and submitted in partial fulfillment of the
requirements for VII Semester degree of Bachelor of Engineering
and Communication Engineering of Visvesvaraya Technological
University, Belagavi during academic year 2021-2022.

Date:
Place: Hubballi Shivani N. Shatoji (2KE18EC078)

ii
ACKNOWLEDGEMENT

The seminar report on an Energy efficient wearable smart IoT system to


predict cardiac arrest is the outcome of guidance, moral support and devotion
bestowed on me throughout my work. For this I acknowledge and express my
profound sense of gratitude and thanks to my guide Mr. Mahaveer Chougala. I
acknowledge that I have learnt the importance of technical research and good
presentation skills.

I feel deeply indebted to our H.O.D. Dr. Manu T. M. for the constant support and
encouragement in all my endeavors. The academic ambience has helped us to
excel in my academics.

1 take this opportunity offer our sincere thanks with to our beloved Principal Dr.
B. S. Anami who is always keen on enhancing the quality of teaching-learning
and always a source of inspiration to us. I would like to thank our Dean
Academics Dr. S. G. Joshi for his constant encouragement for our academic
progress.

I take this opportunity to express my sincere thanks to Seminar Coordinator Mr.


Santosh Hosmani for dedicating time to arrange for guidance that helped for
proper flow of seminar work.

Last but not the least, I would like to thank my parents and friends for their well
wishes for my success.

Shivani N. Shatoji
2KE18EC078

iii
ABSTRACT

Many people have become more concerned about having a sudden Cardiac arrest.
With the increase in popularity of smart wearable devices, an opportunity to
provide an Internet of Things (IoT) solution has become more available.
Unfortunately, out of hospital survival rates are low for people suffering from
sudden cardiac arrests. The objective of this research is to present a multisensory
system using a smart lot system that can collect Body Area Sensor (BAS) data to
provide early warning of an impending cardiac arrest. The goal is to design and
develop an integrated smart IoT system with a low power communication module
to discreetly collect heart rates and body temperatures using a smart phone
without it impeding on everyday life. This research introduces the use of signal
processing and machine-learning techniques for sensor data analytics to identify
predict and/or sudden cardiac arrests with a high accuracy. IoT security is one of
the main research topics as there is a need to provide security for the growing
number of connected devices. For example, there is a need to ensure that lot
devices are only providing information to authorized entities. IoT hardware
development has many related research issues as new devices are introduced and
many of them are small and have limited battery life Moreover, the IoT sensor
devices must be integrated into the Internet using communication protocols. These
protocols must consider the low energy of the sensor battery especially when
sensors are deployed in remote locations.

iv
CONTENTS

Certificate ii
Declaration iii

Acknowledgement iv

Abstract v

List of Figures vii


List of Tables ix

Organization of report x

Chapter No. Name Page No.


1. Introduction 1
2. Overview of selected topic with literature reviews 3
3. Types of health care systems 6
4. System architecture 9
4.1 Hardware components 10
4.2 Software 14
4.3 Algorithm 20
4.4 Results and evaluation 25
5. 5.1 Summary 32
5.2 Bibliography 33

v
LIST OF FIGURES

Fig.4.1 –Proposed system architecture


Fig.4.2 -Hardware components
Fig.4.3 -Final model design
Fig.4.4 -Data collection interface
Fig..4.5-Temperature sensor data accuracy
Fig.4.6-Software analysis
Fig.4.7-ECG signals for sitting, walking, and climbing upstairs
for test subject 1
Fig.4.8-Graph of Fourier transform
Fig.4.9-Graph of R-R interval
Fig.4.10-Graph of ST segment
Fig.4.11-Algorithm 1
Fig.4.12-Decision tree algorithm 2
Fig.4.13-Graph of sliding and sampling windows
Fig.4.14 -Prediction algorithm while walking
ig.4.15 -Prediction while climbing
Fig.4.16-ECG signal of unhealthy person
Fig.4.17-Random heart rates from sample windows
Fig.4.18-ECG of unhealthy person (RR interval)
Fig.4.19-Prediction algorithm results of unhealthy person while walking
Fig.4.20-Prediction algorithm of unhealthy person while climbing upstairs

vi
LIST OF TABLES

Table 3.1-Qualittative comparison of existing work based on different features


Table 4.1-General gathering of subject’s information
Table 4.2-General database for healthy test subjects
Table 4.3-General database for unhealthy test subjects

vii
Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Chapter 1
INTRODUCTION

Heart problems have a significant impact on the quality of life of any who suffer
from them. Through the widespread use of new technologies, there is a potential
for advanced healthcare systems. A special dedicated IEEE standard defines IoT
as a system of interconnected people and physical objects along with Information
and Communication Technology (ICT) to build, operate, and manage the physical
world via smart networking, pervasive data collection, predictive analytics, and
optimization. A special dedicated IEEE standard is under development for the
architectural framework of the IoT, namely, IEEE P2413. This is standard defines
IoT as a system of interconnected people and physical objects along with
Information and Communication Technology (ICT) to build, operate, and manage
the physical world via smart networking, pervasive data collection, predictive
analytics, and optimization.
The IoT standard provides a reference model, defines architectural building
blocks, and affords development mechanisms for the relevant systems. AS the
Internet continues to grow, one of the key enablers is the IPv6 global deployment
which supports the ubiquitous addressing of any communicating "smart thing". It
will provide access to billions of smart things allowing new models of IoT
interconnection and integration. However, as a result of network expansion, more
requirements will be added to network functions, network management, and
network composition. IPv6 must enable the interconnection of heterogeneous lot
components together with heterogeneous applications. 6LOWPANis an optimized
version of IPv6 for Low Power Wireless Personal Area interconnection of
heterogeneous IoT components together with heterogeneous applications.
6LOWPANis an optimized version of IPv6 for Low Power Wireless Personal
Area Networks. It is basically IPv6 implemented on resource constrained IoT
devices. IoT security is one of the main research topics as there is needs to provide
security for the growing number of connect devices. For example, there is a need
to ensure that IoT devices are only providing information to authorized entities,

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 1


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

IoT hardware development has many related research issues as new devices are
introduced and many of them are small and have limited battery life. Moreover,
the IoT sensor devices must be integrated into the Internet using communication
protocols. These protocols must consider the low energy of the sensor battery
especially when sensors are deployed in remote locations. There are many
protocols developed and more to be developed that consider the use of low power
for lot devices. For example, an efficient service announcement and discovery
protocol in IP based ubiquitous sensor networks is proposed. The protocol adopts
a fully distributed approach to ensure optimal acquisition times, low energy
consumption and low generated overhead with timely reaction to topology
changes. The protocol is capable of realizing optimal acquisition times with
minimal cost in terms of energy and generated overhead, making it suitable for
mobile networks. The Internet Engineering Task Force has done the major
standardization work for the Constrained Application Protocol (COAP) that
allows seamless integration of low power devices into the Internet. CoAP can run
on most devices that support User Data Protocol and the network architecture that
use this protocol is a hot research topic. IoT devices use different protocols
(Bluetooth, ZigBee, etc.) and different networks (LANS; WANs). Thus, an IoT
platform has three building blocks: Cloud Computing is used as an enabling
platform that supports IoT-based systems to allow connecting a large number of
devices and sensors.

1.1 Organization of the report


The seminar report is organized as mentioned below:-
Chapter 1: This chapter gives brief discussion on this topic chosen and gives
overview on the concepts
Chapter 2: This chapter describes the literature survey conducted on the topic.
Chapter 3: In this chapter types of health care systems are discussed
Chapter 4: In this chapter system architecture and software used is discussed
Chapter 5: The summary of the entire report is mentioned in this chapter

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 2


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Chapter 2
LITERATURE SURVEY
Research works from different sources, manufacturers white papers, papers from
Works from few of the researchers are presented in the following sections.
Journals and magazines are referred to collect the details. Works from few of the
researchers are presented in the following sections.
2.1 Literature Discussion

1. P. Sethi and S. R. Sarangi, “Internet of things: architectures, protocols, and


applications, (2017). In this article for this intelligence and interconnection, IoT
devices are equipped with embedded sensors, actuators, processors, and
transceivers. IoT is not a single technology, rather it is an agglomeration of
various technologies that work together in tandem. Sensors and actuators are
devices, which help in interacting with the physical environment. The data
collected by the sensors has to be stored and processed intelligently in order to
derive useful inferences from it.

2. E. C. Stecker, K. Reinier, C. Rusinaru, A. Uy‐Evanado, J. Jui, and S. S. Chugh,


“Health insurance expansion and incidence of out‐of‐hospital cardiac arrest: A
Pilot study in a US metropolitan community (2017). In this article the authors
have concluded that two time periods surrounding implementation of the
Affordable Care Act were evaluated: 2011–2012 (“pre‐expansion”) and 2014–
2015 (“postexpansion”). The change in OHCA incidence for the middle‐aged
population (45–64 years old) exposed to insurance expansion was compared with
the elderly population (age ≥65 years old) with constant near‐universal coverage.
Rates of OHCA among middle‐aged individuals decreased from 102 per 100 000
(95% CI: 92–113 per 100 000) to 85 per 100 000 (95% CI: 76–94 per 100 000), P
value 0.01. The elderly population experienced no change in OHCA incidence,
with rates of 275 per 100 000 (95% CI: 250–300 per 100 000) and 269 per 100
000 (95% CI: 245–292 per 100 000).
3. Y. ElSaadany, A Wireless early prediction system of cardiac arrest through IoT.
[Dissertation, thesis], (2017) In this thesis, author describes the increase in
popularity for wearable technologies has opened the door for an Internet of Things

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 3


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

(IoT) solution to healthcare. One of the most prevalent healthcare problems today
is the poor survival rate of out-of-hospital sudden cardiac arrests. The objective of
this study is to present a multisensory system using IoT that can collect physical
activity heart rates and body temperatures. For this study, we implemented an
embedded sensory system with a Low Energy Bluetooth communication module
to discreetly collect electrocardiogram and body temperature data using a
smartphone in a common environment. This study introduces the use of signal
processing and machine learning techniques for sensor data analytics for sudden
cardiac arrest and or heart attack prediction.
2.2 Overview of the topic chosen
The main aim is to develop a smart IoT system that is unique and stands out when
it comes to eHealth based IoT systems for predicting a personalized cardiac arrest,
because they naturally combine the detection and communication components. Its
contributions are as follows:
(i) Developing a multisensory smart IoT-based cyber-human system for heart
abnormality prediction.
(ii) Proposing a Smartphone-based heart rate detection system using a wearable
Body Area Sensor (BAS) system.
(iii) Designing, developing, and implementing a low power communication
module to send data to the smart phone.
(iv) Implementing a mobile system for remote supervision of users, this can be
used to detect personalized health crisis
There are many research projects that attempt to characterize a user's heart
abnormality; however, most of them have lack of key components. Many
individuals currently perform research in eHealth and many companies have taken
advantage of this work by designing systems that connect patients with doctors
around the world. There are two different categories of related systems are
comprehensive health care using embedded systems and connected eHealth
Smartphone applications. This project is more related to connected eHealth smart
phone applications since it is developing an application on Smartphone that
connects with a smart IoT device while most companies focus on comprehensive
health care systems that allow users to interact with one another and benefit from
resources.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 4


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Summary: In this chapter, the papers which are referred are discussed and the
conclusions drawn from them have been discussed. There is introduction on
contributions of IoT systems in detecting and communicating usage and also there
is mentioning on types of eHealth care systems.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 5


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Chapter 3
TYPES OF HEALTH CARE SYSTEMS
In this chapter, different technologies for health care are discussed.
3.1 Comprehensive Health Care Systems
A robust model was developed that included multiple pulse parameters, BBG, and
skin conductance sensors into a shirt. Another system was developed for
connecting facial expressions and voice recognition with BEG patterns. Other
researchers proved that EEG alone exhibits. Characteristics for different emotions.
Facial recognition software has been compared with heart rate variability in order
to better understand patterns associated with various emotions. It has also been
proven that certain pulse patterns are associated with physical stress and not from
emotional stress. But, their systems are mobile and they did not use loT as a
platform for their system. Another comprehensive health care system is called
"Omnio" which is an all-in-one application for Medical Resources. It provides,
among its services, clinical resources, diagnostic resources, disease guides, and
drug information. Everyday Health is a company which owns websites and
produces content relating to health and wellness. It has higher ratings and
publishes many health articles that can be very helpful for patients.
3.2 Connected eHealth Mobile Applications
The systems mentioned above provide health services, they do not provide any
smart devices that can be used to monitor user's daily activities and alert them
when needed. There are many heart monitors that provide users with their ECG
signals so they can keep track of their condition but none of which who alert the
users upon emergencies. A Smart Elderly Home Monitoring System (SEHMS)
designed and developed on an Android-based smart phone with an accelerometer;
it could detect a fall of the user. It provides a smart phone user interface to display
health information gathered from the system. The main advantage of SEHMS is
that it has the remote monitoring facility for elderly who and chronically hostile
patients. But it cannot warn the user in case of emergency.
In Table 3.1, Qualitative comparison of existing work is mentioned.
In Table 3.2, Quantitative comparison of work is mentioned.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 6


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Table 3.1-Qualitative comparison of existing work based on different features


[6]
Approach Use of IoT Mobility Low Cyber Cost
power physical effective
system system
Patients No Yes No No No
normal
Daily Yes Yes No No No
strength
Omnio Yes Yes Yes Yes No
Everyday Yes No No No No
health
SEHMS No Yes No Yes No
RMHM No No No Yes No
PHM yes yes no yes No

Table 3.2-Qunatitative comparison work based on different features [7]


Approach Average Approx. Average Number Power
max HR accuracy sampling of devices consumption
rate in watts
Patients 160 90% 120 1 500mWatt
normal
Daily 156 85% 110 1 N/A
strength
Omnio 140 80% 80 1 N/A
Everyday 144 90% 90 1 N/A
health
SEHMS 155 140% 140 2 N/A
RMHM 162 150% 150 2 N/A
PHM 145 110% 110 1 N/A

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 7


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Remote Mobile Health Monitoring (RMHM) is a system that provides monitoring


of a user's health parameters such as his or her heart rate, which is measured by
wearable sensors, it allows care givers and loving one to monitor the users to
facilitate remote diagnosis. The system does not have the capability of monitoring
in real time. The idea of predicting heart attacks remains a challenge and that is
the focus of our research. Every research group specifies its own approach on how
they plan to achieve its objective. There is combination of body temperature and
ECG to predict heart abnormalities. Other systems have different approaches with
different hardware implementations. None of them were discussed about power
consumption rate during data collection. Our system uses a low power Bluetooth
module to collect a longitudinal data wirelessly using a Smartphone. This system
unique in the sense that we created a low power smart lot system and used a data
mining technique in this prediction algorithm. Upon testing our prediction
algorithm, results are got with a high accuracy for all our healthy and unhealthy
test subjects. There is illustration in the different between our system and the other
related works in Tables 3.1 and 3.2. The most important aspect of our system is
the warning that allows the user to prevent an injury before it actually happens. To
the best of our knowledge, our system is the first smart lot based health assistance
which uses a subject-specific Body Area Sensor signals for predicting heart
related injuries.

• Summary: in this chapter there is detailed mentioning of comprehensive


and connected e-mobile health applications there uses and working
patterns.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 8


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Chapter 4
System Architecture

In Fig. 4.1, the system architecture to detect heart rate [1] is given. The embedded
ECG and temperature sensors constantly collect the heart parameters while the
subject is living a normal life. After receiving the data through a low power
Bluetooth communication channel, the Smartphone will process the data to
classify whether the user's condition is normal or abnormal. A quantitative heart
rate analysis is performed in the Android platform which gives the user the option
of viewing his/her real-time plots of the ECG signal and body temperature. To
determine abnormal heart patterns, we first establish a criterion for normal heart
rate. Quantitative analysis of heart rate stability and pulse symmetry will yield a
series of parameters, like heart rate, RR intervals (in ECG), and ST segments (It
represents the interval between ventricular depolarization and repolarization). The
system continuously monitors ECG patterns, the planned design only triggers a
warning if the ECG patterns and body temperature of the user reaches a certain
threshold level, wherein the user might face a potential heart attack. At that
moment, the system transmits a warning to the subject in the form of a message or
a vibration alert.

Fig. 4.1-System architecture to detect heart rate[1]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 9


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

4.1 Hardware components


The hardware components used in the system are mentioned below-
1. Bluetooth chip equips the Arduino with the ability to connect to the Smartphone
application.
2. Arduino Uno-The Arduino is programmed to read analog signals from the
pulse and temperature sensors and create a data packet to convert the signals into
digital form. It sends those packets to the phone as a response to the data sending
request. It also manages the Bluetooth communication by coordinating with the
RN42 Bluetooth chip. The Arduino then maps those voltage values to digital
values ranging from 0 to 1023.the value from the Arduino through analog pin 0
and then multiply it by 5 and divide it by 1023 to get the correct voltage value.
This only applies to the pulse sensor since the expected output from the
temperature sensor is in degrees Celsius. Rather than using the Arduino Uno, we
decided to use the Arduino Mini instead. They both have the same
microcontroller, clock speed, operating voltage, and range of input voltage. The
Arduino Uno has an area of 36.63 cm2 which is almost 7 times larger than the
Arduino Mini.

To be able to upload code to the device using Mini USB Adapter, there is need of
0.1u F (micro-farad) capacitor connected in series between the reset pin of the
Arduino Mini and the reset pin of the Mini USB Adapter. We used a PCB
soldering board to solder all the hardware components together. To power the
device, we used a 7.4 Volt Lithium Ion battery with a current supply of 2200
mAH (milli-amperes per hour). A Pin Battery Connector Plug to insert the battery
in.

In Fig. 4.2, components used for the block shown in Fig. 4.1, are explained.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 10


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig. 4.2 Hardware components [8]


Final model design its structural view is shown in Fig. 4.3.

Fig. 4.3 Final model design [9]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 11


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

4.2 Data collection


The data collection process can be divided into two parts, reading the data from
the sensors and sending it to the smart phone. For the first part, one sensor gets the
heart's pulse rate and the other one gets the body temperature. The sensors data is
parsed and plotted on the device's screen.
i)Data Collection Interface: The sampling frequency or rate at which it is collected
sensor data is the key challenge in data collection process. For this system, we
send the data from the two sensors simultaneously, so intuitively, the sampling
rate for this system would be less than the sampling rate of a system that reads
data from just one sensor. Given that the body temperature does not undergo as
many changes as the ECG signal, we increased the ECG's sampling rate by
decreasing the temperature's sampling rate. There is fixation of sampling rates for
the temperature sensor and the ECG signal at 5 Hz and 160 Hz, respectively. In
the block diagram that describes the sensor data collection interface. The
Bluetooth chip is also connected to the Arduino which enables the IoT device to
transmit the sensed data to the Smartphone application. First, the user wears the
device as described in the hardware section and then uses the application to
connect to the Bluetooth interface as described in the software section. From this
point the user only needs to interface with them application where she can
navigate through the different options.
ii) Test Subject Data Collection: this system is used to collect data from the users
and store it in the Smartphone’s database and it can plot and process the data in
real time. To be able to write our algorithm, we had to collect data from test
subjects while doing different activities. There are three scenarios that are
considered for each subject are: sitting, walking, and climbing (upstairs). We
believe that those different scenarios can help us understand how everyone's heart
behaves during different activities
iii) Test Subject Sample Data: The data collected show that the system has a data
collection system that is capable of gathering data under any circumstances, such
as in the three scenarios described above. In this section, we show the sample
ECG data for test subjects. The sample temperature sensor data are just plots to
demonstrate the accuracy of the sensor.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 12


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

iv) Temperature Data: - Temperature does not need much analysis except for
converting the data points to the time domain and smoothing the signal for better
visual representation. The "noisiness" in temperature signal indicates a need for
smoothing. The y-axis represents the temperature in Celsius and the x-axis shows
the number of data points. To convert the data points to time in seconds, we need
to use the sampling frequency which for this case was 100 Hz. The sampling rate
that was used here was just to demonstrate the plot in an easier way since 700
hundred data points can be easily mapped to 7 seconds using 100 Hz. However,
the sampling rates used for our system are still 5 Hz for the temperature data and
160 Hz for the ECG data. The temperature sensor used in this work has an
accuracy of +/- 0.5, which allows capturing changes in temperature very quickly
in 7 seconds. The entire process is shown in Fig. 4.4. The results are shown in Fig.
4.5.

Fig. 4.4-data collection interface [5]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 13


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig. 4.5-temperature sensor data accuracy [12]


4.3 Software
Software analysis of the work is shown in Fig. 4.6. To transmit data to the
Smartphone through Bluetooth channel, there is Android application that
connected to the transmitting signals of the Bluetooth module. When the
Bluetooth is supplied with power, it immediately enters the pairing mode, where it
waits for any device to connect to it. Then the Smartphone Bluetooth adapter is
opened through the application and it starts searching for the devices. After a
successful connection, the application will produce a message on the screen
informing the user that the connection was successful, and the Bluetooth chip's
LED will turn from red (pairing mode) to green (connected mode). After
connecting to the lot device, the application will automatically start receiving the
sensors' data. The application parses the temperature and pulse data into separate
arrays that are then sent to different pages where they are plotted in real time.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 14


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig.4.6 Software analysis [5]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 15


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

4.4 Data analysis technique

Data analysis is done using MATLAB. In signal processing, noise is a general


term for unwanted alterations that a signal may suffer during collecting, storing,
transmitting, or processing data. ECG signals for sitting, walking and climbing
upstairs. These signals are shown in Fig. 4.7.

Fig. 4.7 ECG signals for sitting, walking and climbing upstairs for test subject
[11]
Table 4.1 gives the data collection for any test person.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 16


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Table 4.1 General collection of subject’s information [6]


Test subject Weight(lbs) Height age scenario Heart
(in cm.) rate
Subject1(female) 125 173 20 i)sitting 107
ii)walking N/A
iii)climbing N/A
upstairs
Subject2(male) 141 180 24 i)sitting 72
ii)walking 98
iii)climbing 108
upstairs
Subject3(female) 163 177 23 i)sitting 72
ii)walking 95
iii)climbing 100
upstairs
Subject4(male) 128 184 23 i)sitting 79
ii)walking 89
iii)climbing 105
upstairs

4.4.1 Noise Reduction: Filtering Extracting features from a noisy signal can give
a heart rate of 200 when the actual heart rate is 80. Therefore, before we send our
signal to the feature extraction method, almost every unwanted part of the signal is
removed. We smooth the signal using the MATLAB built in function 'smooth',
which gives us that sine-wave-like signal, and then we subtract that sine-wave-like
(low frequency component) from the collected ECG signal.
Where we is the cut-off frequency and N is the filter order
Equation of noise reduction

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 17


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

4.5 Extracting features


The related parameters are explained in this section.
4.5.1 Heart rates-autocorrelation and Fourier transform techniques are used to
extract heart rates or beats per minute from collected ECG signal.

i) Autocorrelation-we calculate the difference between two peaks which gives


the length of one period in data points. Dividing that number of data points by the
sampling frequency gives us the time in seconds of one period. Inversing and
multiplying it by 60 give us the total beats per minute.

Equation of autocorrelation

ii) Fourier Transform-The Fourier transform extracts the frequencies and


harmonies of the signal so, we find the location of the maximum harmonic in the
frequency plot.
Equation of Fourier transform

Where F(w) is the frequency domain of a given signal and f(t) is the time domain
of the signal. For our data analysis, we used an "fft" function in MATLAB that
gives us the plot of the signal in the frequency domain. From there, we get the
location of the maximum harmony and multiply it by 60 to get the beats per
minute.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 18


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig. 4.8 Graph of Fourier transforms [12]


The first significant harmonic is the signal is 0.92 which represents the beats per
second and multiplying this by 60 gives us beats per minute. The other peaks are
noise or irrelevant signals. This is shown in Fig. 4.8.
iii) R-R interval- for normal ECG signals, the R-R intervals do not fluctuate or
suddenly change in a drastic manner. The R-R peak found and subtracted peaks
locations in time, gives us the duration between each beat. This is shown in Fig.
4.9.

Fig. 4.9 Graph of R-R interval [11]

iv) ST segments-Elevated ST segments are one of the biggest indicators of heart


attacks. The R-R interval is basically the range between both peaks. We take a 20
percent from that range and add it to the location of the first peak which gives us
the point where we would start adding the voltage values. Then we take 50

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 19


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

percent of the range and subtract it from the location of the subsequent peak,
which gives us the point where we would stop adding the voltage values. After
adding all the voltage values, we divide by the number of points to get the average
voltage value representing the ST segment. This is shown in Fig. 4.10.

Fig. 4.10 Graph of ST segments [11].

4.6 Algorithm

Fig. 4.11 shows the algorithm used. The first step is to read the data from the
sensors at 5 Hz for the temperature data and 160 Hz for the ECG data. We then
maintain a sampling window of 5 seconds on which to perform all computations.
After selecting the sample window, we reduce the noise by applying the filtering
techniques. After removing all the noise components from the signals, we extract
the three features from the ECG and pass on those features along with the
temperature data to our prediction algorithm. If the results from the algorithm
indicate that the current sample window is normal, the window shifts by 1 second
and takes the next 5 seconds of data. If the algorithm detects an abnormality, it
immediately warns the user. Using a moving window of 1 second creates the need

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 20


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

more computation but it provides faster and more accurate feature extraction and
prediction results. This means the next sample window will have I second of new
data and 4 seconds of data from the previous sample window.

Fig. 4.11 Algorithm [5]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 21


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Our prediction algorithm is based on predictive machine learning model called


148 Decision Tree. This model decides the target value of a new sample based on
various attribute values of the available data. We apply that model to our
algorithm with the result that the target value would indicate whether the patient is
having a heart attack or not, and the available data would be contained in the
extracted features. We note that the decision tree is a general model that can be
used in many applications in many different ways. We designed novel algorithms
Heart Attack Prediction using a Decision Tree based on a Standard Deviation
Statistical Analysis (DTSDSA); as shown in Fig. 4.12. This uses the decision tree
model with a standard deviation statistical analysis. We examine the method by
which the extracted features are processed at the decision tree. Using a standard
deviation statistical analysis, we determine whether the features are abnormal or
abnormal. Figure 11 shows the structure of our decision tree which refers to the
prediction algorithm.
The decision tree algorithm gives clear analysis of the step by step warnings given
by the model how it senses the data and how decision is taken by it. The algorithm
uses warning levels from 0 to 4 to determine the degree of abnormality for each
incoming signal from window.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 22


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig. 4.12 Decision tree algorithm [5]

As in Fig. 4.13, there are 2 windows moving and sampling window the sample
window contains the part of the ECG signal that is being processed while the
moving window specifies the amount by which that sample window is shifted to
start taking the next sample window the sample window is 5 seconds and the
moving window is 1
Second. This provides an overlap of 4 seconds for subsequent sample windows.
We note that, for the 30 second ECG signal shown below, if we did not have a
moving window, we would have only had 6 sample windows (30 seconds/5
second windows). This means that the features would only be updated 6 times

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 23


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

throughout, the entire 30 seconds. The way we implemented it, we get 26 results
instead of 6 for the entire 30 seconds. This represents a far more practical method
since heart rates change very fast, especially during cardiac event.
Heart rates can vary from 55 all the way to 150 depending on the person and what
the person is doing. By using our standard deviation statistical analysis, we only
detect an issue with the heart rate when it suddenly fluctuates out of the normal
range. If the current heart rate has an error above 7 percent, we set the warning
level to 1. If the R-R intervals' error is higher than a certain percentage, we set the
warning level to 2 and proceed to check the ST segment. If the ST segment also
has an error higher than what is considered to be normal, we set the warning level
to 3 and proceed to check the body temperature. We still check the body
temperature to see if the warning level would go up to 4 the moving window is
equivalent to 2 warnings and the prediction window is equivalent to 8 warnings,
which results in 10 prediction windows for the 30 second segment. Prediction
window with all 3's which gives a sum of 24. We add all the warning levels and
divide by 24. If the ratio is 0.5 or above, we trigger a warning to the user.

Fig. 4.13 Graph of sliding and sampling window [9]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 24


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

4.6 Results and Evaluation


The results and the way of evaluation of different subjects are discussed in this
section.
4.6.1 For healthy test subjects
The results shown in Table 4.2, are for one test subject in the three different
scenarios. Since all subjects had normal body temperatures, it will show the ECG
signals and the results of the prediction algorithm for each sample window.

Table 4.2 general database for healthy test subjects [6]

Subject Gender Age Scenario Average heart


rate
1 male 24 Sitting 84
Walking 108
Running 135

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 25


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

• Scenario 01- while walking


The ECG signal while walking is considered as a normal and, therefore, no
warning will trigger. The ECG signal while walking also consider as normal. But,
we had a couple of false warnings while walking. The prediction window is used
as in Fig. 4.14 to eliminate the false warnings in our algorithm. The results from
the prediction algorithm had three warnings of level one while walking.
Therefore, there was no need to warn the user since it was a false error.

Fig. 4.14 Prediction algorithm while walking [9]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 26


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

• Scenario 02-while climbing


The algorithm triggered a few warnings as well while the test subject was
climbing upstairs. There are a few warnings for each prediction window, but, none
of which above 50 percent, threshold level for indicating a myocardial infarction
(MI).

Fig. 4.15 Prediction algorithm while climbing [9]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 27


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

4.6.2 For unhealthy test subjects

Table 4.3 general database for unhealthy test subjects [6]

Subject Gender Age History Medication Underlying


cardiac
rhythm
1 Male 43 Unknown Unknown sinus
2 Female 72 Heart failureDigoxin sinus
Quinidine
gluconate
3 Female 30 Unknown Unknown sinus
4 Female 72 Mitral valve Digoxin Atrial
replacement fibrillation
5 Male 75 Cardiac Digoxin Atrial
surgery Quinidine fibrillation
6 Male 34 Unknown Unknown sinus
7 Female 89 Unknown Unknown Atrial
fibrillation
8 Male 66 Acute Digoxin sinus
myelogenous Quinidine
leukemia
9 Female 82 Heart failure Unknown sinus
10 Male 68 Ventricular Digoxin sinus
ectopy Qunidine
gluconate

The ECG signal appears wavy in unhealthy test subjects as in Fig. 4.16.

Fig. 4.16 ECG signal of unhealthy test subjects [11]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 28


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

The way in which algorithm triggers and generates warnings.1st consider set of
heart rates from sample windows as in Fig. 4.17.

Fig. 4.17 Random heart rates from sample windows [11]

1) Heart Rate Error = 100*|131.84-71.94| / 71.94 = 83.3% → Warning level 1 As


shown in Figure 17,

2) The R-R Intervals as in Fig. 4.18, hasvery high fluctuations which explain why
the heart rate jumped from 71.94 to 131.89 in just one second. → Warning level 2
as shown in Figure 17

3) The ST segment as in Fig. 4.19, has voltage values which are also fluctuating
in an abnormal fashion. → Warning level 3

Fig. 4.18 R-R intervals from the sample window [11]

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 29


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig. 4.19 ST segments from the sample window [11]

Prediction algorithm is shown in Fig. 4.20. The prediction results for the ECG
signal are shown in Figure 19. The warning result from the second sample
window is highlighted in yellow. We observed a remarkable fluctuation in all the
features and the algorithm triggered warnings of level 3 for almost all the sample
windows as expected for a patient who had a history of cardiac surgery and passed
away shortly after the signal was recorded.

Famous personalities who died due to sudden cardiac arrest (surekha suri, punnet
rajkumar, arathi agarwal, sidharath shukala, allen Steve)

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 30


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Fig. 4.20 Predication algorithm for unhealthy test subjects [9]

• Summary: In this chapter there is discussion of system architecture


along with hardware components used, the software analysis is done
alongside with complete algorithm discussion and the results and
evaluation for healthy and unhealthy test subjects.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 31


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

Chapter 5
SUMMARY
There was designing and development of an integrated smart IoT system to
predict and monitor heart abnormality in user. There was also management to
create a low power consumption communication channel between the smart IoT
device and the smart phone application. This research provides users a non-
invasive device that allows them to better understand how they may feel about
their ECG. The results from different data sets are also presented to show that this
approach provides a high rate of classification correctness in distinguishing
between at normal and abnormal ECG patterns. The system may also find
multiple applications in behaviour detection for people with various disabilities.

To test the chronological durability and long-term feasibility of our approach in


the future, there was planning to test our system with data from the people who
suffer from heart problems. There was also planning to test the power
consumption rate for whole working life of the device during test on the field.
There could be measurements done to the different physiological parameters of
the user during daily activities. Additionally, the system can be used in the smart
home monitoring system for future wireless technology. Also, we can enhance the
system by adding more sensors, like, Galvanic Skin Response (GSR),
accelerometer, to the IoT device.

There can be complete health detection that be done like a perfect doctor without
undergoing heavy charges which might be when undergone with the disease to put
into the dispensary.

The lower class society can get the machine with minimal investments and
government schemes and the precious lives can be saved. The results of global
burden disease study rate standardized CVD (cardiovascular diseases) death rates
of 272 per 100000 population in India which can be overcome with lower rates by
such studies, inventions and marketing.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 32


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

BIBLIOGRAPHY
1. ITU-T Global Standards Initiatives Recommendation ITU-T Y. 2060 ,
2012.

URL: http://www.itu.int/en/ITU-T/gsi/iot/Pages/default.aspx.

2. O. Vermesan and P. Friess, “Internet of Things: Converging Technologies


for Smart Environments and Integrated Ecosystems”, River Publishers
Series in Communications, 2013.

3. R. Clarke, “Smart Cities and the Internet of Everything: The Foundation


for Delivering Next-Generation Citizen Services “, Cisco, 2013.

URL:https://www.cisco.com/c/dam/en_us/solutions/industries/docs/scc/ioe
_citizen_svcs_white_paper_idc_2013

4. D. Evans, “The Internet of Things How the Next Evolution of the Internet
Is Changing Everything”, Cisco IBSG.

URL:https://www.scirp.org

5. IEEE Standards Association, P2413 - Standard for an Architectural


Framework for the Internet of Things (IoT)

URL: https://standards.ieee.org/develop/project/2413.html.

6. URL: https://physionet.org/physiobank/database/sddb/

7. Y. ElSaadany, “A Wireless early prediction system of cardiac arrest


through IoT. [Dissertation, thesis]”, 2017.

URL: https://etd.ohiolink.edu/.

8. URL: https://robotechshop.com/shop/arduino/arduinoboard/arduino-uno-
r3-china/?v=7516fd43adaa
9. URL: https://www.hindawi.com/journals/ahci/2019/1507465
10. Y. Zhang, H. Liu, X. Su, P. Jiang, and D. Wei, ‘Remote mobile health
monitoring system based on smart phone and browser/server

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 33


Energy efficient wearable smart IoT system to predict cardiac arrest 2021-2022

structure’, “Journal of Healthcare Engineering”, vol. 6, no. 2, Article ID


590401, pp. 717–738, 2015.
11. URL:https://upload.wikimedia.org/wikipedia/commons/c/c1/ECG-
RRinterval.svg

12. URL: https://en.wikipedia.org/wiki/Fourier_transform.

Department of Electronics and Communication Engineering, KLEIT, Hubballi Page | 34

You might also like