Step Estimator Based on a Wearable ECG Monitor

,


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]. e 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 [9][10][11] 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 easyto-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 [15][16][17][18][19][20][21][22]. 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 ltering [29]. e use of EEMD to extract the gait signal from ECG has been investigated on our previous research [30]. e detection accuracy has been obtained using IMF 7 of the ECG signal. Now, we proposed the algorithm to improve the detection accuracy. e idea of the proposed algorithm is that the gait signal during walk or run has speci c frequency range. at speci c frequency range is represented by speci c IMF. e proposed algorithm is able to choose the corresponding IMF that represents gait signal which has highest detection accuracy. e 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.

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.

EEMD
e 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 di erent IMFs, called as mode mixing [32]. e EEMD algorithm is described in the following steps: (1) Add white noise w (t) into the input data X (t), called as noise-assisted input data X i (t): (2) Obtain maxima and minima envelopes from X i (t), designated as e max (t) and e min (t). en calculate the mean value of two envelopes, designated as m 1 (t): (3) Calculate h 1 (t) by subtracting m 1 (t) from X i (t), and then use h 1 (t) as the current input: (4) Obtain maxima and minima envelopes from the current input h 1 (t), and then calculate the mean value from both envelopes, designated as m 2 (t). h 2 (t) is obtained by subtracting m 2 (t) from h 1 (t), and then use h 2 (t) as the current input: (5) Repeat step 4 ten times until we obtain h 10 (t), then use h 10 (t) as rst IMF c 1 (t). e number of iterations is designed based on [31]. Continuing iteration has a very small relative change based on [33]: (6) Obtain the rst residue r 1 (t) by subtracting c 1 (t) from X i (t), and then use r 1 (t) as input data: (7) Repeat step 2 to step 5 until we obtain second IMF c 2 (t), and then calculate second residue r 2 (t) by subtracting c 2 (t) from r 1 (t): (8) Iterate residue until we obtain ninth IMF c 9 (t) and the last residue r 9 (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 X(t) using the following equation:    Mobile Information Systems

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. en, 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. e proposed algorithm is designed based on the data from five healthy subjects who participated in the treadmill experiment. e 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. en, 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. e 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. e treadmill experiment procedure is exactly identical with previous five subjects, except that they only use belt tightness configuration of 100% of chest circumference. eir 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).

e 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. e 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. e 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).

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. e 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]. e 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: Step Signal, Peak.
(12) 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. e 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. 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.

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. e 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) Mobile Information Systems 5 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-tofrequency 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. e 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. en, 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. e 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. e 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) en, we obtain the highest peak on the left area and the highest peak on the right area. e 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.

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.

Evaluation Using Test Participants.
In order to evaluate the algorithm, we use five different participants for evaluation. e comparison detection accuracy using IMF 6 and IMF 7 along with the chosen IMF is given in Table 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  Mobile Information Systems 7 speed treadmill. Better gait signal delineation contributes higher detection accuracy. e 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. e 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. e 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. en, we combined the IMF 6 and IMF 7 using the proposed algorithm to achieve the best detection accuracy. e 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. en, 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%. e detection accuracy for IMF 6 and IMF 7 along with the chosen IMF based on proposed algorithm is given on Table 4. e 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. is challenges us to design better algorithm in the future.

Conclusion
e proposed algorithm has been designed, tested, and evaluated using EEMD-based algorithm as ECG data extraction and accelerometer data as step counter reference. e 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
e authors declare that they have no conflicts of interest.