]>

AI-Aided Secured ECG Live Edge Monitoring System with a Practical Use-Case

Chapter 11

AI-Aided Secured ECG Live Edge Monitoring System with a Practical Use-Case

Amit Kumar, Tahrat Tazrin, Arti Sharma, Shivani Chaskar, and Sadman Sakib

Lakehead University, Canada

Mostafa M. Fouda

Idaho State University, USA

Zubair Md Fadlullah

Lakehead University, Canada
Thunder Bay Regional Health Research Institute (TBRHRI), Canada

CONTENTS

11.1 Introduction

11.1.1 Background

11.1.2 Problem Statement

11.1.3 Objective and Scope

11.2 Related Work

11.3 Proposed AI-Based System Architecture

11.3.1 Block Diagram

11.3.2 Data Collection and Pre-Processing Steps

11.3.3 Detecting Heart Abnormalities Using AI-Aided Techniques

11.4 Considered Smart ECG Monitoring System

11.4.1 Edge Hardware Components

11.4.1.1 System-on-a-Chip (SoC) Model

11.4.1.2 IoT Sensor for Heart Rate Data Acquisition

11.4.1.3 Microprocessor and Analog to Digital Converter

11.4.2 AI-Logic Component

11.4.2.1 Decision Tree

11.4.2.2 Random Forest

11.4.2.3 ANN

11.4.2.4 CNN

11.5 Bio-Authentication Application of the Considered ECG Monitoring System for Specific Use-Cases

11.6 Performance Evaluation

11.6.1 Supraventricular Arrhythmia Classification

11.6.2 Authorized User Classification for Bio-Authentication System

11.7 Challenges Involved with the Proposed System

11.8 Conclusion and Future Scope

References

11.1 Introduction

11.1.1 Background

The evolution of the Internet of Things (IoT) has propelled various areas of research including real-time user monitoring to smart vehicles. IoT technology has been established as a convenient alternative to traditional approaches for developing various wearables, monitoring systems, early diagnosis systems, etc. to make healthcare systems more efficient [1]. Various techniques are being developed recently that has made communication between doctors and patients more convenient, efficient and reliable. However, there are still some problems that need to be addressed to make smart health a state-of-the-art technology. Hospital managements can be made more responsible and liable by sharing patient’s condition and updates with healthcare providers and relatives. In cases where patient’s condition is critical, their health should be continuously monitored so that accidents can be avoided. However, in most cases this can be achieved with the help of large medical equipment to measure health data. Over the last few years, ECG monitoring systems have become very popular for monitoring heart activities of various kinds and therefore there was a need to improve the communication quality, i.e., ECG signal’s reception and transmission for remote operation [2, 3]. Nevertheless, there exists a plethora of challenges such as packet loss in remote transmission, security [4], sensor noise, wearability [5] and so forth. With the increased inclination of people toward relying on technology, it is important to address the problems of health industries and come up with solutions such as smart health monitoring system that will enable effective communication between network devices. The smart health technologies are therefore expected to provide viable solutions to help the doctors and patients by monitoring, tracking and recording the patient’s medical data conveniently at the edge [6, 7]. In this vein, we have developed an ECG monitoring system to detect supraventricular arrhythmia which will collect patient’s information and send the data securely to the healthcare providers and attendants of patients on their edge devices by monitoring them through the Internet remotely. To achieve this, the health data of patients can be collected through e-Health sensor platform in edge devices such as Raspberry Pi. Raspberry Pi provides the entire environment in a smaller platform for a cheaper cost and enables communication via several input/output pins. All the collected data will be stored and processed on the device, hence facilitating the local intelligence at the edge devices ensuring the privacy of each user. This system can be installed in the hospitals as well as at homes because of its simplicity and accessibility. Moreover, implementing such a system will make the healthcare monitoring more efficient by reducing cost and space requirement. In addition to classifying arrhythmia, we have also proposed the concepts of bio-authentication, where the machine learning algorithms will also differentiate between heartbeats of different people in order to use this model as a mode of authentication. Therefore, the ECG data collection process will be consistent as the system will only collect information of the authorized user and third parties will not be able to get hold of the data without authorization. This kind of authentication system does not currently exist in the developed health monitoring systems and therefore, we have proposed the novel approach of authenticating such systems with the help of machine learning (ML) algorithms.

In our considered system, a user’s heart rate is measured through Electrocardiogram (ECG) which is regarded as a vital biomedical signal. The ECG sensor value is an analog signal. MCP3008 analog to digital converter (ADC) can be utilized to digitize ECG signals and then displayed in real-time using the Raspberry Pi microcontroller. A single ECG trace consists of different segments, i.e., the QRS complex, the ST segment and the PR segment. The QRS complex can be leveraged to identify major heart abnormalities. To understand and do the prediction of the abnormalities four machine learning classification algorithms are used including the decision tree, Random Forest, Artificial Neural Network (ANN) and Convolutional Neural Network (CNN). These algorithms are applied and validated on the MIT-BIH Supraventricular database available in the PhysioNet data repository [8].

11.1.2 Problem Statement

The IoT allows the connection of various objects with people through Internet for collecting and processing various kinds of data through sensors and analyzing them to figure out a particular trait for time monitoring, tracking and management of data [9]. Medicinal service is a basic piece of life and it is essential for every human being. The rapid increase in population and illness is placing a significant role in healthcare system. With the advancement of smart health all around, it is essential to develop more efficient and precise continuous health monitoring systems. This can be easily achieved in the current era because of the accessibility of mobile technologies, which makes the control of these technologies easier than ever. However, with the development of these technologies, the question of security also arises as user’s personal system can be accessed by any other people and hence there is a risk of their private profile being exposed. Therefore, in most cases many people are not comfortable using these kinds of technologies. Thus, there is a growing need to address the privacy concerns with the developments of such techniques. In case of constructing an ECG monitoring system, it is important to ensure, the data is collected from the authorized user in order to maintain the integrity of the system and preserve privacy of user data. This can be considered as a significant challenge because the existing system has no method of distinguishing between authorized and unauthorized users, and therefore data is more vulnerable to third parties.

In addition, heart diseases such as arrhythmia can be considered as very fatal and therefore needs immediate medical attention. However, as the number of doctors in a particular city or area is limited, compared to the total number of people, there are times when highly qualified and efficient physicians need to travel from one part of the country to other parts in order to treat patients with such serious conditions. There are also patients with emergency cases who are unable to go to the doctors because of their severity and hence, are unable to get proper treatment due to transportability. In order to avoid such crucial cases, a health monitoring system can be utilized to continuously monitor patient’s heart condition remotely and warn the users about any probable heart abnormalities that might trigger an arrhythmia. In order to achieve this, the concepts of IoT can be combined with Raspberry Pi which will provide an effective secured solution for monitoring the heart conditions of patients [10, 11].

11.1.3 Objective and Scope

The aim is to execute an Artificial Intelligence (AI) aided secured live checking framework of ECG on edge to detect signs of arrhythmia utilizing Raspberry Pi device during emergency circumstances particularly when a patient is separated from everyone else at home or while the patient is travelling. The system needs to be constructed is such a way so that it is lightweight, economical and efficient so that maximum number of users are benefited by the model and can rely on them. In critical events, e.g., if an individual has an abrupt heart stroke, an alert will be produced to notify the responsible people like the doctors, nurses and patient’s attendants in order to take crucial precautions to assist the patients. This technology can be used by a doctor to study a patient’s condition even if they are not present at the scene and still suggest medications to the patient. The primary goal, therefore, is to decrease the workload of healthcare providers and provide the patients with less complicated secured medical services. To ensure reliability of the system, the bio-authentication part of the system is introduced for authorized access of the user. Applications can be made more secure by using unique ECG signals of the person to authenticate the user so that their private data can be secured. This will encourage more people to use the secured systems and keep their data private.

11.2 Related Work

In the medical domain, monitoring is the observation of a disease, condition or one/several medical parameters over time. In hospitals, patients’ ECG must be monitored constantly, which is usually done by doctors or paramedical staff. They observe ECG of patients continuously and maintain a record of it. This process is quiet slow and bit expensive [12] for which there is a great need of developing advanced monitoring system to monitor ECG continuously.

Rahman et al. [13] discussed about a smart patient monitoring system which will display the health information of patients automatically using multiple sensors as shown in Figure 11.1. The collected information is stored in IoT cloud after it is being processed through Raspberry Pi. The system extracts the primary data as ECG by using ECG sensor (single lead heart rate monitor (AD8232)) and secondary data as temperature by using temperature sensor (DS18B20) and by continuous monitoring the patient’s health conditions can be tracked by doctors, nurses and relatives remotely. Based on the criticality of the condition, a warning is conveyed to the user, and the doctors/nurses/relatives can start a video call. This helps in constant remote caregiving facilities for monitoring condition of patients, where the physicians received the text notification if there are any changes in the patient’s condition. The system contains a push switch that can be pressed by the patient during emergencies like when they get uncomfortable. This will send an SMS notification and make a video call to the people who are responsible for attending like doctors/relatives in order to enable access to the patient’s condition through multimedia such as video. Additionally, there is also an option of live stream to monitor condition of the patient through the website. This can be attained using the camera module of Raspberry Pi positioned near the patient.

Figure 11.1 Elements of the considered ECG monitoring system. Note that the microcontroller is at the centerpiece which provides the resources for local signal processing and/or ECG analytics.

Budida et al. [14] suggested an idea of smart healthcare system utilizing the concepts of IoT as shown in Figure 11.2. Patients’ data are collected using various IoT sensors and are transferred to the microcontroller ATMEL 89s52, which stores the data in the MySQL database server. The MySQL database server is employed to control the collected information and provide accessibility, and it can then be viewed using available android application by patients. If any abnormality is detected in the collected data, the patient is warned through a notification and a message is dispatched to their respective caregiver. The abnormality in the trend in data is detected by employing various decision-making algorithms. People can then have access to the database in order to check their medical records. Hence, this system can provide a better health monitoring framework. Thus, the system in [14] can be exploited to detect the condition of the patient and hence provide a rapid and effective mechanism. The attributes of the patient required for patient monitoring are collected using different sensors. Then, the collected data are analyzed and stored, and the results are presented on the server to be accessed by doctors and patients. The data is also available on mobile applications and webpage to be viewed by doctors and patients in addition to booking appointments, emergency button, patient’s review, alert, single and family registration and so forth.

Figure 11.2 A smart health monitoring system at the edge leveraging IoT.

Riaz et al. [15] proposed an IoT-based system to capture various vital signs such as ECG signals, blood pressure, body temperature and heart rate of patients. Their proposed system also utilizes a Wireless Sensor Network (WSN) with IoT to build a continuous monitoring system. The data are transferred through wireless medium, for instance Internet cloud computing and Zigbee, so that doctors can view the data. The proposed system can be implemented in areas lacking proper healthcare facilities where it is difficult to get reasonable healthcare. Using wireless transmission to acquire data, the work showed that such a continuous monitoring system can be built to monitor and report patient’s condition over Internet. The data collected from the sensor are processed and analyzed in the microcontroller and then sent to doctors and patients’ receiver-end node through wireless module of Zigbee. The data then are dispatched to the mobile application as well as the caregiver’s web repository. The flowchart of the whole process is represented in Figures. 11.3 and 11.4.

Figure 11.3 Process of patient data collection.

Figure 11.4 Process of analyzing patient data.

Bhoyar et al. [16] indicated the progress in multiparameter health tracking system using Arduino to detect illness. A disease identifying algorithm was formulated to identify certain illnesses such as Hyperthermia, Dysautonomia and so on, using various parameters, e.g., metabolic conditions, weight, oxygen level, temperature, heartbeat pulse, stress level and blood pressure. Their introduced system acts as a monitoring and early detection system utilizing the Arduino environment. The collected sensor data are sent to a gateway over Bluetooth. Thus, this research focused on the WSN; different sensor devices are present in a wireless network that are used to collect users’ data in order to monitor their health conditions by taking into consideration two aspects, namely sensor deployment (Figure 11.5) and disease detection algorithm.

Figure 11.5 Sensor deployment and positioning.

The common shortcoming of the aforementioned related work is their lack of consideration for developing a portable secured edge device capable of locally processing and analyzing the data for localized decision-making. We consider this to be the contribution in this chapter by showing how to employ distinct technologies to build a simple yet accurate enough ECG monitoring device that can be leveraged for patient-monitoring applications and further leveraged for bio-signal authentication in specific use-case scenarios.

11.3 Proposed AI-Based System Architecture

11.3.1 Block Diagram

The main motivation of the model includes monitoring the patient’s health conditions periodically and developing a secured and cost-efficient remote patient monitoring edge-based ECG system using sensors that predict results using machine learning algorithm which decides the patient’s abnormalities. Our proposed system will be using sensors that detects health problem with high accuracy by using some AI technology that tracks patients’ health on edge devices. The patient dataset obtained is preprocessed before any algorithms or analysis is performed. The dataset used for training the system is MIT-BIH Supraventricular dataset and the test data is the live data which is obtained from the Raspberry Pi module. The training dataset is classified and trained with multiple machine learning algorithms as mentioned earlier, and the best algorithm based on the performance accuracy is selected to process the test data. The pre-trained data model is loaded on the SoC, and the result and evaluation are displayed on the screen. The entire proposed procedure is summarized in Figure 11.6 below.

Figure 11.6 Block diagram of proposed system.

To connect the heart rate sensor to SoC, we need to have an idea about the GPIO pin diagram of SoC as shown in Figure 11.7, which helps us in identifying which pins are to be used to connect the device and the sensor together.

Figure 11.7 GPIO layout Raspberry Pi [17].

Figure 11.8 shows how the connection is to be made between the sensor and the board, and we can also see how analog to digital converter acts as an intermediate device between the sensor and the board. Here, the pins of ADC, such as voltage supply and ground, are connected to the respective supply and ground pins in raspberry pi. Other pins such as clock, input and output are connected to the GPIO pins of the Raspberry Pi module.

Figure 11.8 Circuit diagram [18].

11.3.2 Data Collection and Pre-Processing Steps

MIT-BIH Supraventricular dataset from PhysioNet is used for the evaluation of the adopted early warning system involving ECG-based arrhythmia classification. Altogether, the data was divided in two cycles which includes futures of ECG such as PQRST wave as depicted in Figure 11.9. The main feature is the QRS complex which identifies heart abnormalities. The dataset contains 184428 total records and 33 total attributes. It is divided into five main target classes which are – Normal (N), Supraventricular ectopic (SVEB), Ventricular ectopic (VEB), Fusion (F) and unknown (Q) beats.

Figure 11.9 Abnormal heartbeat distribution.

Figure 11.10 depicts a representation of the raw ECG signals collected from the heart rate sensors which are later preprocessed to use as test set for the system. This preprocessing step of the signals consists of the following steps: data cleaning, matching, combining and removing noise and irrelevant data. Initially, the collected raw ECG signals were cleaned using three filters which were Band reject, High pass and Low pass filter. The purpose of these filters is to eliminate various noises from the raw signals and clean the data. The cleaned data is then passed to the heartbeat segmentation phase where various peaks of the heartbeat such as Q peak, S peak, R peak and so forth are identified to further extract features from the peaks. Finally, to extract meaningful features from the peak, the distance between the peaks is calculated. The distance between the peaks gives us an idea about the situation of the peak, which can help us assume various crucial features of the ECG signal. Therefore, various features regarding the heartbeat amplitude, heartbeat interval, morphological features and so forth are comprehended in this way. These extracted features are considered as the final feature set for feeding to the machine learning algorithms.

Figure 11.10 Raw ECG output of the monitoring system.

11.3.3 Detecting Heart Abnormalities Using AI-Aided Techniques

All the preprocessed data obtained from the previous step is then processed on a high-end computing device and the results in terms of accuracy rate are determined. Therefore, the pre-trained model having the best performance is then loaded on the Raspberry Pi.

The following steps are the intermediate steps for training the dataset and saving it into a pickle file.

Figure 11.11 demonstrates a chunk of the dataset that was extracted from the ECG signals. Here, the columns such as 0_pre_RR, 1_qrs_morph2, 1_qrs_morph3 etc. are the features of the dataset and the type column is our class label to detect supraventricular arrhythmia. The dataset was scaled using standard scaling method before passing it to the machine learning algorithms. The scaling was performed to normalize the range of the features

Figure 11.11 Preprocessed data obtained from raw ECG signal.

The problem was converted to a binary classification case where the Normal and SVEB classes in the dataset were converted as Type 0 and 1. The total number of records in the two classes are 162240 and 12480, respectively.

During the evaluation, a ‘pkl’ file is created for all the models. This file is used to load the trained ML model on to Raspberry Pi. The pkl file of the model having best performance is copied to Raspberry Pi for displaying the results on the device. The pkl file has a pre-trained model, and this model can be later used for testing the live data which will be obtained from the ECG sensor connected to the raspberry pi device. Once the file is downloaded it is ready to be run on the raspberry pi device provided all the requirements mentioned in 3.1 are already satisfied. The program can be executed by writing a simple python program and it displays the current health status of the person.

11.4 Considered Smart ECG Monitoring System

In this section, we present the hardware (sensing) and AI-logic components of our considered smart ECG monitoring system.

11.4.1 Edge Hardware Components

The centerpiece of the hardware setup for the considered smart ECG monitoring system is a microcontroller. Among various off-the-shelf microcontroller devices, Raspberry Pi 3 Model B+ is considered due to its cost-efficiency and performance for deploying pre-trained AI model for ECG classification with reasonable accuracy. The microcontroller and other hardware devices needed to construct the ECG monitoring system are described next.

11.4.1.1 System-on-a-Chip (SoC) Model

After rigorous study of different microprocessors which are readily available in the market, the Raspberry Pi 3 Model B+ is selected as the SOC model for constructing our considered smart ECG monitoring system. Figure 11.12 illustrates an image of the raspberry pi 3B+ model. This hardware model is based on an ARM Cortex-A53 1.4GHz processor operating on the Raspbian Operating System, a dual-band 2.4GHz and 5GHz Wireless Local Area Network (WLAN) interface, Bluetooth 4.2/BLE, and Ethernet with 300Mbps. A 700mA power supply is used for the operation of the SoC and the IoT peripherals.

Figure 11.12 Raspberry Pi 3B+ [17].

11.4.1.2 IoT Sensor for Heart Rate Data Acquisition

An off-the-shelf optical pulse sensor is used to measure the heart rate of the user as shown is Figure 11.13. This has the capability of collecting reliable pulse readings from the fingertip or earlobe of the user by using the state-of-the-art on-sensor noise-cancellation and signal amplification circuits. The sensor does not require soldering to a system board since it consists of a three-pin cable that is terminated with standard male headers. Furthermore, the sensor consists of a luminous Light Emitting Diode (LED) and a light detector that allow light to pass through the finger and detected, respectively. As the heart pumps a pulse of blood through the blood vessels, the finger turns opaque to such an extent that a less amount of light reaches the detector. Furthermore, the light signal captured at the detector varies with each heart pulse that is translated into an electrical pulse and amplified so that a +5 V logic level output signal is generated. The LED blinks on the generation of each output signal that corresponds to each heartbeat. This analog output is connected to the microcontroller for converting the electronic signal to number of heart beats per minute.

Figure 11.13 Pulse Heart Rate Sensor [19].

11.4.1.3 Microprocessor and Analog to Digital Converter

Arduino microprocessor is selected to connect the analog pulse sensor to the SoC with the support of a cost-efficient, eight-channel and 10-bit analog to digital converter (MCP3008) which is illustrated in Figure 11.14. This converter uses serial interface employing successive approximation algorithm to sample the signal at 75 ksps and 200 ksps with the operating voltages of 2.7 and 5 V, respectively.

Figure 11.14 Analog to digital converter (MCP3008) [20].

The above-mentioned set of hardware was integrated to develop our desired secured ECG monitoring system for collecting ECG signals. Figure 11.15 shows a demonstration of our developed system. Here, the ECG signal data are collected using the pulse heart rate sensor, which with the help of MCP3008 is converted to digital data. The digital data can then be accessed through the raspberry pi SoC.

Figure 11.15 Diagram illustrating the developed system.

11.4.2 AI-Logic Component

For the AI-logic component at the SoC to construct the heartbeat monitoring and corresponding arrhythmiaclassification system from ECG signals, an open-source graphical library and integrated development environment, referred to as ‘Processing’, is exploited. This offers a powerful visualization framework for incorporating the AI-logic component to the considered SoC to simplify the compilation and execution steps of a pre-trained AI logic. The reason behind choosing this framework is its ability to seamlessly connect with MCP3008 analog to digital converter that was challenging with other available frameworks.

For the AI-logic component of the system, the following requirements with latest versions of python with TensorFlow and Keras were downloaded and installed on the SoC. Sklearn, Numpy and Scipy libraries were required for executing the pre-trained AI model on the edge device (i.e., the SoC).

On the other hand, for training the AI-logic model, a more powerful centralized computing environment was used. Four machine/deep learning classification algorithms were taken into consideration for building a model using supervised training based on public repository data of ECG signals and underlying diseases. Classification is a process to identify a model which describes and differentiates data classes or concepts for the purpose of employing the model to predict the class of objects whose class label is unknown. The four classification algorithms used in this work are decision tree, Random Forest, ANN and CNN. These algorithms are used for performing a comparative study and obtaining the best accuracy which can be further used for predicting supraventricular arrhythmia locally at the considered edge device. An overview of these algorithms is presented in the remainder of this section.

11.4.2.1 Decision Tree

First, we select the decision tree to be trained at a central computing environment with sufficient computational power based on publicly available ECG data. The reason behind investigating the decision tree algorithm is its popularity and practicality to deploy on edge nodes for fast inference for sensed bio-signal without much complexity. Decision tree is trained in a supervised manner to predict a class by employing decision rules on nodes generated from previous data. The instances are classified in the root nodes of a decision tree. By employing various features, the root nodes are able to classify the instances with different features. At the root nodes, there may be more than two branches. Finally, in the leaf nodes, the classification result is reported. The decision tree construction is performed step by step by using the highest information gain value among all the attributes.

11.4.2.2 Random Forest

The next model that we consider for facilitating the edge intelligence is Random Forest, which is also a supervised learning algorithm. In essence, Random Forest offers a classification method based on numerous decisions trees to significantly improve the prediction accuracy in contrast with a single decision tree model. In the literature, Random Forest is referred to as an ensemble learning method whereby a multitude of decision trees are formulated during the training time and the output class is obtained as the mode of the classes or mean prediction of the individual trees. The Random Forest model employs bagging and feature randomness while constructing each individual tree. This attempts to build an uncorrelated forest of trees, prediction accuracy of which is significantly improved in a systematic manner.

11.4.2.3 ANN

While decision tree and Random Forest models work with small-scale preprocessed ECG data, more sophisticated techniques may be required with large ECG datasets where preprocessing and manual feature extraction may not be trivial. Therefore, we also consider the ANN structure consisting of neurons deployed over three layers which are input, output and hidden layer. The ANN model is trained by varying their weights using forward and backward propagation techniques. The data of the input layer are propagated to the hidden layer neuron units where each input is assigned a weight based upon the importance of the input. The output layer neuron units represent the predicted class (e.g., whether the user is exhibiting normal or abnormal heartbeats and so forth).

11.4.2.4 CNN

Deep neural networks with more than one hidden layer are becoming more prominent for solving various computational-intensive tasks in today’s literature of biomedical engineering. CNN is an advanced variant of deep neural networks that has a plethora of application in image and speech recognition. The one-dimensional CNN model may be useful in processing complex time-series of heartbeat signals to accurately identify associated cardiac conditions. While the adoption of convolutional layers consisting of local filters, max-pooling and weight sharing makes the CNN model much more robust and powerful over the simple ANN, its training and inference tradeoff for predicting heart disease needs to be carefully considered.

11.5 Bio-Authentication Application of the Considered ECG Monitoring System for Specific Use-Cases

By implementing this IoT-based system in a single chip of logic, improved and economical health services can be provided for the users. The system can authenticate users based on their bio-signals such as ECG signals and make the procedure safe and secure. Since user can access the system on the edge, the entire process of heart monitoring becomes easily accessible. Thus, it is able to offer improved and reliable services related to healthcare in situations where the patient is far away from the doctor. Thus, this allows doctors to acquire data of the patients from far away and prescribe medicine accordingly more quickly and efficiently. It also enables patients and doctors across a country to connect for superior treatments by tracking and recording patient data in real-time. The proposed system can save hospital bill, valuable time and in some cases might avoid long queues in the hospitals. The proposed design provides a cost-efficient, lightweight alternative to the current technologies present in the medical centers which are less efficient and more expensive.

Next, the propositioned system can have a multitude of applications. Several continuous user monitoring applications such as car insurance monitoring apps observe user data to study the user's vehicle-driving behavior and conditions to decide when claims are made to the companies. These apps usually monitor the car speed, road conditions and weather conditions using various features of the user mobile phone. However, to activate and use the application, there is only one-time authentication, and it does not guarantee whether the registered user or any other unauthenticated person is driving the car. We introduce an ECG-based continuous biometric authentication scheme for all such applications where continuous user monitoring is required. We aim to identify the change from authenticated users to the unauthorized user for user monitoring apps. The proposed AI-aided model will analyze and find patterns or trends in the user’s heart activity by analyzing the ECG wave of each individual. The ECG data will be collected from the user and will be processed locally on edge devices adopting AI-aided techniques to also monitor if the person’s health condition is normal or not.

In order to demonstrate our bio-authentication system, we have constructed a machine learning model that will be able to differentiate authorized user from unauthorized user. For implementing it using ECG signals, we have utilized the same dataset containing the extracted features that were used for classifying supraventricular arrhythmia. The classification was carried out on only the normal cases of the dataset to show the efficacy of our proposed concept. In this case, we have classified the users, i.e., the record column as our goal is to authenticate the user. Therefore, we have considered two classes: authorized and unauthorized. We have run the experiment five times, where at each run, only one of the records (i.e., person) will be considered authorized and the rest of the users will be unauthorized. The ECG recordings of both authorized and unauthorized were shuffled and considered in both train and test set. We have applied Random Forest algorithm to classify the records because initially Random Forest performed better for supraventricular arrhythmiaclassification.

11.6 Performance Evaluation

Evaluation on performance of a classification algorithm is usually done on its accuracy. The estimations of an instance to that instance’s genuine value to the level of familiarity is known as accuracy. The dataset was split into train and test set with the ratio of 70 and 30, respectively. The models were validated using stratified five-fold cross-validation.

11.6.1 Supraventricular Arrhythmia Classification

This research used four machine learning models; decision tree, Random Forest, CNN and ANN to predict the chances of heart failure in a patient from the MIT-BIH Supraventricular dataset. The comparative study is performed on the results (Accuracy) of all the ML models as shown in Figure Figure 11.16. In Figure Figure 11.16 it is seen that the model with the best performance is Random Forest with 97.38% accuracy. Thus, the Random Forest model is used as the prediction model for integrating with raspberry pi.

Figure 11.16 Algorithm accuracy chart.

The performance also depends on the sensor manufacturer as the capacity of accurate sensing varies from sensor to sensor and also depends on the manufacturer. The system requires high electronic circuit’s knowledge to reduce the noise from the sensor and get accurate results. The experimental results for the patient’s health status is 100% accurate for normal patients according to the live data which was tested against the training data using the machine learning algorithms.

The result achieved while classifying supraventricular arrhythmia data was compared with the performance of previous studies where similar analysis is performed. Table 11.1 shows a comparative analysis of our model with three studies, using the MIT-BIH Supraventricular dataset, in terms of their performance.

Table 11.1 Comparative study of our model with existing methods.

Problem Classification model Performance
Our model for classifying supraventricular arrhythmia Random Forest 97.38%
Arrhythmiaclassification using ECG signals [21] Convolutional Neural Network 93.31%
Classification of arrhythmia in selected feature set [22] K Nearest Neighbor 92.8%
ECG-based arrhythmia classification [23] Deep belief networks 96.94%

11.6.2 Authorized User Classification for Bio-Authentication System

The performance was evaluated based on Accuracy, Precision, Recall, F1 Score and their respective confusion matrix. For Random Forest algorithm, the number of trees was considered to be 150. As mentioned earlier, the experimentation was repeated for five users. The performance evaluation on the proposed bio-authentication system is illustrated in Table 11.2. Here, record represents the authorized user. It can be seen from the table that Random Forest is performing remarkably while classifying users based on their ECG signal features. The accuracy, precision, recall and F1-score are giving near-perfect values denoting that the ECG signals of each person is distinct from the other person and hence can be thoroughly identified.

Table 11.2 Performance evaluation on the proposed bio-authentication system.

Record Accuracy Precision Recall F1-score
800 0.999918 0.999918 0.999918 0.999918
801 0.999938 0.999938 0.999938 0.999938
802 0.990094 0.995021 0.990094 0.991723
803 0.992396 0.995277 0.992396 0.993286
804 0.998993 0.999038 0.998993 0.999005

The confusion matrix of the results was also plotted for the five experiments. The results are stated in Figure 11.17. It can be seen that the results of false positives and false negatives are almost insignificant and most of the instances are classified accurately.

Figure 11.17 Confusion matrix of the bio-authentication classification.

Thus, we can conclude that implementing the bio-authentication system using Random Forest classification can be a useful method for authenticating the authorized users based on their ECG signals, thus making the ECG system more secure. One of the advantages of this system is that it employs the same dataset for arrhythmia classification and bio-authentication, thus saving valuable processing time along the way.

11.7 Challenges Involved with the Proposed System

The automated treatment employing various ECG techniques is a popular field; however, it still lacks various aspects in the implementation domain in terms of algorithms and so forth. Therefore, it is important to study more in this field in order to improve it. The necessity of automated ECG analysis system is required with the popularity of remote monitoring technology and long-term ECG recording devices. In order to facilitate a real-time processing of dynamic ECG signals, parameters like complicated, time-consuming algorithms, delayed restriction and the search time of distinguishing wave position window should be kept minimal. The noise of ECG signals should be removed in pre-processing steps and the QRS waves should be detected accurately. Additionally, various cases such as the false positives and missed detection rates can also be determined by the algorithms.

The above-mentioned challenges are faced during the initial phase, but there is a list of challenges that were faced during the implementation part of the system. We have listed the following challenges and how we overcame that during implementation.

  • Connecting Analog Sensor to Raspberry Pi-based SoC without using Arduino Module: One of the important parts of the project was to connect the ECG sensor to the Raspberry Pi device. It would not be possible to use Arduino module as the portability is an important aspect for the system; therefore, we used a MCP3008 ADC to connect the sensor.

  • Libraries to Access ADC: After we were able to connect the sensor with the board, it was still hard to communicate with the device because the libraries for the communication to ADC are not present in python which was a major programming language used for implementation. Therefore, the connection was designed with processing since it has libraries to communicate directly with the ADC device.

  • Understanding the Sensor Signal and Plotting ECG Signal: One of the major challenges involved with our implementation was to understand the signal which was sent by the sensor and also plot it as ECG graph. The signal contains output only in bits and the sensor documentation helped in finding out the formulas for converting the signal to ECG Graph.

  • Collecting Live Data for Processing Health Information: The live data collected was to be studied and the QRS component of the data was to be separated from the signal to generate the live dataset from the sensor device. Dividing the signal and saving it into a csv file ignoring the values was the solution we came up with to solve this problem.

  • Machine Learning on Raspberry Pi Device: Raspberry Pi is known as a simple compatible device and known for its portability, but we wanted to include machine learning algorithms on our hardware and machine learning to the contrast requires very high-end computing device. Therefore, we used a pre-trained model which was later dumped on the device using ‘pickle’ to overcome the problem of training the data on the device and saved our times and effort in analyzing the real-time data.

Limitations

  • Noise from the ECG sensor has been a major issue of the system. We were able to reduce some noise by adjusting the resistance to the sensor and ADC. However, complete elimination of the noise was not possible, and this is left as an open research challenge for the future. Admittedly, the noise was responsible to add some missing values in the process.

  • The adopted system was tested only on normal cases which achieved an accuracy of 100%, but we were not able to test the system on patients having heart problems.

11.8 Conclusion and Future Scope

In this chapter, we have presented a prototype of a secured ECG monitoring device with the integration of IoT technology. The proposed model will continuously monitor ECG signals to detect supraventricular arrhythmiaand provide doctors and patient with a more efficient medical service. In this research, the raspberry-pi-based health monitoring system was analyzed through IoT. Heartbeat sensors continuously sense the ECG signals, and the data is transformed through the machine learning algorithm and the prediction is done on edge to determine if the patient is suffering from heart abnormalities or not. There are multiple prediction algorithms used for doing the comparison, and based on best accuracy result the algorithms are further used for prediction. To achieve that, in this chapter, we have applied four different algorithms which are decision tree, Random Forest, ANN and CNN. Random forest performed the best with an accuracy of 97.38% with decision tree being the second best. Therefore, Random Forest was chosen as the most efficient algorithm to be deployed in our system. Some of the benefits of such systems include saving hospital bill, reduce waiting time and long lines in the hospitals. The proposed system provides a lightweight and cheaper alternative to the traditional heavy and costly devices in the hospitals. The system is easily portable, and the patients can be monitored easily from remote places. Hence, this system provides enhanced healthcare services, and is therefore more reliable in cases where the patient is far away from the doctor.

We introduced an ECG-based continuous biometric authentication scheme for all such applications where continuous user monitoring is required. We aim to identify the change from authenticated users to the unauthorized user for user monitoring apps. The proposed Random Forest model analyzes and finds patterns or trends in the user’s heart activity by analyzing the ECG wave of each individual. The ECG data will be collected from the user and will be processed locally on an edge device such as Raspberry Pi, adopting AI aided techniques to also monitor if the person’s health condition is normal or not. Currently, the supraventricular arrhythmia prediction is done based on QRS complexion from the live data and applying prediction algorithms for fast results. Further this live data that is collected can be used for live authentication purpose which can be used in user monitoring apps such as car insurance companies where ECG signal of each individual is identified and the change from authenticated users to the unauthorized user is identified.

In future, the bio-authentication system can be further developed to be implemented in other scenarios such as car insurance monitoring. For the analysis of pre-processed ECG, the PQRST waves will be used as a pivotal characteristic for the change point detection (CPD). Abrupt variations in time series ECG is considered as change points which can be employed to distinguish among different people’s heart activity. Comparing the fundamental differences in the PQRST wave of a person’s ECG and studying the behavior of the wave for a particular person we train our system and if there is a change detected in the wave, the system will report it and also find out the point where this change has occurred. Additionally, the ECG of the user will also be monitored using various machine learning algorithms for any possible abnormalities while driving which will ensure some degree of safety for the user while driving. The system model will be trained to find out whether the heart activity of the person is normal or is prone to any sudden cardiovascular abnormalities. Based on the decision, an automated alerting system can be implemented in the system architecture which will alert the user’s acquaintances about the user’s unusual heart condition. Thus, the system can help several heart patients who are unable to visit the doctor due to their critical condition and get timely treatments and avoid any kind of accidents that might worsen their situation.

References

  1. 1. S. B. Baker, W. Xiang, and I. Atkinson, “Internet of things for smart healthcare: Technologies, challenges, and Opportunities,” IEEE Access, 2017, doi:10.1109/ACCESS.2017.2775180.
  2. 2. S. L. Guo, L. N. Han, H. W. Liu, Q. J. Si, D. F. Kong, and F. S. Guo, “The future of remote ECG monitoring systems,” Journal of Geriatric Cardiology, 2016, doi: 10.11909/j.issn.1671-5411.2016.06.015.
  3. 3. A. Bansal et al., “Remote health monitoring system for detecting cardiac disorders,” IET Systems Biology, 2015, doi:10.1049/iet-syb.2015.0012.
  4. 4. J. Son, J. Park, H. Oh, M. Z. A. Bhuiyan, J. Hur, and K. Kang, “Privacy-preserving electrocardiogram monitoring for intelligent arrhythmia detection,” Sensors (Switzerland), 2017, doi:10.3390/s17061360.
  5. 5. F. J. Martinez-Tabares, Y. J. Costa-Salas, D. Cuesta-Frau, and G. Castellanos-Dominguez, “Multiobjective design of wearable sensor systems for electrocardiogram monitoring,” Journal of Sensors, 2016, doi:10.1155/2016/2418065.
  6. 6. S. Tian, W. Yang, J. M. Le Grange, P. Wang, W. Huang, and Z. Ye, “Smart healthcare: Making medical care more intelligent,” Global Health Journal, 2019, doi:10.1016/j.glohj.2019.07.001.
  7. 7. Y. Yin, Y. Zeng, X. Chen, and Y. Fan, “The internet of things in healthcare: An overview,” Journal of Industrial Information Integration, 2016, doi:10.1016/j.jii.2016.03.004.
  8. 8. S. D. Greenwald, R. S. Patil, and R. G. Mark, “Improved detection and classification of arrhythmias in noise-corrupted electrocardiograms using contextual information within an expert system,” Biomedical Instrumentation and Technology, 1992.
  9. 9. P. P. Ray, “A survey on Internet of Things architectures,” Journal of King Saud University - Computer and Information Sciences, 2018, doi:10.1016/j.jksuci.2016.10.003.
  10. 10. M. S. D. Gupta, V. Patchava, and V. Menezes, “Healthcare based on IoT using Raspberry Pi,” 2016, doi:10.1109/ICGCIoT.2015.7380571.
  11. 11. R. Kumar and M. Pallikonda Rajasekaran, “An IoT based patient monitoring system using raspberry Pi,” 2016, doi:10.1109/ICCTIDE.2016.7725378.
  12. 12. S. Jokić, S. Krčo, V. Delić, D. Sakać, I. Jokić, and Z. Lukić, “An efficient ECG modeling for heartbeat classification,” 2010, doi:10.1109/NEUREL.2010.5644105.
  13. 13. A. Rahman, T. Rahman, N. H. Ghani, S. Hossain, and J. Uddin, “IoT based patient monitoring system using ECG sensor,” 2019, doi:10.1109/ICREST.2019.8644065.
  14. 14. D. A. M. Budida and R. S. Mangrulkar, “Design and implementation of smart HealthCare system using IoT,” 2018, doi:10.1109/ICIIECS.2017.8275903.
  15. 15. M. H. Riaz, U. Rashid, M. Ali, and L. Li, “Internet of things based wireless patient body area monitoring network,” 2018, doi:10.1109/iThings-GreenCom-CPSCom-SmartData.2017.180.
  16. 16. Priyanka Bhoyar and S. S. Sonavane, “Remote patient monitoring using disease detection algorithm,” International Journal of Engineering Research, vol. V4, no. 09, pp. 307312, 2015, doi: 10.17577/ijertv4is090445.
  17. 17.“Raspberry Pi documentation.” https://www.raspberrypi.org/documentation/usage/gpio/.
  18. 18.“소리와 불빛이 나는 계단 프로토타입,” 2019. https://78project.wordpress.com/author/inkspelloo/.
  19. 19.“Heart rate pulse sensor amped introduction.” https://microcontrollerslab.com/heart-rate-pulse- sensor/.
  20. 20.“MCP3008 8-Channel 10-bit ADC IC.” https://components101.com/ics/mcp3008-adc-pinout- equivalent-datasheet.
  21. 21. S. Sakib, M. M. Fouda, Z. M. Fadlullah, and N. Nasser, “Migrating intelligence from cloud to ultra-edge smart IoT sensor based on deep learning: An arrhythmia monitoring use-case,” 2020, doi:10.1109/IWCMC48107.2020.9148134.
  22. 22. H. Leutheuser et al., “Comparison of real-time classification systems for arrhythmia detection on Android-based mobile devices,” 2014, doi:10.1109/EMBC.2014.6944177.
  23. 23. S. M. Mathews, C. Kambhamettu, and K. E. Barner, “A novel application of deep learning for single-lead ECG classification,” Computers in Biology and Medicine, 2018, doi:10.1016/j.compbiomed.2018.05.013.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.14.219