# Step Estimator Based on a Wearable ECG Monitor

Authors: Eka Adi Prasetyo Joko Prawiro; Yuan-Hsiang Lin
Journal: Mobile Information Systems
 (2018)

---

## 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.


---

## Body

## 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 [9–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 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 [15–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 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.Figure 1
Hardware design of device.Figure 2
ECG sensor and circuit.


## 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.Figure 1
Hardware design of device.Figure 2
ECG sensor and circuit.


## 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 noisew (t) into the input data X (t), called as noise-assisted input data Xi (t):(1)Xit=Xt+wt.(2)
Obtain maxima and minima envelopes fromXi (t), designated as emax (t) and emin (t). Then calculate the mean value of two envelopes, designated as m1 (t):(2)m1t=emaxt+emint/2.(3)
Calculateh1 (t) by subtracting m1 (t) from Xi (t), and then use h1 (t) as the current input:(3)h1t=Xit−m1t.(4)
Obtain maxima and minima envelopes from the current inputh1 (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:(4)h2t=h1t−m2t.(5)
Repeat step 4 ten times until we obtainh10 (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]:(5)h3t=h2t−m3t,h10t=h9t−m10t,c1t=h10t.(6)
Obtain the first residuer1 (t) by subtracting c1 (t) from Xi (t), and then use r1 (t) as input data:(6)r1t=Xit−c1t.(7)
Repeat step 2 to step 5 until we obtain second IMFc2 (t), and then calculate second residue r2 (t) by subtracting c2 (t) from r1 (t):(7)r2t=r1t−c2t.(8)
Iterate residue until we obtain ninth IMFc9 (t) and the last residue r9 (t):(8)r3t=r2t−c3t,r9t=r8t−c9t.(9)
Repeat all steps 100 times, denoted asN, and then calculate the means of all IMFs and residues:(9)cjt=1N∑k=1Ncjkt,j=1,2,…,9,rjt=1N∑k=1Nrjkt,j=9.(10)
Finally, we can reconstruct the original input dataX˜t using the following equation:(10)X˜t=∑i=1Lcit+rLt,L=9.


### 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. Figure3 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).Figure 3
Raw accelerometer signal, raw ECG signal, and gait delineation signal from participant 1 using IMF 6 (black line) and IMF 7 (red line) while walk in speed 1.8 km/h using belt tightness of (a) 85%, (b) 90%, (c) 95%, and (d) 100%.
(a)
(b)
(c)
(d)


### 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:(11)Accuracy=1−Error∑Step_Signal_Peak×100%.(12)Error=2∗∑Gait_Signal_Peak−∑Step_Signal,_Peak.Table1 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.Table 1
Gait detection results in treadmill test for participant 1 along with the average accuracy from all five participants using IMF 6 and IMF 7 with various belts tightness.
Treadmill speed (km/h)
Accuracy of 85% of CC
Accuracy of 90% of CC
Accuracy of 95% of CC
Accuracy of 100% of CC
IMF 6 (%)
IMF 7 (%)
IMF 6 (%)
IMF 7 (%)
IMF 6 (%)
IMF 7 (%)
IMF 6 (%)
IMF 7 (%)
A
B
A
B
A
B
A
B
A
B
A
B
A
B
A
B
1.8
40.00
−3.46
92.63
85.52
2.04
−15.39
97.96
93.52
−14.00
−3.02
78.00
87.12
−6.32
−13.85
96.84
93.67
2.7
23.30
1.50
91.26
94.10
3.77
−1.35
92.45
96.59
−7.69
11.09
88.46
92.33
19.23
10.43
94.23
92.13
3.6
54.55
13.18
85.45
94.57
0.00
4.78
99.08
95.73
−3.70
22.41
98.15
89.50
58.93
18.62
71.43
86.07
4.5
66.67
21.29
68.38
91.88
8.62
30.27
100.00
88.78
6.84
28.81
90.60
86.00
88.33
40.36
65.00
81.81
5.4
39.73
44.60
73.97
79.10
30.99
61.71
95.77
75.47
35.62
57.07
78.08
68.17
98.68
83.39
59.21
60.06
6.3
32.88
47.77
79.45
79.32
26.03
62.77
97.26
77.73
54.79
56.52
76.71
68.76
98.68
88.00
61.84
58.62
7.2
19.87
41.32
92.72
79.32
22.52
54.89
99.34
75.26
75.68
67.24
78.38
66.73
98.72
93.72
58.97
54.17
8.1
20.51
42.48
89.74
75.57
52.29
62.60
91.50
71.48
64.90
75.38
76.82
59.80
83.54
95.05
49.37
50.79
9.0
48.10
52.75
81.01
71.80
58.23
75.32
75.95
61.06
87.18
91.90
67.95
53.68
85.89
96.15
51.53
52.03
Avg.
38.40
29.05
83.85
83.46
22.72
37.29
94.37
81.74
33.29
45.27
81.46
74.68
69.52
56.87
67.60
69.93
A, participant 1; B, average.


### 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. Figure4 shows the proposed algorithm to choose the correct IMF as the gait signal.Figure 4
Proposed algorithm.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 Figure5.(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. Figure6 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:(13)Ratio=Left_Highest_PeakRight_Highest_Peak.(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 Figure7. 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.Figure 5
ECG signal, which is obtained from participant 1 in treadmill speed of 1.8 km/h, with the corresponding IMF 6 and IMF 7.Figure 6
IMF 6 on frequency domain and its threshold.Figure 7
IMF 7 on frequency domain and its threshold.


## 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. Figure3 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).Figure 3
Raw accelerometer signal, raw ECG signal, and gait delineation signal from participant 1 using IMF 6 (black line) and IMF 7 (red line) while walk in speed 1.8 km/h using belt tightness of (a) 85%, (b) 90%, (c) 95%, and (d) 100%.
(a)
(b)
(c)
(d)


## 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:(11)Accuracy=1−Error∑Step_Signal_Peak×100%.(12)Error=2∗∑Gait_Signal_Peak−∑Step_Signal,_Peak.Table1 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.Table 1
Gait detection results in treadmill test for participant 1 along with the average accuracy from all five participants using IMF 6 and IMF 7 with various belts tightness.
Treadmill speed (km/h)
Accuracy of 85% of CC
Accuracy of 90% of CC
Accuracy of 95% of CC
Accuracy of 100% of CC
IMF 6 (%)
IMF 7 (%)
IMF 6 (%)
IMF 7 (%)
IMF 6 (%)
IMF 7 (%)
IMF 6 (%)
IMF 7 (%)
A
B
A
B
A
B
A
B
A
B
A
B
A
B
A
B
1.8
40.00
−3.46
92.63
85.52
2.04
−15.39
97.96
93.52
−14.00
−3.02
78.00
87.12
−6.32
−13.85
96.84
93.67
2.7
23.30
1.50
91.26
94.10
3.77
−1.35
92.45
96.59
−7.69
11.09
88.46
92.33
19.23
10.43
94.23
92.13
3.6
54.55
13.18
85.45
94.57
0.00
4.78
99.08
95.73
−3.70
22.41
98.15
89.50
58.93
18.62
71.43
86.07
4.5
66.67
21.29
68.38
91.88
8.62
30.27
100.00
88.78
6.84
28.81
90.60
86.00
88.33
40.36
65.00
81.81
5.4
39.73
44.60
73.97
79.10
30.99
61.71
95.77
75.47
35.62
57.07
78.08
68.17
98.68
83.39
59.21
60.06
6.3
32.88
47.77
79.45
79.32
26.03
62.77
97.26
77.73
54.79
56.52
76.71
68.76
98.68
88.00
61.84
58.62
7.2
19.87
41.32
92.72
79.32
22.52
54.89
99.34
75.26
75.68
67.24
78.38
66.73
98.72
93.72
58.97
54.17
8.1
20.51
42.48
89.74
75.57
52.29
62.60
91.50
71.48
64.90
75.38
76.82
59.80
83.54
95.05
49.37
50.79
9.0
48.10
52.75
81.01
71.80
58.23
75.32
75.95
61.06
87.18
91.90
67.95
53.68
85.89
96.15
51.53
52.03
Avg.
38.40
29.05
83.85
83.46
22.72
37.29
94.37
81.74
33.29
45.27
81.46
74.68
69.52
56.87
67.60
69.93
A, participant 1; B, average.


## 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. Figure4 shows the proposed algorithm to choose the correct IMF as the gait signal.Figure 4
Proposed algorithm.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 Figure5.(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. Figure6 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:(13)Ratio=Left_Highest_PeakRight_Highest_Peak.(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 Figure7. 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.Figure 5
ECG signal, which is obtained from participant 1 in treadmill speed of 1.8 km/h, with the corresponding IMF 6 and IMF 7.Figure 6
IMF 6 on frequency domain and its threshold.Figure 7
IMF 7 on frequency domain and its threshold.


## 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. Table2 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.Table 2
Detection accuracy of proposed algorithm from training participants.
Treadmill speed (km/h)
Subject 1
Subject 2
Subject 3
Subject 4
Subject 5
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
1.8
−6.32
96.84
96.84
−27.59
98.85
98.85
−7.55
100.00
100.00
−57.89
97.37
97.37
30.11
75.27
75.27
2.7
19.23
94.23
94.23
−13.86
99.01
99.01
18.35
91.74
91.74
−20.00
97.78
97.78
48.42
77.89
77.89
3.6
58.93
71.43
71.43
0.00
97.25
97.25
6.90
86.21
86.21
−11.88
95.05
95.05
39.18
80.41
80.41
4.5
88.33
65.00
88.33
−1.71
97.44
97.44
29.27
86.18
86.18
26.32
91.23
91.23
71.15
69.23
71.15
5.4
98.68
59.21
98.68
31.37
92.81
92.81
96.00
49.33
96.00
90.91
46.15
90.91
100.00
52.78
100.00
6.3
98.68
61.84
98.68
62.42
71.34
62.42
100.00
53.33
100.00
78.91
53.06
78.91
100.00
53.52
100.00
7.2
98.72
58.97
98.72
91.14
59.49
91.14
98.70
61.04
98.70
83.44
42.38
83.44
96.60
48.98
96.60
8.1
83.54
49.37
83.54
98.75
53.75
98.75
98.14
54.66
98.14
95.48
45.16
95.48
99.33
51.01
99.33
9.0
85.89
51.53
85.89
100.00
50.63
100.00
98.77
51.85
98.77
97.47
49.37
97.47
98.65
56.76
98.65
Avg.
69.52
67.60
90.70
37.84
80.06
93.07
59.84
70.48
95.08
42.53
68.62
91.96
75.94
62.87
88.81
PA, proposed algorithm.Table 3
Comparison of average detection accuracy of IMF 6, IMF 7, and proposed algorithm from all training participants.
Treadmill states
Detection accuracy (%)
IMF 6
IMF 7
PA
Walking
14.47
88.42
89.68
Running
91.26
55.13
93.72
Average
57.13
69.93
91.93


### 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 Table4.Table 4
Detection accuracy of proposed algorithm from testing participants.
Treadmill speed (km/h)
Subject 6
Subject 7
Subject 8
Subject 9
Subject 10
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
1.8
0.00
100.00
100.00
14.74
98.95
98.95
7.92
87.13
87.13
−22.22
97.78
97.78
−33.33
97.78
97.78
2.7
−5.94
93.07
93.07
8.33
95.83
95.83
3.92
100.00
100.00
30.61
91.84
91.84
−17.39
97.83
97.83
3.6
17.54
98.25
98.25
7.69
98.08
98.08
14.68
93.58
93.58
46.60
93.20
93.20
20.00
100.00
100.00
4.5
40.32
88.71
88.71
19.47
97.35
97.35
62.81
79.34
79.34
58.93
83.93
83.93
1.94
97.09
97.09
5.4
98.16
47.85
98.16
96.45
70.92
96.45
98.04
62.75
98.04
94.12
58.82
94.12
67.16
86.57
86.57
6.3
100.00
45.78
100.00
95.89
58.90
95.89
98.72
57.69
98.72
98.57
62.86
98.57
87.32
67.61
87.32
7.2
99.39
46.06
99.39
97.37
57.89
97.37
96.10
57.14
96.10
97.81
56.93
97.81
93.79
66.21
93.79
8.1
99.41
47.34
99.41
94.27
61.15
94.27
91.14
60.76
91.14
95.83
58.33
95.83
94.04
62.25
94.04
9.0
97.67
46.51
97.67
96.89
59.63
96.89
70.81
69.57
69.57
98.61
59.72
98.61
96.77
65.81
96.77
Avg.
60.73
68.17
97.18
59.01
77.63
96.79
60.46
74.22
90.40
66.54
73.71
94.63
45.59
82.35
94.58


## 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. Table2 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.Table 2
Detection accuracy of proposed algorithm from training participants.
Treadmill speed (km/h)
Subject 1
Subject 2
Subject 3
Subject 4
Subject 5
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
1.8
−6.32
96.84
96.84
−27.59
98.85
98.85
−7.55
100.00
100.00
−57.89
97.37
97.37
30.11
75.27
75.27
2.7
19.23
94.23
94.23
−13.86
99.01
99.01
18.35
91.74
91.74
−20.00
97.78
97.78
48.42
77.89
77.89
3.6
58.93
71.43
71.43
0.00
97.25
97.25
6.90
86.21
86.21
−11.88
95.05
95.05
39.18
80.41
80.41
4.5
88.33
65.00
88.33
−1.71
97.44
97.44
29.27
86.18
86.18
26.32
91.23
91.23
71.15
69.23
71.15
5.4
98.68
59.21
98.68
31.37
92.81
92.81
96.00
49.33
96.00
90.91
46.15
90.91
100.00
52.78
100.00
6.3
98.68
61.84
98.68
62.42
71.34
62.42
100.00
53.33
100.00
78.91
53.06
78.91
100.00
53.52
100.00
7.2
98.72
58.97
98.72
91.14
59.49
91.14
98.70
61.04
98.70
83.44
42.38
83.44
96.60
48.98
96.60
8.1
83.54
49.37
83.54
98.75
53.75
98.75
98.14
54.66
98.14
95.48
45.16
95.48
99.33
51.01
99.33
9.0
85.89
51.53
85.89
100.00
50.63
100.00
98.77
51.85
98.77
97.47
49.37
97.47
98.65
56.76
98.65
Avg.
69.52
67.60
90.70
37.84
80.06
93.07
59.84
70.48
95.08
42.53
68.62
91.96
75.94
62.87
88.81
PA, proposed algorithm.Table 3
Comparison of average detection accuracy of IMF 6, IMF 7, and proposed algorithm from all training participants.
Treadmill states
Detection accuracy (%)
IMF 6
IMF 7
PA
Walking
14.47
88.42
89.68
Running
91.26
55.13
93.72
Average
57.13
69.93
91.93


## 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 Table4.Table 4
Detection accuracy of proposed algorithm from testing participants.
Treadmill speed (km/h)
Subject 6
Subject 7
Subject 8
Subject 9
Subject 10
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
IMF 6 (%)
IMF 7 (%)
PA (%)
1.8
0.00
100.00
100.00
14.74
98.95
98.95
7.92
87.13
87.13
−22.22
97.78
97.78
−33.33
97.78
97.78
2.7
−5.94
93.07
93.07
8.33
95.83
95.83
3.92
100.00
100.00
30.61
91.84
91.84
−17.39
97.83
97.83
3.6
17.54
98.25
98.25
7.69
98.08
98.08
14.68
93.58
93.58
46.60
93.20
93.20
20.00
100.00
100.00
4.5
40.32
88.71
88.71
19.47
97.35
97.35
62.81
79.34
79.34
58.93
83.93
83.93
1.94
97.09
97.09
5.4
98.16
47.85
98.16
96.45
70.92
96.45
98.04
62.75
98.04
94.12
58.82
94.12
67.16
86.57
86.57
6.3
100.00
45.78
100.00
95.89
58.90
95.89
98.72
57.69
98.72
98.57
62.86
98.57
87.32
67.61
87.32
7.2
99.39
46.06
99.39
97.37
57.89
97.37
96.10
57.14
96.10
97.81
56.93
97.81
93.79
66.21
93.79
8.1
99.41
47.34
99.41
94.27
61.15
94.27
91.14
60.76
91.14
95.83
58.33
95.83
94.04
62.25
94.04
9.0
97.67
46.51
97.67
96.89
59.63
96.89
70.81
69.57
69.57
98.61
59.72
98.61
96.77
65.81
96.77
Avg.
60.73
68.17
97.18
59.01
77.63
96.79
60.46
74.22
90.40
66.54
73.71
94.63
45.59
82.35
94.58


## 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 Table1. 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 Table1. 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 Table4. 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.



---

*Source: 8240687-2018-11-19.xml*