Abstract

ECG signal acquisition may be contaminated with various unwanted signals from the environment, but the contaminating signals are not always be categorized as noise. In this paper, we use the signal processing method to extract the step signal from an ECG signal. The proposed algorithm has been designed, tested, and evaluated using ensemble empirical mode decomposition (EEMD) algorithm as ECG data extraction and accelerometer data as the step counter reference. The main idea is to choose the correct intrinsic mode function (IMF) that represents gait signal delineation of ECG, and then calculating the detection accuracy of gait signal based on the step counter from accelerometer data. We use different belt tightness configurations based on chest circumference for each subject during the treadmill test, and then perform the detection accuracy for each configuration. Five healthy subjects were participated in the treadmill test as training subjects. Each participant was asked to walk in four levels of speeds and continue to run in five different speeds: 1.8, 2.7, 3.6, 4.5, 5.4, 6.3, 7.2, 8.1, and 9.0 km/h. Later on, other five healthy subjects were used to evaluate the accuracy of the proposed algorithm using identical configuration as training subjects. The proposed algorithm is able to achieve the detection accuracy of 91.93% and 94.72% for training and testing subjects using the belt tightness scenario of 100% length of chest circumference.

1. Introduction

Step counter is one of the important parameters to evaluate the performance during exercise such as walking and running. One complete cycle of human body locomotion, called as gait cycle, consists of two consecutive steps. Gait cycle is able to provide some information such as Parkinson’s disease [1, 2], human surveillance [3, 4], and biometric [5]. Because of the important information contained in gait cycle, researchers have proposed the method to extract the gait signal from the accelerometer sensor. Fei Wang utilized fast Fourier transform (FFT) and support vector machine (SVM) for feature selection and gait recognition [6]. Dong Xu implemented matrix-based algorithm: couple subspace analysis (CSA) and discriminant analysis for human gait recognition [7]. The latest research in gait recognition proposed by Yuting Zhang utilizes signature points (SPs) method which has superior performance compared with existing methods [8]. All previous researches used the gyroscope and accelerometer sensors or camera-based sensors to extract and recognize the gait information.

Heart rate is one of the important parameters to evaluate the performance during exercise. One kind of heart rate detection method is based on the ECG signal acquired by a wearable ECG monitor. During exercise, the ECG signal will be interfered by body movement. Most studies of heart rate detection are based on motion artifact cancelation [911] and heart rate estimation [12, 13]. But none of researchers used the motion artifact as advantageous motion signal. Our idea is to transfer the motion artifact to useful motion signal and information.

Empirical mode decomposition (EMD) is recently emerged as the tool to extract the data or remove the noise. EMD is able to decompose the signal into various components in different frequency bands, commonly called as intrinsic mode function (IMF). EMD becomes popular in some research fields because of data-driven-based and easy-to-use. Firstly, Norden E. Huang proposed this algorithm in 1998 [14]. Later on, the use of EMD on high-frequency noise filtering and baseline wander removal is emerged [1522]. Hong [23] and Jung [24] implement EMD on real-time and wearable application. Esophageal manometric data analysis in gastroesophageal reflux disease [25], blood pressure delineation [26], and activity recognition based on accelerometer data [27] has been elaborated. Advance version of EMD, called as ensemble empirical mode decomposition (EEMD), is then proposed and implemented on data extraction [28] and filtering [29].

The use of EEMD to extract the gait signal from ECG has been investigated on our previous research [30]. The detection accuracy has been obtained using IMF 7 of the ECG signal. Now, we proposed the algorithm to improve the detection accuracy. The idea of the proposed algorithm is that the gait signal during walk or run has specific frequency range. That specific frequency range is represented by specific IMF. The proposed algorithm is able to choose the corresponding IMF that represents gait signal which has highest detection accuracy. The proposed algorithm is able to achieve the average detection accuracy of 91.93% and 94.72% for training and testing dataset using the best belt tightness scenario.

2. Methods

2.1. Hardware Design of Device

We design the hardware based on the need for acquiring raw data from ECG and accelerometer sensor, and then send it to the main processing unit (PC) via Bluetooth Low Energy interface. Device hardware design on this paper is identical as our previous research which has sample rates of ECG, and accelerometer rates are 200 Hz and 50 Hz, respectively [30]. Figures 1 and 2 are the device hardware and ECG sensor and circuits design.

2.2. EEMD

The extension algorithm of EMD is EEMD that was proposed by Z. Wu in 2009 [31]. EEMD is able to eliminate a component of similar scale residing in different IMFs, called as mode mixing [32]. The EEMD algorithm is described in the following steps:(1)Add white noise (t) into the input data X (t), called as noise-assisted input data Xi (t):(2)Obtain maxima and minima envelopes from Xi (t), designated as emax (t) and emin (t). Then calculate the mean value of two envelopes, designated as m1 (t):(3)Calculate h1 (t) by subtracting m1 (t) from Xi (t), and then use h1 (t) as the current input:(4)Obtain maxima and minima envelopes from the current input h1 (t), and then calculate the mean value from both envelopes, designated as m2 (t). h2 (t) is obtained by subtracting m2 (t) from h1 (t), and then use h2 (t) as the current input:(5)Repeat step 4 ten times until we obtain h10 (t), then use h10 (t) as first IMF c1 (t). The number of iterations is designed based on [31]. Continuing iteration has a very small relative change based on [33]:(6)Obtain the first residue r1 (t) by subtracting c1 (t) from Xi (t), and then use r1 (t) as input data:(7)Repeat step 2 to step 5 until we obtain second IMF c2 (t), and then calculate second residue r2 (t) by subtracting c2 (t) from r1 (t):(8)Iterate residue until we obtain ninth IMF c9 (t) and the last residue r9 (t):(9)Repeat all steps 100 times, denoted as N, and then calculate the means of all IMFs and residues:(10)Finally, we can reconstruct the original input data using the following equation:

2.3. Experimental Setup

On the previous research [30], we have approved the ability of the EEMD algorithm on the signal decomposition using artificial signal and the delineation of the gait signal from the ECG raw data. In this research, in order to achieve higher accuracy, we explore the effect of the difference of belt tightness to the detection accuracy using IMF 6 and IMF 7 as gait signal. Then, we choose the best belt tightness that achieves the highest detection accuracy. After that, the data from IMF 6 and IMF 7 under various belts tightness are transformed into the frequency domain. Later on, we implement the proposed algorithm based on the data in the frequency domain to achieve better detection accuracy.

The proposed algorithm is designed based on the data from five healthy subjects who participated in the treadmill experiment. The ages of the participant ranged from 21 to 29 years (mean: 23.6 ; SD: 2.8 years), with body mass ranging from 52 to 64 kg (mean: 61 kg; SD: 4.6 kg) and chest circumference (CC) ranging from 75 to 84 cm (mean: 78.8 cm, SD: 3.1 cm). Each participant fastened the device across the chest with a belt with a length of 85% of chest circumference. Then, the participants were asked to walk at the following treadmill speeds: 1.8, 2.7, 3.6, and 4.5 km/h and run at consecutive treadmill speeds of 5.4, 6.3, 7.2, 8.1, and 9.0 km/h. ECG and accelerometer data were recorded for a period of one minute at each speed. The experiment was repeated for various belt lengths: 90%, 95%, and 100% of chest circumference.

To evaluate the performance of our proposed algorithm, the data from five other healthy subjects were acquired. The treadmill experiment procedure is exactly identical with previous five subjects, except that they only use belt tightness configuration of 100% of chest circumference. Their age ranged from 21 to 22 years (mean: 21.6 years; SD: 0.5 years), with body mass ranging from 50 to 83 kg (mean: 63.4 kg; SD: 11.6 kg) and chest circumference (CC) ranging from 70 to 90 cm (mean: 77 cm; SD: 7.3 cm).

2.4. The Effect of Belt Tightness

Belt tightness means the comparison of the belt length to the chest circumference. For example, belt tightness of 85% means that the length of the belt is 85% of the length of the chest circumference. Belt tightness configuration test and evaluation become important in order to achieve the optimal gait signal delineation. The gait signal is able to delineate using IMF 6 or IMF 7. Better gait signal quality is able to improve the detection accuracy. We design four different belt length configurations such as 85%, 90%, 95%, and 100% length of chest circumference. After obtaining the gait delineation using IMF 6 and IMF 7, we implement peak detection in order to know which belt length configuration has highest detection accuracy.

The belt tightness contributes the quality of gait signal delineation. Better gait signal quality is able to improve the detection accuracy. Figure 3 shows the different results of gait signal delineation while the participant fastened the device across the chest with a belt using 85% (Figure 3(a)), 90% (Figure 3(b)), 95% (Figure 3(c)), and 100% (Figure 3(d)) length of chest circumference while walking in the speed of 1.8 km/h. And each belt tightness configuration shows the raw accelerometer signal (upper figure), raw ECG signal (middle figure), and gait delineation signal (lower figure) using IMF 6 (black line) and IMF 7 (red line).

2.5. Peak Detection

In order to show the detection accuracy using various belt length configurations, ECG and accelerometer data obtained from all participants have been used for evaluation. We compare between the number of gait delineation cycle obtained from IMF 6 and IMF 7 of ECG signal and the number of step signal peak obtained from the accelerometer sensor. Furthermore, we compare the detection accuracy of our proposed algorithm with the use of IMF 6 and IMF 7.

Peak detection has been implemented for step and gait signals in order to know the accuracy of step counter based on gait signal delineation approach. The step signal was obtained from the accelerometer sensor, and the gait signal was obtained from IMF 6 and IMF 7 of ECG. Before peak detection implementation, step and gait signals have been proceeded using preprocessing signal which is identical in [30]. The detection accuracy was calculated by comparing the number of peak from step signal with gait signal using (11), which is that the error is obtained by subtracting two times the number of gait peaks with the number of signal peaks, as given in (12). We multiply the number of gait peaks by factor 2 because one gait cycle represents two-step cycles:

Table 1 shows the gait detection accuracy from participant 1 along with the average accuracy for all five participants using IMF 6 and IMF 7 with various belts tightness. If we only use IMF 6 as gait signal representation, the best average detection accuracy is achieved using 100% of belt tightness configuration which has 56.87% of accuracy. For IMF 7, the best average detection accuracy is achieved using 85% of belt tightness configuration, which has 83.46% of accuracy. The highest average detection accuracy is achieved using 100% of belt tightness configuration if we use combination of IMF 6 and IMF 7 as lower speed (1.8 to 4.5 km/h) and higher speed (5.4 to 9.0 km/h) gait signal representation, respectively, which has 90% of accuracy. Later on, we explore and evaluate the data from all participants more focus on the ECG and accelerometer data from 100% of belt tightness configuration.

2.6. Frequency Domain Transformation

Because of the difficulties to choose which IMF (IMF 6 or IMF 7) is appropriate to represent gait signal using time domain analysis, we try to analyze the IMF data in the frequency domain. We use FFT to transform the IMF data from time to frequency domain. Frequency domain analysis becomes important in order to analyze the data to achieve higher detection accuracy. By using frequency domain transformation of IMF, we are able to realize that good detection accuracy in lower speed is achieved by using IMF 7 and obtaining better detection accuracy in higher speed by using IMF 6. Higher detection accuracy means that the corresponding IMF is able to represent gait signal more accurate.

2.7. Proposed Algorithm

After frequency domain transformation of IMF data, we design the algorithm to choose the correct IMF (IMF 6 or IMF 7) based on our proposed design. The reason why we use IMF data from ECG in the frequency domain is that the gait signal during walking/running condition is able to be represented clearly. For example, walking in lower speed generates IMF with lower frequency range and walking in higher speed generates IMF with higher frequency range. After that, based on the proposed algorithm, we choose the IMF (IMF 6 or IMF 7) which represents the gait signal. Figure 4 shows the proposed algorithm to choose the correct IMF as the gait signal.

First, we assign IMF 6 and IMF 7 as input 1 and input 2, respectively. As we mentioned before, only IMF 6 or IMF 7 is able to represent the gait signal during walking/running on treadmill experiment. And IMF 6 is processed first because based on data analysis in frequency domain from all participants, IMF 6 has better capability compared with IMF 7 to distinguish which one is the correct IMF to represent the gait signal. Next, input 1 was transformed from time-to-frequency domain using FFT. We obtain the highest peak on the left area and on the right area of input 1 FFT, and then calculate the ratio of both peaks.

We use this ratio to choose which IMF represents gait signal. And the margin of left and right area (1.5 Hz) is determined based on the understanding that the margin is the frequency from gait signal while running in highest speed. We assumed that the participants running in highest speed are not having more than three steps per second. As we mentioned before, one gait cycle represents two step cycles, the ratio value is used to choose IMF 6 or IMF 7 using two thresholds. The constant of two thresholds is determined based on the training data. If the ratio value is low, it means that the IMF 6 cannot represent the gait signal but represent the noise, so we choose IMF 7 as gait signal representation. If the ratio value is high, it means that IMF 6 represents the gait signal. But if the ratio value is in the middle, we need to use input 2 (IMF 7) that transformed in frequency domain. Then, choose the correct IMF based on the location of the highest peak of input 2 FFT. We use other thresholds as margins of input 2 FFT peak locations. If the IMF 7 peak location is located in the left of the threshold or right of the other threshold or amplitude difference of peak and one sample after is lower than threshold, we will consider that IMF 7 as gait signal representation. In vice versa, we choose IMF 6 as gait signal representation. The details of the proposed algorithm is is shown in the following steps:(1)Assign IMF 6 and IMF 7 as input 1 and input 2, respectively. The ECG signal which is obtained from participant 1 on treadmill speed of 1.8 km/h with corresponding IMF 6 and IMF 7 are shown in Figure 5.(2)Input 1 is transformed from time domain into frequency domain, and then determining the left and right areas with margin of 1.5 Hz. Figure 6 shows the details of this step.(3)Then, we obtain the highest peak on the left area and the highest peak on the right area. The ratio is calculated by comparing the left highest peak and the right highest peak, as shown inthe following equation:(4)If the ratio is lower than threshold (THS 1 = 2), IMF 7 is chosen as the gait signal. If not, we use another threshold (THS 2 = 5) to choose the correct IMF. IMF 6 is chosen if the ratio is higher than THS 2.(5)If the ratio is lower than THS 2, input 2 is transformed from time to frequency domain, as shown in Figure 7. We obtain the frequency where the highest signal peak is located. If the frequency is lower than the threshold (THS 3 = 0.5 Hz) or higher than another threshold (THS 4 = 1 Hz) or amplitude difference between peak and one sample after is lower than threshold (THS 5 = 2150), IMF 7 is chosen as the gait signal. Otherwise, we choose IMF 6 as the gait signal.(6)After choosing the correct IMF using the proposed algorithm, we calculate the detection accuracy.

3. Results

3.1. Proposed Algorithm

In order to test the gait detection accuracy, five training subjects are participated in this experiment. We compare the detection accuracy obtained using IMF 6, IMF 7, and proposed algorithm. Table 2 shows the comparison detection accuracy for training participants. Moreover, the comparison of average of detection accuracy using IMF 6, IMF 7, and proposed algorithm in walk, run, and overall is shown in Table 3.

3.2. Evaluation Using Test Participants

In order to evaluate the algorithm, we use five different participants for evaluation. The comparison detection accuracy using IMF 6 and IMF 7 along with the chosen IMF is given in Table 4.

4. Discussion

We have proved that the belt tightness configuration contributes the quality of gait signal delineation from ECG. Different treadmill speeds provide different quality of corresponding IMF. Most of treadmill on lower speed is corresponding with the gait signal that is represented by IMF 7, and IMF 6 is able to represent the gait signal during higher speed treadmill. Better gait signal delineation contributes higher detection accuracy.

The best configuration of belt tightness is able to be achieved using 100% length of chest circumference, as shown in Table 1. Higher detection accuracy in treadmill walk is obtained using IMF 7 as the gait signal, and higher treadmill run detection accuracy is achieved using IMF 6. But, the best scenario of belt tightness to achieve highest detection accuracy in treadmill walk is to use IMF 7 and using 90% length of chest circumference. The reason is that the 90% of belt configuration gives small body movement which is corresponding with IMF 7. And for the highest detection accuracy in treadmill run is use IMF 6 and belt tightness configuration of 100% length of chest circumference which is corresponding with high body movement.

The difficulty of analyzing the gait signal (IMF 6 and IMF 7) in time domain is the main reason to analyze the gait signal in frequency domain. We implement fast Fourier transform on gait signal and try to find the characteristic of the signal in order to choose the correct IMF as representation of gait signal. And we have found out that different treadmill speeds has different frequency ranges of gait signal. Then, we combined the IMF 6 and IMF 7 using the proposed algorithm to achieve the best detection accuracy.

The idea of proposed algorithm is to choose the correct IMF that represents the corresponding gait signal. We implement the proposed algorithm on the belt configuration of 100% length of chest circumference based on the result in Table 1. Then, we obtained the detection accuracy for each participant using 100% belt tightness configuration. In our opinion, the average detection accuracy is good enough to achieve until 91.93%.

The detection accuracy for IMF 6 and IMF 7 along with the chosen IMF based on proposed algorithm is given on Table 4. The proposed algorithm is able to choose IMF, although there are some incorrect cases such as on subject 8 with the speed of 9.0 km/h. This challenges us to design better algorithm in the future.

5. Conclusion

The proposed algorithm has been designed, tested, and evaluated using EEMD-based algorithm as ECG data extraction and accelerometer data as step counter reference. The proposed algorithm is able to achieve the average detection accuracy of 91.93% and 94.72% for training and testing participants, respectively, using the belt tightness scenario of 100% length of chest circumference. Gait signal delineation using ECG is a new approach for step counter estimator in order to simplify the hardware sensor and circuits. We believe that the accuracy is still able to be improved even further in the future.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported in part by a research grant from the Ministry of Science and Technology under Grant nos. MOST 106-3011-E-011-001 and MOST 107-2221-E-011-107.