ECG Energy Change Study Based on Variational Mode Decomposition

Corresponding Author: Wenbo Wang School of Resource and Environmental Science, Wuhan University, Wuhan, China Email: 19404425@qq.com Abstract: Variational Mode Decomposition (VMD) decomposes the signal into a series of Intrinsic Mode Type Functions (IMTFs) according with variational model and fluctuating characteristics of the signal itself, thus very suitable for the analysis of nonlinear and non-stationary Electrocardiogram (ECG) signal. Energy of ECG signal has certain distribution rules, but which could be affected by diseases; therefore, the study of ECG energy distribution change is of great importance to the research and clinical diagnosis of heart diseases. In this paper, firstly, ECG signals are decomposed into a series IMTFs with VMD and the fluctuating characteristics and physical meanings of ECG signals on different time scale are analyzed by observing the fluctuation rule of IMTFs. Then, the energy vectors of ECG signals are obtained by calculating the energy of each IMTF and a comparative analysis of energy vectors is conducted between healthy people and three kinds of heart disease patients. It can be seen according to the experimental results that heart disease could cause high-frequency components of the VMD energy vector to drop significantly and the VMD energy vector can well reflect the impacts of age and disease on ECG energy distribution, which can be used as a reference for heart disease diagnosis.


Introduction
As the comprehensive reflection of the heart electrical activity on the surface of the body, Electrocardiogram (ECG) can serve as an important reference in the study of basic heart functions and disease diagnoses (Rakshit and Das, 2018). ECG signals have several frequency components and as indicated by existing studies, the main energy of ECG falls within the range from 0 to 40 Hz, which accounts for approximately 99% of total energy; the spectral range and energy distribution of P, QRS and T waves differ from each other. (Khadar et al., 2019;Li et al., 2014;Li et al., 2012) The ECG energy distribution of healthy people follows certain rules, but diseases could affect the ECG wave shape, causing the energy distribution to change (Lin- Peng and Jun, 2015;Hamprecht et al., 2001). So, researching of the change of ECG energy distribution can reveal the changes in cardiac functions caused by diseases, which has important significance in clinical practice.
Frequency analysis and Time-Frequency analysis are the main methods for studying variation of ECG energy distribution. Frequency analysis method mainly study change of frequency caused by diseases, which has already achieved some success in heart disease prediction and diagnosis (Hamprecht et al., 2001;Di et al., 2014;Zhu and Dong, 2013;Tripathy et al., 2018). However, ECG signals are nonlinear and nonstationary and their frequency components vary with time. Frequency analysis method only can provide frequency information as a whole but lacks local information; therefore, it cannot provide the positioning function of time and frequency (Xie et al., 2013;Xiang-Kui et al., 2011;Xueyun and Wei, 2019).
The time-frequency analysis methods can reflect the time and frequency feature of ECG signal, which have obtained very good analysis results in QRS wave group detection, ECG identification and classification, disease diagnosis, etc (Banerjee and Mitra 2014;Nguyen et al., 2017;Peng et al., 2014;Kai-Yu et al., 2012). However, the traditional time-frequency analysis methods still have certain shortcomings. Due to the limited length of window function, the STFT will cause energy leakage, which may lead to large errors in frequency spectrum analysis; additionally, STFT requires the ECG signals be stationary during the lasting time of the window function, which cannot be fully satisfied (Peng et al., 2014). The wavelet transform only decomposes the low frequency part of the signal further, which results in serious mode aliasing and wrong time-frequency energy distribution (Xu et al., 2019). Moreover, the performance of wavelet transform highly depends on the wavelet basis and number of decomposition levels, but the selection method of wavelet basis and number of decomposition levels has not yet been determined, so it is difficult to guarantee the best analysis results (Banerjee and Mitra 2014;Dev and Kumar, 2018;Peng et al., 2014;Kai-Yu et al., 2012;Safieddine et al., 2012). Empirical Mode Decomposition (EMD) is an adaptive signal processing method (Costa et al., 2012), which works well for the analysis of non-linear and non-stationary signals. However, the phenomenon of under-envelopment and over-envelopment will occur during EMD iteration, which will lead to the false frequency components be obtained easily (Bouny et al., 2019). Additionally, EMD is highly sensitive to noises and when signals are disturbed by noises, which will seriously affect the precision of frequency spectrum analysis. Dragomiretskiy and Zosso (2014) proposed a new multi-scale analysis method-Variational Mode Decomposition (VMD) method. Different from the recursive mode of EMD method, VMD is a new adaptive signal processing method based on variational model, which VMD transforms the decomposition of signal into the optimization problem with constrained model. So, VMD can avoid the endpoint effect and suppress the mode confusion and has high decomposition efficiency.
VMD method can effectively separate modal component of complex signal and is insensitive to noise. In this paper, VMD is introduced into ECG signal analysis and an ECG energy distribution research method based on VMD is proposed. Firstly, the ECG signal is decomposed into a series of Intrinsic Mode Functions (IMTFs) with VMD. Then, calculating the energy of each IMTF respectively to get the energy vector. Finally, the energy vectors of healthy people and heart disease patients of different ages were compared to explore the energy distribution changes of ECG energy vectors with age and disease and the sensitivity indicators which caused the large changes in energy distribution were analyzed. The experimental results show that, the ECG energy vectors based on VMD method can provided an effective reference for the research and diagnosis of heart disease.

Analysis Method of VMD Energy Vector
Basic Theory of VMD VMD algorithm is a new adaptive signal decomposition method proposed by Dragomiretskiy and Zosso (2014), which solves the target modal function through the variational problem. In view of the accuracy and robustness of VMD algorithm, this paper adopts VMD method to separate the modal components of ECG signal. The variation problem of VMD algorithm is to seek the K IMF components {uk(t), 1kK} with the minimum sum of estimated bandwidth. By calculating the quadratic gradient, the original signal is decomposed into a set of intrinsic mode functions {uk} = {u1, u2,,uK} and then the constrained variational problem is transformed into: Where: k = The frequency center of the corresponding mode t = The partial derivative of t S = The original signal In order to obtain the optimal solution of the above-mentioned constrained variational problem, the quadratic penalty function term  and Lagrange multiplier are introduced. The constrained variational problem is transformed into a non binding variational problem by minimizing the Lagrangian L(*) saddle point of the problem: where,  is the penalty factor and (t) is the Lagrange multiplier. The Lagrange equation is solved by the Altemating Direction Method of Multipliers (ADMM), then, the solution of the modal function problem can be obtained: Similarly, the solution to the problem of the central frequency of the modal component is: reprenset the modal components and their center frequencies, respectively. The algorithm flow of VMD is as follows: Step1. Initialization parameters     1 1 1 ,, kk u  and n = 0; Step2. Let n  n +1, uk and k are updated according to formula (3) and formula (4); Step3.  is updated according to: Step4. Repeat steps 2 and 3 until the iteration stop bar is satisfied, that is: Then, the K modal components {uk(t)}1kK and their center frequencies are obtained.

VMD Energy Vector
After the ECG signal is decomposed into a series IMTFs by VMD, the energy vector of ECG can be obtained by calculating the energy of each IMTF. The steps are as follows:

VMD Decomposition of ECG
We selected the healthy people normal sinus rhythm database (nsrdb) of MIT-BIH as experimental data for VMD decomposition. During VMD, selecting the Morlet wavelet as the wavelet basis and the number of decomposition level is 256 and all programs are realized in Matlab 2017a. The sampling frequency of the nsrdb data is 128 Hz and the duration of the used data is 10 seconds.
Before VMD decomposition, some pretreatment is required (Upganlawar and Chowhan, 2014;Pang et al., 2014). Since the energy of ECG signals mainly concentrates in the range from 0-40 Hz, firstly, ECG signals are filtered by a 40-Hz zero-phase low-pass filter to eliminate high-frequency noise; then, the baseline shift is removed by a quadratic median filter. The decomposition results of ECG signal by VMD are displayed in Fig. 1. ECG can be divided into P wave, QRS wave and T wave according to wave shape. In Fig. 1, the meaning represented by each IMTF can be seen: The first three components, i.e., c1, c2 and c3, mainly represent the decomposed constituents of the QRS wave with the highest frequency; from c4, the decomposed constituent of the P wave is added; from c5, the decomposed constituent of the T wave is added, which is the superposition of the P, QRS and T waves; c6 represents the superposition of the low-frequency components of the P, QRS and T waves; c7 denotes cardiac cycle, representing the rhythm of the heartbeat; and c8 and c9 are the cardiac physiological adjustment rhythms on a larger time scale, representing the long-term heart rhythm. By observing the signal amplitude of each IMTF, it can be seen that the amplitude of the IMTF with a higher frequency is higher and the amplitude of the IMTF with a lower frequency is lower, which means that the ECG has a relatively high energy on a short-term scale and a relatively low energy on a long-term scale.
Spectral analysis is conducted for c1 and the spectrogram of c1 is obtained, as shown in Fig. 2. It can be seen that the central frequency of c1 is approximately 20 Hz and the main frequency distribution range is 15-25 Hz. Likewise, spectral analysis is conducted for other IMTFs and their central frequencies are obtained, as presented in Table 1.
The reference (Hong-Jian, 2009) pointed out that the spectral bandwidth of the P wave is 0-18 Hz (±3 Hz) and the wave crest energy mainly ranges from 5 Hz to 12 Hz; the spectral bandwidth of the QRS wave is 0-37 Hz (±5 Hz) and the wave crest energy mainly ranges from 6 Hz to 18 Hz; the spectral bandwidth of the T wave is 0-8 Hz (±2 Hz) and the wave crest energy mainly ranges from 0 Hz to 8 Hz. it can be seen from Table 1 that the spectral range of the QRS wave group is dominated by components c1 and c2, that of the P wave is dominated by components c4 and c5 and that of the T wave is dominated by components c5-c9. Surely, it is not saying that each IMTF component is determined by only a specific ECG wave shape (P, QRS, T) or that each ECG wave shape exists only in one or several IMTF components and the analysis above is a main frequency-spectrum correspondence relationship. Take low-frequency c5-c8 for example: They result from the superposition of the low-frequency components of various ECG wave shapes rather than from only one ECG wave shape, which can be seen clearly from Fig. 1.  The energy distribution of ECG signals can be seen from the energy vector and for the above signals, the first 4 components have a relatively high energy and the subsequent 5 components have a relatively low energy.

Energy Vector Comparison Between Healthy People and Patients with Congestive Heart Failure
The proposed VMD energy vector method described in this article is used to study the energy vectors of healthy people and patients with congestive heart failure (CHF). The experimental data are gathered from nsrdb, which is the MIT-BIH healthy people normal sinus rhythm database and chfdb, which is the congestive heart failure database. The nsrdb contains 18 healthy people with an average age of 34.3 (±8.4); the chfdb includes 15 CHF patients with an average age of 58.8 (±9.1). The Hz for data of chfdb. In VMD decomposition, Morlet wavelet is chosen as wavelet basis and the number of decomposition levels is set to 256. The sampled data is 10 seconds in duration. The energy vectors of the two databases are calculated and the error bar is made. The experimental results are shown in Fig. 3. As shown in Fig. 3, the energy distribution of healthy people is different from that of CHF patients. For healthy people, the energy gradually decreases from the highfrequency components to the low-frequency components and it is mainly concentrated in the high-frequency part (q1-q5), implying that healthy people have a stronger ability in terms of the short-term adjustment of ECG signals and a lower energy in terms of long-term adjustments (such as q7 which includes heart rhythm control). For CHF patients, the energy of the highest frequency component (q1, q2) in the ECG signals is relatively low, the highest energy appears in q4 and the energy of q7, which includes heart rhythm control, is higher than that of healthy people, which means that the ECG short-term adjusting ability decreases in CHF patients and the main energy is concentrated on medium-scale adjustment.
To further verify the results above, we have chosen a healthy person and a CHF patient from nsrdb and chfdb, respectively, for spectral analysis. The results are shown in Fig. 4. According to Fig. 4, frequencies above 20 Hz are still present in a very high proportion in the frequency spectrum of healthy people, while the frequency spectrum of CHF patients is mainly distributed under 20 Hz. The spectral analysis results of other individuals in the databases are consistent with the results mentioned above. The energy vectors of healthy people and CHF patients were tested by t-test and Table 2 shows the results (NS represents that, in the t-test, p>0.05).
The results of t-test show that, there are significant differences in terms of q1, q2, q3, q5, q6 and q7 (q<0.05) between healthy people and CHF patients. The energy of high-frequency in energy vector of CHF patient decreases, probably indicating that diseases have weakened the adjusting ability of cardiac physiological process of the human body on a small time scale. Additionally, healthy people have a higher proportion of high-frequency energy, showing that healthy people have a good short-term adjusting ability to adapt to behavioural changes and various environmental changes in daily life. Differences in q1, q3 and q5 are especially obvious between healthy people and CHF patients (p<0.001) and can be used as indicators of heart health, thereby assisting the examination of cardiac function.

The Impacts of Age and Disease on the VMD Energy Vector
To further investigate the effects of age and heart disease on the VMD energy vector distribution, we have added ptbdb of MIT-BIH for analysis; this dataset contains 549 groups of data from 294 people, including healthy people and patients with various heart diseases such as myocardial infarction, cardiomyopathy and bundle branch block. A few groups of data with a large number of cases have been selected for VMD energy vector analysis, including 18 healthy young people (less than 36 years old, with an age of 28.3±4.7), 7 healthy old people (older than 59 years old, with an age of 69.4±5.4), 148 patients with Myocardial Infarction (MI) (with an age of 60.5±11) and 15 patients with cardiomyopathy (with an age of 59.7±14.4). Moreover, CHF patients from chfdb are also included (with an age of 58.8±9.1). The chosen ECG signals are filtered by 40 Hz lowpass filtering for denoising and then are eliminated baseline shifts. In VMD, the Morlet wavelet is chosen as the wavelet basis, the decomposition level is set to 256 and the data duration is 10 sec. The mean values of the VMD energy vectors are presented in Fig. 5.
It can be seen from Fig. 5 that the energy of component q1 decreased gradually from the young to the old and decreased further for patients with various diseases; the degree of decrease is roughly positively correlated with the severity of the disease. For healthy people (including the old and the young), the energy curve at stage q1-q6 is smooth and gradually falls at stage q6-q12; however, for heart disease patients, the curve gradually rises at stage q1-q5 and, after reaching the highest energy in q5, gradually decreases at stage q5-q12.
At stage q1-q5, five groups of data cross each other and then have changes that are opposite: The energy distribution curve of heart disease patients is basically an inverted V-shaped and the more serious the disease, the more obvious the inverted V-shape; although the highfrequency energy is slightly lower in healthy old people than in healthy young people, the energies show a similar trend with no significant differences on the whole.
Based on the observations above, age and heart disease will lead to a reduction in the high-frequency components of ECG energy vectors, indicating that age and heart disease can weaken the short-term adjusting ability and the adaptability to environmental changes. In particular, compared with healthy people, heart disease patients show a significant reduction in high-frequency energy and a significant increase in component q7, implying that good control of heart rhythm is more important for heart disease patients than healthy patients. Although age may influence energy distribution, the influence is relatively small, indicating that age increase will not have appreciable effects on heartbeat rhythm and energy distribution and that healthy old people will still be able to maintain a good heartbeat. T-test is conducted for the VMD energy vectors of healthy young people, healthy old people and three kinds of heart disease patients; the results are shown in Table 3-6 (NS represents that, in the t-test, p > 0.05).      In consideration of the t-test results and Fig. 5, it can be concluded that: 1) The energy vectors of healthy young people and healthy old people are almost the same, with no significant differences in any single component. Although a decrease of the high-frequency components of healthy old people can be seen from Fig. 5, it is not obvious 2) Healthy old people and three kinds of heart disease patients show a good distinction in five components, i.e., q1, q2, q6, q6 and q7 and the variation of the differentiation points of different diseases reflects different disease features 3) Compared with healthy elderly people, the t-test of healthy young people and patients with three kinds of heart diseases shows that a new distinguishing point q3 is added between healthy young people and patients with heart diseases. This result indicates that there is a greater difference between healthy young people and patients with heart diseases 4) Significant differences in some components also exist among the three heart diseases, thus showing their different features. As shown in the analysis above, after the VMD decomposition of ECG signals, the energy of high-frequency components in energy vectors decreases significantly as a result of heart disease. Healthy people and heart disease patients have obvious differences in terms of components, including q1, q2, q5, q6 and q7 (q1 and q5 in particular). In the comparisons from Table 4 to Table 6, both q1 and q5 show significant differences and can be used as a basis for clinical diagnosis

Conclusion and Perspectives
In this paper, the ECG signals are decomposed into a group IMTFs by the VMD. By applying the IMTFS energy vectors method to study ECG signals, the effects of age and heart diseases on the distribution of the VMD energy vector have been discovered: The energies of highfrequency IMTFs gradually decrease with age and disease and the decrease degree is positively correlated with disease severity. As demonstrated by the existing study results, the high-frequency parts of the ECG are relatively sensitive to disease and the changes caused by heart disease are first reflected in high-frequency components, which are also proven by the results in this paper.
In the proposed method, we only study the effect of age and disease on the energy distribution of ECG, but we lack more research on the detailed relationship between VMD energy vector curve and disease diagnosis. By observing VMD energy vector curve, it can be found that the energy vector curves of different diseases are not the same. Whether the energy curve can be used for disease diagnosis and differentiation can be a direction of future research.