A Novel ECG Eigenvalue Detection Algorithm Based on Wavelet Transform

This study investigated an electrocardiogram (ECG) eigenvalue automatic analysis and detection method; ECG eigenvalues were used to reverse the myocardial action potential in order to achieve automatic detection and diagnosis of heart disease. Firstly, the frequency component of the feature signal was extracted based on the wavelet transform, which could be used to locate the signal feature after the energy integral processing. Secondly, this study established a simultaneous equations model of action potentials of the myocardial membrane, using ECG eigenvalues for regression fitting, in order to accurately obtain the eigenvalue vector of myocardial membrane potential. The experimental results show that the accuracy of ECG eigenvalue recognition is more than 99.27%, and the accuracy rate of detection of heart disease such as myocardial ischemia and heart failure is more than 86.7%.


Introduction
ECG can record the physiological states of the heart and cardiovascular system in a real-time manner, and thus it is widely used for the detection and diagnosis of clinical heart disease [1]. ECG eigenvalue automatic detection can rapidly and accurately detect heart diseases [2]. Currently, ECG eigenvalue detection is based on multiple algorithms: the envelope analysis technique can effectively decompose complex signals into single component signals, which are typically empirical mode decomposition (EMD) and local mean decomposition (LMD). EMD is an adaptive signal decomposition method, the data from high frequency to low frequency decomposition into a series of intrinsic mode function (IMF) and a margin. Lahmiri and Boukadoum proposed A Weighted Bio-Signal Denoising Approach Using EMD in [3], which shows some advantages in ECG denoising. LMD solves the problem of endpoint effect of EMD method to a certain extent. However, both LMD and EMD belong to the recursive model, which have the problems of modal aliasing [4], end effect, being sensitive to noise and sampling, and difficulty in separating similar frequency components. But there is a problem caused by EMD [5]: in the background of bad noise, IMF will be submerged in the background of noise that leads to missing the signal characteristic component. Variational mode decomposition (VMD) solved this problem by transforming modal estimates into variational problems [6,7].
The above methods are suitable for analyzing and dealing with aperiodic mutational signals [8]. If the periodic signals such as ECG are used to calculate the amount of periodic signals, it is difficult to determine threshold problems, especially for mobile real-time ECG monitoring, requiring low computational complexity and high detection accuracy, so the optimized wavelet processing is an ideal choice [9,10].
However, two problems remain unresolved: firstly, which layer is more appropriate for feature detection after wavelet transform and secondly, whether the high-pass coefficient or low-pass coefficient is appropriate for feature location. If these key parameters are decided only by experiences, it is difficult to obtain systematic and scientific conclusions by experiments and emulations [11,12]. This study investigated 2 BioMed Research International a detection method, which involved directly catching the signal frequency component during wavelet transform according to the frequency characteristics for different wavebands of ECG signal, to accurately locate the eigenvalue during wavelet transform. Currently, detection algorithms are mainly aimed at location and extraction of the QRS eigenvalue. Using these results and further reversing the electrophysiological activity of myocardial cells will be of great significance to automatic analysis and diagnosis of the physiological status of the heart [13]. Based on the eigenvalue detection, this research further studied the reverse analysis of myocardial action potential to enable automatic detection and diagnosis of heart diseases such as myocardial ischemia and heart failure.
Assume the normalised frequency for signal is in [0, ], and for the normalised frequency ∈ [0, ], if * 2 ≈ 0.5 ± Δ , the signal of frequency section can be extracted from [ 1 , 2 ] by bandpass filtering after wavelet transform. As a demonstration, a wavelet transform is performed for signal , where refers to the low-pass component after transform and refers to the high-pass component after transform. According to the discussed situations, the following operations can be made according to concrete situations: is returned, and then the algorithm ends. < 0.25 indicates ⊆ and a wavelet transform is performed for signal . = 2 * , Δ = 2 * Δ ; then this algorithm is repeated. 0.25 < < 0.75 indicates ⊆ , and a wavelet transform is performed for signal . = 2 * ( − 0.25), Δ = 2 * Δ ; then this algorithm is repeated.

Eigenvalue Extraction of QRS Wave Group and T Wave
How to accurately locate QRS wave group and T wave and extract their eigenvalues is of great significance for the detection of ECG eigenvalues. Affected by EMG interference, power frequency interference, and electromagnetic interference and noises, ECG signals are mixed with baseline drift and various noises, causing difficulties in the accurate location of ECG eigenvalues [14]. The basic method is to first analyze the frequency features of QRS wave group and extract the frequency components during wavelet decomposition, then enhance the signals according to certain strategy, and finally accurately locate the QRS wave group and T wave.

Analysis of Frequency Features of QRS Wave and T
Wave. Figure 1 shows the energy distribution of QRS wave and T wave on the frequency spectrum. It shows that the bandwidth for QRS wave is 0-40 Hz, accumulating nearly 99% of energy. To extract the wavelet system of QRS wave by bandpass filtering, the frequency bandwidth should be limited to about 20 Hz, so that the frequency section of 20 Hz bandwidth with maximum energy density in 0-40 Hz is achieved. By assuming ( ) only covers QRS wave signals, to frequency domain. Section of 10 Hz bandwidth with maximum energy density is calculated by the following formulae: Through calculation, it can be concluded that 76% of total energy is accumulated near 9.4 Hz-19.4 Hz of QRS wave. It can utilise the bandpass to extract the signal of this frequency section, where after the signal is enhanced, amplified, and processed, the higher identification can guarantee the signal is accurately locked. The wavelet coefficient has both frequency features and time domain features; location and extraction can be further made on the time domain. As shown in Figure 1, T wave has nearly 94% of energy in the 0-8 Hz frequency section. The bandwidth is narrower, to avoid overlapping with the baseband, and it selects 5 Hz waveband for extraction to calculate the frequency section of T wave of 5 Hz bandwidth with maximum energy density. By assuming ( ) only covers T wave signal, ( ) = ∫ ∞ −∞ ( ) − . Section of 5 Hz bandwidth with maximum energy density is calculated by the following formulae: Through calculation, it can be concluded that 75% total energy is accumulated near 3.0-8.0 Hz. The normalised frequency for the QRS frequency spectrum center is = 0.075. When < 0.25, the bandpass extraction fails to be made at the current wavelet decomposition layer, so the next round of wavelet transform needs to be made for the low-pass component after wavelet transform to finish the bandpass extraction. At this time, the resolution of wavelet-based signal space is shortened to a half, so the bandpass space should be expanded:

Location and Eigenvalue Extraction of QRS Wave Group and T Wave.
This processing has extracted the wavelet coefficient concentrating energies of the R wave signal, so next the coefficient can be accurately localised at the time domain. This study utilised a 0-1 extraction function ( ) to During the algorithm implementation process, the threshold value should be upgraded: Generally, a real number of ≤ 0.25 is used. While the value can be determined as per the actual width of R wave in the time domain, generally speaking, if R wave lasts for , = /2. When the square wave is wider, it should be further localised to minimum time. A trigger mechanism should be set so that when ( ) = 1, = is triggered, and when ( ) changes from 1 to 0, the calculation and location will be made by = ( + )/2. A concrete algorithm implementation can be finished in a loop iteration where the time complexity is ( ). Figure 3 shows the location of features of QRS wave and T wave, and Figure 4 shows the location results of algorithm features. The feature detection and location are based on the wavelet transform and are combined with signal denoising, compressing, and other processing so that the algorithm can save resources.

ECG Reverse Analysis and Myocardial Membrane Action Potential Feature Detection
The electrocardiogram (ECG) is a dynamic potential difference of myocardial membrane action potential between two points of body surface, and it can objectively reflect the physiological status of the heart [15]. ECG is of great significance to clinical diagnosis, but ECG automatic disease diagnosis and analysis face certain technology challenges. Some studies [16,17] have put forward an ECG mode recognition method to establish a complete ECG feature template database in advance and then match it with extracted signal for analysis. However, this method has difficulties in establishing a complete ECG template and complexity in matching analysis time; it is not suitable for mobile and realtime ECG. Other studies [18,19] have put forward an artificial intelligent algorithm, by learning, training, and accumulating the knowledge and experiences to perform intelligent recognition on extracted signals. This method can adapt to big-data and high-performance platform processing but is of insufficient resources for mobile and real-time ECG. The current study reversely calculated the heart outer membrane potential and obtained its eigenvalue based on previously extracted ECG eigenvalue, to enable the physiological status of heart to be shown and to provide a basis for automatic analysis of heart disease diagnosis and health surveillance.

Heart Membrane Potential Action Figure and Feature
Model. The potential difference between the inside and outside of the myocardial membrane is called the transmembrane potential or membrane potential. When the myocardial cells are excited by irritation, the membrane potential will suddenly change; the potential inside the membrane will change from negative potential to positive potential [20], while the potential outside the membrane will change from positive potential to negative potential. This change in myocardial transmembrane potential is called action potential. Figure 5 shows the relationship between myocardial membrane potential and ECG signal. The TNNP model is the single cell transmembrane potential action model presented by Köhler et al. [21]. By H-H equivalent model principle, the cell membrane acts as a capacitor, the ionic currents and pumps are equivalent to interrelated power and resistance [22], so the single cell electrophysiological model of TNNP model can be expressed by where is membrane potential, is time, stim is outside stimulated current, and is unit membrane capacitance.
ion as total transmembrane current can be expressed by ion = Na + KI + to + Kr + Ks + CaL + NaCa + NaK + pCa + pK + bCa + bNa , where CaL is type-L Ca 2+ current, NaCa is the current of Na + /Ca 2+ exchanger, NaK is Na/K pump current, pCa and pK are calcium and potassium current at platform phase, respectively, bCa and bK are background potassium and calcium current, respectively, Na is rapid Na + current, KI is inward rectifier K + current, to is transient outward current, Kr is rapid delayed rectifier K + current, and Ks is slow delayed rectifier K + current. The H-H model makes the influence factor of each current equivalent to a control logic gate to show the electrophysiological status of heart cells. The control parameters of the membrane potential action equation are as many as 256 [23]. For ECG automatic detection and calculation, the detection and extraction of large amounts of fine and sensitive physiological parameters is a complicated and difficult task, not suitable for a mobile and real-time calculation platform.
This complicated heart potential action equation cannot be directly determined by parameters and is hard to fit with polynomials. Based on this, the current study utilised big data to establish a standardised heart outer membrane action potential mode and modulated this model with simple parameters, to enable this model to show different heart outer membrane action potential characteristics and reversely calculate this model with ECG eigenvalue. The myocardial cell action potential can directly reflect the electrophysiological activity of cells in universality and stability; under normal circumstances, it can better show the electrophysiological activity status of myocardial cells. This study used the heart outer membrane potential database as sample data to perform regression analysis and establish the v-lead left and right standard models, where the corresponding figures are as follows.
Let ( ) indicate left epimyocardium standard action potential of human and let ( ) indicate right epimyocardium standard action potential of human.
( , , , ℎ ) = ℎ ( ) means the -coordinate of ( ) is scalable in times and the -coordinate is scalable in ℎ times. Figure 6 compares the normal and abnormal epicardium action potentials, showing , ℎ , and have influences on epicardium action potential forms. Figure 6(b) shows the myocardial action potential figure and ECG with myocardial ischemia, and Figure 6(c) shows the myocardial action potential figure and ECG with heart failure. In the case of myocardial ischemia, in ( , , , ℎ ), is less than 0.9 and is less than 0.95. In the case of heart failure, 7 in ( , , , ℎ ), is less than 1.1 and ℎ is less than 0.96. Therefore, eigenvalues and ℎ can effectively show the status of myocardial electrophysiology activity and thus provide a way for intelligent diagnosis and analysis.

Extraction of Potential Features of Heart Membrane.
Through detection of ECG eigenvalue, it can obtain basic features of the ECG signal: to locate the time of R peak value and T peak value, obtain R peak value Ψ and T peak value , and acquire the integral of ECG signal time on time Δ from R wave starting time to rest time. Accordingly, the following simultaneous equations model can be established: where Φ 1 and Φ 2 indicate the integral of ( , , , ℎ ) on time . This model is unidentifiable from structure. To simplify calculations, this study assigned 1, respectively, to , ℎ , ℎ to get 1 , 2 , and hence, formula (7) is simplified into a regression simultaneous equations model: In the simultaneous equations model, the first equation is a linear equation with two unknowns and is not dependent on the second equation, so the least square method can be adopted independently for unbiased estimation of parameters ℎ , ℎ . Through detection and analysis, the experimental data can be attained: The corresponding deviation equation is Calculate the partial derivative of ℎ , ℎ , let it be 0, and then solve the equation to get By rounds of the least square method, the estimated values of ℎ , ℎ of sets will be attained: Substitute them into Δ = (ℎ Φ 1 − ℎ Φ 2 ) for regression fitting of the least square method on . Generally speaking, the system will tend to be stable after multiple rounds of iterations, and then the parameters ℎ , ℎ , can objectively reflect the basic features of myocardial electrical activity. Figure 7 shows ECG reverse feature analysis results.
This investigation sampled 15 records, respectively, from the European ST-T database and the BIDMC congestive heart failure database and sampled 10 records from ECG ID for comparative experiments, to analyze the correlation between and and myocardial ischemia and heart failure. When is less than 0.85, the myocardial ischemia probability begins to increase; when is less than 0.7, the probability is as high as 89%. When is greater than 1.2, the correlation of heart failure will obviously increase; when is greater than 1.45, the probability of heart failure will be as high as 77.5%. The correlations are shown in Figure 8.

Experiment and Emulation Results
This research utilised the ECG ID database to evaluate the ECG detection method. The ECG database includes the two-channel ECG records of 48.5 hours, with 11 digits of resolutions and 10 mV. ECG records from this database cover sharp waves and high T waves, negative QRS wave group, small QRS wave group, wide QRS wave group, myoelectricity noise, baseline drift, sudden change of QRS amplitude, QRS morphological mutation, polymorphous premature ventricular contraction, long pause, and irregular heart rhythm. Detection and experiments were performed by the algorithm presented in this paper to obtain six quantitative results: correct detection of R or T peak time showed true positive (TP); loss of R or T peak time showed false negative (FN); and the noise spike detected to be R or T peak time showed false positive (FP). To evaluate the performance of the given detection algorithm, the following formulae should be utilised to calculate the sensitivity (Se) and detection error rate (DER). To evaluate the detection accuracy and accuracy rate of this method, accuracy (Acc) is defined. In Table 1, R peak detection rate of first channel (each) of 16 ECG records in the MIT-BIH arrhythmia database is summarised. By running the algorithm for detection, QRS wave totally generates 43 FN pulses and 44 FP beats, totalling 87 failures. The detection accuracy of ECG records change from 99.32% to 100% based on normal and pathological ECG signal features and different noises. The detection accuracy for QRS wave is slightly higher than T wave; T wave totally To test the detection effects of the algorithm on pathological ECG signals of myocardial ischemia and heart failure, this study used 15 ECG samples with myocardial ischemia from the European ST-T database, 15 ECG samples with heart failure from the BIDMC congestive heart failure database, and 10 raw signal ECG samples from the ECG ID database, with 100 heart rhythm signals included for each sample. As seen from the detection results in Table 2  with an accuracy of 93.3%; 13 samples with heart failure were accurately detected, with an accuracy of 86.7%; and 10 raw signal ECG samples were accurately detected, with an accuracy of 100%.
Signal analysis and processing can be divided into two methods: direct analysis and transformation analysis. Signal transformation analysis and processing is carried out by mapping the signal to another domain, such as wavelet transformation or EMD transformation. Figure 9(a) shows the ECG signal processing of conventional processes, including denoising, feature detection, and filtering of the three main processes. If is the length of the signal under normal circumstances, each process needs to undergo a transformation, assuming that each transformation requires a time frequency of 0 ( ) = 0 2 . Under these conditions, denoising, detection, and compression are performed. Assuming that the time frequency of each process is 1 ( ) = 1 , the total time required for the conventional signal processing method is 3( 0 ( )+ 1 ( )) = 3( 0 2 + 1 ). If the proposed algorithm is used for completing the denoising, the detection, and the compression operation, the whole process only needs to perform the wavelet transform one time, with a total time taken of 0 ( ) + 3 1 ( ) = 0 2 + 3 1 (as shown in Figure 9(b)). The algorithm proposed in this paper can reduce the time for transformation between signal domains due to the combination of feature detection, signal filtering, and signal compression, thus saving resources and speeding up the operation. As the wavelet transformation needs to undergo both processes of decomposition and reconstruction, the useful signal is often lost in the process of conversion; for example, the symmetry of the orthogonal wavelet will decrease with the increase of the order of the vanishing moment and the process will cause signal distortion. In this paper, we present a method which reduces the time for transformation, so useful signal loss can be reduced and accuracy of detection increased.

Conclusion
The wavelet transform was performed to achieve wave trapping extraction, to extract the feature signal component from wavelet decomposition signal and then enhance and locate the energy expressing eigenvalue. This method can integrate the feature location, signal filtering, signal compressing, and other processing, and therefore it can save computing resources, speed up the processing, and enhance the detection accuracy. This study utilised ECG eigenvalue to reversely calculate myocardial potential action features. This research also established the simultaneous equations model to represent the myocardial membrane potential activity and utilised iterative regression to analyze the asymptotic approximation, to cause the model to accurately show the myocardial potential action and provide the basis for automatic diagnosis of heart diseases.