Basic Science of Electrocardiography

**3**

**Chapter 1**

*Xin Gao*

**Abstract**

health cloud platform

**1. Introduction**

Diagnosing Abnormal

contrast to conventional schemes on cardiac diagnosis.

**Keywords:** electrocardiogram (ECG), cardiac arrhythmia, deep learning,

Statistical reports indicated that the leading cause of death in the world comes from cardiovascular diseases [9, 20]. The World Health Organization (WHO) reported that the total number of deaths from cardiovascular diseases in 2012 was approximately 17.5 million, compared with 17.7 million in 2015, and this number has been increasing every year [1, 3, 9]. With the accelerating pace of life, more and more young people suffer from great pressure related to work, and completely ignore physical examinations, which increases the risk of sudden death [9]. Hence, monitoring ECG and performing automatic diagnosis become particularly important. In cardiology, the electrical actions of a human's heart are simply and painlessly recorded by electrocardiogram (ECG) via single or multiple-lead detections [8, 20]. The real-time ECG sequence of a patient represents one of the most useful clinical diagnostic features on cardiovascular diseases, reflecting the electrophysiological activity of cardiac excitement, and indicating great importance on the aspects of basic heart functions and related pathological research [12]. Meanwhile, ECG is of crucial importance for analyzing and identifying various arrhythmias, which reflect the degree of myocardial damage, the corresponding development process, and the functional structure of both atria and ventricles [3, 12]. A few

Deep Learning

Electrocardiogram (ECG) via

In this chapter, we investigate the most recent automatic detecting algorithms on abnormal electrocardiogram (ECG) in a variety of cardiac arrhythmias. We present typical examples of a medical case study and technical applications related to diagnosing ECG, which include (i) a recently patented data classifier on the basis of deep learning model, (ii) a deep neural network scheme to diagnose variable types of arrhythmia through wearable ECG monitoring devices, and (iii) implementation of the health cloud platform, which consists of automatic detection, data mining, and classifying via the Android terminal module. Our work establishes a cross-area study, which relates artificial intelligence (AI), deep learning, cloud computing on huge amount of data to minishape ECG monitoring devices, and portable interaction platforms. Experimental results display the technical advantages such as saving cost, better reliability, and higher accuracy of deep learning-based models in

#### **Chapter 1**

## Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning

*Xin Gao*

#### **Abstract**

In this chapter, we investigate the most recent automatic detecting algorithms on abnormal electrocardiogram (ECG) in a variety of cardiac arrhythmias. We present typical examples of a medical case study and technical applications related to diagnosing ECG, which include (i) a recently patented data classifier on the basis of deep learning model, (ii) a deep neural network scheme to diagnose variable types of arrhythmia through wearable ECG monitoring devices, and (iii) implementation of the health cloud platform, which consists of automatic detection, data mining, and classifying via the Android terminal module. Our work establishes a cross-area study, which relates artificial intelligence (AI), deep learning, cloud computing on huge amount of data to minishape ECG monitoring devices, and portable interaction platforms. Experimental results display the technical advantages such as saving cost, better reliability, and higher accuracy of deep learning-based models in contrast to conventional schemes on cardiac diagnosis.

**Keywords:** electrocardiogram (ECG), cardiac arrhythmia, deep learning, health cloud platform

#### **1. Introduction**

Statistical reports indicated that the leading cause of death in the world comes from cardiovascular diseases [9, 20]. The World Health Organization (WHO) reported that the total number of deaths from cardiovascular diseases in 2012 was approximately 17.5 million, compared with 17.7 million in 2015, and this number has been increasing every year [1, 3, 9]. With the accelerating pace of life, more and more young people suffer from great pressure related to work, and completely ignore physical examinations, which increases the risk of sudden death [9]. Hence, monitoring ECG and performing automatic diagnosis become particularly important. In cardiology, the electrical actions of a human's heart are simply and painlessly recorded by electrocardiogram (ECG) via single or multiple-lead detections [8, 20]. The real-time ECG sequence of a patient represents one of the most useful clinical diagnostic features on cardiovascular diseases, reflecting the electrophysiological activity of cardiac excitement, and indicating great importance on the aspects of basic heart functions and related pathological research [12]. Meanwhile, ECG is of crucial importance for analyzing and identifying various arrhythmias, which reflect the degree of myocardial damage, the corresponding development process, and the functional structure of both atria and ventricles [3, 12]. A few

research scholars have related medical evidence of ECG toward arrhythmias with the latest experimental study, see [3, 4, 12, 23, 29], and the references therein.

Typical anomaly behaviors in ECG refer to irregular heartbeats, which are often recognized as sinus arrhythmia, ectopic tachycardia, cardiac flutter and tremor, and heart block [12]. The ectopic tachycardia is also known as premature contraction, standing for the most common types of cardiac arrhythmias. Classification of arrhythmias can be in accordance with a cardiac pacemaker and the conduction process [9, 12]: abnormal pacemakers may lead to arrhythmias and fluctuated heart rates, including atrial fibrillation, ventricular fibrillation (either sinus, supraventricular, or ventricular), tachycardia and bradycardia; abnormal cardiac conduction system results into heart blocks such as atrioventricular block and intraventricular block, etc. Atrioventricular block takes place in the atrioventricular node, the His bundle and its branches, while ventricular conduction block occurs in the left and right bundle branches. Specifically, no obvious symptoms appear in left bundle branch block, while coronary and rheumatic heart diseases as well as acute myocardial infarction often accompany right bundle branch block. Healthy people come along with occasional atrial premature beats, while ventricular premature beats are often associated with some kind of organic lesion. Several distortions on QRS wave and ST segments could appear in those cardiac arrhythmias [12].

Previously reported medications and medical procedures such as pacemaker insertion and surgery offer well-established treatments for most arrhythmias; meanwhile, a large quantity of signal and image processing algorithms as well as sensor devices provided useful tools on electrocardiogram-assisted diagnosis [8, 18, 20, 26, 31, 32]. Recently, many researchers have been devoting themselves on computer-aided ECG analysis, where the technical developments are enriched from the booming growth on machine learning and deep learning algorithms [6, 9, 11, 13–17, 21, 24, 25, 27, 30, 33, 35–37]. Their methodology of study is broadly categorized as conventional machine learning and deep learning. Traditional machine learning schemes are greatly affected by data, which demands complex preprocessing such as noise removal and data normalization. Besides, it is also vulnerable to over-extract unnecessary features, requiring filter design and sorting out redundant features, and then finally input another algorithm for classification [10, 16, 19, 21, 25–28]. While good effects on recognition got achieved, the overall procedure is more complicated than those of the deep learning schemes [1, 6, 9, 14, 17, 21, 25, 27]. Hence, previous machine learnings are no longer suitable to be embedded into mobile devices or perform real-time analysis [15].

For some of the deep learning-based schemes [1, 9, 13–15, 17, 25, 27], it is not only unnecessary to perform accurate denoising on the data, but also automatically extract the features in order to achieve the expected ideal recognition results. Common training modes of algorithmic ECG diagnosis usually compose single lead and multilead [9]. Multilead data combined with multichannel neural network algorithms (MCNN) are capable of achieving considerably good results; however, their shortcomings display on the relatively larger training parameters of models and much longer training time, which increases the difficulties to realize real-time monitoring associated with the existing mobile devices [9, 10, 31, 32]. Comparing to single-lead ECG data processing, the performance of recognition by multilead can be achieved with satisfactory, i.e., using the AlexNet structure, while the weakness lies on that these methods were regarded as relatively out of date [9].

The remainder of this chapter is organized as follows. In Section 2, several typical algorithms are briefly described on how deep learning-based light-quantity level algorithms recognize ECG data, and how the principles of deep learning are related on accurately diagnosing cardiac arrhythmia. Section 3 introduces a recently patented ECG data classifier with deep learning-based model. The automatic ECG

**5**

of arrhythmia [9].

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

intelligence-(AI)-related ECG diagnosis and draws our conclusions.

**2. Deep learning theory and automatic ECG diagnosis**

be increased network parameters and difficulty on training [9].

CNN-based arrhythmia classification is displayed in **Figure 1** [9].

Two representative training methods in deep learning-based ECG diagnosis include the back-propagation (BP) algorithm and deep belief network (DBN) [1, 8, 28], where the former still fails to overcome the error dissipation effect in the process of back-propagation, and the latter is suitable for layer-by-layer unsupervised learning via using a small portion of labeled samples for global optimization; for feature learning, DBN makes full use of unlabeled data and reduces the cost via the strategy of "pretraining and minor tuning" [9]. Other applicable deep network structures applied in latest works on automatic ECG analysis comprise fundamental or variation schemes related to classical MLP, convolutional neural networks (CNN), and recurrent neural networks (RNN) [9, 22]. A schematic diagram of

The three basic features of CNN, known as locally receptive field, shared weights and pooling, are reflected inside of the input and output layers in **Figure 1** as depicted above [9]: the convolutional layer exploits sample information fragments in the form of moving windows (locally acceptable domain) to continuously learn the entire information of samples, and traverse to obtain multiple feature maps by weight sharing, which is the convolution layer. The pool layer performs data compression on the feature map of convolutional layer in order to simplify its output. Frequently used max-pool operation filters out all redundant values except the maximum value in the sample region, and then transforms the data to improve the algorithmic robustness. The upper fully layer corresponds to the network output, and the combination of convolution layer, and pool layer can also be inserted with full layers to acquire middle outputs. Since diagnosing ECG is also a task of time series analysis, its information is mainly expressed by the spatial structure, and the information output by each channel of the multilead ECG is not identically the same. The chest V1 lead signal and the limb II lead signal are both inputs into the neural network, and the output layer performs classification on different types

arrhythmia diagnosing system and Android health cloud platform are referenced in Section 4. The last Section 5 prospects the progress on cross-area study of artificial

Since ECG periodically reflects the variations on electrical activities of a human's heart and real-time monitoring indicates parallel processing on amazing amount of data, automatic ECG diagnosis calls for efficient classification techniques on extracting unsupervised data features in practical ways. Many previous statistical signal processing or machine learning schemes utilize some dimensional reduction methods (i.e., linear discriminate analysis (LDA), independent component analysis (ICA), principle component analysis (PCA), etc.) to release the complexity issues, while it is the fact that practically most of the feature selection schemes are still dependent on human labor [9]. Deep learning is developed from artificial neural networks to simulate the input and output of neurons and the process of excitatory transmission of signals [9, 21, 25]. While early neural network (perceptron) only aimed to solve the linear separable problem, deep learning models connect some hidden layer(s) with an activation function between the input and output layers to obtain multilayer perceptions (MLP) [9]. Expanded cascades on the hidden layer of neurons indicate that the ability of network learning is deepened, and hence, any arbitrary continuous function of arbitrary complexity was proved to be effectively approached (in any level of accuracy), given an expression of a functional model, while the by-products turn to

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

*Practical Applications of Electrocardiogram*

research scholars have related medical evidence of ECG toward arrhythmias with the latest experimental study, see [3, 4, 12, 23, 29], and the references therein.

and ST segments could appear in those cardiac arrhythmias [12].

mobile devices or perform real-time analysis [15].

Previously reported medications and medical procedures such as pacemaker insertion and surgery offer well-established treatments for most arrhythmias; meanwhile, a large quantity of signal and image processing algorithms as well as sensor devices provided useful tools on electrocardiogram-assisted diagnosis [8, 18, 20, 26, 31, 32]. Recently, many researchers have been devoting themselves on computer-aided ECG analysis, where the technical developments are enriched from the booming growth on machine learning and deep learning algorithms [6, 9, 11, 13–17, 21, 24, 25, 27, 30, 33, 35–37]. Their methodology of study is broadly categorized as conventional machine learning and deep learning. Traditional machine learning schemes are greatly affected by data, which demands complex preprocessing such as noise removal and data normalization. Besides, it is also vulnerable to over-extract unnecessary features, requiring filter design and sorting out redundant features, and then finally input another algorithm for classification [10, 16, 19, 21, 25–28]. While good effects on recognition got achieved, the overall procedure is more complicated than those of the deep learning schemes [1, 6, 9, 14, 17, 21, 25, 27]. Hence, previous machine learnings are no longer suitable to be embedded into

For some of the deep learning-based schemes [1, 9, 13–15, 17, 25, 27], it is not only unnecessary to perform accurate denoising on the data, but also automatically extract the features in order to achieve the expected ideal recognition results. Common training modes of algorithmic ECG diagnosis usually compose single lead and multilead [9]. Multilead data combined with multichannel neural network algorithms (MCNN) are capable of achieving considerably good results; however, their shortcomings display on the relatively larger training parameters of models and much longer training time, which increases the difficulties to realize real-time monitoring associated with the existing mobile devices [9, 10, 31, 32]. Comparing to single-lead ECG data processing, the performance of recognition by multilead can be achieved with satisfactory, i.e., using the AlexNet structure, while the weakness

lies on that these methods were regarded as relatively out of date [9].

The remainder of this chapter is organized as follows. In Section 2, several typical algorithms are briefly described on how deep learning-based light-quantity level algorithms recognize ECG data, and how the principles of deep learning are related on accurately diagnosing cardiac arrhythmia. Section 3 introduces a recently patented ECG data classifier with deep learning-based model. The automatic ECG

Typical anomaly behaviors in ECG refer to irregular heartbeats, which are often recognized as sinus arrhythmia, ectopic tachycardia, cardiac flutter and tremor, and heart block [12]. The ectopic tachycardia is also known as premature contraction, standing for the most common types of cardiac arrhythmias. Classification of arrhythmias can be in accordance with a cardiac pacemaker and the conduction process [9, 12]: abnormal pacemakers may lead to arrhythmias and fluctuated heart rates, including atrial fibrillation, ventricular fibrillation (either sinus, supraventricular, or ventricular), tachycardia and bradycardia; abnormal cardiac conduction system results into heart blocks such as atrioventricular block and intraventricular block, etc. Atrioventricular block takes place in the atrioventricular node, the His bundle and its branches, while ventricular conduction block occurs in the left and right bundle branches. Specifically, no obvious symptoms appear in left bundle branch block, while coronary and rheumatic heart diseases as well as acute myocardial infarction often accompany right bundle branch block. Healthy people come along with occasional atrial premature beats, while ventricular premature beats are often associated with some kind of organic lesion. Several distortions on QRS wave

**4**

arrhythmia diagnosing system and Android health cloud platform are referenced in Section 4. The last Section 5 prospects the progress on cross-area study of artificial intelligence-(AI)-related ECG diagnosis and draws our conclusions.

#### **2. Deep learning theory and automatic ECG diagnosis**

Since ECG periodically reflects the variations on electrical activities of a human's heart and real-time monitoring indicates parallel processing on amazing amount of data, automatic ECG diagnosis calls for efficient classification techniques on extracting unsupervised data features in practical ways. Many previous statistical signal processing or machine learning schemes utilize some dimensional reduction methods (i.e., linear discriminate analysis (LDA), independent component analysis (ICA), principle component analysis (PCA), etc.) to release the complexity issues, while it is the fact that practically most of the feature selection schemes are still dependent on human labor [9]. Deep learning is developed from artificial neural networks to simulate the input and output of neurons and the process of excitatory transmission of signals [9, 21, 25]. While early neural network (perceptron) only aimed to solve the linear separable problem, deep learning models connect some hidden layer(s) with an activation function between the input and output layers to obtain multilayer perceptions (MLP) [9]. Expanded cascades on the hidden layer of neurons indicate that the ability of network learning is deepened, and hence, any arbitrary continuous function of arbitrary complexity was proved to be effectively approached (in any level of accuracy), given an expression of a functional model, while the by-products turn to be increased network parameters and difficulty on training [9].

Two representative training methods in deep learning-based ECG diagnosis include the back-propagation (BP) algorithm and deep belief network (DBN) [1, 8, 28], where the former still fails to overcome the error dissipation effect in the process of back-propagation, and the latter is suitable for layer-by-layer unsupervised learning via using a small portion of labeled samples for global optimization; for feature learning, DBN makes full use of unlabeled data and reduces the cost via the strategy of "pretraining and minor tuning" [9]. Other applicable deep network structures applied in latest works on automatic ECG analysis comprise fundamental or variation schemes related to classical MLP, convolutional neural networks (CNN), and recurrent neural networks (RNN) [9, 22]. A schematic diagram of CNN-based arrhythmia classification is displayed in **Figure 1** [9].

The three basic features of CNN, known as locally receptive field, shared weights and pooling, are reflected inside of the input and output layers in **Figure 1** as depicted above [9]: the convolutional layer exploits sample information fragments in the form of moving windows (locally acceptable domain) to continuously learn the entire information of samples, and traverse to obtain multiple feature maps by weight sharing, which is the convolution layer. The pool layer performs data compression on the feature map of convolutional layer in order to simplify its output. Frequently used max-pool operation filters out all redundant values except the maximum value in the sample region, and then transforms the data to improve the algorithmic robustness. The upper fully layer corresponds to the network output, and the combination of convolution layer, and pool layer can also be inserted with full layers to acquire middle outputs. Since diagnosing ECG is also a task of time series analysis, its information is mainly expressed by the spatial structure, and the information output by each channel of the multilead ECG is not identically the same. The chest V1 lead signal and the limb II lead signal are both inputs into the neural network, and the output layer performs classification on different types of arrhythmia [9].

#### **Figure 1.**

*A schematic diagram of CNN-based automatic arrhythmia classification from ECG [9].*

#### **Figure 2.**

*LSTM-based single cell-unit model and schematic diagram for arrhythmia classification [18].*

While applying deep learning theory in automatic ECG diagnosis and arrhythmia classification, in addition to BP algorithm, CNN and fully connected feedforward neural network (FCFNN), the gradient descent training algorithm also suggests a feasible candidate [9, 22]. In the optimization process of training, the follow-up methods such as target function selection, dropout technique, and Nesterov impulse update are capable of improving the training efficiency and reduce the probability of over-fitting on sequential processing of ECG data [9, 22]. Regarding to RNN as mentioned above, its variation model named as long-short-term memory (LSTM) [18, 22] had been applied to classify arrhythmia, where the two share the same network structure, while the neurons in hidden layer got replaced with loop-connected memory units [18]. A standard memory unit contains single/multiple self-connected memory unit and three multiplication units (input/output gates and forgotten gate). Among the consecutive operations of "write," "read," and "reset," the forgotten gate offers a self-reset scheme for memory units, which is crucial to demand LSTM to "forgot" the previously loaded tasks [18]. A single cell-unit-based classical LSTM memory unit model is depicted in **Figure 2a**, and the schematic diagram of LSTMbased arrhythmia classification model is shown in **Figure 2b**.

The LSTM-based model represents another deep learning scheme on diagnosing abnormal ECG and performing automatic arrhythmia classification [18]. With an input layer and two hidden layers, it cascades the SoftMax classifier as the last layer,

**7**

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

which comprises five nodes that correspondingly stands for N, S, V, F, and Q [18]. Preprocessed ECG segments were taken as input data into LSTM to proceed with layer-to-layer feature learning and mapping, then the deep-level ECG signal features were sent to SoftMax classifier to perform training, from which the acquired weights follow-up with the initialization step and weight optimization step by BP algorithm so as to converge into the global optimal of LSTM network model, and finally achieve the goal of arrhythmia classification [18, 22]. The LSTM model overcame the dependence of traditional features on ECG signals, solved the problem of gradient elimination that early neural networks occur, and achieved data mining on the distinctive deep features

In 2017, computer scientists in Stanford University claimed that they have developed a deep learning scheme on accurate diagnosing various types of arrhythmia, which achieved the grading level of diagnosing as high as professional cardiologists [2, 38]. Such kind of deep learning-based schemes can sieve irregular heartbeats from sequential data of several hours. It is common to view arrhythmia from ECG, while doctors often supply patients with portable ECG that consecutively monitors their heartbeats since portable wearing devices are able to generate data in hundreds of hours [2]. Research scholars and a heartbeat monitoring company named as IRhythm have been working together to investigate accurate detection of deep CNN models toward large amount of concentrated, irregular ECG data [34, 38, 39]. It was claimed by these scholars that their proposed algorithm performed much better comparing to professional cardiologists when diagnosing 13 different types of arrhythmia [2]. Benefited from accelerating diagnosis and improving treatments, the algorithmic accuracy even exceeds those obtained by cardiological doctors. Besides, their ECG algorithm was expected to help people in remote areas gain some assistance from cardiological experts: performing some kind of anomaly detection, associated with processing various types of anomalous arrhythmia in high precision [2, 38]. Applying their algorithm to monitor ECG of potential arrhythmia patients can be imaged in the following scenarios: when patients first come to see the doctor in office, if the wearable ECG device does not detect any problem, doctors would possibly allow the potential patient to use portable devices and monitor heartbeats consecutively for 2 weeks; hence, the crossover range of time generating data by the device is longer than 300 hours. After the second appointment, doctors may analysis the data of every second to discover any hint on arrhythmia [2]. Analyzing arrhythmia was in fact a data processing problem, as was found by Dr. Andrew Ng, a well-known artificial intelligence (AI) expert leading Stanford's machine learning team, where the deep learning algorithm they developed aims to diagnose different types of arrhythmias from ECG inputs [2]. Cooperating with companies, which provide wearable rhythm monitoring equipment, about 36,000 ECG data samples were acquired to train a deep neural network model, which was later proved to be more accurate than a cardiologist in diagnosing arrhythmias, and performs even better than a doctor in most cases [2, 38]. Their trained 34-layer CNN model is depicted in **Figure 3**, where a single-lead wearable heart device monitors ECG, and the objective is oriented on correct detection of the sinus rhythm (SINUS) and atrial fibrillation (AFIB). The input after preactivation, followed by 33 convolution layers in cascades, one fully connected layer at the last and a SoftMax, contrib-

behind large pool of ECG data via the proposed self-learning style [18].

uted the entire architecture of this trained deep neural network [38].

Research scholars discovered that many types of arrhythmia are similar on occurrence, while their differences are trivial; however, it has a great impact on how to deal with a specific arrhythmia: for instance, two types of arrhythmias were known as secondary atrioventricular block and showed very similar appearance, while one requires no treatment and the other urges immediate observation [2, 12, 22]. Their research products are not only able to discover signs of arrhythmia, but also expose different types of arrhythmia with unprecedented high precision [22]. The advantage

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

#### *Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning DOI: http://dx.doi.org/10.5772/intechopen.85509*

*Practical Applications of Electrocardiogram*

While applying deep learning theory in automatic ECG diagnosis and arrhythmia classification, in addition to BP algorithm, CNN and fully connected feedforward neural network (FCFNN), the gradient descent training algorithm also suggests a feasible candidate [9, 22]. In the optimization process of training, the follow-up methods such as target function selection, dropout technique, and Nesterov impulse update are capable of improving the training efficiency and reduce the probability of over-fitting on sequential processing of ECG data [9, 22]. Regarding to RNN as mentioned above, its variation model named as long-short-term memory (LSTM) [18, 22] had been applied to classify arrhythmia, where the two share the same network structure, while the neurons in hidden layer got replaced with loop-connected memory units [18]. A standard memory unit contains single/multiple self-connected memory unit and three multiplication units (input/output gates and forgotten gate). Among the consecutive operations of "write," "read," and "reset," the forgotten gate offers a self-reset scheme for memory units, which is crucial to demand LSTM to "forgot" the previously loaded tasks [18]. A single cell-unit-based classical LSTM memory unit model is depicted in **Figure 2a**, and the schematic diagram of LSTM-

*LSTM-based single cell-unit model and schematic diagram for arrhythmia classification [18].*

*A schematic diagram of CNN-based automatic arrhythmia classification from ECG [9].*

The LSTM-based model represents another deep learning scheme on diagnosing abnormal ECG and performing automatic arrhythmia classification [18]. With an input layer and two hidden layers, it cascades the SoftMax classifier as the last layer,

based arrhythmia classification model is shown in **Figure 2b**.

**6**

**Figure 1.**

**Figure 2.**

which comprises five nodes that correspondingly stands for N, S, V, F, and Q [18]. Preprocessed ECG segments were taken as input data into LSTM to proceed with layer-to-layer feature learning and mapping, then the deep-level ECG signal features were sent to SoftMax classifier to perform training, from which the acquired weights follow-up with the initialization step and weight optimization step by BP algorithm so as to converge into the global optimal of LSTM network model, and finally achieve the goal of arrhythmia classification [18, 22]. The LSTM model overcame the dependence of traditional features on ECG signals, solved the problem of gradient elimination that early neural networks occur, and achieved data mining on the distinctive deep features behind large pool of ECG data via the proposed self-learning style [18].

In 2017, computer scientists in Stanford University claimed that they have developed a deep learning scheme on accurate diagnosing various types of arrhythmia, which achieved the grading level of diagnosing as high as professional cardiologists [2, 38]. Such kind of deep learning-based schemes can sieve irregular heartbeats from sequential data of several hours. It is common to view arrhythmia from ECG, while doctors often supply patients with portable ECG that consecutively monitors their heartbeats since portable wearing devices are able to generate data in hundreds of hours [2]. Research scholars and a heartbeat monitoring company named as IRhythm have been working together to investigate accurate detection of deep CNN models toward large amount of concentrated, irregular ECG data [34, 38, 39]. It was claimed by these scholars that their proposed algorithm performed much better comparing to professional cardiologists when diagnosing 13 different types of arrhythmia [2]. Benefited from accelerating diagnosis and improving treatments, the algorithmic accuracy even exceeds those obtained by cardiological doctors. Besides, their ECG algorithm was expected to help people in remote areas gain some assistance from cardiological experts: performing some kind of anomaly detection, associated with processing various types of anomalous arrhythmia in high precision [2, 38]. Applying their algorithm to monitor ECG of potential arrhythmia patients can be imaged in the following scenarios: when patients first come to see the doctor in office, if the wearable ECG device does not detect any problem, doctors would possibly allow the potential patient to use portable devices and monitor heartbeats consecutively for 2 weeks; hence, the crossover range of time generating data by the device is longer than 300 hours. After the second appointment, doctors may analysis the data of every second to discover any hint on arrhythmia [2].

Analyzing arrhythmia was in fact a data processing problem, as was found by Dr. Andrew Ng, a well-known artificial intelligence (AI) expert leading Stanford's machine learning team, where the deep learning algorithm they developed aims to diagnose different types of arrhythmias from ECG inputs [2]. Cooperating with companies, which provide wearable rhythm monitoring equipment, about 36,000 ECG data samples were acquired to train a deep neural network model, which was later proved to be more accurate than a cardiologist in diagnosing arrhythmias, and performs even better than a doctor in most cases [2, 38]. Their trained 34-layer CNN model is depicted in **Figure 3**, where a single-lead wearable heart device monitors ECG, and the objective is oriented on correct detection of the sinus rhythm (SINUS) and atrial fibrillation (AFIB). The input after preactivation, followed by 33 convolution layers in cascades, one fully connected layer at the last and a SoftMax, contributed the entire architecture of this trained deep neural network [38].

Research scholars discovered that many types of arrhythmia are similar on occurrence, while their differences are trivial; however, it has a great impact on how to deal with a specific arrhythmia: for instance, two types of arrhythmias were known as secondary atrioventricular block and showed very similar appearance, while one requires no treatment and the other urges immediate observation [2, 12, 22]. Their research products are not only able to discover signs of arrhythmia, but also expose different types of arrhythmia with unprecedented high precision [22]. The advantage

#### **Figure 3.**

*The trained 34-layer CNN on arrhythmia detection on time-series ECG of random length [38].*

of this deep CNN-based algorithm lies that it never become exhausted and continuously performs immediate diagnosis of arrhythmia, which further benefits patients who are unable to see a cardiologist in remote areas or a developing country [2]. When a potentially fatal heart rhythm appears in high-risk groups, one who wears a dailyused rhythm monitoring device will immediately respond and notify emergency personnel to aid the individual(s) with professional arrhythmia diagnosis [2, 38].

#### **3. Automatic ECG diagnosis via deep learning: lightweight classifier**

Among the architecture model of deep learning-based schemes on automatic ECG diagnosis, reducing the computational cost, network parameters and training difficulties, will represent crucial problems. In order to solve these issues mentioned above, research scholars have been seeking for an ideal technical solution. A deep learning research lab in Zhengzhou University established a lightweight algorithm on automatic ECG data diagnosis, in which the elements on technical realization are displayed as below [40]: the objective is to provide a deep learning-based lightweight algorithm for identifying ECG data, which aims at the deficiencies of the current techniques. This invention takes along with a technical plan of identifying the ECG data based on deep learning, which includes the following steps [40]:

Step 1: Perform rough extraction of data features. The extracted ECG data are conveyed through a standard convolution layer

Step 2: Pass the rough extracted data features through a pooling layer max-pooling, then send these features to the core Lite module to extract deep-level data features

Step 3: Send the deep-level data features through a pooling layer max-pooling, then the two full-connection layers, named as dense, will receive these features by turns and perform purification

Step 4: Transmit the purified data features to the classifier function and proceed with outputs after feature classification.

A flowchart on the operating procedures with respect to this invention is depicted in **Figure 4**, and the diagram of its core module, the deep learning-based light weight algorithm, is shown in **Figure 5**.

**9**

**Figure 5.**

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

Regarding to the core module as proposed on invention, the max-pooling layer plays an anti-overfitting effect in the entire structure model and ensures the classification accuracy. The activation function of each convolutional layer including the fully connected layer is named as LeakReLU [40]. When performing the optimization step by the Adam optimizer, the learning rate was set as 0.001. The specific

Based on the analysis as described above, the activation functions of each convolutional layer and fully connected layer are implemented by LeakReLU, while the model is optimized using the Adam optimizer [40]: the learning rate is set as 0.001. In Step 1, the convolution kernel of the standard convolutional layer is set as 1 × 5 with step size of 1; the convolution kernel size of the pooled layer maxpooling is set as 1 × 2, with step size of 2; the convolution kernel size of the squeeze convolution layer and the first standard convolution layer are both set as 1 × 1 with step size of 1; similarly, with the same step size, convolution kernels of the second

setting parameters of this algorithmic model are presented as below.

*Core modules of deep-learning based lightweight algorithm.*

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

**Figure 4.**

*The flowchart of automatic ECG classifier.*

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning DOI: http://dx.doi.org/10.5772/intechopen.85509*

#### **Figure 4.**

*Practical Applications of Electrocardiogram*

of this deep CNN-based algorithm lies that it never become exhausted and continuously performs immediate diagnosis of arrhythmia, which further benefits patients who are unable to see a cardiologist in remote areas or a developing country [2]. When a potentially fatal heart rhythm appears in high-risk groups, one who wears a dailyused rhythm monitoring device will immediately respond and notify emergency personnel to aid the individual(s) with professional arrhythmia diagnosis [2, 38].

*The trained 34-layer CNN on arrhythmia detection on time-series ECG of random length [38].*

**3. Automatic ECG diagnosis via deep learning: lightweight classifier**

conveyed through a standard convolution layer

turns and perform purification

with outputs after feature classification.

light weight algorithm, is shown in **Figure 5**.

Among the architecture model of deep learning-based schemes on automatic ECG diagnosis, reducing the computational cost, network parameters and training difficulties, will represent crucial problems. In order to solve these issues mentioned above, research scholars have been seeking for an ideal technical solution. A deep learning research lab in Zhengzhou University established a lightweight algorithm on automatic ECG data diagnosis, in which the elements on technical realization are displayed as below [40]: the objective is to provide a deep learning-based lightweight algorithm for identifying ECG data, which aims at the deficiencies of the current techniques. This invention takes along with a technical plan of identifying the ECG data based on deep learning, which includes the following steps [40]: Step 1: Perform rough extraction of data features. The extracted ECG data are

Step 2: Pass the rough extracted data features through a pooling layer max-pooling,

Step 4: Transmit the purified data features to the classifier function and proceed

then send these features to the core Lite module to extract deep-level data features Step 3: Send the deep-level data features through a pooling layer max-pooling, then the two full-connection layers, named as dense, will receive these features by

A flowchart on the operating procedures with respect to this invention is depicted in **Figure 4**, and the diagram of its core module, the deep learning-based

**8**

**Figure 3.**

*The flowchart of automatic ECG classifier.*

#### **Figure 5.**

*Core modules of deep-learning based lightweight algorithm.*

Regarding to the core module as proposed on invention, the max-pooling layer plays an anti-overfitting effect in the entire structure model and ensures the classification accuracy. The activation function of each convolutional layer including the fully connected layer is named as LeakReLU [40]. When performing the optimization step by the Adam optimizer, the learning rate was set as 0.001. The specific setting parameters of this algorithmic model are presented as below.

Based on the analysis as described above, the activation functions of each convolutional layer and fully connected layer are implemented by LeakReLU, while the model is optimized using the Adam optimizer [40]: the learning rate is set as 0.001. In Step 1, the convolution kernel of the standard convolutional layer is set as 1 × 5 with step size of 1; the convolution kernel size of the pooled layer maxpooling is set as 1 × 2, with step size of 2; the convolution kernel size of the squeeze convolution layer and the first standard convolution layer are both set as 1 × 1 with step size of 1; similarly, with the same step size, convolution kernels of the second

and third standard convolutional layers are set as 1 × 2 and 1 × 3, respectively; the convolution kernels of the depthwise convolutional layers match the same size with their follow-up standard convolution layers, their step sizes are set as 1; and the convolution kernel of the pointwise convolution layer is also set as 1 × 1 with step size of 1.

In Step 2, the function of core module lite is to install the squeeze convolution layer on compressing feature data outputted by the upper layer; after the layer of squeezed convolutions, the standard convolutions of three different channels were set to extract data features of different local sizes; the rough data features are transmitted through a depthwise convolution layer and a pointwise convolution layer after the second and the third standard convolutional layers; a residual connection is also constructed on the terminal right side of the squeeze convolution layer; finally, the outputs of filter concatenation are performed after the first standard convolution layer, pointwise convolution layer, and the residual connections [40].

It should be noted that the standard convolution layer in the invented automatic ECG classifier, performs a conventional convolution operation, which is named as standard convolutional layer for distinctions; the compression convolution layer is obtained by compressing the amount of feature data in the upper layer so as to reduce the computational load for convolution operation of the next layer. For example, if the upper layer outputs 10 feature data and the compressed convolution layer sets up five convolution kernels, then 5 feature data will be released, which means the input of next layer has five feature data. Deep convolution and pointwise convolution actually divide the ordinary standard convolution operation into two steps [40]: the first step is to exploit the deep convolution layer to perform convolution operations separately on each feature data of the previous layer, which indicates that a convolution kernel only convolves one feature data. In the second step, the pointwise convolution, which is the 1 × 1 convolution kernel, performs feature combination operations on the output after deep convolution.

By adopting the invented deep learning-based lightweight algorithm and through the setting of a core module, this model is trained to guarantee a certain accuracy in absence of demanding much computational cost. In contrast to other detection algorithms, the proposed scheme takes less time, displays faster prediction, and reduces personal consumption. The well-trained software platform can be embedded into a wearable ECG device or the mobile phone terminals to classify and monitor the collected ECG data, and triggers an alarm in case an abnormality is encountered. The embedded device is not only free of spending extra time affecting daily work, but also arouses people to pay enough attention on cardiac abnormalities and regularly perform physical examination; hence, the incidence of heart disease can be significantly reduced [40].

Comparing to the existing methods, this deep learning-based lightweight algorithm on invention has substantive features and significant advances, which can be specifically referred as [40]:


**11**

memory on GPU [40].

**cloud platform**

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

As specified by several steps mentioned above, the lightweight algorithm for identifying ECG data based on deep learning can be realized via uniprocessors in parallel computing, in which the convolution manner of each convolution layer is convolution of one-dimensional ECG data [40]. Brief notation on implementation is presented as follows: *x*[*n*] and *y*[*n*] denote the input and the output sequences, respectively; *h*[*n*] represents the convolution kernel weight sequence, *h*[*−k*] represents the inversion of the *h*[*k*] sequence, *h*[*N*−*k*] indicates that *h*[*−k*] is moved by *n* points; *m* stands for the length of input sequence, while the length of output sequence is expressed as len(*x*[*n*]) + len(*h*[*n*]) − 1. Because the classifier function is a SoftMax function classifying five types of ECG data, each type of ECG data is recorded as a neuron in the SoftMax function, which appears in the form as a product of the upper neuron output and the weight of SoftMax function connected to the upper neuron [40]. Hence, by constructing the loss function and the linear regression model, the output probability of each neuron and each neural unit can be modeled through vector calculus and probabi-

listic interpretation, which finally achieves the prediction value of output.

To sum up, the technical invention [40] provides a deep learning-based lightweight algorithm for automatic ECG data identification and diagnosis, where its procedure consists of extracting the extracted ECG data through a standard convolution layer, and performing rough extraction of data features; while a feature is passed through a max-pooling layer, the core module is sent to the kernel lite module to extract deep data features. Note that after passing the deep data features through a pooled layer max-pooling, those features will be sequentially loaded into two fully connected layers named as dense, in which purification is performed on the hierarchical data features; in the next step, the classifier function takes responsibility for feature classification on the output of purified data features. Compared with other similar schemes on automatic ECG diagnosis [5, 7, 16, 27, 31, 36], the invented lightweight algorithm has been released from requiring large set of calculation parameters but still ensures constant accuracy on recognition effects, which is able to realize parallel processing of ECG data despite of limited network resources or running

**4. Automatic detection system for arrhythmias and the Android health** 

While the current methods on network medical treatments are often restricted to the interactions between doctors and patients via modern communication tools, it is neither possible to establish mutual trust nor collect real-time data. Hence, wearable ECG monitoring systems and applicable software platforms (typically integrated into Android terminal modules in a cellphone, for daily use) are calling for proposal. Recently, the health cloud platform for arrhythmia detection [9] and the ThingSpeak cloud computing platform [41] on classifying and diagnosing ECG had been proposed to solve some prior problems at different levels. Utilizing deep learning tools and the intelligent information integration platform named as the Internet of Things (IoT) [9, 41], a new follow-up mode of automatic heart monitoring system was developed for real-time remote services among doctors and patients in a long term. The system established a cloud platform on health inquiry, providing medical data management services for online patients. Aiming at reducing potential risks for cardiovascular diseases, this platform offers online assessment, diagnosis, and rehabilitation guidance by relevant doctors [9]. Regarding to offline services, this system relies on existing medical-level biosensors to construct terminals on signal acquisition and processing [9]. For real-time ECG sequence, it provides functions such as collection, exhibition, and analytical monitoring of basic physiological

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

#### *Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning DOI: http://dx.doi.org/10.5772/intechopen.85509*

*Practical Applications of Electrocardiogram*

step size of 1.

and third standard convolutional layers are set as 1 × 2 and 1 × 3, respectively; the convolution kernels of the depthwise convolutional layers match the same size with their follow-up standard convolution layers, their step sizes are set as 1; and the convolution kernel of the pointwise convolution layer is also set as 1 × 1 with

In Step 2, the function of core module lite is to install the squeeze convolution layer on compressing feature data outputted by the upper layer; after the layer of squeezed convolutions, the standard convolutions of three different channels were set to extract data features of different local sizes; the rough data features are transmitted through a depthwise convolution layer and a pointwise convolution layer after the second and the third standard convolutional layers; a residual connection is also constructed on the terminal right side of the squeeze convolution layer; finally, the outputs of filter concatenation are performed after the first standard convolution layer, pointwise convolution layer, and the residual connections [40]. It should be noted that the standard convolution layer in the invented automatic ECG classifier, performs a conventional convolution operation, which is named as standard convolutional layer for distinctions; the compression convolution layer is obtained by compressing the amount of feature data in the upper layer so as to reduce the computational load for convolution operation of the next layer. For example, if the upper layer outputs 10 feature data and the compressed convolution layer sets up five convolution kernels, then 5 feature data will be released, which means the input of next layer has five feature data. Deep convolution and pointwise convolution actually divide the ordinary standard convolution operation into two steps [40]: the first step is to exploit the deep convolution layer to perform convolution operations separately on each feature data of the previous layer, which indicates that a convolution kernel only convolves one feature data. In the second step, the pointwise convolution, which is the 1 × 1 convolution kernel, performs feature

combination operations on the output after deep convolution.

the incidence of heart disease can be significantly reduced [40].

on limited network resources or running memory.

be specifically referred as [40]:

stability of algorithmic model.

By adopting the invented deep learning-based lightweight algorithm and through the setting of a core module, this model is trained to guarantee a certain accuracy in absence of demanding much computational cost. In contrast to other detection algorithms, the proposed scheme takes less time, displays faster prediction, and reduces personal consumption. The well-trained software platform can be embedded into a wearable ECG device or the mobile phone terminals to classify and monitor the collected ECG data, and triggers an alarm in case an abnormality is encountered. The embedded device is not only free of spending extra time affecting daily work, but also arouses people to pay enough attention on cardiac abnormalities and regularly perform physical examination; hence,

Comparing to the existing methods, this deep learning-based lightweight algorithm on invention has substantive features and significant advances, which can

a.Core module stands for an innovative design module of structural fusion, which combines multilayer convolution kernel structure of the famous GoogleNet, the compressive convolution idea of SqueezeNet, and the depth-pointwise convolution on parameter reduction of MobileNets. By implementing the classical AlexNet network structure, the entire framework was designed to ensure the

b.Compared with other algorithms, this invented model does not require many computational parameters while ensures certain recognition effects; it also has the capacity on automatically realizing the processing of sequential ECG data

**10**

As specified by several steps mentioned above, the lightweight algorithm for identifying ECG data based on deep learning can be realized via uniprocessors in parallel computing, in which the convolution manner of each convolution layer is convolution of one-dimensional ECG data [40]. Brief notation on implementation is presented as follows: *x*[*n*] and *y*[*n*] denote the input and the output sequences, respectively; *h*[*n*] represents the convolution kernel weight sequence, *h*[*−k*] represents the inversion of the *h*[*k*] sequence, *h*[*N*−*k*] indicates that *h*[*−k*] is moved by *n* points; *m* stands for the length of input sequence, while the length of output sequence is expressed as len(*x*[*n*]) + len(*h*[*n*]) − 1. Because the classifier function is a SoftMax function classifying five types of ECG data, each type of ECG data is recorded as a neuron in the SoftMax function, which appears in the form as a product of the upper neuron output and the weight of SoftMax function connected to the upper neuron [40]. Hence, by constructing the loss function and the linear regression model, the output probability of each neuron and each neural unit can be modeled through vector calculus and probabilistic interpretation, which finally achieves the prediction value of output.

To sum up, the technical invention [40] provides a deep learning-based lightweight algorithm for automatic ECG data identification and diagnosis, where its procedure consists of extracting the extracted ECG data through a standard convolution layer, and performing rough extraction of data features; while a feature is passed through a max-pooling layer, the core module is sent to the kernel lite module to extract deep data features. Note that after passing the deep data features through a pooled layer max-pooling, those features will be sequentially loaded into two fully connected layers named as dense, in which purification is performed on the hierarchical data features; in the next step, the classifier function takes responsibility for feature classification on the output of purified data features. Compared with other similar schemes on automatic ECG diagnosis [5, 7, 16, 27, 31, 36], the invented lightweight algorithm has been released from requiring large set of calculation parameters but still ensures constant accuracy on recognition effects, which is able to realize parallel processing of ECG data despite of limited network resources or running memory on GPU [40].

#### **4. Automatic detection system for arrhythmias and the Android health cloud platform**

While the current methods on network medical treatments are often restricted to the interactions between doctors and patients via modern communication tools, it is neither possible to establish mutual trust nor collect real-time data. Hence, wearable ECG monitoring systems and applicable software platforms (typically integrated into Android terminal modules in a cellphone, for daily use) are calling for proposal. Recently, the health cloud platform for arrhythmia detection [9] and the ThingSpeak cloud computing platform [41] on classifying and diagnosing ECG had been proposed to solve some prior problems at different levels. Utilizing deep learning tools and the intelligent information integration platform named as the Internet of Things (IoT) [9, 41], a new follow-up mode of automatic heart monitoring system was developed for real-time remote services among doctors and patients in a long term. The system established a cloud platform on health inquiry, providing medical data management services for online patients. Aiming at reducing potential risks for cardiovascular diseases, this platform offers online assessment, diagnosis, and rehabilitation guidance by relevant doctors [9]. Regarding to offline services, this system relies on existing medical-level biosensors to construct terminals on signal acquisition and processing [9]. For real-time ECG sequence, it provides functions such as collection, exhibition, and analytical monitoring of basic physiological

#### **Figure 6.**

*The proposed ThingSpeak online monitoring system for ECG analytics using PCA [41].*

parameters, and constructs a communication platform for doctors and patients with respect to their practical demands. The deep learning-based detection algorithm was integrated into the arrhythmia automatic diagnosis system within the module of health monitoring control, which performs real-time remote surveillance and outputs feedbacks on the ECG signals collected by the biosensors [9].

The system hardware mainly comprises a monitor system and an Android terminal [9]: a monitor system module is responsible for measuring and collecting data of vital signs such as ECG, blood pressure and body temperature, etc., then transmitting real-time data to the Android terminal module via serial port or Bluetooth and thereby completing the tasks of uploading data and synchronous exhibition, followed by performing automatic diagnosis (including real-time analysis) of possible arrhythmia data in the ECG sequence. The hardware of system monitor module adopts PM6750 for medical signal processing. RK3188 development motherboard with quad-core Cortex-A9 processor was chosen for hardware design on the Android terminal module. Original ECG data were sent to the terminal through the monitoring devices where the mode of asynchronous serial port transmission is applied, no parity bit exists, and the baud rate is 115,200 Baud. According to the protocol, Android terminal module parses the restored signal data including waveforms, heart rate and breathing, styles of single-lead or multilead, filtering, and signal gain. The parsed data can be uploaded to the cloud platform and saved as private health data for each client. Historical data can be viewed by each individual at any time through the browser to provide health channels and follow-up support on clinical treatments [9]. While ThingSpeak employed similar datasets on MIT database for ECG data, the proposed online monitoring system displays comparable outputs on ECG signals using principle component analysis (PCA), which is depicted in **Figure 6** [41]. The online MATLAB programs are running through the ThingSpeak IoT cloud for automatic ECG data analysis, which enables doctors to monitor, diagnose, and improve the health of patients [41]; meanwhile, the call for emergency service ensures local first-aid institutions to respond at prompt time in order to minimize any risk issues in absence of proper treatments [9, 41].

In another scenario on the workflow of system, the automatic arrhythmia detection system starts with a network of bio-sensors, where the input signals follow the arranged entry to the bio-data acquisition module followed by the control module on health monitoring, and then uploaded into the cardiovascular health cloud platform for data analysis in Android systems [9]. Those mobile devices provide supplemental aid on building up virtual human models in digital physiological bases, simulating medical plans on treatment and predicting potential risks on disease. With the helpful support of remote clinical diagnosis in collaboration of artificial intelligence-based solutions such as electronic health and digital medicine plans, the comprehensive online medical cloud platform will come into reality very soon [9]. For broader applications on biomedical data management and access, Navale and Bourne [42] proposed a conceptual framework to show how the data

**13**

**Figure 7.**

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

producers, consumers and repositories got integrated via a cloud-based platform; meanwhile, the open data and analytics must follow the principle of findable, accessible, interoperable and reusable (FAIR) to upgrade the discovery and innovation of knowledge. The architecture-based conceptual framework was depicted in **Figure 7**,

*The architecture of conceptual framework on cloud-based platform: variable data types flow between producers and consumers in support of the FAIR principle and in demands of different data level needs [42].*

In this chapter, we have established a study on deep learning theory related to automatic diagnosis on abnormal electrocardiogram (ECG). We briefly introduced the most recent automatic detecting schemes such as convolutional neural networks (CNN), recurrent neural networks (RNN) [9, 22, 34, 39], and its variation of longshort-term memory (LSTM) model [18, 22], which aims on analyzing different types of cardiac arrhythmias. We presented an investigation of practical examples and applications of deep learning on automatic ECG diagnosis [5, 7, 16, 27, 31, 36], which consists of a deep learning-based lightweight classifier on ECG data identification, deep belief network (DBN) [1, 8, 28] on diagnosing cardiac arrhythmia via wearable ECG monitoring devices, and a health cloud platform on automatic ECG detection, data mining and classification. We combined the theoretical concepts of artificial intelligence (AI)-oriented topics such as deep learning, big data health cloud platform to real medical applications, i.e., minishape ECG monitoring devices [9, 41], domestic cardiac arrhythmia analyzer [40], automatic ECG diagnosis on

where API stands for applicable programming interface [42].

**5. Discussions and conclusions**

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

#### **Figure 7.**

*Practical Applications of Electrocardiogram*

**Figure 6.**

parameters, and constructs a communication platform for doctors and patients with respect to their practical demands. The deep learning-based detection algorithm was integrated into the arrhythmia automatic diagnosis system within the module of health monitoring control, which performs real-time remote surveillance and

The system hardware mainly comprises a monitor system and an Android terminal [9]: a monitor system module is responsible for measuring and collecting data of vital signs such as ECG, blood pressure and body temperature, etc., then transmitting real-time data to the Android terminal module via serial port or Bluetooth and thereby completing the tasks of uploading data and synchronous exhibition, followed by performing automatic diagnosis (including real-time analysis) of possible arrhythmia data in the ECG sequence. The hardware of system monitor module adopts PM6750 for medical signal processing. RK3188 development motherboard with quad-core Cortex-A9 processor was chosen for hardware design on the Android terminal module. Original ECG data were sent to the terminal through the monitoring devices where the mode of asynchronous serial port transmission is applied, no parity bit exists, and the baud rate is 115,200 Baud. According to the protocol, Android terminal module parses the restored signal data including waveforms, heart rate and breathing, styles of single-lead or multilead, filtering, and signal gain. The parsed data can be uploaded to the cloud platform and saved as private health data for each client. Historical data can be viewed by each individual at any time through the browser to provide health channels and follow-up support on clinical treatments [9]. While ThingSpeak employed similar datasets on MIT database for ECG data, the proposed online monitoring system displays comparable outputs on ECG signals using principle component analysis (PCA), which is depicted in **Figure 6** [41]. The online MATLAB programs are running through the ThingSpeak IoT cloud for automatic ECG data analysis, which enables doctors to monitor, diagnose, and improve the health of patients [41]; meanwhile, the call for emergency service ensures local first-aid institutions to respond at prompt time

outputs feedbacks on the ECG signals collected by the biosensors [9].

*The proposed ThingSpeak online monitoring system for ECG analytics using PCA [41].*

in order to minimize any risk issues in absence of proper treatments [9, 41].

In another scenario on the workflow of system, the automatic arrhythmia detection system starts with a network of bio-sensors, where the input signals follow the arranged entry to the bio-data acquisition module followed by the control module on health monitoring, and then uploaded into the cardiovascular health cloud platform for data analysis in Android systems [9]. Those mobile devices provide supplemental aid on building up virtual human models in digital physiological bases, simulating medical plans on treatment and predicting potential risks on disease. With the helpful support of remote clinical diagnosis in collaboration of artificial intelligence-based solutions such as electronic health and digital medicine plans, the comprehensive online medical cloud platform will come into reality very soon [9]. For broader applications on biomedical data management and access, Navale and Bourne [42] proposed a conceptual framework to show how the data

**12**

*The architecture of conceptual framework on cloud-based platform: variable data types flow between producers and consumers in support of the FAIR principle and in demands of different data level needs [42].*

producers, consumers and repositories got integrated via a cloud-based platform; meanwhile, the open data and analytics must follow the principle of findable, accessible, interoperable and reusable (FAIR) to upgrade the discovery and innovation of knowledge. The architecture-based conceptual framework was depicted in **Figure 7**, where API stands for applicable programming interface [42].

#### **5. Discussions and conclusions**

In this chapter, we have established a study on deep learning theory related to automatic diagnosis on abnormal electrocardiogram (ECG). We briefly introduced the most recent automatic detecting schemes such as convolutional neural networks (CNN), recurrent neural networks (RNN) [9, 22, 34, 39], and its variation of longshort-term memory (LSTM) model [18, 22], which aims on analyzing different types of cardiac arrhythmias. We presented an investigation of practical examples and applications of deep learning on automatic ECG diagnosis [5, 7, 16, 27, 31, 36], which consists of a deep learning-based lightweight classifier on ECG data identification, deep belief network (DBN) [1, 8, 28] on diagnosing cardiac arrhythmia via wearable ECG monitoring devices, and a health cloud platform on automatic ECG detection, data mining and classification. We combined the theoretical concepts of artificial intelligence (AI)-oriented topics such as deep learning, big data health cloud platform to real medical applications, i.e., minishape ECG monitoring devices [9, 41], domestic cardiac arrhythmia analyzer [40], automatic ECG diagnosis on

Android terminal modules [9] and the conceptual framework on managing and accessing biomedical data [42]. Technical advantages such as low-power consumption, higher accuracy, better reliability, and cost saving on the links of feasible software/hardware implementations to automatic cardiac arrhythmia diagnosis prospects broader applications of deep learning on ECG and other data analytics on medical imaging.

### **Author details**

Xin Gao Department of Electrical and Computer Engineering, The University of Arizona, Tucson, AZ, USA

\*Address all correspondence to: xgao1985@email.arizona.edu

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

**15**

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

[9] Gao Y. Deep learning based

[10] Hu S, Wei HX, Chen YD, Tan JD. A real-time cardiac arrhythmia classification system with wearable

2012;**12**:12844-12869. DOI:10.3390/

[11] Hu X, Yu ZB. Diagnosis of mesothelioma with deep learning. Oncology Letters. Oct 2018:1-8. DOI:

[12] Hsing MJ, Hsia HH, Cardiac Arrhythmias. 2010:341-374. DOI: 10.1007/978-0-387-77452-7\_19

[13] Isin A, Ozdalili S. Cardiac arrhythmia detection using deep learning. Procedia Computer Science.

[14] Jin LP, Dong J. Deep learning research on clinical electrocardiogram analysis. China Science: Information

[15] Jin LP, Dong J. Normal versus abnormal ECG classification by the aid of deep learning. Artificial Intelligence – Emerging Trends and Applications. InTech Open; 2018. pp. 295-315

[16] Kamaleswaran R, Mahajan R, Akbilgic O. A robust deep convolutional neural network for the classification of abnormal cardiac rhythm using varying length single lead electrocardiogram. Physiological Measurement. Jan 2018: 1-12. DOI: 10.1088/1361-6579/aaaa9d

[17] Lee YN, Kwon JM, Lee YH, Park HH, Cho H, Park JS. Deep learning in the medical domain: predicting cardiac arrest using deep learning. Acute and Critical Care. 2018;**33**(3):117-120

Science. 2015;**45**(3):398-416

10.3892/ol.2018.9761

2017;**120**:268-275

sensor networks. Sensors.

2016:1-61

s120912844

automatic detection of arrhythmia and its applications. Thesis in Shandong University of Science and Technology,

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

[1] Altan G, Allahverdi N, Kutlu Y. A multistage deep learning algorithm for detecting arrhythmia. 1st International Conference on Computer Applications & Information Security (ICCAIS). Riyadh: 2018. pp. 1-5; DOI: 10.1109/

[2] Anonymous. Professors in Stanford University of USA developed a new algorithm on diagnosing 13 types of arrhythmias. Journal of Practical Electrocardiology. 2017;**26**(4):246

[3] Behzadi M, Joukar S, Beik A. Opioids and cardiac arrhythmia: a literature review. Medical Principles and Practice.

[4] Bravo-Valenzuela NJ, Rocha LA, Nardozza LMM, Júnior EA. Fetal cardiac arrhythmias: current evidence. Annals of Pediatric Cardiology. May-

[5] Chen KM, Powers LS, Roveda JM. Noise-invariant component analysis for wearable sensor based electrocardiogram monitoring system. SM Journal of Biomedical Engineering.

[6] Chen YM, Gao X. The latest progress of deep learning. Computer Science and Applications. 2018;**8**(4):565-571. DOI:

[7] Fan XM, Yao QH, Cai YP, Miao F, Sun FM, Li Y. Multi-scaled fusion of deep convolutional neural networks for screening atrial fibrillation from single lead short ECG recordings. IEEE Journal of Biomedical and Health Informatics.

[8] Gao X. Non-invasive detection and compression of fetal electrocardiogram. Interpreting Cardiac Electrograms – From Skin to Endocardium, 2017: 53-74. http://dx.doi.org/10.5772/

CAIS.2018.8441942

**References**

2018;**27**:401-414

2018;**4**(1):1025

Aug 2018;**11**(2):148-163

10.12677/csa.2018.84064

2018;**22**(6):1744-1753

intechopen.69920

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning DOI: http://dx.doi.org/10.5772/intechopen.85509*

#### **References**

*Practical Applications of Electrocardiogram*

medical imaging.

Android terminal modules [9] and the conceptual framework on managing and accessing biomedical data [42]. Technical advantages such as low-power consumption, higher accuracy, better reliability, and cost saving on the links of feasible software/hardware implementations to automatic cardiac arrhythmia diagnosis prospects broader applications of deep learning on ECG and other data analytics on

**14**

**Author details**

Tucson, AZ, USA

Xin Gao

provided the original work is properly cited.

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

Department of Electrical and Computer Engineering, The University of Arizona,

\*Address all correspondence to: xgao1985@email.arizona.edu

[1] Altan G, Allahverdi N, Kutlu Y. A multistage deep learning algorithm for detecting arrhythmia. 1st International Conference on Computer Applications & Information Security (ICCAIS). Riyadh: 2018. pp. 1-5; DOI: 10.1109/ CAIS.2018.8441942

[2] Anonymous. Professors in Stanford University of USA developed a new algorithm on diagnosing 13 types of arrhythmias. Journal of Practical Electrocardiology. 2017;**26**(4):246

[3] Behzadi M, Joukar S, Beik A. Opioids and cardiac arrhythmia: a literature review. Medical Principles and Practice. 2018;**27**:401-414

[4] Bravo-Valenzuela NJ, Rocha LA, Nardozza LMM, Júnior EA. Fetal cardiac arrhythmias: current evidence. Annals of Pediatric Cardiology. May-Aug 2018;**11**(2):148-163

[5] Chen KM, Powers LS, Roveda JM. Noise-invariant component analysis for wearable sensor based electrocardiogram monitoring system. SM Journal of Biomedical Engineering. 2018;**4**(1):1025

[6] Chen YM, Gao X. The latest progress of deep learning. Computer Science and Applications. 2018;**8**(4):565-571. DOI: 10.12677/csa.2018.84064

[7] Fan XM, Yao QH, Cai YP, Miao F, Sun FM, Li Y. Multi-scaled fusion of deep convolutional neural networks for screening atrial fibrillation from single lead short ECG recordings. IEEE Journal of Biomedical and Health Informatics. 2018;**22**(6):1744-1753

[8] Gao X. Non-invasive detection and compression of fetal electrocardiogram. Interpreting Cardiac Electrograms – From Skin to Endocardium, 2017: 53-74. http://dx.doi.org/10.5772/ intechopen.69920

[9] Gao Y. Deep learning based automatic detection of arrhythmia and its applications. Thesis in Shandong University of Science and Technology, 2016:1-61

[10] Hu S, Wei HX, Chen YD, Tan JD. A real-time cardiac arrhythmia classification system with wearable sensor networks. Sensors. 2012;**12**:12844-12869. DOI:10.3390/ s120912844

[11] Hu X, Yu ZB. Diagnosis of mesothelioma with deep learning. Oncology Letters. Oct 2018:1-8. DOI: 10.3892/ol.2018.9761

[12] Hsing MJ, Hsia HH, Cardiac Arrhythmias. 2010:341-374. DOI: 10.1007/978-0-387-77452-7\_19

[13] Isin A, Ozdalili S. Cardiac arrhythmia detection using deep learning. Procedia Computer Science. 2017;**120**:268-275

[14] Jin LP, Dong J. Deep learning research on clinical electrocardiogram analysis. China Science: Information Science. 2015;**45**(3):398-416

[15] Jin LP, Dong J. Normal versus abnormal ECG classification by the aid of deep learning. Artificial Intelligence – Emerging Trends and Applications. InTech Open; 2018. pp. 295-315

[16] Kamaleswaran R, Mahajan R, Akbilgic O. A robust deep convolutional neural network for the classification of abnormal cardiac rhythm using varying length single lead electrocardiogram. Physiological Measurement. Jan 2018: 1-12. DOI: 10.1088/1361-6579/aaaa9d

[17] Lee YN, Kwon JM, Lee YH, Park HH, Cho H, Park JS. Deep learning in the medical domain: predicting cardiac arrest using deep learning. Acute and Critical Care. 2018;**33**(3):117-120

[18] Li X. Research of arrhythmia classification based on LSTM. Thesis in Lanzhou University. 2018:1-58

[19] Kalidas V, Tamil LS. Cardiac arrhythmia classification using multimodal signal analysis. Physiological Measurement. 2016;**37**:1253-1272. DOI: 10.1088/0967-3334/37/8/1253

[20] Kalra A, Lowe A, Al-Jumaily A. Critical review of electrocardiography measurement systems and technology. Nov 2018. DOI: 10.1088/1361-6501/ aaf2b7

[21] Krishna MM, Neelima M, Harshali M, Rao MVG. Image classification using deep learning. International Journal of Engineering & Technology. 2018;**7**(2.7):614-617

[22] Oh SL, Ng EYK, Tan RS, Acharya UR. Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats. Computers in Biology and Medicine. June 2018. pp. 1-24. DOI: 10.1016/j.compbiomed.2018.06.002

[23] Papadopoulos CH, Oikonomidis D, Lazaris E, Nihoyannopoulos P. Echocardiography and cardiac arrhythmias, Hellenic Journal of Cardiology. 2017:1-10. https://doi. org/10.1016/j.hjc.2017.11.017

[24] Pourbabaee B, Roshtkhari MJ, Khorasani K. Deep convolutional neural networks and learning ECG features for screening paroxysmal atrial fibrillation patients. IEEE Transactions on Systems, Man, and Cybernetics: Systems. 2018;**48**(12):2095-2104

[25] Pyakillya B, Kazachenko N, Mikhailovsky N. Deep learning for ECG classification. Journal of Physics: Conf. Series. 2017;**913**:012004. DOI: 10.1088/1742-6596/913/1/012004

[26] Rajagopal R, Ranganathan V. Critical evaluation of linear

dimensionality reduction techniques for cardiac arrhythmia classification. Circuits and Systems. 2016;**7**:2603-2612

[27] Sanninoa G, Pietroa GD. Deep learning approach for ECG-based heartbeat classification for arrhythmia detection. Journal of Future Generation Computer Systems. 2018

[28] Savalia S, Emamian V. Cardiac arrhythmia classification by multi-layer perceptron and convolution neural networks. Bioengineering. 2018;**5**(35): 1-12. DOI:10.3390/bioengineering5020035

[29] Shahreyar M, Fahhoum R, Akinseye O, Bhandari S, Dang G, Khouzam RN. Severe sepsis and cardiac arrhythmias. Annuals of Translational Medicine. 2018;**6**(1). DOI: 10.21037/atm.2017.12.26

[30] Sun TK, Bao R, Jiang DH, Wang K. Security technology of the big cloud data based on deep learning. Computer Science and Applications. 2015;**5**(9):336-342

[31] Xia YF, Gao ZF, Zhang HL, Zhang HY, Li S. An automatic cardiac arrhythmia classification system with wearable electrocardiogram. IEEE Access. 2018. DOI: 10.1109/ ACCESS.2018.2807700

[32] Xia YF, Zhang HL, Xu L, Gao ZF, Zhang HY, Liu HF, Li S. An automatic cardiac arrhythmia classification system with wearable electrocardiogram. IEEE Access. 2018;**6**:165529-16538

[33] Yap J, Yolland W, Tschandl P. Multimodal skin lesion classification using deep learning. Experimental Dermatology. 2018;**00**:1-7. https://doi. org/10.1111/exd.13777

[34] Zhan YJ, Wang J, Shi JP, Cheng GL, Yao LL, Sun WD. Distinguishing cloud and snow in satellite images via deep convolutional network. IEEE Geoscience and Remote Sensing Letters. 2017;**14**(10):1485-1489

**17**

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning*

*DOI: http://dx.doi.org/10.5772/intechopen.85509*

[35] Zhang R, Li WP, Tong M. Review of deep learning. Information and Control.

[36] Zhong W, Liao LJ, Guo XM, Wang GL. A deep learning approach for fetal QRS complex detection, Physiological Measurement. 2018;**39**(4):045004(9pp).

DOI: 10.1088/1361-6579/aab297

[37] Zhu YL, Lu ST, Dai RC, Liu GY, Wang ZW. Power market price forecasting via deep learning. 44th Annual Conference of the IEEE. Washington DC, USA: Industrial Electronics Society (IECON); 21-23 Oct 2018. https://arxiv.org/abs/1809.08092

[38] Rajpurkar P, Hannun AY, Haghpanahi M, Bourn C, Ng, AY. Cardiologist-level arrhythmia detection with convolutional neural networks. [Online] Available: arxiv.org/

[39] Ribeiro AH, Ribeiro MH, Paixão G, Oliveira D, Gomes PR, Canazart JA, Pifano M, Meira-Jr. W, Schön TB, Ribeiro AL. Automatic diagnosis of short-duration 12-lead ECG using a deep convolutional network. [Online] Available: arxiv.org/pdf/1811.12194.

[40] A deep learning-based lightweight algorithm for identifying ECG data. [Online] Available: http://www.xjishu. com/zhuanli/55/201810353923.html

[41] Thingspeak cloud computing platform based ECG diagnose system. [Online] Available: http://www.researchgate.net/ publication/328042628\_Thingspeak\_ Cloud\_Computing\_Platform\_Based\_

ECG\_Diagnose\_System

[42] Navale V and Bourne PE. Cloud computing applications for biomedical science: a perspective. PLoS Computational Biology. 2018;**14**(6):e1006144. https://doi. org/10.1371/journal.pcbi.1006144

pdf/1707.01836.pdf

pdf

2018;**47**(4):385-397

*Diagnosing Abnormal Electrocardiogram (ECG) via Deep Learning DOI: http://dx.doi.org/10.5772/intechopen.85509*

[35] Zhang R, Li WP, Tong M. Review of deep learning. Information and Control. 2018;**47**(4):385-397

*Practical Applications of Electrocardiogram*

[18] Li X. Research of arrhythmia classification based on LSTM. Thesis in dimensionality reduction techniques for cardiac arrhythmia classification. Circuits and Systems. 2016;**7**:2603-2612

[27] Sanninoa G, Pietroa GD. Deep learning approach for ECG-based heartbeat classification for arrhythmia detection. Journal of Future Generation

[28] Savalia S, Emamian V. Cardiac arrhythmia classification by multi-layer perceptron and convolution neural networks. Bioengineering. 2018;**5**(35): 1-12. DOI:10.3390/bioengineering5020035

[29] Shahreyar M, Fahhoum R, Akinseye O, Bhandari S, Dang G, Khouzam RN. Severe sepsis and cardiac arrhythmias. Annuals of Translational Medicine. 2018;**6**(1). DOI: 10.21037/atm.2017.12.26

[30] Sun TK, Bao R, Jiang DH, Wang K. Security technology of the big cloud data based on deep learning. Computer Science and Applications.

[31] Xia YF, Gao ZF, Zhang HL, Zhang HY, Li S. An automatic cardiac arrhythmia classification system with wearable electrocardiogram. IEEE Access. 2018. DOI: 10.1109/

[32] Xia YF, Zhang HL, Xu L, Gao ZF, Zhang HY, Liu HF, Li S. An automatic cardiac arrhythmia classification system with wearable electrocardiogram. IEEE

2015;**5**(9):336-342

ACCESS.2018.2807700

Access. 2018;**6**:165529-16538

org/10.1111/exd.13777

2017;**14**(10):1485-1489

[33] Yap J, Yolland W, Tschandl P. Multimodal skin lesion classification using deep learning. Experimental Dermatology. 2018;**00**:1-7. https://doi.

[34] Zhan YJ, Wang J, Shi JP, Cheng GL, Yao LL, Sun WD. Distinguishing cloud and snow in satellite images via deep convolutional network. IEEE Geoscience and Remote Sensing Letters.

Computer Systems. 2018

Lanzhou University. 2018:1-58

10.1088/0967-3334/37/8/1253

aaf2b7

2018;**7**(2.7):614-617

[20] Kalra A, Lowe A, Al-Jumaily A. Critical review of electrocardiography measurement systems and technology. Nov 2018. DOI: 10.1088/1361-6501/

[21] Krishna MM, Neelima M, Harshali M, Rao MVG. Image classification using deep learning. International Journal of Engineering & Technology.

[22] Oh SL, Ng EYK, Tan RS, Acharya UR. Automated diagnosis of arrhythmia using combination of CNN and LSTM techniques with variable length heart beats. Computers in Biology and Medicine. June 2018. pp. 1-24. DOI: 10.1016/j.compbiomed.2018.06.002

[23] Papadopoulos CH, Oikonomidis D,

Lazaris E, Nihoyannopoulos P. Echocardiography and cardiac arrhythmias, Hellenic Journal of Cardiology. 2017:1-10. https://doi. org/10.1016/j.hjc.2017.11.017

[24] Pourbabaee B, Roshtkhari MJ, Khorasani K. Deep convolutional neural networks and learning ECG features for screening paroxysmal atrial fibrillation patients. IEEE Transactions on Systems,

Man, and Cybernetics: Systems.

[25] Pyakillya B, Kazachenko N, Mikhailovsky N. Deep learning for ECG classification. Journal of Physics: Conf. Series. 2017;**913**:012004. DOI: 10.1088/1742-6596/913/1/012004

[26] Rajagopal R, Ranganathan V. Critical evaluation of linear

2018;**48**(12):2095-2104

[19] Kalidas V, Tamil LS. Cardiac arrhythmia classification using multimodal signal analysis. Physiological Measurement. 2016;**37**:1253-1272. DOI:

**16**

[36] Zhong W, Liao LJ, Guo XM, Wang GL. A deep learning approach for fetal QRS complex detection, Physiological Measurement. 2018;**39**(4):045004(9pp). DOI: 10.1088/1361-6579/aab297

[37] Zhu YL, Lu ST, Dai RC, Liu GY, Wang ZW. Power market price forecasting via deep learning. 44th Annual Conference of the IEEE. Washington DC, USA: Industrial Electronics Society (IECON); 21-23 Oct 2018. https://arxiv.org/abs/1809.08092

[38] Rajpurkar P, Hannun AY, Haghpanahi M, Bourn C, Ng, AY. Cardiologist-level arrhythmia detection with convolutional neural networks. [Online] Available: arxiv.org/ pdf/1707.01836.pdf

[39] Ribeiro AH, Ribeiro MH, Paixão G, Oliveira D, Gomes PR, Canazart JA, Pifano M, Meira-Jr. W, Schön TB, Ribeiro AL. Automatic diagnosis of short-duration 12-lead ECG using a deep convolutional network. [Online] Available: arxiv.org/pdf/1811.12194. pdf

[40] A deep learning-based lightweight algorithm for identifying ECG data. [Online] Available: http://www.xjishu. com/zhuanli/55/201810353923.html

[41] Thingspeak cloud computing platform based ECG diagnose system. [Online] Available: http://www.researchgate.net/ publication/328042628\_Thingspeak\_ Cloud\_Computing\_Platform\_Based\_ ECG\_Diagnose\_System

[42] Navale V and Bourne PE. Cloud computing applications for biomedical science: a perspective. PLoS Computational Biology. 2018;**14**(6):e1006144. https://doi. org/10.1371/journal.pcbi.1006144

Chapter 2

Mostafa Laaboubi

analyzing the ECG signals.

1. Introduction

19

Abstract

Combination of the CEEM

for ECG Signals Analysis

Decomposition with Adaptive

Azzedine Dliou, Samir Elouaham, Rachid Latif and

Keywords: ECG, CEEMDAN, periodogram, time-frequency, denoising

The heart function can be obtained by storing the voltage variations which occur on some parts of the human body surface [1–3]. The electrocardiogram (ECG) is the record of those voltage variations over time. This biomedical signal presents a fundamental tool used in cardiology to detect cardiac diseases. The normal ECG signal is characterized by a sequence of some well-defined components as P wave, QRS complex, and T wave [1–3]. ECG signals are most of the time contaminated by different noise sources, like power-line interference, baseline wander, muscle noise and motion artifact, and other noises, which in different cases make the

Noise and Periodogram Technique

The electrocardiogram (ECG) signal is a fundamental tool for patient treatment, especially in the cardiology domain, due to the high mortality rate of heart diseases. The main objective of this paper is to present the most optimal techniques that can link the processing and analysis of ECG signals. This work is divided into two steps. In the first one, we propose a comparison between some denoising techniques that can reduce noise affecting the ECG signals; these techniques are the empirical mode decomposition (EMD), the ensemble empirical mode decomposition (EEMD), and the complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN). In the second one, we make a comparison of three time-frequency techniques: the Choi-Williams (CW), the periodogram (PE), and the smoothed pseudo Wigner-Ville (SPWV). Firstly, the obtained results illustrate the effectiveness of the CEEMDAN in reducing noise that interferes with ECG signals compared to other denoising methods. Secondly, they show that the periodogram time-frequency technique gives a good detection and localization of the main components in the time-frequency plan of ECG signals. This work proves the utility of the combination of the periodogram and CEEMDAN techniques in

#### Chapter 2

## Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique for ECG Signals Analysis

Azzedine Dliou, Samir Elouaham, Rachid Latif and Mostafa Laaboubi

#### Abstract

The electrocardiogram (ECG) signal is a fundamental tool for patient treatment, especially in the cardiology domain, due to the high mortality rate of heart diseases. The main objective of this paper is to present the most optimal techniques that can link the processing and analysis of ECG signals. This work is divided into two steps. In the first one, we propose a comparison between some denoising techniques that can reduce noise affecting the ECG signals; these techniques are the empirical mode decomposition (EMD), the ensemble empirical mode decomposition (EEMD), and the complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN). In the second one, we make a comparison of three time-frequency techniques: the Choi-Williams (CW), the periodogram (PE), and the smoothed pseudo Wigner-Ville (SPWV). Firstly, the obtained results illustrate the effectiveness of the CEEMDAN in reducing noise that interferes with ECG signals compared to other denoising methods. Secondly, they show that the periodogram time-frequency technique gives a good detection and localization of the main components in the time-frequency plan of ECG signals. This work proves the utility of the combination of the periodogram and CEEMDAN techniques in analyzing the ECG signals.

Keywords: ECG, CEEMDAN, periodogram, time-frequency, denoising

#### 1. Introduction

The heart function can be obtained by storing the voltage variations which occur on some parts of the human body surface [1–3]. The electrocardiogram (ECG) is the record of those voltage variations over time. This biomedical signal presents a fundamental tool used in cardiology to detect cardiac diseases. The normal ECG signal is characterized by a sequence of some well-defined components as P wave, QRS complex, and T wave [1–3]. ECG signals are most of the time contaminated by different noise sources, like power-line interference, baseline wander, muscle noise and motion artifact, and other noises, which in different cases make the

identification of standard ECG features very difficult and lead to a misjudgment of patient diagnostic [4]. Consequently, to deal with this problem, a task of removing noise from ECG signal, as preprocessing step, has become very important.

2. Theory background

expression:

analyzed signal.

algorithm [5]:

expression:

residue.

21

2.1 Denoising techniques used

2.1.1 Empirical mode decomposition (EMD)

DOI: http://dx.doi.org/10.5772/intechopen.86007

where r(t) is the low-frequency residue.

Two conditions must be satisfied by each IMFJ(t):

Step 1: Extraction of the signal x(t) extreme.

Step 4: Deduction of dJ(t) = IMFJ(t), a local detail by

Step 5: The expression (1) gives the iteration.

emax(t) (resp. lower emin(t)) is deduced.

Huang et al. had defined a tool named EMD to decompose adaptively a signal in

adaptively by the EMD technique into a sum of functions oscillatory band-limited d(t). These functions, called intrinsic mode functions IMFJ(t), oscillate around zero. The intrinsic mode functions can express the signal x(t) by the following

• The zero crossings and extreme signal numbers must be equal all over the

Step 2: By the maximum interpolation (resp. minima), an upper envelope

Step 3: The half envelope sum is defined as a local average m(t) by the following

The high frequency terms are contained in the first IMF, which also involves the following terms of decreasing frequency up to forwarding only a low-frequency

m tðÞ¼ ð Þ emaxðÞþt eminð Þt =2 (2)

d tðÞ¼ x tðÞ� m tð Þ (3)

• The envelope average defined by signal local extreme must be equal to 0 at any point. On the one hand, the low-oscillation components are represented by the higher-order IMFJ(t), and on the other hand, the fast ones are presented by lower-order IMFJ(t). The IMFJ(t) number is variable for different decomposed signals and depends on the signal spectral content. The technical aspects of the EMD implementation are decomposed on five steps given by the following

djð Þþt r tð Þ (1)

x tðÞ¼ ∑ k j¼1

a set of AM-FM components [5]. No mathematical foundations or analytical expressions have been proposed for the technique theoretical study. In various domains, such as biomedicine, acoustics, seismology, or study of climate phenomena, the EMD has been used successfully in several works to treat real data [20, 21]. These studies had provided satisfaction and good results in signal processing, especially for nonstationary ones. A nonstationary signal is decomposed

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

To tackle this problem, the first part of the current work proposes a comparison study of the following denoising methods, empirical mode decomposition (EMD), ensemble empirical mode decomposition (EEMD), and complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN), to define which one gives the best results in the case of the normal and abnormal ECG signals.

Huang et al. [5] have introduced the empirical mode decomposition (EMD) method to analyze nonstationary and nonlinear signals. The EMD major advantage is that the basic functions are derived from the signal itself; however, the EMD process presents a mode mixing. To surmount this problem, we resort to ensemble empirical mode decomposition (EEMD); this denoising method employs EMD to integrated signals with white Gaussian noise [6]. Even so, signals with added noise can produce a large number of iterations in the EEMD process, and signal result holds residual noise after decomposition. These downsides are resolved with a variant denoising method, called CEEMDAN; this technique achieves an accurate original signal reconstruction. The CEEMDAN iteration number is minus than half of the EEMD iteration number [7].

Traditionally, ECG signal, are analyzed in the time domain by skilled physicians. However, detecting pathological conditions in the time domain is not always evident [8]. The precision and the exactitude of the diagnosis are in relation with the cardiologist experience and the concentration rate.

This fact has incentive applying the frequency domain techniques, such as Fourier transform (FT) analysis [9]. The development of the Cooley-Tukey algorithm made Fourier techniques widely available; this algorithm allows the use of the computation more efficient [10]. However, the ECG signals are multicomponent nonstationary signals [8]; accurate time-varying spectral estimates can be extremely difficult to obtain with Fourier techniques which give only globally averaged information.

To overcome this problem, time-frequency techniques can be a good solution. These techniques can reveal the multicomponent nature of such signals and how the signal spectrum evolves over time [11–13].

Time-frequency techniques can be classified into two major categories: parametric and nonparametric techniques. Nonparametric time-frequency techniques present a good solution for analyzing multicomponent nonstationary signal [13–15]. However, these techniques suffer from the presence of cross-terms [16–18], which can hide the interesting signal information. A lot of efforts have been made to select the best timefrequency technique which provides a low degree of cross-term effect [13–18].

The second part of the this work is consecrated to compare three time-frequency techniques, Choi-Williams (CW), periodogram (PE), and smoothed pseudo Wigner-Ville (SPWV), to deliver which one furnishes the best results in analysis terms of this type of biomedical signals.

The signals that will be the subject of this comparative study are extracted from [19]. These signals are chosen with different pathologies and variant forms in order to make the study more credible.

This paper is organized as follows: the "Theoretical background" section is dedicated to present the chosen denoising methods, the three time-frequency techniques, and the selected ECG signals. For a qualitative performance, comparison of the denoising methods and the time-frequency techniques is performed in the "Results and discussion" section, accompanied with a discussion of the obtained results. Finally, this study is concluded with a "Conclusion" section.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

#### 2. Theory background

identification of standard ECG features very difficult and lead to a misjudgment of patient diagnostic [4]. Consequently, to deal with this problem, a task of removing

Huang et al. [5] have introduced the empirical mode decomposition (EMD) method to analyze nonstationary and nonlinear signals. The EMD major advantage is that the basic functions are derived from the signal itself; however, the EMD process presents a mode mixing. To surmount this problem, we resort to ensemble empirical mode decomposition (EEMD); this denoising method employs EMD to integrated signals with white Gaussian noise [6]. Even so, signals with added noise can produce a large number of iterations in the EEMD process, and signal result holds residual noise after decomposition. These downsides are resolved with a variant denoising method, called CEEMDAN; this technique achieves an accurate original signal reconstruction. The CEEMDAN iteration number is minus than half

Traditionally, ECG signal, are analyzed in the time domain by skilled physicians. However, detecting pathological conditions in the time domain is not always evident [8]. The precision and the exactitude of the diagnosis are in relation with the

This fact has incentive applying the frequency domain techniques, such as Fourier transform (FT) analysis [9]. The development of the Cooley-Tukey algorithm made Fourier techniques widely available; this algorithm allows the use of the computation more efficient [10]. However, the ECG signals are multicomponent nonstationary signals [8]; accurate time-varying spectral estimates can be extremely difficult to obtain with Fourier techniques which give only globally

To overcome this problem, time-frequency techniques can be a good solution. These techniques can reveal the multicomponent nature of such signals and how the

Time-frequency techniques can be classified into two major categories: parametric and nonparametric techniques. Nonparametric time-frequency techniques present a good solution for analyzing multicomponent nonstationary signal [13–15]. However, these techniques suffer from the presence of cross-terms [16–18], which can hide the interesting signal information. A lot of efforts have been made to select the best timefrequency technique which provides a low degree of cross-term effect [13–18].

The second part of the this work is consecrated to compare three time-frequency

The signals that will be the subject of this comparative study are extracted from [19]. These signals are chosen with different pathologies and variant forms in order

This paper is organized as follows: the "Theoretical background" section is dedicated to present the chosen denoising methods, the three time-frequency techniques, and the selected ECG signals. For a qualitative performance, comparison of the denoising methods and the time-frequency techniques is performed in the "Results and discussion" section, accompanied with a discussion of the obtained

results. Finally, this study is concluded with a "Conclusion" section.

techniques, Choi-Williams (CW), periodogram (PE), and smoothed pseudo Wigner-Ville (SPWV), to deliver which one furnishes the best results in analysis

To tackle this problem, the first part of the current work proposes a comparison study of the following denoising methods, empirical mode decomposition (EMD), ensemble empirical mode decomposition (EEMD), and complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN), to define which one gives the best results in the case of the normal and abnormal ECG signals.

noise from ECG signal, as preprocessing step, has become very important.

of the EEMD iteration number [7].

Practical Applications of Electrocardiogram

averaged information.

cardiologist experience and the concentration rate.

signal spectrum evolves over time [11–13].

terms of this type of biomedical signals.

to make the study more credible.

20

#### 2.1 Denoising techniques used

#### 2.1.1 Empirical mode decomposition (EMD)

Huang et al. had defined a tool named EMD to decompose adaptively a signal in a set of AM-FM components [5]. No mathematical foundations or analytical expressions have been proposed for the technique theoretical study. In various domains, such as biomedicine, acoustics, seismology, or study of climate phenomena, the EMD has been used successfully in several works to treat real data [20, 21]. These studies had provided satisfaction and good results in signal processing, especially for nonstationary ones. A nonstationary signal is decomposed adaptively by the EMD technique into a sum of functions oscillatory band-limited d(t). These functions, called intrinsic mode functions IMFJ(t), oscillate around zero. The intrinsic mode functions can express the signal x(t) by the following expression:

$$\mathbf{x}(t) = \sum\_{j=1}^{k} d\_j(t) + r(t) \tag{1}$$

where r(t) is the low-frequency residue. Two conditions must be satisfied by each IMFJ(t):


Step 1: Extraction of the signal x(t) extreme.

Step 2: By the maximum interpolation (resp. minima), an upper envelope emax(t) (resp. lower emin(t)) is deduced.

Step 3: The half envelope sum is defined as a local average m(t) by the following expression:

$$m(t) = (e\_{\max}(t) + e\_{\min}(t))/2\tag{2}$$

Step 4: Deduction of dJ(t) = IMFJ(t), a local detail by

$$d(t) = \mathbf{x}(t) - m(t) \tag{3}$$

Step 5: The expression (1) gives the iteration.

The high frequency terms are contained in the first IMF, which also involves the following terms of decreasing frequency up to forwarding only a low-frequency residue.

#### 2.1.2 Ensemble empirical mode decomposition (EEMD)

The ensemble empirical mode decomposition (EEMD) method was proposed to surpass the mode mixing disadvantage which exists in EMD technique [22]. By repeating the processes of decomposition, the EMD provides all solutions giving the true IMF.

The following steps give the EEMD method algorithm:

Step 1: The analyzed signal is added with a predefined amplitude white noise.

Step 2: The resulted signal is decomposed by using the EMD method.

Step 3: The above signal decomposition is repeated with different fixed amplitude white noises.

Step 4: Calculation of the final results is equal to the ensemble means of the decomposition results.

As finite number of intrinsic mode functions (IMFs) and a residue, the signal x (k) is decomposed:

$$\mathfrak{x}(k) = \sum\_{i=1}^{n} \widehat{c} + \widehat{r} \tag{4}$$

required in EEMD process is higher, added to the residual noise remaining in the reconstructed signal. So we have a new method called CEEMD; this technique provides an exact reconstruction of the original signal and gives better separation of modes with low computation cost. In this method the first mode IMF1 ð Þ n is obtained in the same way as in EEMD. It's computed over an ensemble of r1(n) plus different realizations of a given noise obtaining IMF2ð Þ n by averaging.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

is the white noise

<sup>k</sup> ð Þ n (7)

Here Ej [.] operator provides jth mode obtained by EMD. wi

The steps of CEEMDAN decomposition are as follows:

Step 2: Compute the difference signal:

DOI: http://dx.doi.org/10.5772/intechopen.86007

Step 3: Decompose <sup>r</sup>1ð Þþ <sup>n</sup> <sup>w</sup>1E<sup>1</sup> <sup>ε</sup><sup>i</sup>

IMF2ð Þ¼ n

IMFkþ<sup>1</sup>ð Þ¼ n

So the given signal can be expressed as

1 I ∑ l i¼1

> 1 I ∑ l i¼1

where E1 is a function to extract the jth IMF decomposed by EMD.

Step 1: Decompose x nð Þþ ε0wið Þ n to obtain the first mode by using:

1 I ∑ l i¼1

where w<sup>0</sup> is the added white noise amplitude and εð Þt is the white noise with unit

IMF<sup>i</sup>

<sup>E</sup><sup>1</sup> <sup>r</sup>1ð Þþ <sup>n</sup> <sup>w</sup>1E<sup>1</sup> <sup>ε</sup><sup>i</sup>

<sup>E</sup><sup>1</sup> rkð Þþ <sup>n</sup> wkEk <sup>ε</sup><sup>i</sup>

k k¼1

k k¼1

A quantitatively comparison of these three filtering methods' performance will be made based on two metrics: mean square error (MSE) and percent root mean square difference (PRD). The MSE and PRD are used to evaluate the quality of the information which is preserved in the denoised ECG signal. The MSE and the PRD

For k = 2, …, K, calculate the k-th residue and obtain the first mode. Define the

Step 4: Continue this process until residue is no longer feasible. Final residue

R nð Þ¼ x nð Þ� ∑

x nð Þ¼ R nð Þþ ∑

<sup>N</sup> <sup>∑</sup> N n¼1

MSE <sup>¼</sup> <sup>1</sup>

r1ð Þ¼ n x nð Þ� IMF1ð Þ n (8)

ð Þ <sup>n</sup> , to obtain the first mode, and define the

ð Þ <sup>n</sup> (9)

ð Þ <sup>n</sup> (10)

IMFk (11)

IMFk (12)

ð Þ x nð Þ� x nð Þ <sup>2</sup> (13)

IMF1ð Þ¼ n

[7–24].

variance.

second mode by

(k + 1)-th mode as follows:

are computed as follows:

23

where n defines the IMF number, c \_ <sup>i</sup> is the i-th IMF which is the corresponding

IMF ensemble mean resulted from all of the decomposition processes, and r \_ is the residue mean obtained from all processes of the decomposition.

#### 2.1.3 Complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN)

#### 2.1.3.1 CEEMD algorithm

Although the mode mixing effect is mitigated by the EEMD method, if the ensemble number is small, some noise will continue to exist in the corresponding IMF(s). To deal with this problem and assure a noise-free IMF, a CEEMD algorithm [7–23] is defined by the following steps:

Step 1: The target signal x(t) is added by positive and negative white noise ε + , �(t) in order to create two new signals x+ (t) and x�(t):

$$\begin{aligned} \varkappa^+(t) &= \varkappa(t) + \varepsilon^+(t) \\ \varkappa^-(t) &= \varkappa(t) + \varepsilon^-(t) \end{aligned} \tag{5}$$

Step 2: Step 1 is repeated, and by using the EMD algorithm, each of the new signals x+ (t) and x�(t) is decomposed.

Step 3: For the x+ (t) and x�(t) data sets, two IMF sets are obtained; (4) by averaging the IMF<sup>i</sup> <sup>k</sup> in Eq. (11), the decomposed result is calculated, where IMF<sup>i</sup> k defines the i-th IMF of the k-th iteration;

$$\overline{IMF}\_1(n) = \frac{1}{I} \sum\_{i=1}^{l} \overline{IMF\_k^i}(n) \tag{6}$$

#### 2.1.3.2 Complete ensemble empirical mode of decomposition with adaptive noise (CEEMDAN)

On the one hand, using EEMD overcomes the EMD mode mixing problem, but on the other hand, this technique presents a problem. The number of iterations

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

required in EEMD process is higher, added to the residual noise remaining in the reconstructed signal. So we have a new method called CEEMD; this technique provides an exact reconstruction of the original signal and gives better separation of modes with low computation cost. In this method the first mode IMF1 ð Þ n is obtained in the same way as in EEMD. It's computed over an ensemble of r1(n) plus different realizations of a given noise obtaining IMF2ð Þ n by averaging. Here Ej [.] operator provides jth mode obtained by EMD. wi is the white noise [7–24].

The steps of CEEMDAN decomposition are as follows:

Step 1: Decompose x nð Þþ ε0wið Þ n to obtain the first mode by using:

$$\overline{IMF}\_1(n) = \frac{1}{I} \sum\_{i=1}^{l} \overline{IMF\_k^i}(n) \tag{7}$$

where w<sup>0</sup> is the added white noise amplitude and εð Þt is the white noise with unit variance.

Step 2: Compute the difference signal:

$$r\_1(n) = \varkappa(n) - \mathrm{IMF}\_1(n) \tag{8}$$

Step 3: Decompose <sup>r</sup>1ð Þþ <sup>n</sup> <sup>w</sup>1E<sup>1</sup> <sup>ε</sup><sup>i</sup> ð Þ <sup>n</sup> , to obtain the first mode, and define the second mode by

$$\overline{IMF}\_2(n) = \frac{1}{I} \sum\_{i=1}^{l} E\_1\left(r\_1(n) + w\_1 E\_1\left(\varepsilon^i(n)\right)\right) \tag{9}$$

For k = 2, …, K, calculate the k-th residue and obtain the first mode. Define the (k + 1)-th mode as follows:

$$\overline{IMF}\_{k+1}(n) = \frac{1}{I} \sum\_{i=1}^{l} E\_1\left(r\_k(n) + w\_k E\_k\left(\varepsilon^i(n)\right)\right) \tag{10}$$

where E1 is a function to extract the jth IMF decomposed by EMD. Step 4: Continue this process until residue is no longer feasible. Final residue

$$R(n) = \mathfrak{x}(n) - \sum\_{k=1}^{k} \overline{IMF\_k} \tag{11}$$

So the given signal can be expressed as

$$\varkappa(n) = \mathcal{R}(n) + \sum\_{k=1}^{k} \overline{IMF\_k} \tag{12}$$

A quantitatively comparison of these three filtering methods' performance will be made based on two metrics: mean square error (MSE) and percent root mean square difference (PRD). The MSE and PRD are used to evaluate the quality of the information which is preserved in the denoised ECG signal. The MSE and the PRD are computed as follows:

$$MSE = \frac{1}{N} \sum\_{n=1}^{N} \left( \varkappa(n) - \overline{\varkappa}(n) \right)^2 \tag{13}$$

2.1.2 Ensemble empirical mode decomposition (EEMD)

Practical Applications of Electrocardiogram

The following steps give the EEMD method algorithm:

true IMF.

amplitude white noises.

decomposition results.

(CEEMDAN)

2.1.3.1 CEEMD algorithm

ε + ,

signals x+

22

Step 3: For the x+

(CEEMDAN)

averaging the IMF<sup>i</sup>

where n defines the IMF number, c

[7–23] is defined by the following steps:

�(t) in order to create two new signals x+

(t) and x�(t) is decomposed.

defines the i-th IMF of the k-th iteration;

(k) is decomposed:

The ensemble empirical mode decomposition (EEMD) method was proposed to surpass the mode mixing disadvantage which exists in EMD technique [22]. By repeating the processes of decomposition, the EMD provides all solutions giving the

Step 1: The analyzed signal is added with a predefined amplitude white noise.

Step 4: Calculation of the final results is equal to the ensemble means of the

As finite number of intrinsic mode functions (IMFs) and a residue, the signal x

\_ (4)

\_ is the

k

<sup>i</sup> is the i-th IMF which is the corresponding

Step 2: The resulted signal is decomposed by using the EMD method. Step 3: The above signal decomposition is repeated with different fixed

> x kð Þ¼ ∑ n i¼1 c \_ i þ r

> > \_

IMF ensemble mean resulted from all of the decomposition processes, and r

Although the mode mixing effect is mitigated by the EEMD method, if the ensemble number is small, some noise will continue to exist in the corresponding IMF(s). To deal with this problem and assure a noise-free IMF, a CEEMD algorithm

Step 1: The target signal x(t) is added by positive and negative white noise

xþðÞ¼ t x tðÞþ εþð Þt

Step 2: Step 1 is repeated, and by using the EMD algorithm, each of the new

1 I ∑ l i¼1

On the one hand, using EEMD overcomes the EMD mode mixing problem, but on the other hand, this technique presents a problem. The number of iterations

IMF1ð Þ¼ n

2.1.3.2 Complete ensemble empirical mode of decomposition with adaptive noise

(t) and x�(t):

(t) and x�(t) data sets, two IMF sets are obtained; (4) by

<sup>k</sup> in Eq. (11), the decomposed result is calculated, where IMF<sup>i</sup>

IMF<sup>i</sup>

x�ðÞ¼ t x tðÞþ ε�ð Þt (5)

<sup>k</sup> ð Þ n (6)

2.1.3 Complete ensemble empirical mode decomposition with adaptive noise

residue mean obtained from all processes of the decomposition.

$$PRD = \sqrt{\frac{\sum\_{n=1}^{N} \left(\varkappa(n) - \overline{\varkappa}(n)\right)^2}{\sum\_{n=1}^{N} \varkappa^2(n)}} \* 100 \tag{14}$$

the number of filter coefficient and the exponent H for conjugate transpose and the

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

estimator of this method is defined by the following equation [26]:

PE tð Þ¼ ; <sup>f</sup> <sup>Z</sup><sup>H</sup>

choice. Usually, the PE estimator gives a better frequency resolution.

2.2.3 Smoothed pseudo Wigner-Ville technique (SPWV)

real signal x(t). The following expression defines this signal:

Fað Þ¼ k

Wxa ð Þ¼ t; f

The periodogram (PE) is the derivate of the Capon (CA) technique. The spectral

By sliding windows, the PE technique can be used. Theoretical criterion does not

exist for selecting window duration and filter order. The parametric technique frequency response presents different properties according to the signal

characteristics. The time-frequency resolution depends principally of the window

The Cohen class exhibits most nonparametric time-frequency techniques [16, 17]. The smoothed pseudo Wigner-Ville technique belongs in particular to this class [16, 17]. To overcome the major weakness of the Wigner-Ville time-frequency representation, which is the covering of frequential

components, the SPWV has been proposed between the different existing nonparametric time-frequency techniques; for that, the analytical signal xa(t) replaces the

> 2X kð Þ if 0 < k < N=2 Xð Þ 0 if k ¼ 0, N=2 0 if N=2 < k < N

where X(k) represents the original signal x(t) Fourier transform and N is the

The function Wx(t, f) is the Wigner-Ville distribution related to a signal x(t), of finished energy. This distribution depends on the temporal (t) and frequential (f)

> <sup>a</sup> <sup>t</sup> � <sup>τ</sup> 2 � �<sup>e</sup>

�2iπf τ

dτ (21)

where i<sup>2</sup> <sup>=</sup> �1, H{x(t)} is the Hilbert transform of the signal with real

Expression (20) defines the analytical signal xa(t) spectrum, Fa(k):

8 ><

>:

parameters. The following expression defines this distribution [16, 17]:

xa <sup>t</sup> <sup>þ</sup> <sup>τ</sup> 2 � �:x<sup>∗</sup>

The SPWV is used principally to decrease the problem of the interference terms happening between the inner components that existed in Wigner-Ville image. The time-frequency image visibility is reduced by these terms [13, 14]. The SPWV technique is applied by using two smoothing windows h(t) and g(t). The

Wigner-Ville technique is to guarantee an interference separate control both in time (g) and in frequency (h). This representation is defined by the following

þ ð∞

�∞

utility of these smoothing windows entered into the definition of the

where x\*a(t) indicates the complex conjugate of xa(t).

<sup>f</sup> :Rx:Zf <sup>=</sup> ð Þ <sup>p</sup> <sup>þ</sup> <sup>1</sup> <sup>2</sup> � � (18)

xaðÞ¼ t x tðÞþ iH x t f g ð Þ (19)

(20)

superscript T for transpose.

DOI: http://dx.doi.org/10.5772/intechopen.86007

values, x(t).

point number.

expression [16, 17]:

25

where x(n) is the original ECG signal, x nð Þ denotes the reconstruction of the ECG signal, and N is the number of ECG samples used.

#### 2.2 Time-frequency techniques

In time-varying spectral analysis, time-frequency techniques have found a large number of application [8–15]. There is no single time-frequency representation due to the signal energy distribution which joints time and frequency coordinates. There are many time-frequency techniques and many ways to define them. The most popular time-frequency representation class is called the quadratic or Cohen (1989) class. The Choi-Williams (CW), the periodgram (PE), and the smoothed pseudo Wigner-Ville (SPWV) techniques were chosen from the different time-frequency techniques belonging to this representation time-frequency set, due to its interesting properties.

#### 2.2.1 Choi-Williams distribution (CWD)

The Choi-Williams distribution CWD(t, f) was a significant step in the field of time-frequency analysis where it opened the way for optimizing resolution with cross-term reduction [25]:

$$\text{CWD}\_{\text{x}}(t,f) = \frac{1}{4\pi^2} \int\_{-\infty}^{\infty} \int \int^{+\infty}\_{-\infty} \exp^{-j\theta t - j\pi\omega + j\theta u} \phi(\theta, \tau) A\_{u} du d\tau d\theta \tag{15}$$

where

$$A\_{\
u} = \varkappa \left(\nu + \frac{\tau}{2}\right) \varkappa^\* \left(\nu - \frac{\tau}{2}\right) \tag{16}$$

and ϕ θð Þ¼ ; τ e θ2τ2 σ .

The smoothing of the distribution is controlled by the constant σ. If σ ! ∞, the Choi-Williams distribution (CWD) will simply converge to the Wigner-Ville distribution, as the kernel goes to 1.

#### 2.2.2 Periodogram technique

The minimum variance estimator, named Capon estimator (CA), does not fix a model on the signal. At each frequency f, this method seeks a matched filter whose response is 1 for the frequency f and 0 everywhere else [26]:

$$\text{CA}(t, f) = \mathfrak{a}(n, f)^H \mathcal{R}\_\mathbf{x} \mathfrak{a}(t, f) = \frac{1}{Z\_f^H \mathcal{R}\_\mathbf{x} \left[t\right]^{-1} Z\_f} \tag{17}$$

where CA(n, f) means the filter Capon output power. By the discrete signal x(n) sampled at the period te, this filter is excited; a(n, f) = (a0, …, ap) is the filter impulse response at frequency n; Rx[n] = E{x[n]xT [n]} is the crossed x(n) autocorrelation matrix of dimension (p + 1)\*(p + 1); x[n] = (x(n � p), …, x(n)) is the selected signal at time n; ZH <sup>f</sup> (1, e2iπft e, …, e2iπft e p ) is the steering vector; (p + 1) is

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

the number of filter coefficient and the exponent H for conjugate transpose and the superscript T for transpose.

The periodogram (PE) is the derivate of the Capon (CA) technique. The spectral estimator of this method is defined by the following equation [26]:

$$PE(t, f) = Z\_f^H \cdot R\_\mathbf{x} \cdot Z\_f / \left( \left( \mathbf{p} + \mathbf{1} \right)^2 \right) \tag{18}$$

By sliding windows, the PE technique can be used. Theoretical criterion does not exist for selecting window duration and filter order. The parametric technique frequency response presents different properties according to the signal characteristics. The time-frequency resolution depends principally of the window choice. Usually, the PE estimator gives a better frequency resolution.

#### 2.2.3 Smoothed pseudo Wigner-Ville technique (SPWV)

The Cohen class exhibits most nonparametric time-frequency techniques [16, 17]. The smoothed pseudo Wigner-Ville technique belongs in particular to this class [16, 17]. To overcome the major weakness of the Wigner-Ville time-frequency representation, which is the covering of frequential components, the SPWV has been proposed between the different existing nonparametric time-frequency techniques; for that, the analytical signal xa(t) replaces the real signal x(t). The following expression defines this signal:

$$\varkappa\_{\mathfrak{a}}(t) = \mathfrak{x}(t) + iH\{\mathfrak{x}(t)\} \tag{19}$$

where i<sup>2</sup> <sup>=</sup> �1, H{x(t)} is the Hilbert transform of the signal with real values, x(t).

Expression (20) defines the analytical signal xa(t) spectrum, Fa(k):

$$F\_d(k) = \begin{cases} 2X(k) & \text{if } 0 < k < N/2 \\ X(0) & \text{if } k = 0, \ N/2 \\ 0 & \text{if } N/2 < k < N \end{cases} \tag{20}$$

where X(k) represents the original signal x(t) Fourier transform and N is the point number.

The function Wx(t, f) is the Wigner-Ville distribution related to a signal x(t), of finished energy. This distribution depends on the temporal (t) and frequential (f) parameters. The following expression defines this distribution [16, 17]:

$$\mathcal{W}\_{\mathbf{x}\_a}(t,f) = \int\_{-\infty}^{+\infty} \mathbf{x}\_a \left(t + \frac{\tau}{2}\right) \boldsymbol{\omega}^\* \, \_a \left(t - \frac{\tau}{2}\right) e^{-2i\boldsymbol{\omega}^\dagger \tau} d\tau \tag{21}$$

where x\*a(t) indicates the complex conjugate of xa(t).

The SPWV is used principally to decrease the problem of the interference terms happening between the inner components that existed in Wigner-Ville image. The time-frequency image visibility is reduced by these terms [13, 14]. The SPWV technique is applied by using two smoothing windows h(t) and g(t). The utility of these smoothing windows entered into the definition of the Wigner-Ville technique is to guarantee an interference separate control both in time (g) and in frequency (h). This representation is defined by the following expression [16, 17]:

PRD ¼

ECG signal, and N is the number of ECG samples used.

2.2 Time-frequency techniques

Practical Applications of Electrocardiogram

2.2.1 Choi-Williams distribution (CWD)

CWDxð Þ¼ <sup>t</sup>; <sup>f</sup> <sup>1</sup>

θ2τ2 σ .

distribution, as the kernel goes to 1.

2.2.2 Periodogram technique

selected signal at time n; ZH

24

4π<sup>2</sup>

response is 1 for the frequency f and 0 everywhere else [26]:

impulse response at frequency n; Rx[n] = E{x[n]xT

∞ð

ð ð þ∞

�∞

2 � �

The smoothing of the distribution is controlled by the constant σ. If σ ! ∞, the Choi-Williams distribution (CWD) will simply converge to the Wigner-Ville

The minimum variance estimator, named Capon estimator (CA), does not fix a model on the signal. At each frequency f, this method seeks a matched filter whose

where CA(n, f) means the filter Capon output power. By the discrete signal x(n)

ZH <sup>f</sup> :Rx½ �<sup>t</sup> �<sup>1</sup>

:Zf

[n]} is the crossed x(n) autocor-

) is the steering vector; (p + 1) is

CA tð Þ¼ ; <sup>f</sup> a nð Þ ; <sup>f</sup> HRxa tð Þ¼ ; <sup>f</sup> <sup>1</sup>

sampled at the period te, this filter is excited; a(n, f) = (a0, …, ap) is the filter

relation matrix of dimension (p + 1)\*(p + 1); x[n] = (x(n � p), …, x(n)) is the

e, …, e2iπft

e p

<sup>f</sup> (1, e2iπft

<sup>x</sup><sup>∗</sup> <sup>u</sup> � <sup>τ</sup> 2 � �

�∞

Au <sup>¼</sup> x u <sup>þ</sup> <sup>τ</sup>

cross-term reduction [25]:

ing properties.

where

and ϕ θð Þ¼ ; τ e

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

∑<sup>N</sup> <sup>n</sup>¼1x2ð Þ <sup>n</sup>

where x(n) is the original ECG signal, x nð Þ denotes the reconstruction of the

In time-varying spectral analysis, time-frequency techniques have found a large number of application [8–15]. There is no single time-frequency representation due to the signal energy distribution which joints time and frequency coordinates. There are many time-frequency techniques and many ways to define them. The most popular time-frequency representation class is called the quadratic or Cohen (1989) class. The Choi-Williams (CW), the periodgram (PE), and the smoothed pseudo Wigner-Ville (SPWV) techniques were chosen from the different time-frequency techniques belonging to this representation time-frequency set, due to its interest-

The Choi-Williams distribution CWD(t, f) was a significant step in the field of time-frequency analysis where it opened the way for optimizing resolution with

exp�jθt�jτωþjθ<sup>u</sup>ϕ θð Þ ; <sup>τ</sup> Aududτd<sup>θ</sup> (15)

(16)

(17)

<sup>n</sup>¼1ð Þ x nð Þ� x nð Þ <sup>2</sup>

∗ 100 (14)

∑<sup>N</sup>

s

$$SPWV\_x(t,f) = \int\_{-\infty}^{+\infty} h\left|\left(\frac{\tau}{2}\right)^2\right| \int\_{-\infty}^{+\infty} g(t-u)\chi\_u\left(u+\frac{\tau}{2}\right)$$

$$\varkappa\_a^\*\left(u-\frac{\tau}{2}\right)e^{-2i\pi f\tau}d\tau du$$

where h(t) is a smoothing frequential window and g(t) is a smoothing temporal window.

We compare also the performance of these three time-frequency techniques by using the same metrics that were used in the filtering method comparison.

#### 2.3 Biomedical signals

Electrocardiogram signals allow to represent the human heart state. ECG signal is a fundamental tool commonly used in the heart medical domain to treat patients suffering from cardiac diseases. By measuring the potential difference between electrodes posed in well-known places in the patient skin, these signals are usually obtained. The ECG signal can be single channel or multichannel depending on how many electrodes are used, one or several. Important knowledge is obtained by cardiologists about the patient's heart function only by analyzing a minute feature of these signals.

The ECG signal has a well-defined P, QRS, and T signatures that represent each heartbeat. The duration, shape, and amplitude of these waves are considered as major features in time domain analysis.

Changes in the normal rhythmicity of a human heart may result in different cardiac arrhythmias, which may be immediately fatal or cause irreparable damage to the heart when sustained over a long period of time.

The following subsections present the different normal and abnormal ECG signals chosen for this study. These data were obtained from [19].

#### 2.3.1 Normal ECG

Figure 1 shows the time domain of a normal ECG signal. The sampling frequency for this normal ECG signal was 128 samples/s and the signal length 8 s.

#### 2.3.2 Atrial fibrillation ECG

Figure 2 shows a length of 4 s of an abnormal atrial fibrillation ECG signal obtained from a patient with malignant ventricular arrhythmia. The sampling frequency for this signal was 250 samples/s.

The atrial rate exceeds 350 beats per minute in this type of arrhythmias. This arrhythmia occurs due to an uncoordinated activation and contraction of different parts of the atrial which leads to ineffective pumping of blood into the ventricles.

#### 2.3.3 Ventricular tachyarrhythmia ECG

Figure 3 shows a length of 4 s of a ventricular tachyarrhythmia ECG signal with a 250 samples/s sampling frequency.

2.3.4 Malignant ventricular arrhythmia ECG

unusual morphology.

Atrial fibrillation ECG signal.

Figure 2.

27

Figure 1. Normal ECG signal.

Figure 4 shows a length of 4 s of the time domain ECG signal obtained from a patient with malignant ventricular arrhythmia. The sampling frequency for this signal was 250 samples/s. The depolarization wave spreads through the ventricles by an irregular and therefore slower pathway. The QRS complex is thus wide and abnormal. Repolarization pathways are also different, causing the T wave to have an

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

DOI: http://dx.doi.org/10.5772/intechopen.86007

This abnormal signal presents a misalignment of the third QRS complex.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

Figure 1. Normal ECG signal.

SPWVxð Þ¼ t; f

Practical Applications of Electrocardiogram

window.

2.3 Biomedical signals

of these signals.

2.3.1 Normal ECG

the ventricles.

26

2.3.2 Atrial fibrillation ECG

frequency for this signal was 250 samples/s.

2.3.3 Ventricular tachyarrhythmia ECG

a 250 samples/s sampling frequency.

major features in time domain analysis.

to the heart when sustained over a long period of time.

signals chosen for this study. These data were obtained from [19].

þ ð∞

�∞

x∗ <sup>a</sup> <sup>u</sup> � <sup>τ</sup> 2 � �

using the same metrics that were used in the filtering method comparison.

<sup>h</sup> <sup>τ</sup> 2 � �<sup>2</sup> � � � �

� � � �

where h(t) is a smoothing frequential window and g(t) is a smoothing temporal

We compare also the performance of these three time-frequency techniques by

Electrocardiogram signals allow to represent the human heart state. ECG signal is a fundamental tool commonly used in the heart medical domain to treat patients suffering from cardiac diseases. By measuring the potential difference between electrodes posed in well-known places in the patient skin, these signals are usually obtained. The ECG signal can be single channel or multichannel depending on how many electrodes are used, one or several. Important knowledge is obtained by cardiologists about the patient's heart function only by analyzing a minute feature

The ECG signal has a well-defined P, QRS, and T signatures that represent each heartbeat. The duration, shape, and amplitude of these waves are considered as

Changes in the normal rhythmicity of a human heart may result in different cardiac arrhythmias, which may be immediately fatal or cause irreparable damage

The following subsections present the different normal and abnormal ECG

Figure 1 shows the time domain of a normal ECG signal. The sampling frequency for this normal ECG signal was 128 samples/s and the signal length 8 s.

Figure 2 shows a length of 4 s of an abnormal atrial fibrillation ECG signal obtained from a patient with malignant ventricular arrhythmia. The sampling

The atrial rate exceeds 350 beats per minute in this type of arrhythmias. This arrhythmia occurs due to an uncoordinated activation and contraction of different parts of the atrial which leads to ineffective pumping of blood into

Figure 3 shows a length of 4 s of a ventricular tachyarrhythmia ECG signal with

This abnormal signal presents a misalignment of the third QRS complex.

þ ð∞

�∞

e�2iπ<sup>f</sup> <sup>τ</sup>

g tð Þ � <sup>u</sup> xa <sup>u</sup> <sup>þ</sup> <sup>τ</sup>

dτdu

2 � �

(22)

Figure 2. Atrial fibrillation ECG signal.

#### 2.3.4 Malignant ventricular arrhythmia ECG

Figure 4 shows a length of 4 s of the time domain ECG signal obtained from a patient with malignant ventricular arrhythmia. The sampling frequency for this signal was 250 samples/s. The depolarization wave spreads through the ventricles by an irregular and therefore slower pathway. The QRS complex is thus wide and abnormal. Repolarization pathways are also different, causing the T wave to have an unusual morphology.

Figure 3. Ventricular tachyarrhythmia ECG signal.

These normal and abnormal ECG signals were corrupted with noise CN gener-

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

CN <sup>¼</sup> wbw <sup>∗</sup> BW <sup>þ</sup> wem <sup>∗</sup> EM <sup>þ</sup> wma <sup>∗</sup> MA wbw þ wem þ wma

where BW is the baseline wander noise, EM is the electromyogram noise, and MA is the motion artifact. Wbw, wem, and wma define the added noise percentage of baseline wander, electromyogram noise, and motion artifact noises, respectively. These parameters have been chosen with the following values wbw = 2, wem = 2, and wma = 5, which signified that the predominant noise in the noisy ECG signal is

To evaluate the performance of the three denoising methods, EMD, EEMD, and CEEMDAN, a set of normal and abnormal ECG signals with different shapes were chosen. Before applying the proposed denoising methods, the ECG signals were corrupted with different values of signal-to-noise ratio (SNR); these values are from

Tables 1–5 report the performance of the denoising methods for the five ECG recordings. These tables present the obtained results of the mean square error (MSE), the root mean square error (RMSE), and the percent root mean square difference (PRD) for the following ECG signals, respectively, a normal ECG, an atrial fibrillation ECG, a ventricular tachyarrhythmia ECG, a malignant ventricular

Figures 6–10 present the RMSE comparison graphs of the results obtained by using different denoising methods (EMD, EEMD, and CEEMDAN) to the five

arrhythmia ECG, and a supraventricular arrhythmia ECG.

(23)

ated by the following Eq. [4]:

Supraventricular arrhythmia ECG signal.

DOI: http://dx.doi.org/10.5772/intechopen.86007

Figure 5.

the motion artifact.

3. Results and discussion

�5 dB to 20 dB with a 5 dB step.

3.1 Denoising methods

29

Figure 4. Malignant ventricular arrhythmia ECG signal.

#### 2.3.5 Supraventricular ECG

Figure 5 shows the time domain ECG signal of a patient with supraventricular arrhythmia. The sampling frequency for this abnormal ECG signal was 128 samples/ s and the signal length 8 s. The shape of the QRS complex in this signal is abnormal at the QR part.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

Figure 5. Supraventricular arrhythmia ECG signal.

These normal and abnormal ECG signals were corrupted with noise CN generated by the following Eq. [4]:

$$\text{CN} = \frac{whw \ast BW + wem \ast EM + wma \ast MA}{whw + wem + wma} \tag{23}$$

where BW is the baseline wander noise, EM is the electromyogram noise, and MA is the motion artifact. Wbw, wem, and wma define the added noise percentage of baseline wander, electromyogram noise, and motion artifact noises, respectively. These parameters have been chosen with the following values wbw = 2, wem = 2, and wma = 5, which signified that the predominant noise in the noisy ECG signal is the motion artifact.

#### 3. Results and discussion

#### 3.1 Denoising methods

To evaluate the performance of the three denoising methods, EMD, EEMD, and CEEMDAN, a set of normal and abnormal ECG signals with different shapes were chosen. Before applying the proposed denoising methods, the ECG signals were corrupted with different values of signal-to-noise ratio (SNR); these values are from �5 dB to 20 dB with a 5 dB step.

Tables 1–5 report the performance of the denoising methods for the five ECG recordings. These tables present the obtained results of the mean square error (MSE), the root mean square error (RMSE), and the percent root mean square difference (PRD) for the following ECG signals, respectively, a normal ECG, an atrial fibrillation ECG, a ventricular tachyarrhythmia ECG, a malignant ventricular arrhythmia ECG, and a supraventricular arrhythmia ECG.

Figures 6–10 present the RMSE comparison graphs of the results obtained by using different denoising methods (EMD, EEMD, and CEEMDAN) to the five

2.3.5 Supraventricular ECG

Malignant ventricular arrhythmia ECG signal.

at the QR part.

28

Figure 4.

Figure 3.

Ventricular tachyarrhythmia ECG signal.

Practical Applications of Electrocardiogram

Figure 5 shows the time domain ECG signal of a patient with supraventricular arrhythmia. The sampling frequency for this abnormal ECG signal was 128 samples/ s and the signal length 8 s. The shape of the QRS complex in this signal is abnormal


3.2 Time-frequency techniques

DOI: http://dx.doi.org/10.5772/intechopen.86007

Table 4.

Table 5.

Figure 6.

31

To compare the performance of the three chosen time-frequency techniques, Choi-Williams (CW), periodogram (PE), and smoothed pseudo Wigner-Ville (SPWV), we applied these time-frequency methods to ECG signals presented in

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 0.918 0.958 177.481 0.922 0.960 177.902 0.920 0.959 177.673 0 0.291 0.539 99.900 0.291 0.540 99.946 0.291 0.539 99.921 5 0.092 0.303 56.142 0.092 0.304 56.221 0.092 0.303 56.214 10 0.029 0.171 31.672 0.029 0.171 31.692 0.029 0.171 31.628 15 0.009 0.096 17.863 0.009 0.096 17.856 0.009 0.096 17.846 20 0.003 0.056 10.291 0.003 0.055 10.214 0.003 0.055 10.122

SNR EMD EEMD CEEMDAN

SNR EMD EEMD CEEMDAN

RMSE comparison of the three denoising methods at different SNR levels for the normal ECG signal.

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 0.137 0.370 179.290 0.135 0.367 177.814 0.135 0.367 177.867 0 0.047 0.217 105.004 0.043 0.206 99.982 0.043 0.207 100.557 5 0.017 0.131 63.466 0.013 0.116 56.276 0.014 0.119 57.717 10 0.008 0.090 43.633 0.004 0.066 31.748 0.005 0.071 34.536 15 0.006 0.079 38.091 0.001 0.037 18.000 0.002 0.047 22.774 20 0.004 0.061 29.538 0.0005 0.021 10.400 0.001 0.037 17.705

MSE, RMSE, and PRD of the malignant ventricular arrhythmia ECG signal.

MSE, RMSE, and PRD of the supraventricular arrhythmia ECG signal.

Table 1.

MSE, RMSE, and PRD of the normal ECG signal.


#### Table 2. MSE, RMSE, and PRD of the atrial fibrillation ECG signal.


Table 3.

MSE, RMSE, and PRD of the ventricular tachyarrhythmia ECG signal.

considered ECG signals: normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia ECG, respectively, at a SNR interval varying from 5 to 20 dB.

Figures 11–15 are presenting the obtained PRD results of the three denoising methods (EMD, EEMD, and CEEMDAN) to all the chosen ECG signals, normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia ECG, respectively, at a SNR interval varying from 5 to 20 dB.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

#### 3.2 Time-frequency techniques

To compare the performance of the three chosen time-frequency techniques, Choi-Williams (CW), periodogram (PE), and smoothed pseudo Wigner-Ville (SPWV), we applied these time-frequency methods to ECG signals presented in


Table 4.

MSE, RMSE, and PRD of the malignant ventricular arrhythmia ECG signal.


#### Table 5.

MSE, RMSE, and PRD of the supraventricular arrhythmia ECG signal.

considered ECG signals: normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia ECG, respectively, at a SNR interval varying from 5 to 20 dB.

SNR EMD EEMD CEEMDAN

SNR EMD EEMD CEEMDAN

SNR EMD EEMD CEEMDAN

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 1.590 1.261 177.669 1.590 1.261 177.694 1.589 1.261 177.640 0 0.513 0.716 100.957 0.505 0.711 100.173 0.503 0.709 99.905 5 0.173 0.416 58.550 0.159 0.399 56.224 0.159 0.399 56.195 10 0.057 0.240 33.782 0.051 0.225 31.769 0.050 0.224 31.618 15 0.029 0.169 23.884 0.016 0.127 17.906 0.016 0.127 17.863 20 0.016 0.126 17.685 0.005 0.074 10.403 0.005 0.072 10.151

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 0.780 0.883 179.314 0.768 0.877 177.928 0.767 0.876 177.727 0 0.254 0.504 102.241 0.243 0.493 100.025 0.243 0.493 100.150 5 0.097 0.311 63.129 0.077 0.277 56.300 0.078 0.280 56.837 10 0.042 0.204 41.404 0.025 0.157 31.797 0.026 0.163 33.003 15 0.023 0.153 31.050 0.008 0.087 17.760 0.010 0.099 20.117 20 0.017 0.132 26.796 0.003 0.051 10.373 0.005 0.070 14.131

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 1.179 1.086 192.033 1.011 1.006 177.847 1.047 1.023 180.914 0 0.450 0.671 118.580 0.320 0.565 99.966 0.357 0.597 105.620 5 0.227 0.476 84.191 0.101 0.318 56.303 0.136 0.368 65.094 10 0.136 0.368 65.104 0.032 0.180 31.820 0.064 0.253 44.812 15 0.055 0.235 41.628 0.010 0.101 17.900 0.042 0.205 36.252 20 0.038 0.196 34.604 0.003 0.059 10.359 0.034 0.185 32.695

Figures 11–15 are presenting the obtained PRD results of the three denoising methods (EMD, EEMD, and CEEMDAN) to all the chosen ECG signals, normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia ECG, respectively, at a SNR

interval varying from 5 to 20 dB.

Table 1.

Table 2.

Table 3.

30

MSE, RMSE, and PRD of the normal ECG signal.

Practical Applications of Electrocardiogram

MSE, RMSE, and PRD of the atrial fibrillation ECG signal.

MSE, RMSE, and PRD of the ventricular tachyarrhythmia ECG signal.

Figure 7. RMSE comparison of the three denoising methods at different SNR levels for the atrial fibrillation ECG signal.

Figure 10.

ECG signal.

Figure 11.

Figure 12.

33

RMSE comparison of the three denoising methods at different SNR levels for the supraventricular arrhythmia

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

DOI: http://dx.doi.org/10.5772/intechopen.86007

PRD comparison of the different denoising methods at different SNR levels for the normal ECG signal.

PRD comparison of the different denoising methods at different SNR levels for the atrial fibrillation ECG signal.

Figure 8.

RMSE comparison of the three denoising methods at different SNR levels for the ventricular tachyarrhythmia ECG signal.

Figure 9.

RMSE comparison of the three denoising methods at different SNR levels for the malignant ventricular arrhythmia ECG signal.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

#### Figure 10.

Figure 7.

Practical Applications of Electrocardiogram

Figure 8.

ECG signal.

Figure 9.

32

arrhythmia ECG signal.

RMSE comparison of the three denoising methods at different SNR levels for the atrial fibrillation ECG signal.

RMSE comparison of the three denoising methods at different SNR levels for the ventricular tachyarrhythmia

RMSE comparison of the three denoising methods at different SNR levels for the malignant ventricular

RMSE comparison of the three denoising methods at different SNR levels for the supraventricular arrhythmia ECG signal.

#### Figure 11.

PRD comparison of the different denoising methods at different SNR levels for the normal ECG signal.

Section 2.3. Before applying the time-frequency techniques, these ECG signals were corrupted with different values of signal-to-noise ratio, varying from 5 to 20 dB

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

Tables 6–10 report the obtained results of the mean square error (MSE), the root mean square error (RMSE), and the percent root mean square difference (PRD) after applying the three time-frequency methods (CW, PE, and SPWV) to the ECG signals, normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia

SNR Choi-Williams Periodogram SPWV

SNR Choi-Williams Periodogram SPWV

SNR Choi-Williams Periodogram SPWV

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 65.469 8.091 423.064 1.295 1.138 220.730 65.501 8.093 418.365 0 11.304 3.362 196.830 0.222 0.471 105.949 11.196 3.346 188.372 5 2.351 1.533 97.777 0.046 0.213 53.838 2.327 1.526 93.922 10 0.571 0.756 50.923 0.011 0.105 28.461 0.565 0.751 49.037 15 0.154 0.393 27.357 0.003 0.054 15.431 0.153 0.391 26.384 20 0.045 0.211 14.981 0.001 0.029 8.496 0.044 0.210 14.461

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 13.303 3.647 271.222 0.252 0.502 151.833 13.340 3.652 270.031 0 2.270 1.507 131.224 0.041 0.202 75.307 2.202 1.484 126.352 5 0.478 0.691 67.090 0.008 0.090 39.165 0.458 0.676 64.774 10 0.119 0.345 35.616 0.002 0.044 21.018 0.113 0.335 34.446 15 0.033 0.181 19.362 0.001 0.023 11.501 0.031 0.176 18.746 20 0.010 0.098 10.678 0.0001 0.012 6.367 0.009 0.095 10.345

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 14.590 3.820 768.692 0.243 0.493 566.139 14.084 3.753 787.649 0 2.247 1.499 338.207 0.029 0.171 254.753 1.910 1.382 332.290 5 0.470 0.686 160.505 0.004 0.067 123.148 0.367 0.606 158.078 10 0.124 0.352 80.891 0.001 0.030 62.893 0.092 0.303 79.802 15 0.037 0.192 42.531 0.0002 0.015 33.357 0.027 0.163 42.003 20 0.011 0.106 22.983 0.0001 0.008 18.122 0.008 0.090 22.712

with a 5 dB step.

DOI: http://dx.doi.org/10.5772/intechopen.86007

ECG, respectively.

Table 6.

Table 7.

Table 8.

35

MSE, RMSE, and PRD of the normal ECG signal.

MSE, RMSE, and PRD of the atrial fibrillation ECG signal.

MSE, RMSE, and PRD of the ventricular tachyarrhythmia ECG signal.

#### Figure 13.

PRD comparison of the different denoising methods at different SNR levels for the ventricular tachyarrhythmia ECG signal.

#### Figure 14.

PRD comparison of the different denoising methods at different SNR levels for the malignant ventricular arrhythmia ECG signal.

PRD comparison of the different denoising methods at different SNR levels for the supraventricular arrhythmia ECG signal.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

Section 2.3. Before applying the time-frequency techniques, these ECG signals were corrupted with different values of signal-to-noise ratio, varying from 5 to 20 dB with a 5 dB step.

Tables 6–10 report the obtained results of the mean square error (MSE), the root mean square error (RMSE), and the percent root mean square difference (PRD) after applying the three time-frequency methods (CW, PE, and SPWV) to the ECG signals, normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia ECG, respectively.


Table 6.

Figure 13.

Practical Applications of Electrocardiogram

ECG signal.

Figure 14.

Figure 15.

ECG signal.

34

arrhythmia ECG signal.

PRD comparison of the different denoising methods at different SNR levels for the ventricular tachyarrhythmia

PRD comparison of the different denoising methods at different SNR levels for the malignant ventricular

PRD comparison of the different denoising methods at different SNR levels for the supraventricular arrhythmia

MSE, RMSE, and PRD of the normal ECG signal.


Table 7.

MSE, RMSE, and PRD of the atrial fibrillation ECG signal.


Table 8.

MSE, RMSE, and PRD of the ventricular tachyarrhythmia ECG signal.

Figures 16–20 illustrate the RMSE comparison results obtained by using the different time-frequency techniques (CW, PE, and SPWV), at a SNR interval varying from 5 to 20 dB, to the following signals, respectively: normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhythmia ECG, and supraventricular arrhythmia ECG.

Figures 21–25 show the comparison PRD results of the three time-frequency techniques (CW, PE, and SPWV) to the five selected ECG signals.


Figure 17.

Figure 18.

Figure 19.

37

arrhythmia ECG signal.

tachyarrhythmia ECG signal.

signal.

RMSE comparison of the three time-frequency methods at different SNR levels for the atrial fibrillation ECG

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

DOI: http://dx.doi.org/10.5772/intechopen.86007

RMSE comparison of the three time-frequency methods at different SNR levels for the ventricular

RMSE comparison of the three time-frequency methods at different SNR levels for the malignant ventricular

Table 9.

MSE, RMSE, and PRD of the malignant ventricular arrhythmia ECG signal.


#### Table 10.

MSE, RMSE, and PRD of the supraventricular arrhythmia ECG signal.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

#### Figure 17.

Figures 16–20 illustrate the RMSE comparison results obtained by using the different time-frequency techniques (CW, PE, and SPWV), at a SNR interval varying from 5 to 20 dB, to the following signals, respectively: normal ECG, atrial fibrillation ECG, ventricular tachyarrhythmia ECG, malignant ventricular arrhyth-

Figures 21–25 show the comparison PRD results of the three time-frequency

5 25.422 5.042 81.102 0.505 0.710 44.366 25.435 5.043 79.304 0 4.654 2.157 42.667 0.092 0.303 23.665 4.621 2.150 40.959 5 1.020 1.010 23.067 0.020 0.141 12.902 1.013 1.006 22.176 10 0.257 0.507 12.679 0.005 0.071 7.127 0.255 0.505 12.200 15 0.071 0.267 7.038 0.001 0.037 3.967 0.071 0.266 6.775 20 0.021 0.145 3.929 0.0004 0.020 2.218 0.021 0.144 3.783

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

SNR Choi-Williams Periodogram SPWV

SNR Choi-Williams Periodogram SPWV

MSE RMSE PRD MSE RMSE PRD MSE RMSE PRD

5 0.410 0.640 1496.14 0.008 0.087 1300.33 0.407 0.638 1562.32 0 0.071 0.267 618.458 0.001 0.035 541.681 0.068 0.262 618.646 5 0.015 0.124 277.450 0.0002 0.016 244.693 0.015 0.121 277.768 10 0.004 0.062 133.833 0.0001 0.008 118.663 0.004 0.060 134.056 15 0.001 0.033 68.259 2 10<sup>5</sup> 0.004 60.743 0.001 0.032 68.391 20 0.0003 0.018 36.175 5 10<sup>6</sup> 0.002 32.266 0.0003 0.017 36.250

RMSE comparison of the three time-frequency methods at different SNR levels for the normal ECG signal.

techniques (CW, PE, and SPWV) to the five selected ECG signals.

MSE, RMSE, and PRD of the malignant ventricular arrhythmia ECG signal.

MSE, RMSE, and PRD of the supraventricular arrhythmia ECG signal.

mia ECG, and supraventricular arrhythmia ECG.

Practical Applications of Electrocardiogram

Table 9.

Table 10.

Figure 16.

36

RMSE comparison of the three time-frequency methods at different SNR levels for the atrial fibrillation ECG signal.

#### Figure 18.

RMSE comparison of the three time-frequency methods at different SNR levels for the ventricular tachyarrhythmia ECG signal.

Figure 19.

RMSE comparison of the three time-frequency methods at different SNR levels for the malignant ventricular arrhythmia ECG signal.

#### Figure 20.

RMSE comparison of the three time-frequency methods at different SNR levels for the supraventricular arrhythmia ECG signal.

Figure 23.

Figure 24.

Figure 25.

39

ventricular tachyarrhythmia ECG signal.

DOI: http://dx.doi.org/10.5772/intechopen.86007

malignant ventricular arrhythmia ECG signal.

supraventricular arrhythmia ECG signal.

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the

#### Figure 21.

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the normal ECG signal.

#### Figure 22.

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the atrial fibrillation ECG signal.

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

#### Figure 23.

Figure 20.

Figure 21.

Figure 22.

38

atrial fibrillation ECG signal.

normal ECG signal.

arrhythmia ECG signal.

Practical Applications of Electrocardiogram

RMSE comparison of the three time-frequency methods at different SNR levels for the supraventricular

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the ventricular tachyarrhythmia ECG signal.

#### Figure 24.

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the malignant ventricular arrhythmia ECG signal.

#### Figure 25.

PRD comparison of the three time-frequency techniques (CW, PE, and SPWV) at different SNR levels for the supraventricular arrhythmia ECG signal.

#### 3.3 Discussion

The study was divided to two separate steps. The first part involved a comparison between three denoising methods, empirical mode decomposition (EMD) and its two variants ensemble empirical mode decomposition (EEMD) and complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN). We note from the obtained results (Tables 1–5 and Figures 6–15) that the EEMD and the CEEMDAN methods for the most selected ECG signals for the different signalto-noise ratio (SNR) values yield the smallest values of MSE, RMSE, and PRD compared to those obtained by the EMD method. Despite the EEMD method providing a slight advantage than CEEMDAN for a few degrees of SNR in some ECG signals, we concluded that the most optimal technique for denoising this type of biomedical signals is CEEMDAN, especially for the large number of iterations required in EEMD process.

The second part of study presents a comparison of the different results of the three time-frequency techniques Choi-Williams (CW), periodogram (PE), and smoothed pseudo Wigner-Ville (SPWV). These time-frequency techniques were applied to normal and abnormal ECG signals with different degrees of SNR varying from 5 dB to 20 dB. We note that the PE technique provides the best results; it furnishes the smallest values of MSE, RMSE, and PRD than those obtained by the two other techniques, CW and SPWV.

After these two steps, we concluded that a combination of the two techniques, CEEMDAN denoising method and PE time-frequency technique, would be ideal for the ECG signal analysis. The CEEMDAN method will be reserved for the pretreatment phase to filter the noise, and in the second phase, the PE technique will be applied to supply the evolution of the ECG signal fequential components over the time in order to provide a good diagnosis.

#### 4. Conclusion

The work purpose was to conduct two comparative studies to determine the best techniques for ECG signal processing. The first one focused on the comparison between techniques aimed at preprocessing ECG signals, namely, denoising methods. The second one was to compare some time-frequency techniques that are intended to analyze these biomedical signals. The obtained results show that, in the first part, the CEEMDAN presents a high effectiveness in the noise elimination and, in the second one, the periodogram provides the best solution for analyzing ECG signals. We conclude that a combination of the CEEMDAN denoising method and the PE time-frequency technique can be a good issue in analyzing the ECG signals.

Author details

Agadir, Morocco

41

Azzedine Dliou\*, Samir Elouaham, Rachid Latif and Mostafa Laaboubi

\*Address all correspondence to: dliou.azzedine@yahoo.fr

provided the original work is properly cited.

ESSI-LISTI Laboratory, National School of Applied Sciences, Ibn Zohr University,

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

DOI: http://dx.doi.org/10.5772/intechopen.86007

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

### Author details

3.3 Discussion

Practical Applications of Electrocardiogram

required in EEMD process.

4. Conclusion

40

two other techniques, CW and SPWV.

time in order to provide a good diagnosis.

The study was divided to two separate steps. The first part involved a comparison between three denoising methods, empirical mode decomposition (EMD) and its two variants ensemble empirical mode decomposition (EEMD) and complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN). We note from the obtained results (Tables 1–5 and Figures 6–15) that the EEMD and the CEEMDAN methods for the most selected ECG signals for the different signalto-noise ratio (SNR) values yield the smallest values of MSE, RMSE, and PRD compared to those obtained by the EMD method. Despite the EEMD method providing a slight advantage than CEEMDAN for a few degrees of SNR in some ECG signals, we concluded that the most optimal technique for denoising this type of biomedical signals is CEEMDAN, especially for the large number of iterations

The second part of study presents a comparison of the different results of the three time-frequency techniques Choi-Williams (CW), periodogram (PE), and smoothed pseudo Wigner-Ville (SPWV). These time-frequency techniques were applied to normal and abnormal ECG signals with different degrees of SNR varying from 5 dB to 20 dB. We note that the PE technique provides the best results; it furnishes the smallest values of MSE, RMSE, and PRD than those obtained by the

After these two steps, we concluded that a combination of the two techniques, CEEMDAN denoising method and PE time-frequency technique, would be ideal for the ECG signal analysis. The CEEMDAN method will be reserved for the pretreatment phase to filter the noise, and in the second phase, the PE technique will be applied to supply the evolution of the ECG signal fequential components over the

The work purpose was to conduct two comparative studies to determine the best

methods. The second one was to compare some time-frequency techniques that are intended to analyze these biomedical signals. The obtained results show that, in the first part, the CEEMDAN presents a high effectiveness in the noise elimination and, in the second one, the periodogram provides the best solution for analyzing ECG signals. We conclude that a combination of the CEEMDAN denoising method and the PE time-frequency technique can be a good issue in analyzing the ECG signals.

techniques for ECG signal processing. The first one focused on the comparison between techniques aimed at preprocessing ECG signals, namely, denoising

> Azzedine Dliou\*, Samir Elouaham, Rachid Latif and Mostafa Laaboubi ESSI-LISTI Laboratory, National School of Applied Sciences, Ibn Zohr University, Agadir, Morocco

\*Address all correspondence to: dliou.azzedine@yahoo.fr

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

### References

[1] Jones SA. ECG Success Exercises in ECG Interpretation. Philadelphia: F. A. Davis Company; 2008

[2] Clifford GD, Azuaje F, McSharry PE. Advanced Methods and Tools for ECG Data Analysis. Norwood: Artech House, Inc; 2006

[3] Sende J. Guide Pratique ECG. ESTEM ed; 2003

[4] El B'charri O, Latif R, Elmansouri K, Abenaou A, Jenkal W. ECG signal performance de-noising assessment based on threshold tuning of dual-tree wavelet transform. Biomedical Engineering Online. 2017;16(1):26

[5] Huang NE, Shen Z, Long SR, Wu MC, Shih EH, Zheng Q, et al. The empirical mode decomposition method and the Hilbert spectrum for nonstationary time series analysis. Proceedings Royal Society of London. 1998;454A:903-995

[6] Liao A-H, Shen C-C, Li P-C. Contrast improvement by combining pulse inversion with EMD and EEMD. In: Proceedings of the IEEE International Ultrasonics Symposium (IUS'09); Rome, Italy. 2009. pp. 287-290

[7] Torres ME, Colominas MA, Schlotthauer G, Flandrin P. A complete ensemble empirical mode decomposition with adaptive noise. In: Proceedings of the 36th IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP'11). Prague, Czech Republic: IEEE; 2011. pp. 4144-4147

[8] Bigan C, Woolfson MS. Time– frequency analysis of short segments of biomedical data. IEE Proceedings Science, Measurement & Technology. 2000;147(6):368-373

[9] Clayton RH, Murray A. Estimation of the ECG signal spectrum during

ventricular fibrillation using the fast Fourier transform and maximum entropy methods. In: Proceedings of the Computers in Cardiology. 1993. pp. 867-870

[19] Physiobank, Physionet. Physiologic

DOI: http://dx.doi.org/10.5772/intechopen.86007

using ANFIS and periodogram techniques. International Review on Computers and Software. 2013;8(12):

2959-2966

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique…

Research. 2005. Available from: http:// www.physionet.org/physiobank/

[20] Elouaham S, Latif R, Nassiri B, Dliou A, Laaboubi M, Maoulainine F. Analysis electrocardiogram signal using

decomposition and time-frequency techniques. International Journal of Computer Engineering and Technology.

[21] Flandrin P, Rilling G, Goncalves P. Empirical mode decomposition as a filter bank. IEEE Signal Processing

decomposition and adaptive filtering for

Proceedings of 2012 IEEE International Symposium on Medical Measurements and Applications (MeMeA); 18-19 May 2012; Budapest, Hungary. 2012. pp. 1-5

[23] Yeh J-R, Shieh J-S, Huang NE. Complementary ensemble empirical mode decomposition: A novel noise enhanced data analysis method. Advances in Adaptive Data Analysis.

[24] Colominas MA, Schlotthauer G, Torres ME. Improved complete ensemble EMD: A suitable tool for biomedical signal processing. Biomedical Signal Processing and

[25] Choi H, Williams W. Improved time-frequency representation of multicomponent signals using

[26] Elouaham S, Latif R, Nassiri B, Dliou A, Laaboubi M, Maoulainine F. Analysis electroencephalogram signals

exponential kernels. IEEE Transactions on Signal Processing. 1989;37(6):

2010;2:135-156

862-871

43

Control. 2014;14:19-29

Signal Archives for Biomedical

[Accessed: August, 2005]

ensemble empirical mode

Letters. 2004;11:112-114

[22] He X, Goubran RA, Liu XP. Ensemble empirical mode

ECG signal enhancement. In:

2013;4(2):275-289

[10] Cooley JW, Tukey JW. An algorithm for machine calculation of complex Fourier series. Mathematics of Computation. 1965;19:297-301

[11] Addison PS. Wavelet transforms and the ECG: A review. Physiological Measurement. 2005;26:R155-R199

[12] Mousa A, Saleem R. Using reduced interference distribution to analyze abnormal cardiac signal. Journal of Electrical Engineering. 2011;62(3): 168-172

[13] Dliou A, Latif R, Laaboubi M, Maoulainine FMR. Abnormal ECG signals analysis using non-parametric time-frequency techniques. February 2014;39(2):913-921

[14] Latif R, Laaboubi M, Aassif E, Maze G. Détermination de l'épaisseur d'un tube élastique à partir de l'analyse temps-fréquence de Wigner–Ville. Journal of Acta Acustica. 2009;95(5): 843-848

[15] Hussain ZM, Boashash B. IF estimation for multicomponent signals. In: Time-Frequency Signal Analysis and Processing: A Comprehensive Reference. Oxford: Elsevier; 2003. pp. 437-445

[16] Cohen L. Time-frequency distributions—A review. Proceedings of the IEEE. 1989;77(7):941-981

[17] Cohen L. Time-Frequency Analysis. Englewood Cliffs: Prentice Hall PTR; 1995

[18] Flandrin P. Time-Frequency/Time-Scale Analysis. Boston: Academic Press; 1998

Combination of the CEEM Decomposition with Adaptive Noise and Periodogram Technique… DOI: http://dx.doi.org/10.5772/intechopen.86007

[19] Physiobank, Physionet. Physiologic Signal Archives for Biomedical Research. 2005. Available from: http:// www.physionet.org/physiobank/ [Accessed: August, 2005]

References

Inc; 2006

ESTEM ed; 2003

1998;454A:903-995

Davis Company; 2008

[1] Jones SA. ECG Success Exercises in ECG Interpretation. Philadelphia: F. A.

Practical Applications of Electrocardiogram

ventricular fibrillation using the fast Fourier transform and maximum entropy methods. In: Proceedings of the

Computers in Cardiology. 1993.

[10] Cooley JW, Tukey JW. An algorithm for machine calculation of complex Fourier series. Mathematics of

Computation. 1965;19:297-301

[11] Addison PS. Wavelet transforms and the ECG: A review. Physiological Measurement. 2005;26:R155-R199

[12] Mousa A, Saleem R. Using reduced interference distribution to analyze abnormal cardiac signal. Journal of Electrical Engineering. 2011;62(3):

[13] Dliou A, Latif R, Laaboubi M, Maoulainine FMR. Abnormal ECG signals analysis using non-parametric time-frequency techniques. February

[14] Latif R, Laaboubi M, Aassif E, Maze G. Détermination de l'épaisseur d'un tube élastique à partir de l'analyse temps-fréquence de Wigner–Ville. Journal of Acta Acustica. 2009;95(5):

[15] Hussain ZM, Boashash B. IF estimation for multicomponent signals. In: Time-Frequency Signal Analysis and

Processing: A Comprehensive Reference. Oxford: Elsevier; 2003.

[16] Cohen L. Time-frequency

the IEEE. 1989;77(7):941-981

distributions—A review. Proceedings of

[17] Cohen L. Time-Frequency Analysis. Englewood Cliffs: Prentice Hall PTR;

[18] Flandrin P. Time-Frequency/Time-Scale Analysis. Boston: Academic Press;

pp. 867-870

168-172

843-848

pp. 437-445

1995

1998

2014;39(2):913-921

[2] Clifford GD, Azuaje F, McSharry PE. Advanced Methods and Tools for ECG Data Analysis. Norwood: Artech House,

[4] El B'charri O, Latif R, Elmansouri K, Abenaou A, Jenkal W. ECG signal performance de-noising assessment based on threshold tuning of dual-tree

[3] Sende J. Guide Pratique ECG.

wavelet transform. Biomedical Engineering Online. 2017;16(1):26

[5] Huang NE, Shen Z, Long SR, Wu MC, Shih EH, Zheng Q, et al. The empirical mode decomposition method and the Hilbert spectrum for nonstationary time series analysis. Proceedings Royal Society of London.

[6] Liao A-H, Shen C-C, Li P-C. Contrast improvement by combining pulse inversion with EMD and EEMD. In: Proceedings of the IEEE International Ultrasonics Symposium (IUS'09); Rome, Italy. 2009. pp. 287-290

Schlotthauer G, Flandrin P. A complete

decomposition with adaptive noise. In:

International Conference on Acoustics,

(ICASSP'11). Prague, Czech Republic:

[9] Clayton RH, Murray A. Estimation of

[8] Bigan C, Woolfson MS. Time– frequency analysis of short segments of biomedical data. IEE Proceedings Science, Measurement & Technology.

the ECG signal spectrum during

[7] Torres ME, Colominas MA,

Proceedings of the 36th IEEE

Speech, and Signal Processing

IEEE; 2011. pp. 4144-4147

2000;147(6):368-373

42

ensemble empirical mode

[20] Elouaham S, Latif R, Nassiri B, Dliou A, Laaboubi M, Maoulainine F. Analysis electrocardiogram signal using ensemble empirical mode decomposition and time-frequency techniques. International Journal of Computer Engineering and Technology. 2013;4(2):275-289

[21] Flandrin P, Rilling G, Goncalves P. Empirical mode decomposition as a filter bank. IEEE Signal Processing Letters. 2004;11:112-114

[22] He X, Goubran RA, Liu XP. Ensemble empirical mode decomposition and adaptive filtering for ECG signal enhancement. In: Proceedings of 2012 IEEE International Symposium on Medical Measurements and Applications (MeMeA); 18-19 May 2012; Budapest, Hungary. 2012. pp. 1-5

[23] Yeh J-R, Shieh J-S, Huang NE. Complementary ensemble empirical mode decomposition: A novel noise enhanced data analysis method. Advances in Adaptive Data Analysis. 2010;2:135-156

[24] Colominas MA, Schlotthauer G, Torres ME. Improved complete ensemble EMD: A suitable tool for biomedical signal processing. Biomedical Signal Processing and Control. 2014;14:19-29

[25] Choi H, Williams W. Improved time-frequency representation of multicomponent signals using exponential kernels. IEEE Transactions on Signal Processing. 1989;37(6): 862-871

[26] Elouaham S, Latif R, Nassiri B, Dliou A, Laaboubi M, Maoulainine F. Analysis electroencephalogram signals using ANFIS and periodogram techniques. International Review on Computers and Software. 2013;8(12): 2959-2966

**45**

detection.

construction [24].

**Chapter 3**

**Abstract**

**1. Introduction**

Variant Maps

*Zhihui Hou and Jeffrey Zheng*

Visualization of ECG Data on

properties can be observed, and further explorations are required.

**Keywords:** variant maps, ECG data, visualization feature

important means of diagnosing abnormal cardiac activity.

This chapter presents variant maps for showing potential features in ECG data sets. The variant map is a visualization method different from a traditional ECG. In this chapter, the ECG data sets obtained by clinical ECG monitoring are used as the data source, and the corresponding variant maps are obtained by the variant statistics method. This chapter mainly introduces the variant statistics method about converting ECG data into variant maps. From sample results, various visual

Today, people still are in a state of high cardiovascular disease incidence. The world is paying attention to cardiovascular diseases [1], mainly relying on the detection of ECG signals to promote the research of cardiovascular diseases. ECG signals are the product of a wide range of clinical ECG technologies. The electrocardiogram represents cardiac function and graphic signals [2], which are

With the development of the information age, signal acquisition, data processing, and information analysis have become the main theme of scientific and technological development. In recent years, ECG signal research methods have made significant progress, such as the use of machine learning [3], clustering [4], partial fractal dimension [5], wavelet transform [6], and other methods for classification of arrhythmia detection [7]. Among the emerging ECG signal research methods, the most typical representative is the ECG scatter plot [8–10]. The ECG scatter plot observes the ECG signal in a new perspective, complementing traditional ECG

The variant method is an emerging method for dealing with the phase change of the signal phase. Now the variant method has formed the theory of variant theory, variant logic function, and variant visualization method. In the 1990s, the application of variant method in the processing of binary image classification and conversion [11, 12]. In 2010, the variant method had been improved [13, 14]. So far, the variant method has been continuously developed and applied to different data samples, quantum sequences [15, 16], random sequences [17], noncoding DNA [18–20], bat echo signals [21], ECG signals [22, 23], and variant

The variant method can process massive random sequences and extract statistical measurement features from them. The ECG sequence is a natural random

#### **Chapter 3**

## Visualization of ECG Data on Variant Maps

*Zhihui Hou and Jeffrey Zheng*

#### **Abstract**

This chapter presents variant maps for showing potential features in ECG data sets. The variant map is a visualization method different from a traditional ECG. In this chapter, the ECG data sets obtained by clinical ECG monitoring are used as the data source, and the corresponding variant maps are obtained by the variant statistics method. This chapter mainly introduces the variant statistics method about converting ECG data into variant maps. From sample results, various visual properties can be observed, and further explorations are required.

**Keywords:** variant maps, ECG data, visualization feature

#### **1. Introduction**

Today, people still are in a state of high cardiovascular disease incidence. The world is paying attention to cardiovascular diseases [1], mainly relying on the detection of ECG signals to promote the research of cardiovascular diseases. ECG signals are the product of a wide range of clinical ECG technologies. The electrocardiogram represents cardiac function and graphic signals [2], which are important means of diagnosing abnormal cardiac activity.

With the development of the information age, signal acquisition, data processing, and information analysis have become the main theme of scientific and technological development. In recent years, ECG signal research methods have made significant progress, such as the use of machine learning [3], clustering [4], partial fractal dimension [5], wavelet transform [6], and other methods for classification of arrhythmia detection [7]. Among the emerging ECG signal research methods, the most typical representative is the ECG scatter plot [8–10]. The ECG scatter plot observes the ECG signal in a new perspective, complementing traditional ECG detection.

The variant method is an emerging method for dealing with the phase change of the signal phase. Now the variant method has formed the theory of variant theory, variant logic function, and variant visualization method. In the 1990s, the application of variant method in the processing of binary image classification and conversion [11, 12]. In 2010, the variant method had been improved [13, 14]. So far, the variant method has been continuously developed and applied to different data samples, quantum sequences [15, 16], random sequences [17], noncoding DNA [18–20], bat echo signals [21], ECG signals [22, 23], and variant construction [24].

The variant method can process massive random sequences and extract statistical measurement features from them. The ECG sequence is a natural random sequence. It is a good fit to apply the variant method to the statistical measurement characteristics of massive ECG sequences. It has research value. The main purpose of this chapter is to study the visual characteristics of ECG signals and to mine valuable information in ECG signals. This chapter introduces the overall architecture, module function, and core algorithm of the variant measurement system. The results of this study show that the variant maps provide a new observation angle for ECG signal feature detection, and it shows the resolution of ECG data in visual effect.

The experimental data samples and experimental results in this chapter will be introduced in the fourth part. The overall structure and workflow of the variant measurement system are introduced in the second part. The third part introduces core module function and algorithm and finally summarizes the research.

### **2. Variant map for ECG**

### **2.1 Overall structure**

The variant measurement system is divided into five modules as a whole, which are an input data source module, a variant processing module, a segmentation measurement module, a state statistics module, and an output variant map module. The structure of variant measurement is shown in **Figure 1**.

It can be seen in **Figure 1** that each module has its specific function. The input data source module is mainly used to read the ECG sequence. The main function of the variant processing module is to discretize the continuous ECG sequence. Segmentation measurement module is to segment the sequence. The main function of the state statistics module is to count the state of the pseudogene sequence.

#### **2.2 Workflow chart**

The five modules in the variant measurement system are independent and connected. The workflow of the entire variant measurement system is shown in **Figure 2**.

As can be seen from **Figure 2**, the five modules of the variant measurement system are arranged in order. The output of the previous module is the input of the next module. The input and output of each module are as follows:


**47**

adjustability.

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

sequence, where N = M\*m.

*The workflow of variant measurement.*

**3.1 Variant processing module**

**Parameter setting:**

*3.1.1 Parameter setting submodule*

discrete 4-primary pseudogene sequences.

input and output relationship of the module is:

scatter plot.

**Figure 2.**

**3. Core module**

in **Figure 3**.

greater than 0. **Input:**

**Procedure:**

**Output:**

integer.

integer.

3. Segmentation measurement module: Input segment length value "m," input pseudogene sequence of length N, output is divided into M segment pseudogene

5. Variable value graph output module: Input variant measure, output variant ECG

The core function of the module is to process successive ECG sequences into

The variant processing module includes three submodules, a parameter setting submodule, a data discretization submodule, and a variant processing submodule. The three submodules are closely related, and the workflow of the module is shown

As can be seen from the workflow chart of the variant processing module, the

Sliding window value "W," ; threshold "R," R is a natural number

The base sequence value of length N: , where N is a positive

A conversion sequence of length N: , where N is a positive

Pseudogene sequence of length N: , N belongs to a

The above is the overall workflow of the variant processing module. Since the variant processing module includes a parameter setting submodule, a data discretization submodule, and a variant conversion submodule, the functions of each

The parameter setting is to set the sliding window value "W" and the threshold "R" two parameters. It should be noted that the parameters have dynamic

positive integer, and is an element in .

submodule and its core algorithm will be specifically described below.

4. State statistics module: Input the pseudogene sequence with length M (N = M\*m), and output the corresponding variable measure value.

**Figure 1.** *The structure of variant measurement.* *Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

#### **Figure 2.**

*Practical Applications of Electrocardiogram*

data in visual effect.

**2. Variant map for ECG**

**2.1 Overall structure**

sequence.

**2.2 Workflow chart**

sequence.

sequence. It is a good fit to apply the variant method to the statistical measurement characteristics of massive ECG sequences. It has research value. The main purpose of this chapter is to study the visual characteristics of ECG signals and to mine valuable information in ECG signals. This chapter introduces the overall architecture, module function, and core algorithm of the variant measurement system. The results of this study show that the variant maps provide a new observation angle for ECG signal feature detection, and it shows the resolution of ECG

The experimental data samples and experimental results in this chapter will be introduced in the fourth part. The overall structure and workflow of the variant measurement system are introduced in the second part. The third part introduces

The variant measurement system is divided into five modules as a whole, which

It can be seen in **Figure 1** that each module has its specific function. The input data source module is mainly used to read the ECG sequence. The main function of the variant processing module is to discretize the continuous ECG sequence. Segmentation measurement module is to segment the sequence. The main function of the state statistics module is to count the state of the pseudogene

The five modules in the variant measurement system are independent and connected. The workflow of the entire variant measurement system is shown in **Figure 2**. As can be seen from **Figure 2**, the five modules of the variant measurement system are arranged in order. The output of the previous module is the input of the

1. Input data source module: The input data set, the output is the length of N ECG

2. Variable value processing module: Input is ECG sequence of length N, and the

are an input data source module, a variant processing module, a segmentation measurement module, a state statistics module, and an output variant map module.

The structure of variant measurement is shown in **Figure 1**.

next module. The input and output of each module are as follows:

output is pseudogene sequence of length N.

core module function and algorithm and finally summarizes the research.

**46**

**Figure 1.**

*The structure of variant measurement.*

*The workflow of variant measurement.*


#### **3. Core module**

#### **3.1 Variant processing module**

The core function of the module is to process successive ECG sequences into discrete 4-primary pseudogene sequences.

The variant processing module includes three submodules, a parameter setting submodule, a data discretization submodule, and a variant processing submodule. The three submodules are closely related, and the workflow of the module is shown in **Figure 3**.

As can be seen from the workflow chart of the variant processing module, the input and output relationship of the module is:

#### **Parameter setting:**

Sliding window value "W," ; threshold "R," R is a natural number greater than 0.

#### **Input:**

The base sequence value of length N: , where N is a positive integer.

#### **Procedure:**

A conversion sequence of length N: , where N is a positive integer.

#### **Output:**

Pseudogene sequence of length N: , N belongs to a positive integer, and is an element in .

The above is the overall workflow of the variant processing module. Since the variant processing module includes a parameter setting submodule, a data discretization submodule, and a variant conversion submodule, the functions of each submodule and its core algorithm will be specifically described below.

#### *3.1.1 Parameter setting submodule*

The parameter setting is to set the sliding window value "W" and the threshold "R" two parameters. It should be noted that the parameters have dynamic adjustability.

#### **Figure 3.** *The workflow of variant processing.*

#### *3.1.2 Data discretization submodule*

The specific variable discretization algorithm is divided into three steps: the first step calculates the average sequence corresponding to the base sequence, the second step calculates the truncated average sequence corresponding to the base sequence, and the third step calculates the conversion sequence corresponding to the base sequence. The calculation of these three steps is as follows:

1. The first step is to calculate the average sequence corresponding to the base sequence. In the sliding window value, the sliding window is sequentially moved from the first position of the base sequence, one bit at a time, and the average value in the sliding window value obtained by each movement is calculated. The calculation process is:

#### **Input:**

The base sequence value of length N is , N is a positive integer; the sliding window value is "W," .

#### **Processing:**

Here is an example of the process of calculating a sliding window. Suppose the base sequence in the sliding window value "W" is ; then the average value of the sequence is .

**49**

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

is calculated. The calculation process is:

threshold "R," R is a natural number greater than 0.

**Input:**

**Processing:**

**Output:**

sequence: **Input:**

**Processing:**

**Output:**

*3.1.3 Variant processing submodule*

integer.

as follows: **Input:**

**Processing:**

the conversion sequence:

2. The second step calculates the truncated average sequence corresponding to the base sequence. In the sliding window value, the sliding window is sequentially moved from the first position of the base sequence, one bit at a time, and the truncated average value in the sliding window value obtained by each movement

Base sequence value of length N: , N is a positive integer;

Here is an example of the process of calculating a sliding window. Suppose the base sequence in the sliding window value "W" is ; then the maxi-

, then the truncated mean of the sequence is .

mum value of the elements in the sequence is , the minimum value is

3. The third step calculates the conversion sequence corresponding to the base

For example, calculation of the i-th element in the base sequence to the i-th

Conversion sequence of length N is , where N is a positive

The variant processing submodule is for processing the conversion sequence into a corresponding pseudogene sequence. The conversion rule is based on the threshold value, dividing the number axis into four intervals, and the four intervals correspond to the four primitives of the gene sequence: A, G, C, and T. When the conversion value is greater than or equal to the threshold, the conversion value is defined as A. When the conversion value is less than or equal to the negative threshold, the conversion value is defined as T. When the conversion value is greater than 0 and less than the threshold, the conversion value is defined as G, and when the conversion value is less than 0. When the value is greater than the negative threshold, the conversion value is defined as C; the conversion rules are

A sequence of converted values of length N: ; N is a positive

For example, conversion rule between the i-th element and the threshold in

integer; threshold "R," R is a natural number greater than 0.

Truncated average sequence of length N: .

the truncated average sequence of length N is .

Threshold "R," R is a natural number greater than 0; the base sequence of length N is ; the average sequence of length N is ; and

element in the conversion sequence: .

#### **Output:**

The average sequence of length N is .

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

2. The second step calculates the truncated average sequence corresponding to the base sequence. In the sliding window value, the sliding window is sequentially moved from the first position of the base sequence, one bit at a time, and the truncated average value in the sliding window value obtained by each movement is calculated. The calculation process is:

#### **Input:**

*Practical Applications of Electrocardiogram*

*3.1.2 Data discretization submodule*

*The workflow of variant processing.*

calculation process is:

value of the sequence is .

**Input:**

**Figure 3.**

**Processing:**

**Output:**

sequence. The calculation of these three steps is as follows:

integer; the sliding window value is "W," .

The average sequence of length N is .

The specific variable discretization algorithm is divided into three steps: the first step calculates the average sequence corresponding to the base sequence, the second step calculates the truncated average sequence corresponding to the base sequence, and the third step calculates the conversion sequence corresponding to the base

1. The first step is to calculate the average sequence corresponding to the base sequence. In the sliding window value, the sliding window is sequentially moved from the first position of the base sequence, one bit at a time, and the average value in the sliding window value obtained by each movement is calculated. The

The base sequence value of length N is , N is a positive

Here is an example of the process of calculating a sliding window. Suppose the base sequence in the sliding window value "W" is ; then the average

**48**

Base sequence value of length N: , N is a positive integer; threshold "R," R is a natural number greater than 0.

#### **Processing:**

Here is an example of the process of calculating a sliding window. Suppose the base sequence in the sliding window value "W" is ; then the maxi-

mum value of the elements in the sequence is , the minimum value is

, then the truncated mean of the sequence is . **Output:**

Truncated average sequence of length N: .

3. The third step calculates the conversion sequence corresponding to the base sequence:

#### **Input:**

Threshold "R," R is a natural number greater than 0;

the base sequence of length N is ;

the average sequence of length N is ; and

the truncated average sequence of length N is .

#### **Processing:**

For example, calculation of the i-th element in the base sequence to the i-th element in the conversion sequence: .

#### **Output:**

Conversion sequence of length N is , where N is a positive integer.

#### *3.1.3 Variant processing submodule*

The variant processing submodule is for processing the conversion sequence into a corresponding pseudogene sequence. The conversion rule is based on the threshold value, dividing the number axis into four intervals, and the four intervals correspond to the four primitives of the gene sequence: A, G, C, and T. When the conversion value is greater than or equal to the threshold, the conversion value is defined as A. When the conversion value is less than or equal to the negative threshold, the conversion value is defined as T. When the conversion value is greater than 0 and less than the threshold, the conversion value is defined as G, and when the conversion value is less than 0. When the value is greater than the negative threshold, the conversion value is defined as C; the conversion rules are as follows:

#### **Input:**

A sequence of converted values of length N: ; N is a positive integer; threshold "R," R is a natural number greater than 0.

#### **Processing:**

For example, conversion rule between the i-th element and the threshold in the conversion sequence:

$$\begin{array}{c} \text{if } \mathsf{f} \cdot \mathsf{R} \leq \mathsf{t}\_{i} < \mathsf{0} \text{ if } \mathsf{t}\_{i} \to \mathsf{C} \quad \text{if } \mathsf{t}\_{i} \leq \mathsf{t}\_{i} > \mathsf{0} \text{ if } \mathsf{t}\_{i} \to \mathsf{T} \end{array}$$

#### **Output:**

```
A pseudogene sequence of length N , where N is a 
positive integer.
```
#### **3.2 Segmented measurement module**

The segmentation measurement module is to segment the pseudogene sequence. The function of this step is simple, but it is essential to prepare for the state statistics module. It should be noted that the segmentation measurement method here is different from the sliding window value in the variable value processing module. The principle of sliding window operation in the variable value processing module is to perform correlation measurement in order of 1 interval and sliding window value as unit length. The segmentation measurement is based on the segment length and sequentially segments the data sequence. For example, when the segment length is m, the pseudogene sequence of length N can be divided into M segments, N = M\*m. The workflow of segmented measurement is in **Figure 4**.

The input and output relationship of this module is:

#### **Parameter setting:**

The segment length value is recorded as "m," .

#### **Input:**

Segmentation length value "m"; pseudogene sequence of length N: .

#### **Processing:**

Segmenting the pseudogene sequence of length N in turn at intervals of segment length m.

#### **Output:**

The segmentation length of m is divided into M groups of pseudogene sequences ; where .

#### **3.3 Variant state statistics module**

This module statistically analyzes the sequence mathematically, revealing the patterns in the data and the relationship between the data. The module uses

**51**

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

chart is shown in **Figure 5**.

*The workflow of variable state statistics.*

Segment length with m; pseudogene sequence

**Output:** Probability measure sequence.

in the grouped pseudogene sequence as an example:

sequence consisting of all pseudogenes in the i-th group.

**Input:**

**Figure 5.**

**Processing:**

are defined as follows.

*3.3.1 Variant conversion statistics*

measurement.

statistical ideas to calculate the measure values of the various primitives of A, G, C, and T in the pseudogene sequence. The measurement method is to count the number of each primitive in each group in the grouping sequence of the pseudogene sequence and mark the obtained value as a state statistical sequence. The workflow

Processing includes variant conversion statistics and variant probability

As can be seen from **Figure 5**, the input and output relationship of the module is:

The rules for variant conversion statistics and variant probability measurement

The process of variant conversion statistics is illustrated by taking the i-th group

 represents the value of the number of A primitives in the i-th group; represents the value of the number of G primitives in the i-th group; represents the value of the number of C primitives in the i-th group; and represents the value of the number of T primitives in the i-th group.

Taking the i-th group as an example, the state measurement sequence

can be obtained by analogy.

; where , is a pseudogene

; where .

**Figure 4.** *The workflow of segmented measurement.*

#### **Figure 5.**

*Practical Applications of Electrocardiogram*

**3.2 Segmented measurement module**

**Parameter setting:**

.

**3.3 Variant state statistics module**

**Input:**

length m. **Output:**

**Processing:**

The workflow of segmented measurement is in **Figure 4**. The input and output relationship of this module is:

The segment length value is recorded as "m," .

Segmentation length value "m"; pseudogene sequence of length N:

Segmenting the pseudogene sequence of length N in turn at intervals of segment

The segmentation length of m is divided into M groups of pseudogene sequences ; where .

This module statistically analyzes the sequence mathematically, revealing the patterns in the data and the relationship between the data. The module uses

A pseudogene sequence of length N , where N is a

The segmentation measurement module is to segment the pseudogene sequence. The function of this step is simple, but it is essential to prepare for the state statistics module. It should be noted that the segmentation measurement method here is different from the sliding window value in the variable value processing module. The principle of sliding window operation in the variable value processing module is to perform correlation measurement in order of 1 interval and sliding window value as unit length. The segmentation measurement is based on the segment length and sequentially segments the data sequence. For example, when the segment length is m, the pseudogene sequence of length N can be divided into M segments, N = M\*m.

**Output:**

positive integer.

**50**

**Figure 4.**

*The workflow of segmented measurement.*

*The workflow of variable state statistics.*

statistical ideas to calculate the measure values of the various primitives of A, G, C, and T in the pseudogene sequence. The measurement method is to count the number of each primitive in each group in the grouping sequence of the pseudogene sequence and mark the obtained value as a state statistical sequence. The workflow chart is shown in **Figure 5**.

As can be seen from **Figure 5**, the input and output relationship of the module is: **Input:**

Segment length with m; pseudogene sequence

; where .

#### **Processing:**

Processing includes variant conversion statistics and variant probability measurement.

**Output:** Probability measure sequence.

The rules for variant conversion statistics and variant probability measurement are defined as follows.

#### *3.3.1 Variant conversion statistics*

The process of variant conversion statistics is illustrated by taking the i-th group in the grouped pseudogene sequence as an example:

; where , is a pseudogene sequence consisting of all pseudogenes in the i-th group.

 represents the value of the number of A primitives in the i-th group; represents the value of the number of G primitives in the i-th group; represents the value of the number of C primitives in the i-th group; and represents the value of the number of T primitives in the i-th group.

Taking the i-th group as an example, the state measurement sequence can be obtained by analogy.

#### *3.3.2 Variant probability measurement*

The following describes the process of probability measurement by taking the i-th group in the pseudogene sequence as an example:

Taking the i-th group as an example, the probability measurement sequence can be obtained by analogy.

#### **4. Sample results and brief analysis**

#### **4.1 Data source description**

ECG data samples from the First People's Hospital of Yunnan Province. This batch of data sets was initially analyzed by hospital experts. In order to facilitate the experimental research, an ECG database was established to classify ECG data. Among them, the normal ECG data is about 138 MB, and the abnormal ECG data is about 362 MB. The data samples obtained by collation are shown in **Figure 6**.

As can be seen in **Figure 6**, ECG data belongs to multivalued data and has a plurality of different attribute values, including pr interval, qt interval, p wave, qrs wave, and the like. In the medical field, the diagnosis of P-wave signals is a key point and difficulty in research. The P wave is the key to the diagnosis of arrhythmia; as shown in **Figure 7**, it is the normal ECG signal that marks P.

Based on the above background, this chapter selects the P-wave data in the ECG data provided by the First People's Hospital of Yunnan Province to perform variable value visualization analysis. In order to ensure the rigor of the experiment, the normal P wave and the abnormal P wave of the same data amount were selected


**53**

**Figure 8.**

*P-wave variant map.*

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

for research. By comparing the variant maps between the normal P wave and the

data source and parameter value; the data source is a normal P-wave ECG sequence of length 10,254, an abnormal P-wave ECG sequence of length 10,254; the parameter is the sliding window value "W," and the threshold "R," a segment length value "m";

Variant maps: the X-axis represents the probability measure of G in the four primitives A, G, C, and T, and the Y-axis represents the probability measure of C in the four

**Figure 8** shows an example of normal P-wave and anomalous P-wave variation map. This example is a variable value map obtained under the condition that the

*Normal P-wave and abnormal P-wave characteristics. (a) Normal P-wave variant map. (b) Abnormal* 

abnormal P wave, the useful information in the ECG data is mined.

The process is completed by the variant measurement system.

primitives A, G, C, and T. Marked on the variable map as X = St(G), Y=St(C).

**4.2 Meaning of selected variable value map**

**Input:**

**Figure 7.**

**Processing:**

**4.3 Visualization features**

*The normal ECG signal that marks P.*

**Output:**

**Figure 6.** *Sample of ECG data.*

**Figure 7.** *The normal ECG signal that marks P.*

for research. By comparing the variant maps between the normal P wave and the abnormal P wave, the useful information in the ECG data is mined.

#### **4.2 Meaning of selected variable value map**

#### **Input:**

*Practical Applications of Electrocardiogram*

*3.3.2 Variant probability measurement*

i-th group in the pseudogene sequence as an example:

can be obtained by analogy.

**4. Sample results and brief analysis**

**4.1 Data source description**

The following describes the process of probability measurement by taking the

Taking the i-th group as an example, the probability measurement sequence

ECG data samples from the First People's Hospital of Yunnan Province. This batch of data sets was initially analyzed by hospital experts. In order to facilitate the experimental research, an ECG database was established to classify ECG data. Among them, the normal ECG data is about 138 MB, and the abnormal ECG data is about 362 MB. The data samples obtained by collation are shown in **Figure 6**. As can be seen in **Figure 6**, ECG data belongs to multivalued data and has a plurality of different attribute values, including pr interval, qt interval, p wave, qrs wave, and the like. In the medical field, the diagnosis of P-wave signals is a key point and difficulty in research. The P wave is the key to the diagnosis of arrhyth-

Based on the above background, this chapter selects the P-wave data in the ECG data provided by the First People's Hospital of Yunnan Province to perform variable value visualization analysis. In order to ensure the rigor of the experiment, the normal P wave and the abnormal P wave of the same data amount were selected

mia; as shown in **Figure 7**, it is the normal ECG signal that marks P.

**52**

**Figure 6.**

*Sample of ECG data.*

data source and parameter value; the data source is a normal P-wave ECG sequence of length 10,254, an abnormal P-wave ECG sequence of length 10,254; the parameter is the sliding window value "W," and the threshold "R," a segment length value "m";

#### **Processing:**

The process is completed by the variant measurement system.

#### **Output:**

Variant maps: the X-axis represents the probability measure of G in the four primitives A, G, C, and T, and the Y-axis represents the probability measure of C in the four primitives A, G, C, and T. Marked on the variable map as X = St(G), Y=St(C).

#### **4.3 Visualization features**

**Figure 8** shows an example of normal P-wave and anomalous P-wave variation map. This example is a variable value map obtained under the condition that the

#### **Figure 8.**

*Normal P-wave and abnormal P-wave characteristics. (a) Normal P-wave variant map. (b) Abnormal P-wave variant map.*

parameter sliding window value W = 24, the threshold R = 0.85, and the segment length value m = 100 are selected. It can be seen that there are obvious differences in the shape characteristics of the normal P-wave and the abnormal P-wave scatter cluster, and the distribution characteristics of the scatter cluster between the two are also different. The normal P-wave characteristics are mainly concentrated in the interior of the quadrilateral formed by "(0.3, 0.4), (0.4, 0.1), (0.8, 0.4), (0.8, 0.7)." The abnormal P-wave characteristics are mainly concentrated inside the triangle formed by "(0, 1), (0.4, 0.4), (1, 1)."

In order to better display the variant features, the following will be shown as an example of the visualization results under different "m" values (**Figure 9**).

**55**

**5. Summary**

**Figure 9.**

traditional clinical ECG can be compared:

This chapter is closely related to the measurement model, processing method, and variant maps to study ECG signals. To some extent, the variant maps and the

*A list of variant maps on parameters M = {50,80,110,140,170,200}; (a1)–(a6) is a list of normal P wave; and (b1)–(b6) is a list of abnormal P wave. (a1) m = 50, (a2) m = 80, (a3) m = 110, (a4) m = 140, (a5) m = 170, and (a6) m = 200; and (b1) m = 50, (b2) m = 80, (b3) m = 110, (b4) m = 140, (b5) m = 170, and (b6) m = 200.*

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

*Practical Applications of Electrocardiogram*

formed by "(0, 1), (0.4, 0.4), (1, 1)."

parameter sliding window value W = 24, the threshold R = 0.85, and the segment length value m = 100 are selected. It can be seen that there are obvious differences in the shape characteristics of the normal P-wave and the abnormal P-wave scatter cluster, and the distribution characteristics of the scatter cluster between the two are also different. The normal P-wave characteristics are mainly concentrated in the interior of the quadrilateral formed by "(0.3, 0.4), (0.4, 0.1), (0.8, 0.4), (0.8, 0.7)." The abnormal P-wave characteristics are mainly concentrated inside the triangle

In order to better display the variant features, the following will be shown as an

example of the visualization results under different "m" values (**Figure 9**).

**54**

#### **Figure 9.**

*A list of variant maps on parameters M = {50,80,110,140,170,200}; (a1)–(a6) is a list of normal P wave; and (b1)–(b6) is a list of abnormal P wave. (a1) m = 50, (a2) m = 80, (a3) m = 110, (a4) m = 140, (a5) m = 170, and (a6) m = 200; and (b1) m = 50, (b2) m = 80, (b3) m = 110, (b4) m = 140, (b5) m = 170, and (b6) m = 200.*

#### **5. Summary**

This chapter is closely related to the measurement model, processing method, and variant maps to study ECG signals. To some extent, the variant maps and the traditional clinical ECG can be compared:


The experimental results in this chapter demonstrate the visual characteristics of the differences in ECG data, giving a simple and clear visual experience, but the research in this chapter still has some shortcomings: due to the differences in the detection instruments, the different backgrounds of the times, the different data sources, and the lack of specific ECG diagnostic experts to guide these factors in the reality, the basic research of this chapter needs to be further improved.

Further cooperation with hospital ECG experts in the later stage is expected, combined with computer method technology, to process more targeted ECG data and further improve the variant measurement system to form a standard model, and combined with pathological conditions; the corresponding quantitative evaluation criteria were studied.

It is necessary to specifically note here that the parameters selected in the experiments in this chapter are selected after a large number of experiments, and the selection is based on the integrity, usability, and stability of the image features in the visualization results.

#### **Acknowledgements**

Thanks to First People's Hospital of Yunnan Province for ECG data, Key project of Electric Information and Next Generation IT Technology of Yunnan (2018ZI002), National Science Foundation of China NSFC (61362014), and the Overseas Higherlevel Scholar Project of Yunnan for financial supports of the project.

#### **Author details**

Zhihui Hou1 and Jeffrey Zheng2 \*

1 China Yangtze Power Co., Ltd., Hubei, China

2 School of Software, Yunnan University, Kunming, China

\*Address all correspondence to: conjugatelogic@yahoo.com

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

**57**

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

[1] Sabab SA, Munshi AR, Pritom AI, Shihabuzzaman. Cardiovascular disease prognosis using effective classification and feature selection technique. In: The International Conference on Medical Engineering, Health Informatics and Technology (MediTec); Dhaka,

of electrocardiogram based on Lorenz plot. In: IEEE International Conference on Robotics and Biomimetics (ROBIO); Zhuhai, China; 2015. pp. 644-649

[9] Chawla MPS. Segment classification

[10] Zheng ZJ, Maeder AJ. The Conjugate Classification of the Kernel Form of the Hexagonal Grid. Japan, Tokyo: Springer;

[11] Zheng ZJ. Conjugate transformation of regular plan lattices for binary images [PhD thesis]. Monash University; 1994

[12] Zheng JZJ, Zheng CH. A framework

[13] Zheng JZJ, Zheng CH, Kunii TL. A Framework of Variant Logic Construction for Cellular Automata.

Chapter: 16. InTech Press. 2011. DOI:

[14] Zheng JZJ, Zheng CH. Variant measures and visualized statistical distributions. Acta Photonica Sinica.

[15] Zheng JZJ, Zheng CH. Variant simulation system using quaternion structures. Journal of Modern Optics.

[16] Wang H, Zheng JZJ. 3D visual method of variant logic construction for random sequence. In: Proceedings of the 14th Australian Information Warfare and Security Conference; Perth; 2013

to express variant and invariant functional spaces for binary logic. Frontiers of Electrical and Electronic Engineering in China. 2010;**5**:163

In book: Cellular Automata - Innovative Modelling for Science and Engineering, Edition: 1,

10.13140/2.1.4071.5208

2011;**40**:1397

2012;**59**:484

of ECG data and construction of scatter plots using principal component analysis. Journal of Mechanics in Medicine and Biology.

2008;**08**(03):421-458

1992

[2] Subramanian B, Ramya K, Asokan R. Anatomizing electrocardiogram using fractal features and GUI based detection of P and T waves. In: International

Conference on Wireless Communications,

[3] Skowronski MD, Harris JG. Acoustic detection and classification of microchiroptera using machine learning: Lessons learned from automatic speech recognition. The Journal of the Acoustical

Signal Processing and Networking (WiSPNET); India; 2016. pp. 469-473

Society of America. 2006;**119**:1817

[5] Mishra AK, Raghav S. Local fractal dimension based ECG

[6] Kutlu Y, Kuntalp D. Feature extraction for ECG heartbeats using higher order statistics of WPD coefficients. Computer Methods and Programs in Biomedicine.

[7] Luz EJS, Schwartz WR, Cámara-Chávez G, Menott D. ECG-based heartbeat classification for arrhythmia

Methods and Programs in Biomedicine.

[8] Wang W, Wei Y, Guan N, Wang Y. The automatic detection and analysis

detection: A survey. Computer

arrhythmia classification. Biomedical Signal Processing and Control.

2006;**36**(4):376-388

2010;**5**(2):114-123

2012;**105**(3):257-267

2016;**127**:144-164

[4] Özbay Y, Ceylan R, Karlik B. A fuzzy clustering neural network architecture for classification of ECG arrhythmias. Computers in Biology and Medicine.

Bangladesh; 2016. pp. 1-6

**References**

*Visualization of ECG Data on Variant Maps DOI: http://dx.doi.org/10.5772/intechopen.83552*

#### **References**

*Practical Applications of Electrocardiogram*

tion criteria were studied.

in the visualization results.

**Acknowledgements**

**Author details**

Zhihui Hou1

1.The electrocardiogram is a characteristic map obtained by processing the individual ECG signal. The variant maps, which mainly target massive ECG signals, can process individual ECG signals and can also process cluster ECG

2.The waveform features on the electrocardiogram have strong professionalism and complexity, while variant maps show waveform features from another perspective in the form of scatter clusters; variant maps visualization features are simple and clear. Nonprofessional ECG experts can also see the difference

The experimental results in this chapter demonstrate the visual characteristics of the differences in ECG data, giving a simple and clear visual experience, but the research in this chapter still has some shortcomings: due to the differences in the detection instruments, the different backgrounds of the times, the different data sources, and the lack of specific ECG diagnostic experts to guide these factors in the

Further cooperation with hospital ECG experts in the later stage is expected, combined with computer method technology, to process more targeted ECG data and further improve the variant measurement system to form a standard model, and combined with pathological conditions; the corresponding quantitative evalua-

It is necessary to specifically note here that the parameters selected in the experiments in this chapter are selected after a large number of experiments, and the selection is based on the integrity, usability, and stability of the image features

Thanks to First People's Hospital of Yunnan Province for ECG data, Key project of Electric Information and Next Generation IT Technology of Yunnan (2018ZI002), National Science Foundation of China NSFC (61362014), and the Overseas Higher-

level Scholar Project of Yunnan for financial supports of the project.

\*

2 School of Software, Yunnan University, Kunming, China

\*Address all correspondence to: conjugatelogic@yahoo.com

signals to provide visual analysis of points and surfaces.

between normal and abnormal ECG characteristics.

reality, the basic research of this chapter needs to be further improved.

**56**

provided the original work is properly cited.

and Jeffrey Zheng2

1 China Yangtze Power Co., Ltd., Hubei, China

© 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

[1] Sabab SA, Munshi AR, Pritom AI, Shihabuzzaman. Cardiovascular disease prognosis using effective classification and feature selection technique. In: The International Conference on Medical Engineering, Health Informatics and Technology (MediTec); Dhaka, Bangladesh; 2016. pp. 1-6

[2] Subramanian B, Ramya K, Asokan R. Anatomizing electrocardiogram using fractal features and GUI based detection of P and T waves. In: International Conference on Wireless Communications, Signal Processing and Networking (WiSPNET); India; 2016. pp. 469-473

[3] Skowronski MD, Harris JG. Acoustic detection and classification of microchiroptera using machine learning: Lessons learned from automatic speech recognition. The Journal of the Acoustical Society of America. 2006;**119**:1817

[4] Özbay Y, Ceylan R, Karlik B. A fuzzy clustering neural network architecture for classification of ECG arrhythmias. Computers in Biology and Medicine. 2006;**36**(4):376-388

[5] Mishra AK, Raghav S. Local fractal dimension based ECG arrhythmia classification. Biomedical Signal Processing and Control. 2010;**5**(2):114-123

[6] Kutlu Y, Kuntalp D. Feature extraction for ECG heartbeats using higher order statistics of WPD coefficients. Computer Methods and Programs in Biomedicine. 2012;**105**(3):257-267

[7] Luz EJS, Schwartz WR, Cámara-Chávez G, Menott D. ECG-based heartbeat classification for arrhythmia detection: A survey. Computer Methods and Programs in Biomedicine. 2016;**127**:144-164

[8] Wang W, Wei Y, Guan N, Wang Y. The automatic detection and analysis of electrocardiogram based on Lorenz plot. In: IEEE International Conference on Robotics and Biomimetics (ROBIO); Zhuhai, China; 2015. pp. 644-649

[9] Chawla MPS. Segment classification of ECG data and construction of scatter plots using principal component analysis. Journal of Mechanics in Medicine and Biology. 2008;**08**(03):421-458

[10] Zheng ZJ, Maeder AJ. The Conjugate Classification of the Kernel Form of the Hexagonal Grid. Japan, Tokyo: Springer; 1992

[11] Zheng ZJ. Conjugate transformation of regular plan lattices for binary images [PhD thesis]. Monash University; 1994

[12] Zheng JZJ, Zheng CH. A framework to express variant and invariant functional spaces for binary logic. Frontiers of Electrical and Electronic Engineering in China. 2010;**5**:163

[13] Zheng JZJ, Zheng CH, Kunii TL. A Framework of Variant Logic Construction for Cellular Automata. In book: Cellular Automata - Innovative Modelling for Science and Engineering, Edition: 1, Chapter: 16. InTech Press. 2011. DOI: 10.13140/2.1.4071.5208

[14] Zheng JZJ, Zheng CH. Variant measures and visualized statistical distributions. Acta Photonica Sinica. 2011;**40**:1397

[15] Zheng JZJ, Zheng CH. Variant simulation system using quaternion structures. Journal of Modern Optics. 2012;**59**:484

[16] Wang H, Zheng JZJ. 3D visual method of variant logic construction for random sequence. In: Proceedings of the 14th Australian Information Warfare and Security Conference; Perth; 2013

[17] Zheng J, Zhang W, Luo J, Zhou W, Shen R. Variant map system to simulate complex properties of DNA interactions using binary sequences. Advances in Pure Mathematics. 2013;**3**:5

[18] Zheng J, Luo J, Zhou W. Pseudo DNA sequence generation of noncoding distributions using variant maps on cellular automata. Applied Mathematics. 2014;**5**:153

[19] Zheng J, Zhang W, Luo J, Zhou W, Liesaputra V. Variant map construction to detect symmetric properties of genomes on 2D distributions. Journal of Data Mining in Genomics & Proteomics. 2014;**5**:1

[20] Heim D, Heim O, Zeng PA, Zheng J. Successful creation of regular patterns in variant maps from bat echolocation calls. Biological Systems: Open Access. 2016;**5**:166

Section 2

Clinical Applications of

Electrocardiography

59

[21] Ji Y, Zheng J, Xie Y, Shou T. Variant maps on normal and abnormal ECG data sequences. Biology and Medicine (Aligarh). 2016;**8**:336

[22] Hou Z, Zheng J. Mapping ECG signals on variant maps. In: Proceedings of the 2017 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM'17); 31 July–03 August 2017; Sydney, Australia: ACM; 2017

[23] Hou Z, Zheng J. Visualization of P wave characteristics in ECG. In: Proceedings of the 2017 IEEE International Conference on Image and Signal Processing, Biomedical Engineering and Informatics (CISP-BMEI'10); 14-16; IEEE; 2017

[24] Zheng J. Variant construction from theoretical foundation to applications. Springer-Nature. 2019. DOI: 10.1007/978-981-13-2282-2

### Section 2
