an energy efficient wearable smart iot system to predict ...advancesinhuman-computerinteraction daa...
TRANSCRIPT
Research ArticleAn Energy Efficient Wearable Smart IoT System toPredict Cardiac Arrest
AKM Jahangir AlamMajumder 1 Yosuf Amr ElSaadany2
Roger Young Jr1 and Donald R Ucci2
1University of South Carolina Upstate SC USA2Miami University OH 45056 USA
Correspondence should be addressed to AKM Jahangir AlamMajumder majumdaamiamiohedu
Received 26 October 2018 Accepted 1 January 2019 Published 12 February 2019
Guest Editor Maurizio Rebaudengo
Copyright copy 2019 AKM Jahangir Alam Majumder et al This is an open access article distributed under the Creative CommonsAttribution License which permits unrestricted use distribution and reproduction in any medium provided the original work isproperly cited
Recently many people have become more concerned about having a sudden cardiac arrest With the increase in popularity ofsmart wearable devices an opportunity to provide an Internet of Things (IoT) solution has become more available Unfortunatelyout of hospital survival rates are low for people suffering from sudden cardiac arrests The objective of this research is to presenta multisensory system using a smart IoT system that can collect Body Area Sensor (BAS) data to provide early warning of animpending cardiac arrest The goal is to design and develop an integrated smart IoT system with a low power communicationmodule to discreetly collect heart rates and body temperatures using a smartphone without it impeding on everyday life Thisresearch introduces the use of signal processing and machine-learning techniques for sensor data analytics to identify predictandor sudden cardiac arrests with a high accuracy
1 Introduction
Heart problems have a significant impact on the quality oflife of any who suffer from them Through the widespreaduse of new technologies there is a potential for advancedhealthcare systems The development of smart wearable IoTsystem for health monitoring is revolutionizing our lives [1]Medical services have made large advancements in recentyears Computing and communication technologies have thepotential to offer a wider variety of services for patientsThrough this advancement a patientrsquos quality of life wouldimprove and provide a benefit to a large portion of thepopulation
Through the availability and advancement of wearableIoT devices it aids patients in monitoring and controllingtheir health metrics An example of the benefits is that apatient can bemade aware of the status of their conditionwiththe aid of such devices at any timeThat information can thenbe made available to the treating health care professional toprovide prompt action for a condition or save the life of the
user in an emergency Connected health is proving to be amajor application for developing technologies
The concept of connected healthcare systems and smartembedded IoT devices offers a potential for both commercialcompanies and individuals to benefit The goal is to useinvestigations performed on new technologies to enable thecreation enhancement and expansion of connected healthsystems with the objective of developing a system that canhelp patients obtain a better awareness of their health statusand provide early medical warnings
The goal of the IoT is to enable things to be connectedanytime and anyplace with anything and anyone ideallyusing any pathnetwork and any service [2 3] This goalrequires more development inmany areas including commu-nication and applications Many research and developmententities are involved in development activities Cisco definesthe Internet of Everything (IoE) as connectivity of peopledata things and processes in networks of connections [3] inother words IoE is a network of computers and devices of alltypes and sizes all communicating and sharing information
HindawiAdvances in Human-Computer InteractionVolume 2019 Article ID 1507465 21 pageshttpsdoiorg10115520191507465
2 Advances in Human-Computer Interaction
According to Cisco there will be 50 billion devices connectedto the Internet by 2020 [4] IoT can be described as a networkof networks
A special dedicated IEEE standard is under developmentfor the architectural framework of the IoT namely IEEEP2413 [5] This standard defines IoT as a system of intercon-nected people and physical objects along with Informationand Communication Technology (ICT) to build operate andmanage the physical world via smart networking pervasivedata collection predictive analytics and optimization [6]The IoT standard provides a reference model defines archi-tectural building blocks and affords development mecha-nisms for the relevant systems
As the Internet continues to grow one of the key enablersis the IPv6 [7] global deployment which supports the ubiq-uitous addressing of any communicating ldquosmart thingrdquo Itwill provide access to billions of smart things allowing newmodels of IoT interconnection and integration Howeveras a result of network expansion more requirements willbe added to network functions network management andnetwork composition IPv6 must enable the interconnectionof heterogeneous IoT components together with heteroge-neous applications 6LoWPAN [8] is an optimized versionof IPv6 for Low Power Wireless Personal Area Networks Itis basically IPv6 implemented on resource-constrained IoTdevices
IoT security is one of the main research topics as thereis a need to provide security for the growing number ofconnected devices For example there is a need to ensurethat IoT devices are only providing information to authorizedentities [20] IoT hardware development has many relatedresearch issues as new devices are introduced and many ofthem are small and have limited battery life Moreover theIoT sensor devices must be integrated into the Internet usingcommunication protocolsThese protocols must consider thelow energy of the sensor battery especially when sensors aredeployed in remote locations
There are many protocols developed and more to bedeveloped that consider the use of low power for IoTdevices For example an efficient service announcement anddiscovery protocol in IP-based ubiquitous sensor networksis proposed [8] The protocol adopts a fully distributedapproach to ensure optimal acquisition times low energyconsumption and low generated overhead with timely reac-tion to topology changes The protocol is capable of realizingoptimal acquisition times with minimal cost in terms ofenergy and generated overhead making it suitable for mobilenetworks
The Internet Engineering Task Force has done the majorstandardization work for the Constrained Application Pro-tocol (CoAP) that allows seamless integration of low powerdevices into the Internet [21] CoAP can run on most devicesthat supportUser Data Protocol and the network architecturethat use this protocol is a hot research topic [22ndash26] IoTdevices use different protocols (Bluetooth Zigbee etc) anddifferent networks (LANs WANs) Thus an IoT platformhas three building blocks Cloud Computing is used as anenabling platform that supports IoT-based systems to allowconnecting a large number of devices and sensors IoT-based
healthcare applications can use Cloud Computing platformsto facilitate sensors communication instead of implementingseparate means to have all the sensors communicate directly
11MajorContributions In this paper our aim is to develop asmart IoT system that is unique and stands out when it comesto eHealth based IoT systems for predicting a personalizedcardiac arrest because they naturally combine the detectionand communication components Our major contributionsare as follows
(i) Developing a multisensory smart IoT-based cyber-human system for heart abnormality prediction
(ii) Proposing a smartphone-based heart rate detectionsystem using a wearable Body Area Sensor (BAS) system
(iii) Designing developing and implementing a low powercommunication module to send data to the smartphone
(iv) Implemening amobile system for remote supervision ofusers which can be used to detect personalized health crisis
The rest of the paper is organized as follows in Section 2we describe the background and relevant related work InSection 3 we discuss the solution process of designing oursystem architecture and we explain the circuit design of oursystem In Section 4 we discuss the data collection processand follow with Sections 5 and 6 which are data analysisresults and evaluation of our smartphone-based prototypesystem Finally in Section 7 we conclude the paperwith somefuture research directions
2 Related Works
There are many research projects that attempt to charac-terize a userrsquos heart abnormality however most of themhave lack of key components Many individuals currentlyperform research in eHealth andmany companies have takenadvantage of this work by designing systems that connectpatients with doctors around the world We examine twodifferent categories of related systems comprehensive healthcare using embedded systems and connected eHealth smart-phone applications Our proposed system is more relatedto connected eHealth smartphone applications since weare developing an application on smartphone that connectswith a smart IoT device while most companies focus oncomprehensive health care systems that allowusers to interactwith one another and benefit from resources
21 Comprehensive Health Care Systems ldquoPatientsLikeMerdquofocused on helping patients answer the question ldquoGiven mystatus what is the best outcome I can hope to achieve andhow do I get thererdquo They answered patient questions inseveral forms like having patients with similar conditionsconnect to each other and share their experiences [27] Butthey did not mention data security and the usability of thesystem
Another related system is called ldquoDailyStrengthrdquo It isa social network centered on support groups where usersprovide one another with emotional support by discussingtheir struggles and successes with each other The site con-tains online communities that deal with different medicalconditions or life challenges [28] It is very similar to
Advances in Human-Computer Interaction 3
ldquoPatientsLikeMerdquo in the sense that both of them are freeplatforms that involve patients and doctors interacting Twomajor discrepancies between them are that ldquoDailyStrengthrdquodoes not involve research institutes and does not have amobile application Also both systems are not IoT-basedsystem
In another work a robust model was developed thatincluded multiple pulse parameters EEG and skin conduc-tance sensors into a shirt [42] Another systemwas developedfor connecting facial expressions and voice recognition withEEG patterns [43] Other researchers proved that EEG aloneexhibits characteristics for different emotions [44] Facialrecognition software has been compared with heart ratevariability in order to better understand patterns associatedwith various emotions [45] It has also been proven thatcertain pulse patterns are associated with physical stress andnot from emotional stress [46] But their systems are mobileand they did not use IoT as a platform for their system
Another comprehensive health care system is calledldquoOmniordquo which is an all-in-one application for MedicalResources [29] It provides among its services clinicalresources diagnostic resources disease guides and druginformation Everyday Health [30] is a company which ownswebsites and produces content relating to health andwellnessIt has higher ratings and publishes many health articles thatcan be very helpful for patients In addition it has a smartsearch that provides users with easy access their materials
22 Connected eHealth Mobile Applications Even though allthe systemsmentioned above provide health services they donot provide any smart devices that can be used to monitoruserrsquos daily activities and alert them when needed Thereare many heart monitors that provide users with their ECGsignals so they can keep track of their condition but none ofwhichwho alert the users upon emergencies A Smart ElderlyHomeMonitoring System (SEHMS) designed and developedon an Android-based smartphone with an accelerometer itcould detect a fall of the user [31] It provides a smartphoneuser interface to display health information gathered fromthe system The main advantage of SEHMS is that it has theremote monitoring facility for elderly who and chronicallyhostile patients But it cannot warn the user in case ofemergency
Remote Mobile Health Monitoring (RMHM) is a systemthat providesmonitoring of a userrsquos health parameters such ashis or her heart rate which is measured by wearable sensors[32] It allows care givers and loving one tomonitor the userrsquosto facilitate remote diagnosis The system does not have thecapability of monitoring in real time
The idea of predicting heart attacks remains a challengeand that is the focus of our research Every research groupspecifies its own approach on how they plan to achieveits objective We decided to use a combination of bodytemperature and ECG to predict heart abnormalities Othersystems have different approaches with different hardwareimplementations None of them were discussed about powerconsumption rate during data collection Our system uses alow power Bluetooth module to collect a longitudinal datawirelessly using a smartphone
In [33 34] authors presented a comparison betweendifferent data mining techniques for heart attack predictionThey present just prediction algorithms rather than a com-plete system with a data collection device and a computingplatform The best techniques that are most commonly usedfor predicting heart problems areDecisionTreeNaıve BayesNeuralNetwork andK-meanOur researchnot only includesa complete system with an IoT device and a computingplatform but also uses one of those data mining techniques(Decision Tree) to predict heart problems This makes oursystem unique in the sense that we created a low powersmart IoT system and used a data mining technique in ourprediction algorithm Upon testing our prediction algorithmwe obtained results with a high accuracy for all our healthyand unhealthy test subjects We illustrate the differencebetween our system and the other related works in Tables 1and 2
To address the drawbacks of the above-mentionedresearch and systems in this paper we propose a smart IoT-based heart rate monitoring system Our system is designedto address directly some of the drawbacks of the existingsystems and potentially yield good prediction results Themost important aspect of our system is the warning thatallows the user to prevent an injury before it actually happensTo the best of our knowledge our system is the first smartIoT-based health assistance which uses a subject-specificBodyArea Sensor signals for predicting heart related injuries
3 System Architecture
The strength of our system relies on existing wireless com-munications to provide low power with maximum freedomof movement to users in their physical activity In additionwe have used small light-weight smart IoT devices that areuser friendly like the smartphone and the wrist-band
To integrate the sensors we used the output of the embed-ded sensors to perform an extensive set of experiments forevaluating and discriminating between normal and abnormalheart rate patterns Subjects wear the embedded sensorsand carry their smartphone in their pocket or hold it intheir hands The embedded ECG and temperature sensorsconstantly collect the heart parameters while the subject isliving a normal life After receiving the data through a lowpower Bluetooth communication channel the smartphonewill process the data to classify whether the userrsquos conditionis normal or abnormal A quantitative heart rate analysis isperformed in the Android platform which gives the user theoption of viewing hisher real-time plots of the ECG signaland body temperature
To determine abnormal heart patterns we first establisha criterion for normal heart rate Quantitative analysis ofheart rate stability and pulse symmetry will yield a series ofparameters like heart rate RR intervals (RR interval is theduration between two consecutive R peaks in an ECG signal)and ST segments (ST segment is the flat section of the ECGsignal between the end of the S wave and the beginning ofthe T wave It represents the interval between ventriculardepolarization and repolarization) We then design an earlywarning system to monitor those parameters for signs of
4 Advances in Human-Computer Interaction
Table 1 Qualitative comparison of existing work based on different features
Approach Use IoT Device Mobility Low Power System Cyber Physical System Cost EffectivePatientsL-ikeMe [27] No Yes No No NoDaily Strength [28] Yes Yes No No NoOm-nio [29] Yes Yes Yes Yes NoEveryday Health [30] Yes No No No NoSEHMS [31] No Yes No Yes NoRMHM [32] No No No Yes NoPHM [33] Yes Yes No Yes NoQardiocore [34] No No No Yes NoMaksimovic [35] No No No Yes NoStecker [36] No No No Yes NoMancini [37] No No No Yes NoSun [38] No No No Yes YesCommunicore [39] No No N0 Yes NoKavitha1 [40] Yes No No Yes NoJagtap [41] No No No Yes NoOur Approach Yes Yes Yes Yes Yes
Table 2 Quantitative comparison of existing work based on different features
Approach Average Max HR ApproximateAccuracy
Average MaxSampling Rate
Number of Device (s)Used
Power Consumptionin Watts
PatientsL-ikeMe [27] 160 90 120 1 sim 500 mWattDaily Strength [28] 156 85 110 1 NAOm-nio [29] 140 80 100 1 NAEveryday Health [30] 144 85 80 1 NASEHMS [31] 155 78 90 2 NARMHM [32] 162 82 140 2 NAPHM [33] 145 70 150 1 NAQardiocore [34] 135 78 110 1 NAMaksimovic [35] 155 85 105 2 NAStecker [36] 167 77 130 1 NAMancini [37] 151 87 135 2 sim 600 mWattSun [38] 160 75 95 1 NACommunicore [39] 148 72 150 1 NAKavitha1 [40] 156 68 155 1 NAJagtap [41] 148 72 145 2 NAOur Approach 135 95 160 1 sim 444 mWatt
cardiac arrest during any activity Although the system con-tinuously monitors ECG patterns the planned design onlytriggers a warning if the ECG patterns and body temperatureof the user reaches a certain threshold level wherein theuser might face a potential heart attack At that moment thesystem transmits a warning to the subject in the form of amessage or a vibration alert Figure 1 illustrates the prototypeembedded smart IoT system
The IoT device constantly collects data from the userand sends it to smartphone via a Bluetooth communicationmodule All the processing and data analysis take place inthe application where the user has the option to view user
real-time plots These plots provide the user a basic idea ofhisher bodyrsquos status The user does not have maintained arecord of hisher data to ensure that she is in a healthy orunhealthy state since the applicationrsquos job is to alert the userupon an emergency Finally when the algorithm senses anabnormality it immediately alerts the user
31 Hardware The initial prototype system consists of a lowpower Bluetooth chip an Arduino Uno a pulse sensor anda temperature sensor as shown in Figure 2 The other com-ponents are the power supply unit along with a smartphonewith an application
Advances in Human-Computer Interaction 5
Dat
a C
olle
ctio
n
Data Transmission
Data A
nalysis
Real-Time Plots
Emergency ContactInformation
Figure 1 Proposed system architecture
Bluetooth Chip Arduino Uno
Pulse Sensor Temp Sensor
VccOutput
GND
LM35
Figure 2 Hardware components for early prototype system [9ndash12]
The Arduino simply serves as an Analog to Digital Con-verter (ADC) [47] An Arduino is an open-source physicalcomputing platform based on a simple IO board and adevelopmental environment that implements the process-ingwiring language The Arduino is programmed to readanalog signals from the pulse and temperature sensors andcreate a data packet to convert the signals into digital formSubsequently it sends those packets to the phone as aresponse to the data sending request It also manages theBluetooth communication by coordinating with the RN42Bluetooth chip The Bluetooth chip basically equips theArduino with the ability to connect to the smartphoneapplication
The data read from the sensors is always an analog valuebetween 0 and 5 volts since that is the operating voltage ofthis microcontroller The Arduino then maps those voltage
values to digital values ranging from 0 to 1023 Since the y-axis for ECG signals is also a voltage all we had to do is scalethe digital values to back voltage
Basically we read the sensor value from the Arduinothrough analog pin 0 and thenmultiply it by 5 and divide it by1023 to get the correct voltage value This only applies to thepulse sensor since the expected output from the temperaturesensor is in degrees Celsius
To avoid the inaccuracy in simultaneous reading frommultiple analog pins we not only need a delay between eachreading but also need to read from the same analog pin twiceWe read the temperature data from the sensor twice and sendthe second reading then do the same for the pulse sensorWe need to send different symbols before the sensor readingsto be able to parse the data at the receiving end (androidapplication) Before sending a temperature reading we send
6 Advances in Human-Computer Interaction
a lsquorsquo and before sending a pulse reading we send a lsquo-rsquo whichmakes data parsing simple
311 Hardware Modifications After testing our early pro-totype system we worked on modifying the hardware todevelop a better IoT device that can later on be used asa user friendly wearable device In this section we willdiscuss the new hardware components used the design of thewearable device and the performance of the device (powerconsumption current draw)
(1) New Hardware Components Rather than using theArduino Uno we decided to use the Arduino Mini insteadThey both have the same microcontroller clock speed oper-ating voltage and range of input voltage The Arduino Unohas an area of 3663 cm2 which is almost 7 times larger thanthe ArduinoMini When developing a user friendly wearabledevice it is important to have smaller components to be ableto design a compact device
To be able to upload code to the device using Mini USBAdapter we also needed a 01 120583F (micro-farad) capacitorconnected in series between the reset pin of the ArduinoMini and the reset pin of the Mini USB Adapter We used aPCB soldering board to solder all the hardware componentstogether The board which has dimensions of 5 cm x 7 cm(almost the same size of the Arduino Uno) has all the hard-ware components soldered to it To power the device we useda 74 Volt Lithium Ion battery with a current supply of 2200mAH (milli-amperes per hour) This battery has an outletplug that gives it the ability to recharge So we also boughta Pin Battery Connector Plug to insert the battery in Thisallows us to solder the pin plug to the boardwithout solderingthe battery itself allowing the user to remove the batterywhen it needs to be recharged All the components that weadded (shown in Bold in this section) are shown in Figure 3
(2) Design of the Wearable Device After soldering all thehardware components on the PCB board we design thesystem using Velcro strips to make it wearable The device isdesigned such that the Mini USB Adapter can be connectedonly when we need to modify code on the Arduino The finaldesign of the device is shown in Figure 4 where Figure 4(a)shows the device with the Mini USB Adapter attached andFigure 4(b) shows the device without the Mini USB Adapter
Figure 4(b) shows the device when the battery is activehence the LEDs of the Arduino Mini Bluetooth and pulsesensor are all on The wires connected to the battery canbe easily plugged in and out of the IoT device to allow theuser to power the device on and off The battery is placedbetween two PCB soldering boardsThe temperature sensorrsquosconnection mounts over the Bluetooth chip and under thelower PCB board where it will be in contact with the userrsquosskin when the device is worn The pulse sensor extends tothe palm where it should be wrapped around the userrsquos indexfinger It is easy to measure pulse from finger during dailyactivities of the user Finally the Velcro is glued to the bottomof the lower PCB board and covered in black leather to givethe device a better appearance A complete smart wearableIoT device is shown in Figure 5
(3) Smart IoT Device Performance In this section we explainthe power consumption of the IoT device in different modesWhen the IoT device is powered the Bluetooth enters theidle mode where it blinks on and off waiting for a connectionrequest When the Android device connects to the IoT devicethrough the application the Bluetoothrsquos LED stops blinkingand is set to green indicating a successful connection
The performance of the device can be determined bymeasuring the current consumption which tells us how longthe device can be powered The voltage supplied from thebattery is constant since the Arduino Mini takes the voltageit needs and supplies to the devices connected to it Thetypical way to determine the performance of the device is bychecking the amount of current that is drawn from the batteryin the different modes The two modes in which we testthe device are the idle mode and the connectedtransmittingmode The measuring unit of the battery is in milliamp hour(mAH) which is an energy measure A battery with 2200mAH will work for an hour if the current drawn from it isalways 2200mA Similarly if the current draw is 1100mA thebattery would last two hoursTherefore to measure how longthe device can be powered in the on state without the batterydraining we need to calculate the average current draw ofthe IoT device Table 3 shows the current draws the devicersquoslifetime and the power consumption during the two modesfor the IoT device
The performance of the smart IoT device shows that thesystem can collect data for a long period of time in bothmodes whichmakes it very useful for usersWhen the batteryis too low on power to operate the device it can be rechargedby simply plugging the batteryrsquos wires to a charger
32 Software To receive and analyze data from the IoTdevice we use a heart rate and body temperature collectorinterface in the smartphone As described in the hardwaresection we developed a Bluetooth communication channelthat is capable of transmitting data from the pulse andtemperature sensors to the smartphone On receiving datafrom the sensors the system processes the data to identifyany abnormality in the heart rate
To transmit data to the smartphone through Bluetoothchannel we opened a socket from the Android applicationthat connected to the transmitting signals of the Bluetoothmodule To communicate with the Arduino we created asoftware serial object and specified the transmitting andreceiving pins When the Bluetooth is supplied with powerit immediately enters the pairing mode where it waits forany device to connect to it Then the smartphone Bluetoothadapter is opened through the application and it startssearching for the devices After a successful connection theapplication will produce a message on the screen informingthe user that the connectionwas successful and theBluetoothchiprsquos LED will turn from red (pairing mode) to green(connected mode) The detail user interface of our system isshown in Figure 6
After connecting to the IoT device the application willautomatically start receiving the sensorsrsquo data The appli-cation parses the temperature and pulse data into separatearrays that are then sent to different pages where they are
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
2 Advances in Human-Computer Interaction
According to Cisco there will be 50 billion devices connectedto the Internet by 2020 [4] IoT can be described as a networkof networks
A special dedicated IEEE standard is under developmentfor the architectural framework of the IoT namely IEEEP2413 [5] This standard defines IoT as a system of intercon-nected people and physical objects along with Informationand Communication Technology (ICT) to build operate andmanage the physical world via smart networking pervasivedata collection predictive analytics and optimization [6]The IoT standard provides a reference model defines archi-tectural building blocks and affords development mecha-nisms for the relevant systems
As the Internet continues to grow one of the key enablersis the IPv6 [7] global deployment which supports the ubiq-uitous addressing of any communicating ldquosmart thingrdquo Itwill provide access to billions of smart things allowing newmodels of IoT interconnection and integration Howeveras a result of network expansion more requirements willbe added to network functions network management andnetwork composition IPv6 must enable the interconnectionof heterogeneous IoT components together with heteroge-neous applications 6LoWPAN [8] is an optimized versionof IPv6 for Low Power Wireless Personal Area Networks Itis basically IPv6 implemented on resource-constrained IoTdevices
IoT security is one of the main research topics as thereis a need to provide security for the growing number ofconnected devices For example there is a need to ensurethat IoT devices are only providing information to authorizedentities [20] IoT hardware development has many relatedresearch issues as new devices are introduced and many ofthem are small and have limited battery life Moreover theIoT sensor devices must be integrated into the Internet usingcommunication protocolsThese protocols must consider thelow energy of the sensor battery especially when sensors aredeployed in remote locations
There are many protocols developed and more to bedeveloped that consider the use of low power for IoTdevices For example an efficient service announcement anddiscovery protocol in IP-based ubiquitous sensor networksis proposed [8] The protocol adopts a fully distributedapproach to ensure optimal acquisition times low energyconsumption and low generated overhead with timely reac-tion to topology changes The protocol is capable of realizingoptimal acquisition times with minimal cost in terms ofenergy and generated overhead making it suitable for mobilenetworks
The Internet Engineering Task Force has done the majorstandardization work for the Constrained Application Pro-tocol (CoAP) that allows seamless integration of low powerdevices into the Internet [21] CoAP can run on most devicesthat supportUser Data Protocol and the network architecturethat use this protocol is a hot research topic [22ndash26] IoTdevices use different protocols (Bluetooth Zigbee etc) anddifferent networks (LANs WANs) Thus an IoT platformhas three building blocks Cloud Computing is used as anenabling platform that supports IoT-based systems to allowconnecting a large number of devices and sensors IoT-based
healthcare applications can use Cloud Computing platformsto facilitate sensors communication instead of implementingseparate means to have all the sensors communicate directly
11MajorContributions In this paper our aim is to develop asmart IoT system that is unique and stands out when it comesto eHealth based IoT systems for predicting a personalizedcardiac arrest because they naturally combine the detectionand communication components Our major contributionsare as follows
(i) Developing a multisensory smart IoT-based cyber-human system for heart abnormality prediction
(ii) Proposing a smartphone-based heart rate detectionsystem using a wearable Body Area Sensor (BAS) system
(iii) Designing developing and implementing a low powercommunication module to send data to the smartphone
(iv) Implemening amobile system for remote supervision ofusers which can be used to detect personalized health crisis
The rest of the paper is organized as follows in Section 2we describe the background and relevant related work InSection 3 we discuss the solution process of designing oursystem architecture and we explain the circuit design of oursystem In Section 4 we discuss the data collection processand follow with Sections 5 and 6 which are data analysisresults and evaluation of our smartphone-based prototypesystem Finally in Section 7 we conclude the paperwith somefuture research directions
2 Related Works
There are many research projects that attempt to charac-terize a userrsquos heart abnormality however most of themhave lack of key components Many individuals currentlyperform research in eHealth andmany companies have takenadvantage of this work by designing systems that connectpatients with doctors around the world We examine twodifferent categories of related systems comprehensive healthcare using embedded systems and connected eHealth smart-phone applications Our proposed system is more relatedto connected eHealth smartphone applications since weare developing an application on smartphone that connectswith a smart IoT device while most companies focus oncomprehensive health care systems that allowusers to interactwith one another and benefit from resources
21 Comprehensive Health Care Systems ldquoPatientsLikeMerdquofocused on helping patients answer the question ldquoGiven mystatus what is the best outcome I can hope to achieve andhow do I get thererdquo They answered patient questions inseveral forms like having patients with similar conditionsconnect to each other and share their experiences [27] Butthey did not mention data security and the usability of thesystem
Another related system is called ldquoDailyStrengthrdquo It isa social network centered on support groups where usersprovide one another with emotional support by discussingtheir struggles and successes with each other The site con-tains online communities that deal with different medicalconditions or life challenges [28] It is very similar to
Advances in Human-Computer Interaction 3
ldquoPatientsLikeMerdquo in the sense that both of them are freeplatforms that involve patients and doctors interacting Twomajor discrepancies between them are that ldquoDailyStrengthrdquodoes not involve research institutes and does not have amobile application Also both systems are not IoT-basedsystem
In another work a robust model was developed thatincluded multiple pulse parameters EEG and skin conduc-tance sensors into a shirt [42] Another systemwas developedfor connecting facial expressions and voice recognition withEEG patterns [43] Other researchers proved that EEG aloneexhibits characteristics for different emotions [44] Facialrecognition software has been compared with heart ratevariability in order to better understand patterns associatedwith various emotions [45] It has also been proven thatcertain pulse patterns are associated with physical stress andnot from emotional stress [46] But their systems are mobileand they did not use IoT as a platform for their system
Another comprehensive health care system is calledldquoOmniordquo which is an all-in-one application for MedicalResources [29] It provides among its services clinicalresources diagnostic resources disease guides and druginformation Everyday Health [30] is a company which ownswebsites and produces content relating to health andwellnessIt has higher ratings and publishes many health articles thatcan be very helpful for patients In addition it has a smartsearch that provides users with easy access their materials
22 Connected eHealth Mobile Applications Even though allthe systemsmentioned above provide health services they donot provide any smart devices that can be used to monitoruserrsquos daily activities and alert them when needed Thereare many heart monitors that provide users with their ECGsignals so they can keep track of their condition but none ofwhichwho alert the users upon emergencies A Smart ElderlyHomeMonitoring System (SEHMS) designed and developedon an Android-based smartphone with an accelerometer itcould detect a fall of the user [31] It provides a smartphoneuser interface to display health information gathered fromthe system The main advantage of SEHMS is that it has theremote monitoring facility for elderly who and chronicallyhostile patients But it cannot warn the user in case ofemergency
Remote Mobile Health Monitoring (RMHM) is a systemthat providesmonitoring of a userrsquos health parameters such ashis or her heart rate which is measured by wearable sensors[32] It allows care givers and loving one tomonitor the userrsquosto facilitate remote diagnosis The system does not have thecapability of monitoring in real time
The idea of predicting heart attacks remains a challengeand that is the focus of our research Every research groupspecifies its own approach on how they plan to achieveits objective We decided to use a combination of bodytemperature and ECG to predict heart abnormalities Othersystems have different approaches with different hardwareimplementations None of them were discussed about powerconsumption rate during data collection Our system uses alow power Bluetooth module to collect a longitudinal datawirelessly using a smartphone
In [33 34] authors presented a comparison betweendifferent data mining techniques for heart attack predictionThey present just prediction algorithms rather than a com-plete system with a data collection device and a computingplatform The best techniques that are most commonly usedfor predicting heart problems areDecisionTreeNaıve BayesNeuralNetwork andK-meanOur researchnot only includesa complete system with an IoT device and a computingplatform but also uses one of those data mining techniques(Decision Tree) to predict heart problems This makes oursystem unique in the sense that we created a low powersmart IoT system and used a data mining technique in ourprediction algorithm Upon testing our prediction algorithmwe obtained results with a high accuracy for all our healthyand unhealthy test subjects We illustrate the differencebetween our system and the other related works in Tables 1and 2
To address the drawbacks of the above-mentionedresearch and systems in this paper we propose a smart IoT-based heart rate monitoring system Our system is designedto address directly some of the drawbacks of the existingsystems and potentially yield good prediction results Themost important aspect of our system is the warning thatallows the user to prevent an injury before it actually happensTo the best of our knowledge our system is the first smartIoT-based health assistance which uses a subject-specificBodyArea Sensor signals for predicting heart related injuries
3 System Architecture
The strength of our system relies on existing wireless com-munications to provide low power with maximum freedomof movement to users in their physical activity In additionwe have used small light-weight smart IoT devices that areuser friendly like the smartphone and the wrist-band
To integrate the sensors we used the output of the embed-ded sensors to perform an extensive set of experiments forevaluating and discriminating between normal and abnormalheart rate patterns Subjects wear the embedded sensorsand carry their smartphone in their pocket or hold it intheir hands The embedded ECG and temperature sensorsconstantly collect the heart parameters while the subject isliving a normal life After receiving the data through a lowpower Bluetooth communication channel the smartphonewill process the data to classify whether the userrsquos conditionis normal or abnormal A quantitative heart rate analysis isperformed in the Android platform which gives the user theoption of viewing hisher real-time plots of the ECG signaland body temperature
To determine abnormal heart patterns we first establisha criterion for normal heart rate Quantitative analysis ofheart rate stability and pulse symmetry will yield a series ofparameters like heart rate RR intervals (RR interval is theduration between two consecutive R peaks in an ECG signal)and ST segments (ST segment is the flat section of the ECGsignal between the end of the S wave and the beginning ofthe T wave It represents the interval between ventriculardepolarization and repolarization) We then design an earlywarning system to monitor those parameters for signs of
4 Advances in Human-Computer Interaction
Table 1 Qualitative comparison of existing work based on different features
Approach Use IoT Device Mobility Low Power System Cyber Physical System Cost EffectivePatientsL-ikeMe [27] No Yes No No NoDaily Strength [28] Yes Yes No No NoOm-nio [29] Yes Yes Yes Yes NoEveryday Health [30] Yes No No No NoSEHMS [31] No Yes No Yes NoRMHM [32] No No No Yes NoPHM [33] Yes Yes No Yes NoQardiocore [34] No No No Yes NoMaksimovic [35] No No No Yes NoStecker [36] No No No Yes NoMancini [37] No No No Yes NoSun [38] No No No Yes YesCommunicore [39] No No N0 Yes NoKavitha1 [40] Yes No No Yes NoJagtap [41] No No No Yes NoOur Approach Yes Yes Yes Yes Yes
Table 2 Quantitative comparison of existing work based on different features
Approach Average Max HR ApproximateAccuracy
Average MaxSampling Rate
Number of Device (s)Used
Power Consumptionin Watts
PatientsL-ikeMe [27] 160 90 120 1 sim 500 mWattDaily Strength [28] 156 85 110 1 NAOm-nio [29] 140 80 100 1 NAEveryday Health [30] 144 85 80 1 NASEHMS [31] 155 78 90 2 NARMHM [32] 162 82 140 2 NAPHM [33] 145 70 150 1 NAQardiocore [34] 135 78 110 1 NAMaksimovic [35] 155 85 105 2 NAStecker [36] 167 77 130 1 NAMancini [37] 151 87 135 2 sim 600 mWattSun [38] 160 75 95 1 NACommunicore [39] 148 72 150 1 NAKavitha1 [40] 156 68 155 1 NAJagtap [41] 148 72 145 2 NAOur Approach 135 95 160 1 sim 444 mWatt
cardiac arrest during any activity Although the system con-tinuously monitors ECG patterns the planned design onlytriggers a warning if the ECG patterns and body temperatureof the user reaches a certain threshold level wherein theuser might face a potential heart attack At that moment thesystem transmits a warning to the subject in the form of amessage or a vibration alert Figure 1 illustrates the prototypeembedded smart IoT system
The IoT device constantly collects data from the userand sends it to smartphone via a Bluetooth communicationmodule All the processing and data analysis take place inthe application where the user has the option to view user
real-time plots These plots provide the user a basic idea ofhisher bodyrsquos status The user does not have maintained arecord of hisher data to ensure that she is in a healthy orunhealthy state since the applicationrsquos job is to alert the userupon an emergency Finally when the algorithm senses anabnormality it immediately alerts the user
31 Hardware The initial prototype system consists of a lowpower Bluetooth chip an Arduino Uno a pulse sensor anda temperature sensor as shown in Figure 2 The other com-ponents are the power supply unit along with a smartphonewith an application
Advances in Human-Computer Interaction 5
Dat
a C
olle
ctio
n
Data Transmission
Data A
nalysis
Real-Time Plots
Emergency ContactInformation
Figure 1 Proposed system architecture
Bluetooth Chip Arduino Uno
Pulse Sensor Temp Sensor
VccOutput
GND
LM35
Figure 2 Hardware components for early prototype system [9ndash12]
The Arduino simply serves as an Analog to Digital Con-verter (ADC) [47] An Arduino is an open-source physicalcomputing platform based on a simple IO board and adevelopmental environment that implements the process-ingwiring language The Arduino is programmed to readanalog signals from the pulse and temperature sensors andcreate a data packet to convert the signals into digital formSubsequently it sends those packets to the phone as aresponse to the data sending request It also manages theBluetooth communication by coordinating with the RN42Bluetooth chip The Bluetooth chip basically equips theArduino with the ability to connect to the smartphoneapplication
The data read from the sensors is always an analog valuebetween 0 and 5 volts since that is the operating voltage ofthis microcontroller The Arduino then maps those voltage
values to digital values ranging from 0 to 1023 Since the y-axis for ECG signals is also a voltage all we had to do is scalethe digital values to back voltage
Basically we read the sensor value from the Arduinothrough analog pin 0 and thenmultiply it by 5 and divide it by1023 to get the correct voltage value This only applies to thepulse sensor since the expected output from the temperaturesensor is in degrees Celsius
To avoid the inaccuracy in simultaneous reading frommultiple analog pins we not only need a delay between eachreading but also need to read from the same analog pin twiceWe read the temperature data from the sensor twice and sendthe second reading then do the same for the pulse sensorWe need to send different symbols before the sensor readingsto be able to parse the data at the receiving end (androidapplication) Before sending a temperature reading we send
6 Advances in Human-Computer Interaction
a lsquorsquo and before sending a pulse reading we send a lsquo-rsquo whichmakes data parsing simple
311 Hardware Modifications After testing our early pro-totype system we worked on modifying the hardware todevelop a better IoT device that can later on be used asa user friendly wearable device In this section we willdiscuss the new hardware components used the design of thewearable device and the performance of the device (powerconsumption current draw)
(1) New Hardware Components Rather than using theArduino Uno we decided to use the Arduino Mini insteadThey both have the same microcontroller clock speed oper-ating voltage and range of input voltage The Arduino Unohas an area of 3663 cm2 which is almost 7 times larger thanthe ArduinoMini When developing a user friendly wearabledevice it is important to have smaller components to be ableto design a compact device
To be able to upload code to the device using Mini USBAdapter we also needed a 01 120583F (micro-farad) capacitorconnected in series between the reset pin of the ArduinoMini and the reset pin of the Mini USB Adapter We used aPCB soldering board to solder all the hardware componentstogether The board which has dimensions of 5 cm x 7 cm(almost the same size of the Arduino Uno) has all the hard-ware components soldered to it To power the device we useda 74 Volt Lithium Ion battery with a current supply of 2200mAH (milli-amperes per hour) This battery has an outletplug that gives it the ability to recharge So we also boughta Pin Battery Connector Plug to insert the battery in Thisallows us to solder the pin plug to the boardwithout solderingthe battery itself allowing the user to remove the batterywhen it needs to be recharged All the components that weadded (shown in Bold in this section) are shown in Figure 3
(2) Design of the Wearable Device After soldering all thehardware components on the PCB board we design thesystem using Velcro strips to make it wearable The device isdesigned such that the Mini USB Adapter can be connectedonly when we need to modify code on the Arduino The finaldesign of the device is shown in Figure 4 where Figure 4(a)shows the device with the Mini USB Adapter attached andFigure 4(b) shows the device without the Mini USB Adapter
Figure 4(b) shows the device when the battery is activehence the LEDs of the Arduino Mini Bluetooth and pulsesensor are all on The wires connected to the battery canbe easily plugged in and out of the IoT device to allow theuser to power the device on and off The battery is placedbetween two PCB soldering boardsThe temperature sensorrsquosconnection mounts over the Bluetooth chip and under thelower PCB board where it will be in contact with the userrsquosskin when the device is worn The pulse sensor extends tothe palm where it should be wrapped around the userrsquos indexfinger It is easy to measure pulse from finger during dailyactivities of the user Finally the Velcro is glued to the bottomof the lower PCB board and covered in black leather to givethe device a better appearance A complete smart wearableIoT device is shown in Figure 5
(3) Smart IoT Device Performance In this section we explainthe power consumption of the IoT device in different modesWhen the IoT device is powered the Bluetooth enters theidle mode where it blinks on and off waiting for a connectionrequest When the Android device connects to the IoT devicethrough the application the Bluetoothrsquos LED stops blinkingand is set to green indicating a successful connection
The performance of the device can be determined bymeasuring the current consumption which tells us how longthe device can be powered The voltage supplied from thebattery is constant since the Arduino Mini takes the voltageit needs and supplies to the devices connected to it Thetypical way to determine the performance of the device is bychecking the amount of current that is drawn from the batteryin the different modes The two modes in which we testthe device are the idle mode and the connectedtransmittingmode The measuring unit of the battery is in milliamp hour(mAH) which is an energy measure A battery with 2200mAH will work for an hour if the current drawn from it isalways 2200mA Similarly if the current draw is 1100mA thebattery would last two hoursTherefore to measure how longthe device can be powered in the on state without the batterydraining we need to calculate the average current draw ofthe IoT device Table 3 shows the current draws the devicersquoslifetime and the power consumption during the two modesfor the IoT device
The performance of the smart IoT device shows that thesystem can collect data for a long period of time in bothmodes whichmakes it very useful for usersWhen the batteryis too low on power to operate the device it can be rechargedby simply plugging the batteryrsquos wires to a charger
32 Software To receive and analyze data from the IoTdevice we use a heart rate and body temperature collectorinterface in the smartphone As described in the hardwaresection we developed a Bluetooth communication channelthat is capable of transmitting data from the pulse andtemperature sensors to the smartphone On receiving datafrom the sensors the system processes the data to identifyany abnormality in the heart rate
To transmit data to the smartphone through Bluetoothchannel we opened a socket from the Android applicationthat connected to the transmitting signals of the Bluetoothmodule To communicate with the Arduino we created asoftware serial object and specified the transmitting andreceiving pins When the Bluetooth is supplied with powerit immediately enters the pairing mode where it waits forany device to connect to it Then the smartphone Bluetoothadapter is opened through the application and it startssearching for the devices After a successful connection theapplication will produce a message on the screen informingthe user that the connectionwas successful and theBluetoothchiprsquos LED will turn from red (pairing mode) to green(connected mode) The detail user interface of our system isshown in Figure 6
After connecting to the IoT device the application willautomatically start receiving the sensorsrsquo data The appli-cation parses the temperature and pulse data into separatearrays that are then sent to different pages where they are
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 3
ldquoPatientsLikeMerdquo in the sense that both of them are freeplatforms that involve patients and doctors interacting Twomajor discrepancies between them are that ldquoDailyStrengthrdquodoes not involve research institutes and does not have amobile application Also both systems are not IoT-basedsystem
In another work a robust model was developed thatincluded multiple pulse parameters EEG and skin conduc-tance sensors into a shirt [42] Another systemwas developedfor connecting facial expressions and voice recognition withEEG patterns [43] Other researchers proved that EEG aloneexhibits characteristics for different emotions [44] Facialrecognition software has been compared with heart ratevariability in order to better understand patterns associatedwith various emotions [45] It has also been proven thatcertain pulse patterns are associated with physical stress andnot from emotional stress [46] But their systems are mobileand they did not use IoT as a platform for their system
Another comprehensive health care system is calledldquoOmniordquo which is an all-in-one application for MedicalResources [29] It provides among its services clinicalresources diagnostic resources disease guides and druginformation Everyday Health [30] is a company which ownswebsites and produces content relating to health andwellnessIt has higher ratings and publishes many health articles thatcan be very helpful for patients In addition it has a smartsearch that provides users with easy access their materials
22 Connected eHealth Mobile Applications Even though allthe systemsmentioned above provide health services they donot provide any smart devices that can be used to monitoruserrsquos daily activities and alert them when needed Thereare many heart monitors that provide users with their ECGsignals so they can keep track of their condition but none ofwhichwho alert the users upon emergencies A Smart ElderlyHomeMonitoring System (SEHMS) designed and developedon an Android-based smartphone with an accelerometer itcould detect a fall of the user [31] It provides a smartphoneuser interface to display health information gathered fromthe system The main advantage of SEHMS is that it has theremote monitoring facility for elderly who and chronicallyhostile patients But it cannot warn the user in case ofemergency
Remote Mobile Health Monitoring (RMHM) is a systemthat providesmonitoring of a userrsquos health parameters such ashis or her heart rate which is measured by wearable sensors[32] It allows care givers and loving one tomonitor the userrsquosto facilitate remote diagnosis The system does not have thecapability of monitoring in real time
The idea of predicting heart attacks remains a challengeand that is the focus of our research Every research groupspecifies its own approach on how they plan to achieveits objective We decided to use a combination of bodytemperature and ECG to predict heart abnormalities Othersystems have different approaches with different hardwareimplementations None of them were discussed about powerconsumption rate during data collection Our system uses alow power Bluetooth module to collect a longitudinal datawirelessly using a smartphone
In [33 34] authors presented a comparison betweendifferent data mining techniques for heart attack predictionThey present just prediction algorithms rather than a com-plete system with a data collection device and a computingplatform The best techniques that are most commonly usedfor predicting heart problems areDecisionTreeNaıve BayesNeuralNetwork andK-meanOur researchnot only includesa complete system with an IoT device and a computingplatform but also uses one of those data mining techniques(Decision Tree) to predict heart problems This makes oursystem unique in the sense that we created a low powersmart IoT system and used a data mining technique in ourprediction algorithm Upon testing our prediction algorithmwe obtained results with a high accuracy for all our healthyand unhealthy test subjects We illustrate the differencebetween our system and the other related works in Tables 1and 2
To address the drawbacks of the above-mentionedresearch and systems in this paper we propose a smart IoT-based heart rate monitoring system Our system is designedto address directly some of the drawbacks of the existingsystems and potentially yield good prediction results Themost important aspect of our system is the warning thatallows the user to prevent an injury before it actually happensTo the best of our knowledge our system is the first smartIoT-based health assistance which uses a subject-specificBodyArea Sensor signals for predicting heart related injuries
3 System Architecture
The strength of our system relies on existing wireless com-munications to provide low power with maximum freedomof movement to users in their physical activity In additionwe have used small light-weight smart IoT devices that areuser friendly like the smartphone and the wrist-band
To integrate the sensors we used the output of the embed-ded sensors to perform an extensive set of experiments forevaluating and discriminating between normal and abnormalheart rate patterns Subjects wear the embedded sensorsand carry their smartphone in their pocket or hold it intheir hands The embedded ECG and temperature sensorsconstantly collect the heart parameters while the subject isliving a normal life After receiving the data through a lowpower Bluetooth communication channel the smartphonewill process the data to classify whether the userrsquos conditionis normal or abnormal A quantitative heart rate analysis isperformed in the Android platform which gives the user theoption of viewing hisher real-time plots of the ECG signaland body temperature
To determine abnormal heart patterns we first establisha criterion for normal heart rate Quantitative analysis ofheart rate stability and pulse symmetry will yield a series ofparameters like heart rate RR intervals (RR interval is theduration between two consecutive R peaks in an ECG signal)and ST segments (ST segment is the flat section of the ECGsignal between the end of the S wave and the beginning ofthe T wave It represents the interval between ventriculardepolarization and repolarization) We then design an earlywarning system to monitor those parameters for signs of
4 Advances in Human-Computer Interaction
Table 1 Qualitative comparison of existing work based on different features
Approach Use IoT Device Mobility Low Power System Cyber Physical System Cost EffectivePatientsL-ikeMe [27] No Yes No No NoDaily Strength [28] Yes Yes No No NoOm-nio [29] Yes Yes Yes Yes NoEveryday Health [30] Yes No No No NoSEHMS [31] No Yes No Yes NoRMHM [32] No No No Yes NoPHM [33] Yes Yes No Yes NoQardiocore [34] No No No Yes NoMaksimovic [35] No No No Yes NoStecker [36] No No No Yes NoMancini [37] No No No Yes NoSun [38] No No No Yes YesCommunicore [39] No No N0 Yes NoKavitha1 [40] Yes No No Yes NoJagtap [41] No No No Yes NoOur Approach Yes Yes Yes Yes Yes
Table 2 Quantitative comparison of existing work based on different features
Approach Average Max HR ApproximateAccuracy
Average MaxSampling Rate
Number of Device (s)Used
Power Consumptionin Watts
PatientsL-ikeMe [27] 160 90 120 1 sim 500 mWattDaily Strength [28] 156 85 110 1 NAOm-nio [29] 140 80 100 1 NAEveryday Health [30] 144 85 80 1 NASEHMS [31] 155 78 90 2 NARMHM [32] 162 82 140 2 NAPHM [33] 145 70 150 1 NAQardiocore [34] 135 78 110 1 NAMaksimovic [35] 155 85 105 2 NAStecker [36] 167 77 130 1 NAMancini [37] 151 87 135 2 sim 600 mWattSun [38] 160 75 95 1 NACommunicore [39] 148 72 150 1 NAKavitha1 [40] 156 68 155 1 NAJagtap [41] 148 72 145 2 NAOur Approach 135 95 160 1 sim 444 mWatt
cardiac arrest during any activity Although the system con-tinuously monitors ECG patterns the planned design onlytriggers a warning if the ECG patterns and body temperatureof the user reaches a certain threshold level wherein theuser might face a potential heart attack At that moment thesystem transmits a warning to the subject in the form of amessage or a vibration alert Figure 1 illustrates the prototypeembedded smart IoT system
The IoT device constantly collects data from the userand sends it to smartphone via a Bluetooth communicationmodule All the processing and data analysis take place inthe application where the user has the option to view user
real-time plots These plots provide the user a basic idea ofhisher bodyrsquos status The user does not have maintained arecord of hisher data to ensure that she is in a healthy orunhealthy state since the applicationrsquos job is to alert the userupon an emergency Finally when the algorithm senses anabnormality it immediately alerts the user
31 Hardware The initial prototype system consists of a lowpower Bluetooth chip an Arduino Uno a pulse sensor anda temperature sensor as shown in Figure 2 The other com-ponents are the power supply unit along with a smartphonewith an application
Advances in Human-Computer Interaction 5
Dat
a C
olle
ctio
n
Data Transmission
Data A
nalysis
Real-Time Plots
Emergency ContactInformation
Figure 1 Proposed system architecture
Bluetooth Chip Arduino Uno
Pulse Sensor Temp Sensor
VccOutput
GND
LM35
Figure 2 Hardware components for early prototype system [9ndash12]
The Arduino simply serves as an Analog to Digital Con-verter (ADC) [47] An Arduino is an open-source physicalcomputing platform based on a simple IO board and adevelopmental environment that implements the process-ingwiring language The Arduino is programmed to readanalog signals from the pulse and temperature sensors andcreate a data packet to convert the signals into digital formSubsequently it sends those packets to the phone as aresponse to the data sending request It also manages theBluetooth communication by coordinating with the RN42Bluetooth chip The Bluetooth chip basically equips theArduino with the ability to connect to the smartphoneapplication
The data read from the sensors is always an analog valuebetween 0 and 5 volts since that is the operating voltage ofthis microcontroller The Arduino then maps those voltage
values to digital values ranging from 0 to 1023 Since the y-axis for ECG signals is also a voltage all we had to do is scalethe digital values to back voltage
Basically we read the sensor value from the Arduinothrough analog pin 0 and thenmultiply it by 5 and divide it by1023 to get the correct voltage value This only applies to thepulse sensor since the expected output from the temperaturesensor is in degrees Celsius
To avoid the inaccuracy in simultaneous reading frommultiple analog pins we not only need a delay between eachreading but also need to read from the same analog pin twiceWe read the temperature data from the sensor twice and sendthe second reading then do the same for the pulse sensorWe need to send different symbols before the sensor readingsto be able to parse the data at the receiving end (androidapplication) Before sending a temperature reading we send
6 Advances in Human-Computer Interaction
a lsquorsquo and before sending a pulse reading we send a lsquo-rsquo whichmakes data parsing simple
311 Hardware Modifications After testing our early pro-totype system we worked on modifying the hardware todevelop a better IoT device that can later on be used asa user friendly wearable device In this section we willdiscuss the new hardware components used the design of thewearable device and the performance of the device (powerconsumption current draw)
(1) New Hardware Components Rather than using theArduino Uno we decided to use the Arduino Mini insteadThey both have the same microcontroller clock speed oper-ating voltage and range of input voltage The Arduino Unohas an area of 3663 cm2 which is almost 7 times larger thanthe ArduinoMini When developing a user friendly wearabledevice it is important to have smaller components to be ableto design a compact device
To be able to upload code to the device using Mini USBAdapter we also needed a 01 120583F (micro-farad) capacitorconnected in series between the reset pin of the ArduinoMini and the reset pin of the Mini USB Adapter We used aPCB soldering board to solder all the hardware componentstogether The board which has dimensions of 5 cm x 7 cm(almost the same size of the Arduino Uno) has all the hard-ware components soldered to it To power the device we useda 74 Volt Lithium Ion battery with a current supply of 2200mAH (milli-amperes per hour) This battery has an outletplug that gives it the ability to recharge So we also boughta Pin Battery Connector Plug to insert the battery in Thisallows us to solder the pin plug to the boardwithout solderingthe battery itself allowing the user to remove the batterywhen it needs to be recharged All the components that weadded (shown in Bold in this section) are shown in Figure 3
(2) Design of the Wearable Device After soldering all thehardware components on the PCB board we design thesystem using Velcro strips to make it wearable The device isdesigned such that the Mini USB Adapter can be connectedonly when we need to modify code on the Arduino The finaldesign of the device is shown in Figure 4 where Figure 4(a)shows the device with the Mini USB Adapter attached andFigure 4(b) shows the device without the Mini USB Adapter
Figure 4(b) shows the device when the battery is activehence the LEDs of the Arduino Mini Bluetooth and pulsesensor are all on The wires connected to the battery canbe easily plugged in and out of the IoT device to allow theuser to power the device on and off The battery is placedbetween two PCB soldering boardsThe temperature sensorrsquosconnection mounts over the Bluetooth chip and under thelower PCB board where it will be in contact with the userrsquosskin when the device is worn The pulse sensor extends tothe palm where it should be wrapped around the userrsquos indexfinger It is easy to measure pulse from finger during dailyactivities of the user Finally the Velcro is glued to the bottomof the lower PCB board and covered in black leather to givethe device a better appearance A complete smart wearableIoT device is shown in Figure 5
(3) Smart IoT Device Performance In this section we explainthe power consumption of the IoT device in different modesWhen the IoT device is powered the Bluetooth enters theidle mode where it blinks on and off waiting for a connectionrequest When the Android device connects to the IoT devicethrough the application the Bluetoothrsquos LED stops blinkingand is set to green indicating a successful connection
The performance of the device can be determined bymeasuring the current consumption which tells us how longthe device can be powered The voltage supplied from thebattery is constant since the Arduino Mini takes the voltageit needs and supplies to the devices connected to it Thetypical way to determine the performance of the device is bychecking the amount of current that is drawn from the batteryin the different modes The two modes in which we testthe device are the idle mode and the connectedtransmittingmode The measuring unit of the battery is in milliamp hour(mAH) which is an energy measure A battery with 2200mAH will work for an hour if the current drawn from it isalways 2200mA Similarly if the current draw is 1100mA thebattery would last two hoursTherefore to measure how longthe device can be powered in the on state without the batterydraining we need to calculate the average current draw ofthe IoT device Table 3 shows the current draws the devicersquoslifetime and the power consumption during the two modesfor the IoT device
The performance of the smart IoT device shows that thesystem can collect data for a long period of time in bothmodes whichmakes it very useful for usersWhen the batteryis too low on power to operate the device it can be rechargedby simply plugging the batteryrsquos wires to a charger
32 Software To receive and analyze data from the IoTdevice we use a heart rate and body temperature collectorinterface in the smartphone As described in the hardwaresection we developed a Bluetooth communication channelthat is capable of transmitting data from the pulse andtemperature sensors to the smartphone On receiving datafrom the sensors the system processes the data to identifyany abnormality in the heart rate
To transmit data to the smartphone through Bluetoothchannel we opened a socket from the Android applicationthat connected to the transmitting signals of the Bluetoothmodule To communicate with the Arduino we created asoftware serial object and specified the transmitting andreceiving pins When the Bluetooth is supplied with powerit immediately enters the pairing mode where it waits forany device to connect to it Then the smartphone Bluetoothadapter is opened through the application and it startssearching for the devices After a successful connection theapplication will produce a message on the screen informingthe user that the connectionwas successful and theBluetoothchiprsquos LED will turn from red (pairing mode) to green(connected mode) The detail user interface of our system isshown in Figure 6
After connecting to the IoT device the application willautomatically start receiving the sensorsrsquo data The appli-cation parses the temperature and pulse data into separatearrays that are then sent to different pages where they are
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
4 Advances in Human-Computer Interaction
Table 1 Qualitative comparison of existing work based on different features
Approach Use IoT Device Mobility Low Power System Cyber Physical System Cost EffectivePatientsL-ikeMe [27] No Yes No No NoDaily Strength [28] Yes Yes No No NoOm-nio [29] Yes Yes Yes Yes NoEveryday Health [30] Yes No No No NoSEHMS [31] No Yes No Yes NoRMHM [32] No No No Yes NoPHM [33] Yes Yes No Yes NoQardiocore [34] No No No Yes NoMaksimovic [35] No No No Yes NoStecker [36] No No No Yes NoMancini [37] No No No Yes NoSun [38] No No No Yes YesCommunicore [39] No No N0 Yes NoKavitha1 [40] Yes No No Yes NoJagtap [41] No No No Yes NoOur Approach Yes Yes Yes Yes Yes
Table 2 Quantitative comparison of existing work based on different features
Approach Average Max HR ApproximateAccuracy
Average MaxSampling Rate
Number of Device (s)Used
Power Consumptionin Watts
PatientsL-ikeMe [27] 160 90 120 1 sim 500 mWattDaily Strength [28] 156 85 110 1 NAOm-nio [29] 140 80 100 1 NAEveryday Health [30] 144 85 80 1 NASEHMS [31] 155 78 90 2 NARMHM [32] 162 82 140 2 NAPHM [33] 145 70 150 1 NAQardiocore [34] 135 78 110 1 NAMaksimovic [35] 155 85 105 2 NAStecker [36] 167 77 130 1 NAMancini [37] 151 87 135 2 sim 600 mWattSun [38] 160 75 95 1 NACommunicore [39] 148 72 150 1 NAKavitha1 [40] 156 68 155 1 NAJagtap [41] 148 72 145 2 NAOur Approach 135 95 160 1 sim 444 mWatt
cardiac arrest during any activity Although the system con-tinuously monitors ECG patterns the planned design onlytriggers a warning if the ECG patterns and body temperatureof the user reaches a certain threshold level wherein theuser might face a potential heart attack At that moment thesystem transmits a warning to the subject in the form of amessage or a vibration alert Figure 1 illustrates the prototypeembedded smart IoT system
The IoT device constantly collects data from the userand sends it to smartphone via a Bluetooth communicationmodule All the processing and data analysis take place inthe application where the user has the option to view user
real-time plots These plots provide the user a basic idea ofhisher bodyrsquos status The user does not have maintained arecord of hisher data to ensure that she is in a healthy orunhealthy state since the applicationrsquos job is to alert the userupon an emergency Finally when the algorithm senses anabnormality it immediately alerts the user
31 Hardware The initial prototype system consists of a lowpower Bluetooth chip an Arduino Uno a pulse sensor anda temperature sensor as shown in Figure 2 The other com-ponents are the power supply unit along with a smartphonewith an application
Advances in Human-Computer Interaction 5
Dat
a C
olle
ctio
n
Data Transmission
Data A
nalysis
Real-Time Plots
Emergency ContactInformation
Figure 1 Proposed system architecture
Bluetooth Chip Arduino Uno
Pulse Sensor Temp Sensor
VccOutput
GND
LM35
Figure 2 Hardware components for early prototype system [9ndash12]
The Arduino simply serves as an Analog to Digital Con-verter (ADC) [47] An Arduino is an open-source physicalcomputing platform based on a simple IO board and adevelopmental environment that implements the process-ingwiring language The Arduino is programmed to readanalog signals from the pulse and temperature sensors andcreate a data packet to convert the signals into digital formSubsequently it sends those packets to the phone as aresponse to the data sending request It also manages theBluetooth communication by coordinating with the RN42Bluetooth chip The Bluetooth chip basically equips theArduino with the ability to connect to the smartphoneapplication
The data read from the sensors is always an analog valuebetween 0 and 5 volts since that is the operating voltage ofthis microcontroller The Arduino then maps those voltage
values to digital values ranging from 0 to 1023 Since the y-axis for ECG signals is also a voltage all we had to do is scalethe digital values to back voltage
Basically we read the sensor value from the Arduinothrough analog pin 0 and thenmultiply it by 5 and divide it by1023 to get the correct voltage value This only applies to thepulse sensor since the expected output from the temperaturesensor is in degrees Celsius
To avoid the inaccuracy in simultaneous reading frommultiple analog pins we not only need a delay between eachreading but also need to read from the same analog pin twiceWe read the temperature data from the sensor twice and sendthe second reading then do the same for the pulse sensorWe need to send different symbols before the sensor readingsto be able to parse the data at the receiving end (androidapplication) Before sending a temperature reading we send
6 Advances in Human-Computer Interaction
a lsquorsquo and before sending a pulse reading we send a lsquo-rsquo whichmakes data parsing simple
311 Hardware Modifications After testing our early pro-totype system we worked on modifying the hardware todevelop a better IoT device that can later on be used asa user friendly wearable device In this section we willdiscuss the new hardware components used the design of thewearable device and the performance of the device (powerconsumption current draw)
(1) New Hardware Components Rather than using theArduino Uno we decided to use the Arduino Mini insteadThey both have the same microcontroller clock speed oper-ating voltage and range of input voltage The Arduino Unohas an area of 3663 cm2 which is almost 7 times larger thanthe ArduinoMini When developing a user friendly wearabledevice it is important to have smaller components to be ableto design a compact device
To be able to upload code to the device using Mini USBAdapter we also needed a 01 120583F (micro-farad) capacitorconnected in series between the reset pin of the ArduinoMini and the reset pin of the Mini USB Adapter We used aPCB soldering board to solder all the hardware componentstogether The board which has dimensions of 5 cm x 7 cm(almost the same size of the Arduino Uno) has all the hard-ware components soldered to it To power the device we useda 74 Volt Lithium Ion battery with a current supply of 2200mAH (milli-amperes per hour) This battery has an outletplug that gives it the ability to recharge So we also boughta Pin Battery Connector Plug to insert the battery in Thisallows us to solder the pin plug to the boardwithout solderingthe battery itself allowing the user to remove the batterywhen it needs to be recharged All the components that weadded (shown in Bold in this section) are shown in Figure 3
(2) Design of the Wearable Device After soldering all thehardware components on the PCB board we design thesystem using Velcro strips to make it wearable The device isdesigned such that the Mini USB Adapter can be connectedonly when we need to modify code on the Arduino The finaldesign of the device is shown in Figure 4 where Figure 4(a)shows the device with the Mini USB Adapter attached andFigure 4(b) shows the device without the Mini USB Adapter
Figure 4(b) shows the device when the battery is activehence the LEDs of the Arduino Mini Bluetooth and pulsesensor are all on The wires connected to the battery canbe easily plugged in and out of the IoT device to allow theuser to power the device on and off The battery is placedbetween two PCB soldering boardsThe temperature sensorrsquosconnection mounts over the Bluetooth chip and under thelower PCB board where it will be in contact with the userrsquosskin when the device is worn The pulse sensor extends tothe palm where it should be wrapped around the userrsquos indexfinger It is easy to measure pulse from finger during dailyactivities of the user Finally the Velcro is glued to the bottomof the lower PCB board and covered in black leather to givethe device a better appearance A complete smart wearableIoT device is shown in Figure 5
(3) Smart IoT Device Performance In this section we explainthe power consumption of the IoT device in different modesWhen the IoT device is powered the Bluetooth enters theidle mode where it blinks on and off waiting for a connectionrequest When the Android device connects to the IoT devicethrough the application the Bluetoothrsquos LED stops blinkingand is set to green indicating a successful connection
The performance of the device can be determined bymeasuring the current consumption which tells us how longthe device can be powered The voltage supplied from thebattery is constant since the Arduino Mini takes the voltageit needs and supplies to the devices connected to it Thetypical way to determine the performance of the device is bychecking the amount of current that is drawn from the batteryin the different modes The two modes in which we testthe device are the idle mode and the connectedtransmittingmode The measuring unit of the battery is in milliamp hour(mAH) which is an energy measure A battery with 2200mAH will work for an hour if the current drawn from it isalways 2200mA Similarly if the current draw is 1100mA thebattery would last two hoursTherefore to measure how longthe device can be powered in the on state without the batterydraining we need to calculate the average current draw ofthe IoT device Table 3 shows the current draws the devicersquoslifetime and the power consumption during the two modesfor the IoT device
The performance of the smart IoT device shows that thesystem can collect data for a long period of time in bothmodes whichmakes it very useful for usersWhen the batteryis too low on power to operate the device it can be rechargedby simply plugging the batteryrsquos wires to a charger
32 Software To receive and analyze data from the IoTdevice we use a heart rate and body temperature collectorinterface in the smartphone As described in the hardwaresection we developed a Bluetooth communication channelthat is capable of transmitting data from the pulse andtemperature sensors to the smartphone On receiving datafrom the sensors the system processes the data to identifyany abnormality in the heart rate
To transmit data to the smartphone through Bluetoothchannel we opened a socket from the Android applicationthat connected to the transmitting signals of the Bluetoothmodule To communicate with the Arduino we created asoftware serial object and specified the transmitting andreceiving pins When the Bluetooth is supplied with powerit immediately enters the pairing mode where it waits forany device to connect to it Then the smartphone Bluetoothadapter is opened through the application and it startssearching for the devices After a successful connection theapplication will produce a message on the screen informingthe user that the connectionwas successful and theBluetoothchiprsquos LED will turn from red (pairing mode) to green(connected mode) The detail user interface of our system isshown in Figure 6
After connecting to the IoT device the application willautomatically start receiving the sensorsrsquo data The appli-cation parses the temperature and pulse data into separatearrays that are then sent to different pages where they are
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 5
Dat
a C
olle
ctio
n
Data Transmission
Data A
nalysis
Real-Time Plots
Emergency ContactInformation
Figure 1 Proposed system architecture
Bluetooth Chip Arduino Uno
Pulse Sensor Temp Sensor
VccOutput
GND
LM35
Figure 2 Hardware components for early prototype system [9ndash12]
The Arduino simply serves as an Analog to Digital Con-verter (ADC) [47] An Arduino is an open-source physicalcomputing platform based on a simple IO board and adevelopmental environment that implements the process-ingwiring language The Arduino is programmed to readanalog signals from the pulse and temperature sensors andcreate a data packet to convert the signals into digital formSubsequently it sends those packets to the phone as aresponse to the data sending request It also manages theBluetooth communication by coordinating with the RN42Bluetooth chip The Bluetooth chip basically equips theArduino with the ability to connect to the smartphoneapplication
The data read from the sensors is always an analog valuebetween 0 and 5 volts since that is the operating voltage ofthis microcontroller The Arduino then maps those voltage
values to digital values ranging from 0 to 1023 Since the y-axis for ECG signals is also a voltage all we had to do is scalethe digital values to back voltage
Basically we read the sensor value from the Arduinothrough analog pin 0 and thenmultiply it by 5 and divide it by1023 to get the correct voltage value This only applies to thepulse sensor since the expected output from the temperaturesensor is in degrees Celsius
To avoid the inaccuracy in simultaneous reading frommultiple analog pins we not only need a delay between eachreading but also need to read from the same analog pin twiceWe read the temperature data from the sensor twice and sendthe second reading then do the same for the pulse sensorWe need to send different symbols before the sensor readingsto be able to parse the data at the receiving end (androidapplication) Before sending a temperature reading we send
6 Advances in Human-Computer Interaction
a lsquorsquo and before sending a pulse reading we send a lsquo-rsquo whichmakes data parsing simple
311 Hardware Modifications After testing our early pro-totype system we worked on modifying the hardware todevelop a better IoT device that can later on be used asa user friendly wearable device In this section we willdiscuss the new hardware components used the design of thewearable device and the performance of the device (powerconsumption current draw)
(1) New Hardware Components Rather than using theArduino Uno we decided to use the Arduino Mini insteadThey both have the same microcontroller clock speed oper-ating voltage and range of input voltage The Arduino Unohas an area of 3663 cm2 which is almost 7 times larger thanthe ArduinoMini When developing a user friendly wearabledevice it is important to have smaller components to be ableto design a compact device
To be able to upload code to the device using Mini USBAdapter we also needed a 01 120583F (micro-farad) capacitorconnected in series between the reset pin of the ArduinoMini and the reset pin of the Mini USB Adapter We used aPCB soldering board to solder all the hardware componentstogether The board which has dimensions of 5 cm x 7 cm(almost the same size of the Arduino Uno) has all the hard-ware components soldered to it To power the device we useda 74 Volt Lithium Ion battery with a current supply of 2200mAH (milli-amperes per hour) This battery has an outletplug that gives it the ability to recharge So we also boughta Pin Battery Connector Plug to insert the battery in Thisallows us to solder the pin plug to the boardwithout solderingthe battery itself allowing the user to remove the batterywhen it needs to be recharged All the components that weadded (shown in Bold in this section) are shown in Figure 3
(2) Design of the Wearable Device After soldering all thehardware components on the PCB board we design thesystem using Velcro strips to make it wearable The device isdesigned such that the Mini USB Adapter can be connectedonly when we need to modify code on the Arduino The finaldesign of the device is shown in Figure 4 where Figure 4(a)shows the device with the Mini USB Adapter attached andFigure 4(b) shows the device without the Mini USB Adapter
Figure 4(b) shows the device when the battery is activehence the LEDs of the Arduino Mini Bluetooth and pulsesensor are all on The wires connected to the battery canbe easily plugged in and out of the IoT device to allow theuser to power the device on and off The battery is placedbetween two PCB soldering boardsThe temperature sensorrsquosconnection mounts over the Bluetooth chip and under thelower PCB board where it will be in contact with the userrsquosskin when the device is worn The pulse sensor extends tothe palm where it should be wrapped around the userrsquos indexfinger It is easy to measure pulse from finger during dailyactivities of the user Finally the Velcro is glued to the bottomof the lower PCB board and covered in black leather to givethe device a better appearance A complete smart wearableIoT device is shown in Figure 5
(3) Smart IoT Device Performance In this section we explainthe power consumption of the IoT device in different modesWhen the IoT device is powered the Bluetooth enters theidle mode where it blinks on and off waiting for a connectionrequest When the Android device connects to the IoT devicethrough the application the Bluetoothrsquos LED stops blinkingand is set to green indicating a successful connection
The performance of the device can be determined bymeasuring the current consumption which tells us how longthe device can be powered The voltage supplied from thebattery is constant since the Arduino Mini takes the voltageit needs and supplies to the devices connected to it Thetypical way to determine the performance of the device is bychecking the amount of current that is drawn from the batteryin the different modes The two modes in which we testthe device are the idle mode and the connectedtransmittingmode The measuring unit of the battery is in milliamp hour(mAH) which is an energy measure A battery with 2200mAH will work for an hour if the current drawn from it isalways 2200mA Similarly if the current draw is 1100mA thebattery would last two hoursTherefore to measure how longthe device can be powered in the on state without the batterydraining we need to calculate the average current draw ofthe IoT device Table 3 shows the current draws the devicersquoslifetime and the power consumption during the two modesfor the IoT device
The performance of the smart IoT device shows that thesystem can collect data for a long period of time in bothmodes whichmakes it very useful for usersWhen the batteryis too low on power to operate the device it can be rechargedby simply plugging the batteryrsquos wires to a charger
32 Software To receive and analyze data from the IoTdevice we use a heart rate and body temperature collectorinterface in the smartphone As described in the hardwaresection we developed a Bluetooth communication channelthat is capable of transmitting data from the pulse andtemperature sensors to the smartphone On receiving datafrom the sensors the system processes the data to identifyany abnormality in the heart rate
To transmit data to the smartphone through Bluetoothchannel we opened a socket from the Android applicationthat connected to the transmitting signals of the Bluetoothmodule To communicate with the Arduino we created asoftware serial object and specified the transmitting andreceiving pins When the Bluetooth is supplied with powerit immediately enters the pairing mode where it waits forany device to connect to it Then the smartphone Bluetoothadapter is opened through the application and it startssearching for the devices After a successful connection theapplication will produce a message on the screen informingthe user that the connectionwas successful and theBluetoothchiprsquos LED will turn from red (pairing mode) to green(connected mode) The detail user interface of our system isshown in Figure 6
After connecting to the IoT device the application willautomatically start receiving the sensorsrsquo data The appli-cation parses the temperature and pulse data into separatearrays that are then sent to different pages where they are
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
6 Advances in Human-Computer Interaction
a lsquorsquo and before sending a pulse reading we send a lsquo-rsquo whichmakes data parsing simple
311 Hardware Modifications After testing our early pro-totype system we worked on modifying the hardware todevelop a better IoT device that can later on be used asa user friendly wearable device In this section we willdiscuss the new hardware components used the design of thewearable device and the performance of the device (powerconsumption current draw)
(1) New Hardware Components Rather than using theArduino Uno we decided to use the Arduino Mini insteadThey both have the same microcontroller clock speed oper-ating voltage and range of input voltage The Arduino Unohas an area of 3663 cm2 which is almost 7 times larger thanthe ArduinoMini When developing a user friendly wearabledevice it is important to have smaller components to be ableto design a compact device
To be able to upload code to the device using Mini USBAdapter we also needed a 01 120583F (micro-farad) capacitorconnected in series between the reset pin of the ArduinoMini and the reset pin of the Mini USB Adapter We used aPCB soldering board to solder all the hardware componentstogether The board which has dimensions of 5 cm x 7 cm(almost the same size of the Arduino Uno) has all the hard-ware components soldered to it To power the device we useda 74 Volt Lithium Ion battery with a current supply of 2200mAH (milli-amperes per hour) This battery has an outletplug that gives it the ability to recharge So we also boughta Pin Battery Connector Plug to insert the battery in Thisallows us to solder the pin plug to the boardwithout solderingthe battery itself allowing the user to remove the batterywhen it needs to be recharged All the components that weadded (shown in Bold in this section) are shown in Figure 3
(2) Design of the Wearable Device After soldering all thehardware components on the PCB board we design thesystem using Velcro strips to make it wearable The device isdesigned such that the Mini USB Adapter can be connectedonly when we need to modify code on the Arduino The finaldesign of the device is shown in Figure 4 where Figure 4(a)shows the device with the Mini USB Adapter attached andFigure 4(b) shows the device without the Mini USB Adapter
Figure 4(b) shows the device when the battery is activehence the LEDs of the Arduino Mini Bluetooth and pulsesensor are all on The wires connected to the battery canbe easily plugged in and out of the IoT device to allow theuser to power the device on and off The battery is placedbetween two PCB soldering boardsThe temperature sensorrsquosconnection mounts over the Bluetooth chip and under thelower PCB board where it will be in contact with the userrsquosskin when the device is worn The pulse sensor extends tothe palm where it should be wrapped around the userrsquos indexfinger It is easy to measure pulse from finger during dailyactivities of the user Finally the Velcro is glued to the bottomof the lower PCB board and covered in black leather to givethe device a better appearance A complete smart wearableIoT device is shown in Figure 5
(3) Smart IoT Device Performance In this section we explainthe power consumption of the IoT device in different modesWhen the IoT device is powered the Bluetooth enters theidle mode where it blinks on and off waiting for a connectionrequest When the Android device connects to the IoT devicethrough the application the Bluetoothrsquos LED stops blinkingand is set to green indicating a successful connection
The performance of the device can be determined bymeasuring the current consumption which tells us how longthe device can be powered The voltage supplied from thebattery is constant since the Arduino Mini takes the voltageit needs and supplies to the devices connected to it Thetypical way to determine the performance of the device is bychecking the amount of current that is drawn from the batteryin the different modes The two modes in which we testthe device are the idle mode and the connectedtransmittingmode The measuring unit of the battery is in milliamp hour(mAH) which is an energy measure A battery with 2200mAH will work for an hour if the current drawn from it isalways 2200mA Similarly if the current draw is 1100mA thebattery would last two hoursTherefore to measure how longthe device can be powered in the on state without the batterydraining we need to calculate the average current draw ofthe IoT device Table 3 shows the current draws the devicersquoslifetime and the power consumption during the two modesfor the IoT device
The performance of the smart IoT device shows that thesystem can collect data for a long period of time in bothmodes whichmakes it very useful for usersWhen the batteryis too low on power to operate the device it can be rechargedby simply plugging the batteryrsquos wires to a charger
32 Software To receive and analyze data from the IoTdevice we use a heart rate and body temperature collectorinterface in the smartphone As described in the hardwaresection we developed a Bluetooth communication channelthat is capable of transmitting data from the pulse andtemperature sensors to the smartphone On receiving datafrom the sensors the system processes the data to identifyany abnormality in the heart rate
To transmit data to the smartphone through Bluetoothchannel we opened a socket from the Android applicationthat connected to the transmitting signals of the Bluetoothmodule To communicate with the Arduino we created asoftware serial object and specified the transmitting andreceiving pins When the Bluetooth is supplied with powerit immediately enters the pairing mode where it waits forany device to connect to it Then the smartphone Bluetoothadapter is opened through the application and it startssearching for the devices After a successful connection theapplication will produce a message on the screen informingthe user that the connectionwas successful and theBluetoothchiprsquos LED will turn from red (pairing mode) to green(connected mode) The detail user interface of our system isshown in Figure 6
After connecting to the IoT device the application willautomatically start receiving the sensorsrsquo data The appli-cation parses the temperature and pulse data into separatearrays that are then sent to different pages where they are
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 7
Arduino Mini
7CM
5CM
Mini USB Adapter
PCB Soldering Board Li-Ion Battery
Capacitor Pin Battery Connector Plug
Figure 3 Hardware components for improved version of the system [13ndash18]
(a) With USB adapter (b) Without USB adapter
Figure 4 Wearable IoT device
plotted in real time The user has the option of either viewingthe separate plots for each sensor data or viewing a page thathas both plots in real time While data is being plotted thealgorithm is constantly examining the ECG signal waiting forany abnormality
The user will have the option of either signing up orlogging in depending on whether the user has an accountor not If the user has an account she can simply enter theusername and password to login If not clicking on the sign-up button will take the user to another page where she willbe asked to enter some information to create an account Theuser will then be directed to the home page of the application
where she will have different options The user will need toconnect to the IoTdevice before she can start viewing hisherdata This can be done by pressing the connect button whichwill take the user to another page where she can find thedevice
In the connect page at first the user needs to turnon the Bluetooth of the Android device By pressing theldquoTURN ONrdquo button the Android device will respond to theapplicationrsquos request asking the user if the application canopen the Bluetooth and by hitting yes the Bluetooth turnson The user can then go to the home page where she willhave several options between viewing hisher real-time plots
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
8 Advances in Human-Computer Interaction
Figure 5 Wearable smart IoT device
Table 3 Performance metrics of IoT device
Mode of operation Current Draw (mA) Lifetime (Hours) Power Consumption (mW)Idle 26 84 1922Connected 60 36 444
Table4 Statistics about subjects participating in our data collection
Gender Age [yrs] Height [cm]F 4 23-26 8 150-159 3M 16 27-34 9 160-169 5
35-39 3 170-179 10180-189 2
of the sensed data or going to the decision pageThe decisionpage will basically have information that describes the userrsquoscurrent health status The time axis in real-time graphs showsthat the graph retrieves the current time from the Androiddevice and displays it in real time as the axis moves withincoming data points
4 Data Collection
After we finalized the system and were retrieving accurateresults we began testing on test subjects Since we cannot testour systemwith real people who have a chronic heart diseasewe recruited a group of participants a variety of age groupsand a range of heights (see Table 4 for statistics)
The data collection process can be divided into two partsreading the data from the sensors and sending it to thesmartphone For the first part one sensor gets the heartrsquospulse rate and the other one gets the body temperature Thesensors data is parsed and plotted on the devicersquos screen
41 Data Collection Interface The sampling frequency or rateat which we are collected sensor data is the key challenge indata collection process For our systemwe send the data fromthe two sensors simultaneously so intuitively the samplingrate for our system would be less than the sampling rate of
a system that reads data from just one sensor Given thatthe body temperature does not undergo as many changesas the ECG signal we increased the ECGrsquos sampling rateby decreasing the temperaturersquos sampling rate We fixed thesampling rates for the temperature sensor and the ECG signalat 5 Hz and 160 Hz respectively Figure 7 shows the blockdiagram that describes the sensor data collection interfaceThe Bluetooth chip is also connected to the Arduino whichenables the IoT device to transmit the sensed data to thesmartphone application
First the user wears the device as described in thehardware section and then uses the application to connect tothe Bluetooth interface as described in the software sectionFrom this point the user only needs to interface with theapplication where she can navigate through the differentoptions
42 Test Subject Data Collection Our proposed system isused to collect data from the users and store it in thesmartphonersquos database and it can plot and process the data inreal time To be able to write our algorithm we had to collectdata from test subjects while doing different activities Thethree scenarios that we consider for each subject are sittingwalking and climbing (upstairs) We believe that thosedifferent scenarios can help us understand how everyonersquosheart behaves during different activities
43 Test Subject Sample Data The data collected show thatthe system has a data collection system that is capable ofgathering data under any circumstances such as in the threescenarios described above In this section we show thesample ECG data for test subjects The sample temperaturesensor data are just plots to demonstrate the accuracy of thesensor
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 9
Login
Con
nectSi
gn U
p
Figure 6 Smartphone user interface for data collection and for real-time graph
431 Temperature Data In this subsection we present thedetailed data for our temperature sensing process Tempera-ture does not need much analysis except for converting thedata points to the time domain and smoothing the signal forbetter visual representation The ldquonoisinessrdquo in temperaturesignal indicates a need for smoothing The y-axis representsthe temperature in Celsius and the x-axis shows the numberof data points To convert the data points to time in secondswe need to use the sampling frequency which for this casewas 100 Hz The sampling rate that was used here was justto demonstrate the plot in an easier way since 700 hundred
data points can be easily mapped to 7 seconds using 100 HzHowever the sampling rates used for our system are still 5Hz for the temperature data and 160 Hz for the ECG dataFigure 16 shows a set of datawhen converted fromdata pointsto time in seconds
The temperature sensor used in our work has an accuracyof +- 05 which allows it to capture changes in temperaturevery quickly as shown in the 7 second plots in Figure 8The one on the left shows the temperature decreasingwhile the one on the right shows the temperature increas-ing
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
10 Advances in Human-Computer Interaction
Pulse Sensor
Temperature Sensor
Vcc
Output
GND
Arduino MiniBluetooth Chip
Android
Application
LM35
Pulse Sensor
Temperature Sensor
Arduino MiniBluetooth Chip
Android
Application
LM35
Figure 7 Data collection interface
268
267
266
265
264
263
262
261
26
259
258
Tem
pera
ture
(Cel
sius)
Tem
pera
ture
(Cel
sius)
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Time (secs) Time (secs)
27
265
26
255
25
245
Figure 8 Temperature sensor data accuracy
432 ECG Data ECG data was collected from test subjectsand analyzed on MATLAB In this section we show the dataof four test subjects in the three scenarios two males and twofemales We were able to collect data for the walking scenariousing treadmills and for the climbing upstairs scenario usingstair steppers at the rec center For each scenario we showthe ECG signal and its corresponding heart rate The heartrate was ultimately calculated using the Fourier transformmethod to make sure it is accurate [48] Table 5 shows theinformation of the four test subjects
It is observed that the data collected for test subject 1while sitting had no problems Variations occurred when thedata collected while walking and climbing upstairs This is aresult of the sensor moving while the subject was performingthe different activities We collected data for multiple timesbefore we start analyzing However we decided to present thenoisy data obtained for subject 1 to show themajor distinctionbetween noisy and proper ECG data Therefore the heartrates for subject 1 for the last two scenarios are displayed asNA A sample ECG signals for sitting walking and climbingupstairs for a test subject shown in Figure 9
5 Data Analysis Techniques
Our data analysis was mostly done using MATLAB In signalprocessing noise is a general term for unwanted alterationsthat a signal may suffer during collecting storing transmit-ting or processing data [49] We collected data from analogsensors and transmitting them over a low power Bluetoothcommunication channel We need data enhancement tech-niques before we can start analyzing the data as the readingcan be affected by noise through the process Since temper-ature values do not usually have many fluctuations we aremore concerned about the enhancement of the ECG signals
51 Noise Reduction Filtering Extracting features from anoisy signal can give a heart rate of 200 when the actual heartrate is 80Therefore we ensure that before we send our signalto the feature extraction method almost every unwanted partof the signal is removed
511 Baseline Wander Removal The baseline wander is aproblem that showsECGsignals in awavy fashion rather than
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 11
05
1
Volta
ge
Sitting
02040608
112
Volta
ge
Walking
0
05
1
Volta
ge
Climbing Upstairs
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
5 10 15 20 250Time (secs)
Figure 9 ECG signals for sitting walking and climbing upstairs for test subject 1
Table 5 Test subject information
Test Subject Weight (lbs) Height (cm) Age Scenario Heart Rate
Subject 1(Female) 125 173 20
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 107(ii) NA(iii) NA
Subject 2(Male) 141 177 24
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 98(iii) 108
Subject 3(Male) 163 180 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 72(ii) 100(iii) 134
Subject 4(Female) 128 184 23
(i) Sitting(ii) Walking(iii) Climbing
Upstairs
(i) 79(ii) 89(iii) 105
being more of a constant envelope A high pass filter to thesignal improves the ldquolookrdquo of the signal because it removes thelow frequency component that manifests itself as a sine-likepattern of the baseline Removing the baseline wander gives abetter signal which can help us process data more accuratelyEquation (1) describes the process of reducing noise usingbase line wonder where 119908c is the cut-off frequency and 119873is the filter order
|119867 (120596)|2 = 11 + (120596119888120596)2119873 (1)
First we smooth the signal using the MATLAB builtin function lsquosmoothrsquo which gives us that sine-wave-likesignal then we subtract that sine-wave-like (low frequencycomponent) from the collected ECG signal
512 Removal of High-Frequency Component The timedomain operation of a low pass filter for signals is themathematical operation called the moving average (oftenaddressed to as smoothing) The enhanced version wasachieved by applying a low pass filter with a very satisfyingresult as can be seen in the plotThe key when using high passor low pass filters is to choose the correct cut-off frequency
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
12 Advances in Human-Computer Interaction
0 1 2 3 4 5 6 7 8
0
5
10
15
20
105 Subject 1 fft
X 09216Y 2219e+06
Figure 10 Fourier transform of an ECG signal
Choosing the wrong cut-off frequency can result in hugealterations in the signal and irrelevant or worse erroneousdata decisions Equation (2) describes the operation of lowpass filtering
|119867 (120596)|2 = 11 + (120596120596119888)2119873 (2)
We apply a moving average which is achieved by usingthe smooth function in MATLAB Using the correct windowfor smoothing is essential as it can affect the signalrsquos expectedoutput For the ECG signal we used a smoothing window of20 data points
52 Extracting Features After noise reduction we extractedheart rate RR intervals and ST segments from ECG signalsWe used these features as inputs of our prediction algorithmalong with the body temperature In the next subsectionswe describe the process of extracting features from the ECGsignal
521 Heart Rate We extracted heart rate or Beats perMinutes (BPM) from collected ECG signals We can calculateBPM using several techniques including taking the numberof QRS peaks in a given time using autocorrelation or usingFourier transformThefirst technique sometimes yields inac-curate results however when a signal has no baseline wanderproblem this technique should work Autocorrelation andFourier transform techniques yield very accurate results
(1) Autocorrelation In autocorrelation a signal is correlatedwith a shifted copy of itself as a function of delay or lagCorrelation indicates the similarity between observationsas a function of the time lag between them We used thistechnique to analyze our data as the collected ECG signals areperiodic First we calculate the difference between two peakswhich gives the length of one period in data points Dividingthat number of data points by the sampling frequency gives us
RndashR interval
P P
R R
Q QS S
T T
Figure 11 R-R interval of an ECG signal [19]
the time in seconds of one period Inversing and multiplyingit by 60 give us the total beats per minute
The mathematical equation for the autocorrelation func-tion for signal processing is shown in
119877 (119896) =1198732minus119896
sum119899=1198731
119909 (119898) lowast 119909 (119898 + 119896) (3)
The equation shows the summation of the product of asignal (x(m)) and a shifted version of it (x(m + k)) Fromthe equation one can intuitively understand that at lagzero the signal will have the highest amplitude since it is amultiplication of itself without any shift
(2) Fourier Transform The Fourier transform extracts thefrequencies and harmonics of the signal So we find thelocation of the maximum harmonic in the frequency plot
The first significant harmonic in the signal is shownapproximately around 092 (the red circle) as shown inFigure 10 which represents the beats per second Simplymultiplying this by 60 gives us the beats perminuteThe otherpeaks in the signal represent either noise or information areirrelevant in terms of calculating the heart rate
The equations for the Fourier and inverse Fourier trans-forms are shown below in (4) and (5) respectively [50]
119865 (120596) = intinfin
minusinfin
119891 (119905) lowast 119890minus119894120596119905119889119905 (4)
119891 (119905) = 12120587 intinfin
minusinfin
119865 (120596) lowast 119890119894120596119905119889120596 (5)
where 119865(120596) is the frequency domain of a given signal and119891(119905) is the time domain of the signal For our data analysiswe used an ldquofftrdquo function in MATLAB that gives us the plotof the signal in the frequency domain From there we get thelocation of the maximum harmony and multiply it by 60 toget the beats per minute
522 R-R Intervals Another feature that we extracted fromthe ECG signal is called the R-R interval which is the intervalbetween successive R peaks in an ECG signal For normalECG signals the R-R intervals do not fluctuate or suddenlychange in a drastic manner We recorded R-R intervals byhaving the standard deviation of the signal Figure 11 gives avisual representation of an RR interval
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 13
1 12 14 16 18 2 22 24Time (Seconds)
055
06
065
07
075
08
085
09
Volta
ge (V
olts)
Subject 1 Sitting
R-R Interval
ST Segment Voltage Values
Figure 12 Sample ECG with R-R interval and ST segment
Basically we find the R peaks and subtract the peakslocations in time giving us the duration between each beatWe find the peaks using a threshold value that ensures that allthe R peaks are included To do that we get the maximum ofthe signal and subtract it by a specified percentage to ensurethat all the intervals are above the threshold valueThe reasonfor this was because not all the R peaks have the same voltagevalue the voltage values of the peaks usually fluctuate whichis whywe dynamically calculate that threshold value based onthe portion of the ECG signal with which we are dealing Wecreate arrays that store the R-R intervals of the ECG signal tocalculate the variability of the durations
523 ST Segments Also another feature is that we extractedST segment voltage value from the ECG signals We take theST segment into consideration for heart attack predictionssince elevated ST segments are one of the biggest indicatorsof heart attacks Figure 12 shows the sample data from one ofour test subjects To calculate the ST segment voltage valuewe take the average of the points shown in the rectangle
This produces a number that represents the ST segmentvoltage value The R-R interval is basically the range betweenboth peaks We take a 20 percent from that range and addit to the location of the first peak which gives us the pointwhere we would start adding the voltage values Then wetake 50 percent of the range and subtract it from the locationof the subsequent peak which gives us the point where wewould stop adding the voltage values Those voltage valuesare shown in the box in Figure 12
After adding all the voltage values we divide by thenumber of points to get the average voltage value representingthe ST segment Typically the voltage values of a normal ECGwould be much lower than the voltage values of an ECG withan elevated ST segment We also use a standard deviationanalysis to detect if an ST segment suddenly changed Notethat using percentages of the R-R interval to get the locationsof the ST segment voltage values and then averaging them isnot a conventional way to calculate the voltage value of the
ST segment This is based on our analysis which used trialand error and that method to extract the ST segment voltagevalue provided us with the best results
53 Algorithm The algorithm is the most important part ofthe system The algorithm functions as shown in the flowchart in Figure 13 The first step is to read the data from thesensors at 5 Hz for the temperature data and 160 Hz for theECGdata We then maintain a sampling window of 5 secondson which to perform all computations After selecting thesample window we reduce the noise by applying the filteringtechniques discussed in Section 51 After removing all thenoise components from the signals we extract the threefeatures from the ECG and pass on those features alongwith the temperature data to our prediction algorithm Ifthe results from the algorithm indicate that the currentsample window is normal the window shifts by 1 second andtakes the next 5 seconds of data If the algorithm detects anabnormality it immediately warns the user Using a movingwindow of 1 second creates the need more computation butit provides faster and more accurate feature extraction andprediction results This means the next sample window willhave 1 second of new data and 4 seconds of data from theprevious sample window
Our prediction algorithm is based on a predictivemachine-learning model called J48 Decision Tree [51] Thismodel decides the target value of a new sample based onvarious attribute values of the available data We applythat model to our algorithm with the result that the targetvalue would indicate whether the patient is having a heartattack or not and the available data would be containedin the extracted features We note that the decision treeis a general model that can be used in many applicationsin many different ways We designed a novel algorithmHeart Attack Prediction using a Decision Tree based ona Standard Deviation Statistical Analysis (DTSDSA) thatuses the decision tree model with a standard deviationstatistical analysis We examine the method by which theextracted features are processed at the decision tree Using astandard deviation statistical analysis we determine whetherthe features are abnormal or abnormal Figure 14 shows thestructure of our decision tree which refers to the predictionalgorithm block in Figure 13 Our algorithm uses warninglevels from 0 to 4 to determine the degree of abnormality foreach incoming window
We employ a sample window and a moving window Thesample window contains the part of the ECG signal thatis being processed while the moving window specifies theamount bywhich that samplewindow is shifted to start takingthe next sample window Figure 15 illustrates the appearanceof both of the windows on one of our test subjects for bothsensors As shown in Figure 14 the sample window is 5seconds and the moving window is 1 second This providesan overlap of 4 seconds for subsequent sample windows Wenote that for the 30 second ECG signal shown below if wedid not have a moving window we would have only had 6sample windows (30 seconds5 second windows)Thismeansthat the features would only be updated 6 times throughoutthe entire 30 seconds The way we implemented it we get 26
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
14 Advances in Human-Computer Interaction
Read Sensor DataECG Data at 160 Hz
Temperature Data at 5 Hz
Sampling Window 5 secsECG Data Points 800
Temperature Data Points 25
Noise Reduction FilteringRemoving Baseline from ECG
Smoothing ECG Smoothing Temperature
Extract FeaturesHeart Rate
RR Intervals ST Segments Temperature
Prediction AlgorithmDecision Tree
WARN USER
Abnormal
Moving Window 1 secsECG Data Points 160
Temperature Data Points 5
No
Yes
Figure 13 Flow diagram of our algorithm
results instead of 6 for the entire 30 secondsThis represents afar more practical method since heart rates change very fastespecially during cardiac events
For each sample window the feature extraction functionreturns a single value for the heart rate in a one-dimensionalarray with the RR interval durations and a one-dimensionalarray with the ST segment voltage values Since heart ratesare the most important feature that describe the heartrsquos statuswe start by checking variations in the heart beats first Wedo so by making sure that the heart rate is consistent usingour standard deviation analysis Any heart rate while walkingor running is obviously going to be higher than the heartrate while sitting or resting Since we have a wide range ofheart rates that are considered normal we were not able tosimply apply a thresholding technique where a heart rateabove a certain threshold value would be a sign of potentialheart failure Heart rates can vary from 55 all the way to 150depending on the person and what the person is doing
By using our standard deviation statistical analysis weonly detect an issue with the heart rate when it suddenly
fluctuates out of the normal range If the current heart ratehas an error above 7 percent we set the warning level to 1 Forexample if a personrsquos average heart rate is between 80 beatsper minute for 20 seconds then suddenly goes up to 100 theerror would be 25 percent We only proceed to check the R-R intervals if there is a problem with the current heart rateFor the R-R intervals and ST segments arrays with whichwe are dealing we calculate the standard deviation of thesample window for both features If the R-R intervalsrsquo erroris higher than a certain percentage we set the warning levelto 2 and proceed to check the ST segment If the ST segmentalso has an error higher than what is considered to be normalwe set the warning level to 3 and proceed to check the bodytemperature At this point we already know that this samplewindow is abnormal We still check the body temperature tosee if the warning level would go up to 4 or not since up tothis point it can be a false reading based on errors in featureextraction due to noisy signals Since the temperature is asingle value we calculate the error the same way we did forthe heart rates only with different thresholds We then return
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 15
Warning Level 4
Warning Level 3
Warning Level 2
Warning Level 0
Warning Level 1
Heart Rate1 Return Warning Level 2 Read Next Sample Window
Abnormal
RR Intervals
No
No
AbnormalYes
ST Segment
AbnormalNo
Temperature
AbnormaloN seY
Yes
Yes
Figure 14 Flow diagram of decision tree algorithm
the warning level for each sample window to process thatwarning and read the next sample window
We created a dynamic buffer that attends to the processingof warnings that are returned for each sample window Thebuffer is responsible for collecting the warning levels andmaking a decision To implement the buffer we createdanother window called the prediction window along with amoving window This window initially waits to collect theresults from 8 sample windows (8 warnings) The movingwindow then shifts the predictionwindow2 spots to the rightA decision is made on each prediction window based ona ratio that is calculated from the warning levels Figure 16shows the technique by which the prediction and movingwindows are established The moving window is equivalentto 2 warnings and the prediction window is equivalent to 8
warnings which results in 10 prediction windows for the 30second segment
Assuming that the body temperatures are normal theworst case would be a prediction window with all 3rsquos whichgives a sum of 24 We add all the warning levels and divideby 24 If the ratio is 05 or above we trigger a warning tothe user The results shown in Figure 16 are from an ECGsignal that was very noisy and did not have any characteristicsof a proper ECG The algorithm therefore started detectingabnormalities in the third prediction window Running thisalgorithm on normal ECGrsquos for healthy subjects gave usratios that were either zero or close to zero Those wereour first indications that the algorithm does indeed workHowever our next step was to run the algorithm on realtest subjects with heart failures for more validation The
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
16 Advances in Human-Computer Interaction
Subject 1 SittingSampling Window
Moving Window
Moving Window
Sampling Window
81812814816818
82822824
Tem
pera
ture
(Fah
renh
eit)
0506070809
111
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
5 10 15 20 25 300Time (Seconds)
Figure 15 Illustration of sample and moving windows
Prediction Window 8 Warnings
Ratio = 21 24 = 0875
Ratio = 11 24 = 04583
Ratio = 15 24 = 0583 WARNING
Ratio = 20 24 = 08333 WARNING
Ratio = 23 24 = 09583 WARNING
Ratio = 17 24 = 07083 WARNING
Ratio = 12 24 = 05 WARNING
Ratio = 6 24 = 025
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
0 0 2 0 0 0 3 0 3 3 3 2 3 3 3 3 0 0 0 0 0 0 0 0 1 1
0 0 2 0 0 0 3 0
2 0 0 0 3 0 3 3
0 0 3 0 3 3 3 3
3 0 3 3 3 3 2 3
3 3 3 3 2 3 3 3
3 2 3 3 3 3 0 0
3 3 3 3 0 0 0 0
3 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
Moving Window 2 Warnings
Figure 16 Algorithm results using prediction window
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 17
Prediction Window 8 Warnings
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 3 24 = 0125
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 0
Moving Window 2 Warnings
Figure 17 Prediction algorithm results for test subject 1 while walking
results are shown and discussed in more detail in the nextsection
6 Results and Evaluation
To evaluate our proposed system we developed a prototypeapplication and investigated its performance We evaluatedthe prototype with extensive experiments In this sectionwe explain how the data is analyzed and performance ismeasured for healthy and unhealthy subjects
61 Healthy Test Subjects The results shown are for one testsubject in the three different scenarios Since all subjects hadnormal body temperatures we will show the ECG signalsand the results of the prediction algorithm for each samplewindowThe test subjectrsquos information is shown in Table 6
The ECG signal while walking is considered as a normaland therefore no warning will trigger The ECG signal whilewalking also consider as normal But we had a couple offalse warnings while walking We use the prediction windowto eliminate the false warnings in our algorithm Figure 17shows that the results from the prediction algorithm hadthree warnings of level one while walking Therefore therewas no need to warn the user since it was a false error
The algorithm triggered a few warnings as well while thetest subject was climbing upstairs As shown in Figure 18there are a few warnings for each prediction window but
none of which above 50 percent threshold level for indicatinga myocardial infarction (MI)
62 Unhealthy Test Subjects We were able to downloaddatasets from a database online that has records of patientswho suffered from sudden cardiac deaths We also ran thealgorithm on our 20 healthy test subjects and the resultsvalidated that the algorithm works with a high accuracy forthe healthy test subjects Table 7 shows the information ofeach test subject [52]
The results showed that the algorithm gives no warningsfor all scenarios that had different heart rates However tovalidate our algorithm using only healthy subject data isnot enough Even though we ran our algorithm on noisydata we still cannot conclude that our algorithm can predictheart problemsTherefore we downloaded 10 datasets from adatabase online that has ECG signals for patients that sufferedfrom sudden cardiac deaths The ECG signals we selected foreach test subjectwasmoments before the subject passed away
We tested our algorithm on the ECG signals from all thesubjects shown in Table 7 and the results were accurate asexpected We show some details of the algorithmrsquos results forthe subject 5 fromTable 7 Figure 19 shows the ECG signal forsubject 5
Before showing the prediction algorithm results we willexplain the results from the feature extraction to show whythe algorithm triggered warnings
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
18 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 5 24 = 02083
Ratio = 8 24 = 0333
Ratio = 8 24 = 0333
Ratio = 5 24 = 02083
Ratio = 3 24 = 0125
Ratio = 0 24 = 0
Ratio = 2 24 = 00833
Ratio = 6 24 = 025
Ratio = 10 24 = 04167
Ratio = 11 24 = 04583
0 0 0 0 3 0 0 2 2 1 0 0 0 0 0 0 0 0 1 1 1 3 3 1 1 0
0 0 0 0 3 0 0 2
0 0 3 0 0 2 2 1
3 0 0 2 2 1 0 0
0 2 2 1 0 0 0 0
2 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 1
0 0 0 0 1 1 1 3
0 0 1 1 1 3 3 1
1 1 1 3 3 1 1 0
Moving Window 2 Warnings
Figure 18 Prediction algorithm results for subject 1 while climbing upstairs
Table 6 Information for test subject 1
Subject Gender Age Scenario Average Heart Rate
1 Male 24(i) Sitting
(ii) Walking(iii) Climbing Upstairs
(i) 84(ii) 108(iii) 135
Heart Rates for First 11 Sample Windows
7194
13189
71942
11990
11990
13189
71942
71942
71942
71942
13189
Sample Window 2
(1) Heart Rate Error = 100 lowast |13189 minus 7194| 7194 =833 997888rarrWarning level 1
(2) As shown in Figure 20 the R-R Intervals had veryhigh fluctuations which explain why the heart ratejumped from 7194 to 13189 in just one second 997888rarrWarning level 2
(3) As shown in Figure 21 the ST segment voltage valueswere also fluctuating in an abnormal fashion 997888rarrWarning level 3
The prediction results for the ECG signal are shownin Figure 22 The warning result from the second samplewindow the one we discussed is highlighted in yellow Weobserved a remarkable fluctuation in all the features and thealgorithm triggered warnings of level 3 for almost all thesample windows as expected for a patient who had a historyof cardiac surgery and passed away shortly after the signal wasrecorded
7 Conclusion
In this paper we designed and developed an integrated smartIoT system to predict and monitor heart abnormality in
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 19
Table 7 Information of unhealthy test subjects
Subject Gender Age History Medication Underlying Cardiac Rhythm1 Male 43 Unknown Unknown Sinus2 Female 72 Heart Failure Digoxin Quinidine gluconate Sinus3 Female 30 Unknown Unknown Sinus4 Female 72 Mitral valve replacement Digoxin Atrial fibrillation5 Male 75 Cardiac surgery Digoxin Quinidine Atrial fibrillation6 Male 34 Unknown Unknown Sinus7 Female 89 Unknown Unknown Atrial fibrillation8 Male 66 Acute myelogenous leukemia Digoxin Quinidine Sinus9 Female 82 Heart failure None listed Sinus10 Male 68 History of ventricular ectopy Digoxin Quinidine Gluconate Sinus
Subject 5
01
02
03
04
05
06
07
08
Volta
ge (V
olts)
5 10 15 20 25 300Time (Seconds)
Figure 19 ECG signal of unhealthy subject 5
2 25 3 35 4 45 5 55 6Time (Seconds)
02
03
04
05
06
07
Volta
ge (V
olts)
Subject 5
083
086
127
Figure 20 R-R Intervals on sample window 2
2 25 3 35 4 45 5 55Time (Seconds)
025
03
035
04
045
05
055
06
065
07
075
Volta
ge (V
olts)
Subject 5
Figure 21 ST segments on sample window 2
user We also managed to create a low power consumptioncommunication channel between the smart IoT device andthe smartphone application This research provides users anoninvasive device that allows them to better understandhow theymay feel about their ECGThe results fromdifferentdata sets are also presented to show that this approach pro-vides a high rate of classification correctness in distinguishingbetween at normal and abnormal ECG patterns The systemmay also find multiple applications in behavior detection forpeople with various disabilities
To test the chronological durability and long-term fea-sibility of our approach in the future we plan to test oursystem with data from the people who suffer from heartproblems We plan to test the power consumption rate forwhole working life of the device during test on the field Wealso plan to measure the different physiological parametersof the user during daily activities Additionally the systemcan be used in the smart home monitoring system for futurewireless technology Also we can enhance the system by
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
20 Advances in Human-Computer Interaction
Prediction Window 8 Warnings
Ratio = 21 24 = 0875 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 24 24 = 1 WARNING
Ratio = 21 24 = 0875 WARNING
Ratio = 18 24 = 075 WARNING
Ratio = 18 24 = 075 WARNING
0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 0 0 3 3 3
0 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 3
3 3 3 3 3 3 3 0
3 3 3 3 3 0 0 3
3 3 3 0 0 3 3 3
Moving Window 2 Warnings
Figure 22 Prediction algorithm results for unhealthy subject 5
adding more sensors like Galvanic Skin Response (GSR)accelerometer to the IoT device
Data Availability
The data used to support the findings of this study areavailable from the corresponding author upon request
Disclosure
This paper is based on theMS thesis work by the author YosufAmr ElSaadany [53]
Conflicts of Interest
The authors declare that they have no conflicts of interestregarding the publication of this paper
Acknowledgments
This work was supported in part by the Department ofElectrical and Computer Engineering Miami UniversityOxford OH USA We would like to thank the ElectricalEngineering Department at Miami University for fundingthe project This especially includes Ms Tina Carico andJeff Peterson We would also like to thank Ishmat Zerin forreviewing the early drafts of this paper
References
[1] ITU-T Global Standards Initiatives Recommendation ITU-T Y2060 (062012) httpwwwituintenITU-TgsiiotPagesdefaultaspx
[2] O Vermesan and P Friess Internet of Things Converging Tech-nologies for Smart Environments and Integrated EcosystemsRiver Publishers Series in Communications 2013
[3] R Clarke Smart Cities and the Internet of Everything TheFoundation for Delivering Next-Generation Citizen ServicesCisco 2013
[4] D Evans The Internet of Things How the Next Evolution of theInternet Is Changing Everything Cisco IBSG
[5] IEEE Standards Association P2413 - Standard for an Architec-tural Framework for the Internet of Things (IoT) httpsstandardsieeeorgdevelopproject2413html
[6] IEEE Standards Association (IEEE-SA) Internet of Things(IoT) Ecosystem Study IEEE 2015
[7] IETF Internet Protocol Version 6 (IPv6) Specification NetworkWorking Group The Internet Society (1998)
[8] B Djamaa and RWitty ldquoAn efficient service discovery protocolfor 6LoWPANsrdquo in Proceedings of Science and InformationConference SAI 2013
[9] httpswwwsparkfuncomproducts12576[10] httpsrobotechshopcomshoparduinoarduinoboardarduino-
uno-r3-chinav=7516fd43adaa[11] httpswwwsparkfuncomproducts11574
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Advances in Human-Computer Interaction 21
[12] httpswwwslidesharenetAmeerKhan3zigbee-based-patient-monitoring-system-21031306
[13] httpsstorearduinoccusaarduino-mini-05[14] httpsstorearduinoccusaarduino-usb-2-serial-micro[15] httpwwwebaycomitm100PCS-7CM-X-5CM-PCB-Solder-
ing-Printed-Circuit-Board-Blank-220845344036[16] http18650-batterynetwp-contentuploads20160374V-2200mAh-
18650-Rechargeable-Li-ion-Battery-0-2jpg[17] httpwwwjamecocomzMY-1ndash1-uF-100-Volt-Mylar-Capacitor
26956html[18] httpswwwaliexpresscomstoreproduct50-SETS-JST-XH-
2-5-2-Pin-Battery-Connector-Plug-Female-Male-with-140MM-Wire506373 32598005148html
[19] httpsuploadwikimediaorgwikipediacommonscc1ECG-RRintervalsvg
[20] J Penney Choosing An IoT Security Provider 2016httpinfodeviceauthoritycomblog-dachoosing-an-iot-security-provider
[21] Internet Engineering Task Force The Constrained ApplicationProtocol (CoAP) httpstoolsietforghtmlrfc7252
[22] P Sethi and S R Sarangi ldquoInternet of things architecturesprotocols and applicationsrdquo Journal of Electrical and ComputerEngineering vol 2017 Article ID 9324035 pp 1ndash25 2017
[23] P P Pereira J Eliasson and J Delsing ldquoAn authentication andaccess control framework for CoAP-based Internet of Thingsrdquoin Proceedings of the 40th Annual Conference of the IEEEIndustrial Electronics Society 2014
[24] H Khattak M Ruta and P di Bari ldquoCoAP-based HealthcareSensor Networks a surveyrdquo in Proceedings of the 11th Interna-tional Bhurban Conference on Applied Sciences and Technology2014
[25] M Kovatsch ldquoCoAP for theWeb of things From tiny resource-constrained devices to the web browserrdquo in Proceedings of the4th International Workshop on the Web of Things (WoT 2013)UbiComp rsquo13 Adjunct Switzerland Zurich Sept 2013
[26] Internet Engineering Task Force (IETF) The ConstrainedApplication Protocol (CoAP) httpstoolsietforghtmlrfc7252 2012
[27] Patients Like Me httpswwwpatientslikemecom[28] DailyStrength httpwwwdailystrengthorg[29] Omnio httpomniocom[30] Everyday Health httpwwweverydayhealthcom[31] J-V Lee Y-D Chuah and K T H Chieng ldquoSmart elderly
homemonitoring system with an android phonerdquo InternationalJournal of Smart Home vol 7 no 3 pp 17ndash32 2013
[32] Y Zhang H Liu X Su P Jiang and D Wei ldquoRemote mobilehealth monitoring system based on smart phone and browserserver structurerdquo Journal of Healthcare Engineering vol 6 no2 Article ID 590401 pp 717ndash738 2015
[33] P Pawar V Jones B-J F van Beijnum and H Hermens ldquoAframework for the comparison of mobile patient monitoringsystemsrdquo Journal of Biomedical Informatics vol 45 no 3 pp544ndash556 2012
[34] Qardiocore httpswwwgetqardiocomqardiocore-wearable-ecg-ekg-monitor-iphone
[35] M Maksimovic V Vujovic and B Perisic ldquoA custom Internetof Things healthcare systemrdquo in Proceedings of the 10th IberianConference on Information Systems and Technologies (CISTI rsquo15)Aveiro Portugal June 2015
[36] E C Stecker K Reinier C Rusinaru A Uy-Evanado J Juiand S S Chugh ldquoHealth insurance expansion and incidence of
out-of-hospital cardiac arrest A Pilot study in a US metropoli-tan communityrdquo Journal of the American Heart Association vol6 no 7 2017
[37] M EManciniMCazzell S Kardong-Edgren andC L CasonldquoImprovingworkplace safety training using a self-directedCPR-AED learning programrdquoAAOHN journal official journal of theAmerican Association of Occupational Health Nurses vol 57 no4 pp 159ndash169 2009
[38] Feng-Tso S Cynthia K Heng-Tze C et al ldquoActivity-awaremental stress detection using physiological sensorsrdquo MobileComputing Applications and Services pp 211ndash230 2012
[39] Communicore (1996) Sudden cardiac arrest A treatable publichealth crisis Retrieved July 20 2017 httppublicsafetytuftseduemsdownloadssca whtppdf
[40] G Kavitha and E Mariya ldquoEndowed heart attack predictionsystem using big datardquo International Journal of Pharmacy ampTechnology IJPT vol 9 no 1 p 285 2017
[41] S Jagtap ldquoPrediction and analysis of heart diseaserdquo Interna-tional Journal of Innovative Research in Computer and Commu-nication Engineering vol 5 no 2 2017
[42] C Min M Yujun S Jeungeun et al ldquoSmart clothing con-necting human with clouds and big data for sustainable healthmonitoringrdquo Mobile Networks and Applications vol 21 no 5pp 825ndash845 July 2016
[43] G Chanel J J M Kierkels M Soleymani and T Pun ldquoShort-term emotion assessment in a recall paradigmrdquo InternationalJournal of Human-Computer Studies vol 67 no 8 pp 607ndash6272009
[44] P C Petrantonakis and L J Hadjileontiadis ldquoEmotion recogni-tion from EEG using higher order crossingsrdquo IEEE Transactionson Information Technology in Biomedicine vol 14 no 2 pp 186ndash197 2010
[45] F Bousefsaf C Maaoui and A Pruski ldquoRemote assessment ofthe heart rate variability to detect mental stressrdquo in Proceedingsof the 7th International Conference on Pervasive ComputingTechnologies for Healthcare and Workshops PervasiveHealth2013 pp 348ndash351 Venice Italy May 2013
[46] E M Tapia S S Intille W Haskell et al ldquoReal-time recog-nition of physical activities and their intensities using wirelessaccelerometers and a heart rate monitorrdquo in Proceedings of the11th IEEE International Symposium onWearable Computers pp37ndash40 Boston MA USA October 2007
[47] httpslearnsparkfuncomtutorialsanalog-to-digital-conver-sion
[48] N Sani W Mansor K Lee N Zainudin and S MahrimldquoDetermination of heart rate from photoplethysmogram usingfast fourier transformrdquo in Proceedings of the International Con-ference BioSignal Analysis Processing and Systems (ICBAPS)2015
[49] T Vyacheslav Signal Processing Noise Electrical Engineeringand Applied Signal Processing Series ISBN 9781420041118 CRCPress 2010
[50] httpsenwikipediaorgwikiFourier transform[51] K Thenmozhi and P Deepika ldquoHeart Disease prediction using
classification with different decision tree techniquesrdquo Interna-tional Journal of Engineering Research and General Science vol2 no 6 2014
[52] httpsphysionetorgphysiobankdatabasesddb[53] Y ElSaadany AWireless early prediction system of cardiac arrest
through IoT [Dissertation thesis] 2017 httpsetdohiolinkedu
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom
Computer Games Technology
International Journal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom
Journal ofEngineeringVolume 2018
Advances in
FuzzySystems
Hindawiwwwhindawicom
Volume 2018
International Journal of
ReconfigurableComputing
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Applied Computational Intelligence and Soft Computing
thinspAdvancesthinspinthinsp
thinspArtificial Intelligence
Hindawiwwwhindawicom Volumethinsp2018
Hindawiwwwhindawicom Volume 2018
Civil EngineeringAdvances in
Hindawiwwwhindawicom Volume 2018
Electrical and Computer Engineering
Journal of
Journal of
Computer Networks and Communications
Hindawiwwwhindawicom Volume 2018
Hindawi
wwwhindawicom Volume 2018
Advances in
Multimedia
International Journal of
Biomedical Imaging
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Engineering Mathematics
International Journal of
RoboticsJournal of
Hindawiwwwhindawicom Volume 2018
Hindawiwwwhindawicom Volume 2018
Computational Intelligence and Neuroscience
Hindawiwwwhindawicom Volume 2018
Mathematical Problems in Engineering
Modelling ampSimulationin EngineeringHindawiwwwhindawicom Volume 2018
Hindawi Publishing Corporation httpwwwhindawicom Volume 2013Hindawiwwwhindawicom
The Scientific World Journal
Volume 2018
Hindawiwwwhindawicom Volume 2018
Human-ComputerInteraction
Advances in
Hindawiwwwhindawicom Volume 2018
Scientic Programming
Submit your manuscripts atwwwhindawicom