Keywords

1 Introduction

Nowadays, healthcare technologies and biomedical equipment have grown rapidly due to advances in semiconductor industry. Though there are technological improvements in the modern medical equipment available in healthcare centres, it is not a simple task to develop affordable, low complexity and high-quality wearable devices for ECG tele-monitoring [1]. Mobile healthcare monitoring systems are highly popular in recent times due to the size of wearable device and their real-time monitoring capability. In continuous monitoring, data of individuals need to be analysed effectively to recognize critical health conditions [2]. Mobile-based monitoring encounters huge challenges in developing low complexity power efficient systems. Cloud computing and fog computing emerge as major computing paradigms in the era of Internet of things (IoT), where it is possible to utilize bulky information saving options along with huge manipulation facilities efficiently [3]. Figure 1 highlights cloud computing-related telemedicine where hospital service system, physicians and users are connected through IoT. Mobile cloud computing (MCC) allows the healthcare centres to store numerous medical records that are generated in daily clinical practices. The cloud server is accessed by healthcare centres while performing data analysis and decision making [4].

Fig. 1
figure 1

Cloud computing model for digital healthcare

In MCC, cloud computing services can be utilized in intensive computation-based applications in addition to huge data storage. Cloud computing power has been utilized in electroencephalograph (EEG) signal feature extraction and analysis in the detection of brain-related diseases [5]. MCC techniques find applications in computation-intensive ECG tele-monitoring applications. Cloud computing facilitates the minimum local processing of signals in IoT-based healthcare devices. However, there are few issues in quality of service while using cloud framework in real-time continuous monitoring. Fog computing has gained popularity among researchers in healthcare applications to enhance security and save bandwidth. It provides energy efficiency in sensor nodes and enables distributed data storage and data compression. A smart personalized healthcare monitor has been developed for ECG signal monitoring from remote locations that utilizes cloud services for medical data storage and analysis [6]. In this chapter, ECG feature extraction analysis and machine learning-based classification are carried out for coronary heart disease (CHD) risk detection that utilizes fog computing architecture.

CHD occurs whenever there is a blood circulation flow disturbance to coronary muscles. The blood supply reduction is predominantly due to cholesterol deposits in the blood vessels. The reduction of blood circulation to the pumping organ distracts the respiratory gases volume along with nourishment supply that affects regular working mechanism. Reduction of O2 with essential nourishment components end up in heartache leading to heart attack to the affected circle [6]. Since CHD causes most of the heart-related problems and heart attack, CHD risk assessment methods are vital to avoid serious heart diseases [7]. Usual health indicators for evaluating CHD risk detection include age, smoking habits and medical history. Early identification of cardiovascular diseases is essential to proceed with the proper treatment [7]. Blood pressure and heart rate variability (HRV) parameters were evaluated to detect CHD possibilities and mortality using Dublin survey [8]. The study suggested the need for continuous real-time monitoring of ECG signal for preliminary level CHD detection. Besides blood pressure and HRV-based prediction, tobacco usage has also been taken for the evaluation of ventricular arrhythmias.

Electrocardiogram (ECG) morphological investigation and HRV-based analysis have led many researchers into in-depth analysis of ECG signal features. The R-R interval of ECG signal is measured to examine heart beat duration in millisecond units (ms). Followed by heart rate in bpm is measured with a formulation = (60000)/(RR interval). If any modifications seen in R-R interval shows abnormal heart rate, then the R-R intervals will be studied in spectrum with transforms like FFT, STFT as well as wavelet transforms [9]. HRV features are extracted in both time domain and frequency domain for analysing cardiovascular activities [1012]. In human HRV, there are three main categories, namely, very low frequency (VLF, i.e. less than 0.04 Hz), low frequency (LF, i.e. between 0.04 and 0.15 Hz) and high frequency (HF, i.e. between 0.15 and 0.5 Hz). In machine learning-based classifiers, observed time and frequency domain metrics were utilized for training classifier.

Wavelets have been largely deployed for information extraction process in many biomedical signals and images. Since all the wavelets are formed by shifting and scaling of mother wavelet, mother wavelet selection is crucial in many applications [1314]. Machine learning algorithms are being utilized in many healthcare applications for detection of diseases by performing classification. Artificial neural network is used in stroke diagnosis healthcare system by applying age, gender and medical history [15].Though there are many works in the detection of acute stroke and heart diseases, it is necessary to predict acute stroke to avoid sudden death. CHD risk detection is highly essential for acute stroke prediction. Artificial neural networks are proposed for ECG signal analysis where the complex relationship has been established between inputs and outputs [13]. In addition to neural networks, support vector machines, fuzzy logic and genetic algorithms are used for ECG signal analysis and classification. In few scenarios, neural networks are combined with fuzzy logic for obtaining desired results. In adaptive neuro fuzzy inference system, a back propagation learning algorithm of neural network is combined with fuzzy inference system [14].

In ECG signal processing, identifying the exact position of the QRS complex helps to detect heart rate variability (HRV) parameters [16]. Many cardiovascular-related diseases are identified by analysing the ECG signal parameters such as QRS complex, R-R interval, P wave and QT interval dispersion [1718]. Though ECG signal is a reliable indicator to identify acute stroke and heart-related diseases, ECG signal parameters are not studied in depth in CHD threat detection. Results were acquired and related with comparable techniques. The importance of the proposed work is listed as follows: (i) personalized warning can be given to the individuals to correct their food habits and lifestyle; (ii) elderly people can be informed about heart functionality to take necessary precautions; (iii) cause of heart diseases can be identified by clinicians for better treatment. There are four sections in the chapter including the introduction part. The second section presents the ECG signal feature extraction using wavelets, ANFIS evaluation of HRV signal and CHD risk detection. The third section represents the acquired end product and advantages when related with already existing mechanisms. To conclude, summary of our observations are presented.

2 Architecture and Methodology of the System

Our proposed system comprises of fog manipulation technique, feature classification of HRV and CHD threat detection that are explained as follows. The goals of the work are: (i) to collect large volume of data using wearable devices while monitoring ECG, blood pressure, glucose and cholesterol level; (ii) to develop principal component analysis-based ECG signal feature extraction; (iii) to develop the fog computing framework for storing and analysing the collected data from monitoring devices; iv) To apply machine learning algorithm for CHD risk detection based on extracted ECG signal features and medical data.

2.1 Fog Computing Model

The individuals’ data can be collected from hospitals that belong to different age group, gender, background and patients with heart-related diseases. MIT-BIH database ECG signal analysis can be used for testing. ECG signal can also be acquired using NI DAQ and wearable devices for better testing in real-time scenario. These collected data are sent to fog environment without any processing to reduce the computational burden of wearable devices. Complex quality analysis and stroke prediction are performed using fog computing framework. Fog computing framework comprises of sensor layer, fog computing layer with cloud computation level. Figure 2 refers to the method with the prescribed cloud computation method. Wearable device dataset are collected by sensor layer and they are sent to fog computing layer for signal quality assessment and to communicate few simple decisions. Heavy computations are performed in cloud computing layer, and the results are sent back to the end user.

Fig. 2
figure 2

Fog computing model

2.2 HRV Feature Extraction

The collected data have to be sent to the fog environment for machine learning-based CHD risk detection. Blood pressure, glucose level, cholesterol level can be sent without any preprocessing. However, preprocessing and feature extraction plays a major role in ECG signal analysis. A complete data analysis on ECG signal with signal processing techniques for heart rate feature extraction is performed. Time and spectrum investigations were examined with acquired HRV of ECG. Many wavelets were utilized for HRV feature extraction where wavelets and their results were finalized with number of coefficients and decomposition level. Coif wavelet was used in this work producing good HRV metric acquisition from the ECG, because linear phase characteristics are much better than Daubechies wavelet and Spline wavelet [9]. For R-peak estimation, the number of wavelets was exploited. Coif wavelet provided good outcomes to detect QRS peak in ECG signals [11]. Practically, R-R mid time evaluation model having timing resolution ± 1ms is used with correlation technique.

2.3 CHD Threat Detection

The collected and feature extracted data are stored as training data and testing data. Usually 80% of the data can be trained to obtain good classification results. The classification of individuals data can be done as normal and CHD risky. Machine learning-based CHD risk classification is carried out in this stage by the following steps: (i) feature extraction from the quality-assessed ECG signal; (ii) applying various physiological data and QRS feature-extracted ECG signals; (iii) machine learning-based classification for acute stroke prediction into normal, low-stroke risk and high-stroke risk. Figure 3 describes the machine learning-based CHD risk classification.

Fig. 3
figure 3

Machine learning-based CHD risk classification

CHD risk detection in fog computing framework is carried out using the above machine learning-based process flow. The prototype can be developed as a wearable device for better CHD risk detection. The prototype can be checked with the combination of wearable devices and fog computing-assisted machine learning framework. The classification accuracy of CHD risk detection is determined using specificity, sensitivity and total classification accuracy.

3 Results and Discussion

Results of HRV feature extraction and machine learning-based classification are presented and their significance is discussed in this section. Patient data can be collected from hospitals that belong to different age group, gender, background and patients with heart-related diseases. MIT-BIH database are also applied for better training of the classifier. Matlab 2015a and NI DAQ are used in this work for analysis and better testing in real-time scenario. These collected data are sent to fog environment without any processing to reduce the computational burden of wearable devices. Data analysis is performed with the sample size of 160 in the cloud server under the fog computing environment. Wavelet-based HRV feature extraction is performed for generating many frequency and time domain metrics. National Instruments Biomedical equipment was used for evaluating these metrics. Hence, collected data are stored as training data and testing data. Usually, 80% of the data can be trained to obtain good classification results. The classification of individuals data can be done as normal, CHD risky. Machine learning-based quality analysis and risk classification are performed.

Observed ECG signal data from MIT-BIH database and real-time recorded signals are given to wavelet-based HR feature extraction process. R-peak detection is the major step towards HRV feature extraction. Coif wavelet and biorthogonal wavelets are used to detect the possible R-peaks in one healthy individual ECG data. The obtained result is shown in Fig. 4. From the obtained results, biorthogonal wavelet provided the beat rate of 129 whereas Coif wavelet provided the beat rate of 74. Since the usual human heart rate ranges from 60 to 100 bpm, it is concluded that it cab be analyzed with Coif wavelet.

Fig. 4
figure 4

Analysis of R-peak using (a) Biorthogonal wavelet, (b) Coif wavelet

National instruments (NI) health equipment was used for examining spectrum domain values. The obtained values were averaged for studying the threats utilizing arrhythmic beat classification technique. From Table 1, it is clear that all cases of HR mean ranges between 70 bpm and 90 bpm. Various numerical metrics like HR average (mean), HR (std. deviation), RR average, RR SD, R-MSSD, NN-50 and TINN (Triangular Index NN) were analysed (Fig. 5).

Table 1 Obtained statistical parameters of ECG data
Fig. 5
figure 5

Obtained wavelet coefficients using NI biomedical kit

The observed RR metrics were eventually studied with the help of Fuzzy Inference System (FIS) in order to detect CHD threat. Table 2 represents the rule base based on the 25 fuzzy rules.

Table 2 CHD risk-based rule base

The proposed system worked with 128 training datasets alongside 1000 epochs (80%) that was utilized to study the ANFIS classifier. Preliminary phase of training is crucial for obtaining better classification accuracy. After training the data samples, 32 test cases out of 40 samples (80%) were applied for verifying the classification exactness of this machine learning prototype. Confusion matrix in Table 3 is used to determine the classification accuracy of the proposed work. The ANFIS classifier performance is analysed with the help of the following metrics: specificity, sensitivity and total classification accuracy. The statistical parameter values such as sensitivity, specificity and total classification accuracy are derived from Table 3. Table 4 shows the attained specificity, sensitivity and total classification accuracy of ANFIS classifier.

Table 3 Confusion matrix
Table 4 Statistical parameter values

Formula for finding total classification accuracy (TCA):

$$ TCA=\frac{\ \left(\mathrm{sum}\ \mathrm{of}\ \mathrm{the}\ \mathrm{value}\ \mathrm{of}\ \mathrm{sensitivity}\ \mathrm{with}\ \mathrm{the}\ \mathrm{value}\ \mathrm{of}\ \mathrm{specificity}\right)}{2} $$

Various machine learning models are related as shown with Table 5 while classifying subjects into CHD risky vs. normal. Though many machine learning classifiers such as Bayes classifier, Decision tree classifier, Support vector machine (SVM), K-nearest neighbor (KNN) are used, ANFIS classifier provided better classification for the applied HRV features. In many machine learning approaches, different biomedical data such as peaks of ECG signal, capacity of blood, rate of pulse, temperature as well as HRV metrics were considered. From the obtained results, it is observed that the maximum classification accuracy is 96.88%. ANFIS classifier yields the extreme 99.38% accuracy after sorting as normal vs. CHD risky.

Table 5 Evaluation and results of different classification

4 Conclusion

This chapter suggested a fog computing-assisted IoT framework for telemedicine applications. Machine learning-based CHD risk detection is proposed using extracted HRV features. Fog computing layer is utilized for fast and reliable decision making. Machine learning-based heavy computations are performed in the cloud server. In various machine learning approaches, biomedical data such as peaks of ECG signal, capacity of blood, rate of pulse, temperature as well as HRV metrics are considered for CHD risk detection. From the obtained results, it is observed that the maximum classification accuracy is 96.88%. However, ANFIS classifier yields the extreme 99.38% accuracy after sorting as normal vs. CHD risky.