# Walking Gait Phase Detection Based on Acceleration Signals Using Voting-Weighted Integrated Neural Network

Authors: Lei Yan; Tao Zhen; Jian-Lei Kong; Lian-Ming Wang; Xiao-Lei Zhou
Journal: Complexity
 (2020)

---

## Abstract

Human gait phase recognition is a significant technology for rehabilitation training robot, human disease diagnosis, artificial prosthesis, and so on. The efficient design of the recognition method for gait information is the key issue in the current gait phase division and eigenvalues extraction research. In this paper, a novel voting-weighted integrated neural network (VWI-DNN) is proposed to detect different gait phases from multidimensional acceleration signals. More specifically, it first employs a gait information acquisition system to collect different IMU sensors data fixed on the human lower limb. Then, with dimensionality reduction and four-phase division preprocessing, key features are selected and merged as unified vectors to learn common and domain knowledge in time domain. Next, multiple refined DNNs are transferred to design a multistream integrated neural network, which utilizes the mixture-granularity information to exploit high-dimensional feature representative. Finally, a voting-weighted function is developed to fuse different submodels as a unified representation for distinguishing small discrepancy among different gait phases. The end-to-end implementation of the VWI-DNN model is fine-tuned by the loss optimization of gradient back-propagation. Experimental results demonstrate the outperforming performance of the proposed method with higher classification accuracy compared with the other methods, of which classification accuracy and macro-F1 is up to 99.5%. More discussions are provided to indicate the potential applications in combination with other works.


---

## Body

## 1. Introduction

As the most common form of human behavior, walking style is related to health status and individual differences, which can be shown by the differences of the gait phase [1]. Detecting results of the gait phase can provide references for disease diagnosis and rehabilitation [2, 3], which is of great significance to the patients’ clinical rehabilitation. For example, an estimated gait disorder of 1.1 million children may have originated from different somatosensory disease in the United States [3]. In addition, researchers have managed to program humanoid robots to use human-based gait trajectories generated via gait classification [4], as well as consistently control wearable assistive devices such as robotic prostheses [5] and orthoses [6] for the recovery of lower-limb mobility. For instance, Yan et al. [4] proposed that gait phase detection can also be used to facilitate the development human auxiliary equipment, such as the medical ankle joint (AF), hip joint (HK), and knee ankle joint (KAF) orthopedic devices, as well as exoskeletons and other equipment. Similarly, gait phase detection plays an important role in sports medicine [7] and rehabilitation medicine [8].Computational methods for gait phase recognition fall into two main categories. The first category is comprised of algorithms, which divide the gait phases based on the threshold selection of either raw or processed data [9]. Secondly, some deep-learning approaches have emerged in recent years to substitute the aforementioned techniques that rely on traditional classification algorithms. Some have applied deep-learning algorithms to different types of sensors to detect gait phases. For instance, Mukherjee et al. [10] present a fully automated frontal (i.e., employing front and back views only) gait phase recognition approach using the depth information captured by multiple Kinect RGB-D cameras. However, the captured image information is easily disturbed by the external environment. Rosati et al. [11] proposed a method of hierarchical clustering to achieve recognition of the human gait phase by processing electromyography (EMG) data collected during gait, which has improved the abovementioned problems that are susceptible to environmental interference. However, muscle electrical signals are susceptible to factors such as sweat when collecting EMG data. Ding et al. [12] further improved the problems of the above EMG method and proposed a proportional fuzzy algorithm to achieve smooth recognition of the gait phase for foot pressure information processing, but the foot pressure will be affected by the wearer’s weight, load, and other factors [13], and the pressure sensor also has a high failure rate. In recent years, researchers have started to study gait phase recognition methods based on inertial sensors (IMU). This is mainly due to the fact that more information can be obtained by adopting a small number of inertial sensor modules and most of the inertial sensor modules are installed on the legs and feet, so as to avoid damage or discomfort to the wearer [14]. At the same time, the information of IMU is basically unaffected by human body weight, belongings, clothing, sweat, and other factors, which is a prominent advantage compared to the method of plantar pressure or muscle electrical signal detection. In addition, inertial sensors are extremely cost effective [15] and acceleration signals acquired by inertial sensors exhibit typical waveform characteristics during the gait cycle. Previous studies have positioned inertial sensors on the instep, thigh, and calf [16–18]. This paper considers the position of the instep, lower leg, and thigh because the classifier has better classification performance at the lower extremity position [19].For the recognition system, this paper designs an effective and adaptable gait detection method. Some research studies [13] indicate that a large amount of information can be obtained by using a small number of acceleration sensors that are located on the legs and feet to minimize sensor damage and discomfort to the person wearing the sensor. In this paper, we describe a system that uses three inertial sensor modules to obtain the acceleration information of the lower limbs of the human body. The collected acceleration data was reduced by the Principal Component Analysis (PCA) algorithm, which focuses on extracting the feature information of the original data and searches for a set of orthogonal low-wiki functions to represent a set of high-dimensional data, improving the recognition rate and recognition speed [20, 21]. Then, the paper divides the human gait into three phases and proposes a method of dividing the three gait phases. Finally, this paper proposes a VWF-DNN algorithm for detecting the gait phase, which is inspired by integrated learning. The core idea of the VWF-DNN algorithm is to use the three subneural networks with distinct differences to output the final classification result through the voting algorithm designed in this paper. The designed VWF-DNN with higher accuracy will be further evaluated with learned and unlearned data to test its suitability with acceleration classification.This paper proposes an algorithmic model for detecting the gait phase, which uses the acceleration data from the instep, calf, and thigh to accurately detect two gait phase events. Finally, the effectiveness of the proposed VWI-DNN algorithm in gait phase detection is verified by the final recognition results.


## 2. Materials and Methods

### 2.1. Data Collection

Twenty volunteers with weight range in 46 kg to 88 kg and height range in 155 cm to 190 cm were recruited for the experimental data collection. The details of personal information are shown in Figure1. The subjects have no physical or nerve injury to their legs or feet, which may affect walking gait phase detection.Figure 1
Information about volunteers participating in this experiment.With the improvement of the sensor manufacturing process, this study selected three IMU modules as portable devices for obtaining acceleration information. The inertial sensor modules were placed on the foot dorsum, the outer side of the lower leg, and the outer side of the thigh. The arrangement of the acceleration sensor on the instep, calf, and thigh monitoring the lower limb movement is shown in Figure2. The acceleration resolution of the three-axis inertial sensor module used in the experiment is 6.1e − 5 g, the stability of attitude measurement is 0.01°, and the transmission baud rate in the experiment was set to 115200 bps.Figure 2
Human gait information acquisition system.In this experiment, all participants were asked to walk for at least 120 s on the configured treadmill with speeds at 0.78 m/s, 1.0 m/s, and 1.25 m/s, respectively. Participants walked normally three times on a treadmill at each speed, with all settings being the same in each state. In order to prevent the participants from affecting the gait due to fatigue, the experiment requires the participants to rest for 2 minutes for each walking test. In addition, data is only saved until the treadmill’s running speed reaching the set speed. When the experiment was stopped and the treadmill began to slow down, we stopped collecting data. Moreover, each participant was asked to perform the same experiment under the same conditions to ensure the reliability and validity of the collecting process.


### 2.2. Data Preprocessing

Since each data sample contains multiple features from different sensors and each data in the same IMU module includes three acceleration data inX, Y, and Z directions, abundant data with different dimensions will lead to excessive complexity and easy overfitting of the detection model. In order to reduce the dimension of data set, the PCA method was adopted to synthesize the three-directional acceleration information ax,ay,andaz of every IMU sensors into a new dimension variable Comp. PCA [22] is a general tool for dimensionality reduction and data analysis, and its essence is to project the data samples in the high-dimensional space into the low-dimensional space through linear transformation, while preserving the original data features as much as possible [23]. With the dimension reduction process, the compressed Comp can avoid the excessive information lose and adjust input dimension before passing acceleration data into the subsequent classifier. The Comp is calculated as follows:(1)Comp=z_1∗ax+z_2∗ay+z_3∗az,where ax,ay, and az represent the acceleration in the X-, Y-, and Z-directions, respectively. Comp is a one-dimensional data by combining three-directions movement, which can improve the response performance of the algorithm and avoid overfitting during late training. The combined acceleration “Comp” of the instep, calf, and thigh together constitutes the input vector of the model, where z_1, z_2, and z_3 represent the coefficients of the acceleration in three directions. The distribution of z_1, z_2, and z_3 corresponding to different body parts at asynchronous speed is shown in Table 1.Table 1
Acceleration data for different parts at different speeds using PCA synthesized parameter table.
Pace
Collection location
z_1
z_2
z_3
0.78 m/s
Calf
0.632
0.671
0.421
Thigh
−0.652
0.569
0.355
Foot
0.636
0.524
0.582
1.0 m/s
Calf
0.613
0.637
0.423
Thigh
−0.479
0.601
0.673
Foot
0.667
0.625
0.533
1.25 m/s
Calf
0.629
0.638
0.427
Thigh
−0.565
0.623
0.641
Foot
0.753
0.568
0.531Based on the above experiment, we can get the curve of the acceleration in theX, Y, and Z directions and the combined acceleration as shown in Figure 3.Figure 3
Acceleration data collected under the three body parts: foot (a), thigh (b), and calf (c).a_x represents the acceleration in the x-axis direction, a_y represents the acceleration in the y-axis direction, a_z represents the acceleration in the z-axis direction, and a_com represents the combined acceleration.
(a)
(b)
(c)The human walking process is a rhythmic movement, and a complete gait cycle definition is from the unilateral heel to the ipsilateral heel again [21]. A two-phase model has proven to be sufficient to control the knee module of an active orthosis [9]. Nonetheless, the most widespread approach relies on a four-phase model [24], which are independently written as (1) Heel Strike (HS), (2) the loading response phase or Flat Foot (FF), (3) the heel lifting or Heel-Off (HO) and (4) the initial Swing Phase (SW). This four-phase model of gait granularity has been used for the actuation of multiple robotic ankle-foot orthoses [25, 26].(2)
soft
max
q
i
=
e
q
i
′
∑
i
=
1
n
e
q
i
′
.To ensuring the scientificity of gait classification, the walking cycle in this paper was also divided into HS, FF, HO, and SW. During normal walking, the acceleration signals in the three directions of the foot, thigh, and calf exhibit periodicity. The sway phase accounts for approximately 40% of the total gait phase, and the stance phase accounts for approximately 60% of the total gait phase [27]. We can approximate that the stance phase is the biggest phase in the walking cycle. According to the division of gait phase, the phase division in this paper is shown in Figure 4.Figure 4
Phase division diagram of gait. Green curve represents the acquired foot acceleration data, brown curve represents the acquired calf acceleration data, and blue curve represents the collected thigh acceleration data.Except for the gait phase division, feature selection is also used to extract meaningful information or noise from acceleration signals. After this processing, the key features effectively representing different gait phases are obtained from time domain for the subsequent recognition model. In this paper, the standard deviation (SD), mean absolute value (Mav), maximum value (Max), minimum value (Min), and median (Med) are selected to handle with acceleration signals as feature vectors. Since the vectors composed of single and multiple feature sets will produce different accuracy rates, we merged SD, Max, Min, Med, and Mav feature vectors to form the input feature vector in order to improve the recognition accuracy.


### 2.3. Voting-Weighted Integrated Neural Network

The next step is to design an algorithm to recognize the timings vectors related to the acceleration signal. As the commonly classifier with excellent performance [28], the DNN is a feedforward artificial neural network consisting of an input layer, an output layer, and at least two hidden layers [29]. Although the DNN is a strong classifier, sometimes the subneural network still misjudges certain situations, leading to the misclassification of results [30]. Thus, the voting fusion of the neural network is proposed to solve the instability of the subneural network, which may be insensitive to the data of some input layers due to a single network structure [31], and results in errors in the output layer. The output of the integrated neural network is determined by the output of each integrated neural network under the sample [32], which can improve the classification performance and generalization performance of the classifier to some extent [33, 34]. Therefore, inspired by the AdaBoosting algorithm [35] and Bagging [36] algorithm in current integrated learning, this paper further proposes a novel VWI-DNN algorithm (the entire structure is shown in Figure 5) by modifying the traditional DNN network. Our work aims to construct a general neural network structure allowing for different voting decisions at each submodel and demonstrate its use as a practical way to massively increase model capacity.Figure 5
Structure diagram of integrated neural network algorithm based on vote weighting.Firstly, we chose three advanced deep neural networks instead of the perceptual layer network as the classifiers and named them SNN_1, SNN_2, SNN_3, so as to improve the classification performance of the network. The research mainly focuses on the design of three subneural networks and the optimization of network parameters, as well as the fusion method of the output results of these three subneural networks. SNN_1, SNN_2, and SNN_3 have one common input layer and two hidden layers, so that they can have a common network structure. In addition, three independent and different networks are set up in the third hidden layer. This design can simplify the network and share the weight information. The latter network structure maintains their independence, the number of neurons, and activation functions, and the number of hidden layers exist certain differences. The neural network has associated nonlinearities and are trained using greedy hierarchical supervision, and the final learning rate was manually specified and set to 0.05. Finally, the three subneural networks output their respective classification results through the Softmax regression layer. Some parameters of the structure of the entire network are shown in Table2, where HL_x represents the xth hidden layer and the “Dropout column” represents the sparse rate that needs to be set.Table 2
Parameter setting of VWI-DNN structure.
Layer
Number of neurons
Activation function
Dropout
SNN_1
SNN_2
SNN_3
SNN_1
SNN_2
SNN_3
SNN_1
SNN_2
SNN_3
HL_1
540
540
540
leaky_relu
leaky_relu
leaky_relu
1.0
1.0
1.0
HL_2
200
200
200
leaky_relu
leaky_relu
leaky_relu
1.0
1.0
1.0
HL_3
260
200
140
leaky_relu
relu
tanh
0.6
0.8
1.0
HL_4
120
90
60
leaky_relu
relu
tanh
1.0
1.0
1.0
HL_5
60
90
—
leaky_relu
relu
—
1.0
1.0
—The goal of the WWI-DNN algorithm is to identify the three gait phases of the human body, which solves the multiclassification task. However, the output of the neural network does not necessarily represent a probability distribution, so the output of the neural network must be transformed into a probability distribution through the Softmax regression layer, whose expression is shown in the following equation:Then, the focus of the VWI-DNN algorithm is to establish a voting fusion mechanism. In the process of output fusion, the establishment of fusion algorithm is the core content of information fusion [37, 38]. The concept of voting fusion was therefore proposed to obtain more accurate results from multiple unreliable data. After years of development, there have been numerous voting algorithms, such as majority voting fusion, logical voting fusion, median voting fusion, and weighted average voting fusion. The voting weight of an excellent voting fusion algorithm should not be artificially set. It is more reasonable that its voting weight should be larger when a subneural network performs well and vice versa. In the AdaBoosting algorithm theory, the weight information is updated with the classification error rate, but the weight update is problematic when the error rate is higher than 50%. In order to avoid this problem, considering that good performance classifiers should be rewarded and poor performance classifiers should be punished, this paper proposes a weighted sum voting algorithm. The algorithm of weighted summation is to add the weights of the three networks to output the same result, respectively, and regard the sum of the weights as the fusion result. This is also a simple and effective information fusion algorithm.In order to solve the multiple classifier weight problem, this paper introduces the weighting function. This paper used the classification accuracy to determine the weight coefficient of each classifier. Equation (3) shows how to solve the accuracy of each classifier, and we need to set the corresponding weighting function to determine the weight coefficient of the classification. The image of the weighting function is given in Figure 6, and its expression is as shown in equation (5), wherein the expression of the reward function is indicated in equation (4). It can be seen that the derivative value of the reward function (Deriv_reward) has a negative correlation with the value of the abscissa, which is why this paper chooses it as a reward function. Such a function can make the model with good performance get larger reward. When the accuracy εt is less than 40%, the weight should be reduced, so the weight coefficient is taken as ωi⋅expεi−1; similarly, when the accuracy εt is more than 40%, the classification performance of the weak classifier can be considered great, and its weight should be increased, so the weight should be taken rewardεt. Meanwhile, in order to make the new weight available in [0,1], this paper normalizes c by using equation (6). In addition, given that one classifier cannot be made large on its own, this paper sets a minimum threshold of 0.26 for each classifier’s weight. The classification weight of each classifier is obtained according to equation (7). The given ω initial value ω0 is 33.33% and the initial value c0 of c is 1.0.Figure 6
Weighting function diagram.(3)
ε
i
=
n
correct
N
total
,
i
=
1,2,3
,
(4)
reward
ε
i
=
0.5
+
1
1
+
exp
−
5
∗
ε
i
,
(5)
c
i
=
reward
ε
i
⋅
I
ε
i
>
0.4
+
exp
ε
i
−
1
⋅
I
ε
i
<
0.4
,
(6)
c
i
=
c
i
∑
i
=
1
3
c
i
,
(7)
ω
i
=
ω
i
−
1
⋅
c
i
∑
i
=
1
3
ω
i
−
1
⋅
c
i
,
ω
i
>
0.26
,
0.26
,
otherwise
.The next step is to confirm the weight of the classifier. The classification result of each classifier is calculated by using equation (8). When the classification results are the same, the weights of these classifiers should be added and obtained the weight corresponding to each gait phase. This process can be expressed by equation (9), where γk indicates the probability output corresponding to the human gait phase k. The final classification result should be determined by the maximum weight value corresponding to each gait phase, thereby obtaining the final integrated output q, whose expression is as shown in equation (10), where ncorrect denotes the number of samples correctly classified, Ntotal denotes the total number of samples, qi′ denotes the value output by the ith subneural network through the output layer, and ωi denotes the weight of the ith neural network corresponding to the gait phase k, and when k = 1, it represents the starting phase; when k = 2, it indicates the swing phase; when k = 3, it indicates the foot phase.Finally, the task of the VWI-DNN algorithm is to solve the problem of internal parameter update and optimization of each subneural network. The neural network generally updates the internal parameters of the network architecture by optimizing the loss function value. When using neural networks for classification, the usual function is the cross-entropy loss function [39] which characterizes the distance between two probability parts so that the cross-entropy loss function can be used to calculate the distance between the predicted probability distribution and the probability distribution of the real answer. According to the cross-entropy loss function equation (11), we can obtain the loss function equations (12)–(14) of the three subneural networks. When we train this network, we hope that the parameters of the first subneural network would not be changed when we train the other two neural networks. But the reality is that when you train any of the three subneural networks, the parameters of the shared layer will change. Therefore, if the optimizer optimizes the three loss functions separately, the shared layer parameters will be changed reciprocally and the ideal result will not be achieved. In order to improve this situation, this paper proposes a method to optimize the global loss by using a classifier. The optimizer no longer optimizes the three cross-entropy loss functions separately but only optimizes the sum of the three loss functions (loss_sum), which can ensure that the shared layer parameters can achieve a better result and the training speed can be improved. The loss_sum expression is shown in equation (15).(8)cfi=argmaxqi,i=1,2,3,(9)γk=∑i=1Nωi⋅Icfi=k,k=1,2,3,(10)qγk=argmaxγk,k=1,2,3,(11)loss=−∑pxlogqx,(12)loss_1=−∑p1xlogq1x,(13)loss_2=−∑p2xlogq2x,(14)loss_3=−∑p3xlogq3x,(15)loss_sum=loss_1+loss_2+loss_3,where qix denotes the probability distribution of the three subneural networks predicting the phase of the three types of gaits after passing through the Softmax layer and pix denotes the distribution of the real samples.To avoid overfitting, 70% of the sample set was selected for training and 30% for testing. After training the three learning models 10,000 times with the same training set, the same test set was used to test the trained models, and the classification accuracy, macro-F value, and area ender curve (AUC) after the test were recorded. The entire process of this study is shown in Figure7.Figure 7
System block diagram.


## 2.1. Data Collection

Twenty volunteers with weight range in 46 kg to 88 kg and height range in 155 cm to 190 cm were recruited for the experimental data collection. The details of personal information are shown in Figure1. The subjects have no physical or nerve injury to their legs or feet, which may affect walking gait phase detection.Figure 1
Information about volunteers participating in this experiment.With the improvement of the sensor manufacturing process, this study selected three IMU modules as portable devices for obtaining acceleration information. The inertial sensor modules were placed on the foot dorsum, the outer side of the lower leg, and the outer side of the thigh. The arrangement of the acceleration sensor on the instep, calf, and thigh monitoring the lower limb movement is shown in Figure2. The acceleration resolution of the three-axis inertial sensor module used in the experiment is 6.1e − 5 g, the stability of attitude measurement is 0.01°, and the transmission baud rate in the experiment was set to 115200 bps.Figure 2
Human gait information acquisition system.In this experiment, all participants were asked to walk for at least 120 s on the configured treadmill with speeds at 0.78 m/s, 1.0 m/s, and 1.25 m/s, respectively. Participants walked normally three times on a treadmill at each speed, with all settings being the same in each state. In order to prevent the participants from affecting the gait due to fatigue, the experiment requires the participants to rest for 2 minutes for each walking test. In addition, data is only saved until the treadmill’s running speed reaching the set speed. When the experiment was stopped and the treadmill began to slow down, we stopped collecting data. Moreover, each participant was asked to perform the same experiment under the same conditions to ensure the reliability and validity of the collecting process.


## 2.2. Data Preprocessing

Since each data sample contains multiple features from different sensors and each data in the same IMU module includes three acceleration data inX, Y, and Z directions, abundant data with different dimensions will lead to excessive complexity and easy overfitting of the detection model. In order to reduce the dimension of data set, the PCA method was adopted to synthesize the three-directional acceleration information ax,ay,andaz of every IMU sensors into a new dimension variable Comp. PCA [22] is a general tool for dimensionality reduction and data analysis, and its essence is to project the data samples in the high-dimensional space into the low-dimensional space through linear transformation, while preserving the original data features as much as possible [23]. With the dimension reduction process, the compressed Comp can avoid the excessive information lose and adjust input dimension before passing acceleration data into the subsequent classifier. The Comp is calculated as follows:(1)Comp=z_1∗ax+z_2∗ay+z_3∗az,where ax,ay, and az represent the acceleration in the X-, Y-, and Z-directions, respectively. Comp is a one-dimensional data by combining three-directions movement, which can improve the response performance of the algorithm and avoid overfitting during late training. The combined acceleration “Comp” of the instep, calf, and thigh together constitutes the input vector of the model, where z_1, z_2, and z_3 represent the coefficients of the acceleration in three directions. The distribution of z_1, z_2, and z_3 corresponding to different body parts at asynchronous speed is shown in Table 1.Table 1
Acceleration data for different parts at different speeds using PCA synthesized parameter table.
Pace
Collection location
z_1
z_2
z_3
0.78 m/s
Calf
0.632
0.671
0.421
Thigh
−0.652
0.569
0.355
Foot
0.636
0.524
0.582
1.0 m/s
Calf
0.613
0.637
0.423
Thigh
−0.479
0.601
0.673
Foot
0.667
0.625
0.533
1.25 m/s
Calf
0.629
0.638
0.427
Thigh
−0.565
0.623
0.641
Foot
0.753
0.568
0.531Based on the above experiment, we can get the curve of the acceleration in theX, Y, and Z directions and the combined acceleration as shown in Figure 3.Figure 3
Acceleration data collected under the three body parts: foot (a), thigh (b), and calf (c).a_x represents the acceleration in the x-axis direction, a_y represents the acceleration in the y-axis direction, a_z represents the acceleration in the z-axis direction, and a_com represents the combined acceleration.
(a)
(b)
(c)The human walking process is a rhythmic movement, and a complete gait cycle definition is from the unilateral heel to the ipsilateral heel again [21]. A two-phase model has proven to be sufficient to control the knee module of an active orthosis [9]. Nonetheless, the most widespread approach relies on a four-phase model [24], which are independently written as (1) Heel Strike (HS), (2) the loading response phase or Flat Foot (FF), (3) the heel lifting or Heel-Off (HO) and (4) the initial Swing Phase (SW). This four-phase model of gait granularity has been used for the actuation of multiple robotic ankle-foot orthoses [25, 26].(2)
soft
max
q
i
=
e
q
i
′
∑
i
=
1
n
e
q
i
′
.To ensuring the scientificity of gait classification, the walking cycle in this paper was also divided into HS, FF, HO, and SW. During normal walking, the acceleration signals in the three directions of the foot, thigh, and calf exhibit periodicity. The sway phase accounts for approximately 40% of the total gait phase, and the stance phase accounts for approximately 60% of the total gait phase [27]. We can approximate that the stance phase is the biggest phase in the walking cycle. According to the division of gait phase, the phase division in this paper is shown in Figure 4.Figure 4
Phase division diagram of gait. Green curve represents the acquired foot acceleration data, brown curve represents the acquired calf acceleration data, and blue curve represents the collected thigh acceleration data.Except for the gait phase division, feature selection is also used to extract meaningful information or noise from acceleration signals. After this processing, the key features effectively representing different gait phases are obtained from time domain for the subsequent recognition model. In this paper, the standard deviation (SD), mean absolute value (Mav), maximum value (Max), minimum value (Min), and median (Med) are selected to handle with acceleration signals as feature vectors. Since the vectors composed of single and multiple feature sets will produce different accuracy rates, we merged SD, Max, Min, Med, and Mav feature vectors to form the input feature vector in order to improve the recognition accuracy.


## 2.3. Voting-Weighted Integrated Neural Network

The next step is to design an algorithm to recognize the timings vectors related to the acceleration signal. As the commonly classifier with excellent performance [28], the DNN is a feedforward artificial neural network consisting of an input layer, an output layer, and at least two hidden layers [29]. Although the DNN is a strong classifier, sometimes the subneural network still misjudges certain situations, leading to the misclassification of results [30]. Thus, the voting fusion of the neural network is proposed to solve the instability of the subneural network, which may be insensitive to the data of some input layers due to a single network structure [31], and results in errors in the output layer. The output of the integrated neural network is determined by the output of each integrated neural network under the sample [32], which can improve the classification performance and generalization performance of the classifier to some extent [33, 34]. Therefore, inspired by the AdaBoosting algorithm [35] and Bagging [36] algorithm in current integrated learning, this paper further proposes a novel VWI-DNN algorithm (the entire structure is shown in Figure 5) by modifying the traditional DNN network. Our work aims to construct a general neural network structure allowing for different voting decisions at each submodel and demonstrate its use as a practical way to massively increase model capacity.Figure 5
Structure diagram of integrated neural network algorithm based on vote weighting.Firstly, we chose three advanced deep neural networks instead of the perceptual layer network as the classifiers and named them SNN_1, SNN_2, SNN_3, so as to improve the classification performance of the network. The research mainly focuses on the design of three subneural networks and the optimization of network parameters, as well as the fusion method of the output results of these three subneural networks. SNN_1, SNN_2, and SNN_3 have one common input layer and two hidden layers, so that they can have a common network structure. In addition, three independent and different networks are set up in the third hidden layer. This design can simplify the network and share the weight information. The latter network structure maintains their independence, the number of neurons, and activation functions, and the number of hidden layers exist certain differences. The neural network has associated nonlinearities and are trained using greedy hierarchical supervision, and the final learning rate was manually specified and set to 0.05. Finally, the three subneural networks output their respective classification results through the Softmax regression layer. Some parameters of the structure of the entire network are shown in Table2, where HL_x represents the xth hidden layer and the “Dropout column” represents the sparse rate that needs to be set.Table 2
Parameter setting of VWI-DNN structure.
Layer
Number of neurons
Activation function
Dropout
SNN_1
SNN_2
SNN_3
SNN_1
SNN_2
SNN_3
SNN_1
SNN_2
SNN_3
HL_1
540
540
540
leaky_relu
leaky_relu
leaky_relu
1.0
1.0
1.0
HL_2
200
200
200
leaky_relu
leaky_relu
leaky_relu
1.0
1.0
1.0
HL_3
260
200
140
leaky_relu
relu
tanh
0.6
0.8
1.0
HL_4
120
90
60
leaky_relu
relu
tanh
1.0
1.0
1.0
HL_5
60
90
—
leaky_relu
relu
—
1.0
1.0
—The goal of the WWI-DNN algorithm is to identify the three gait phases of the human body, which solves the multiclassification task. However, the output of the neural network does not necessarily represent a probability distribution, so the output of the neural network must be transformed into a probability distribution through the Softmax regression layer, whose expression is shown in the following equation:Then, the focus of the VWI-DNN algorithm is to establish a voting fusion mechanism. In the process of output fusion, the establishment of fusion algorithm is the core content of information fusion [37, 38]. The concept of voting fusion was therefore proposed to obtain more accurate results from multiple unreliable data. After years of development, there have been numerous voting algorithms, such as majority voting fusion, logical voting fusion, median voting fusion, and weighted average voting fusion. The voting weight of an excellent voting fusion algorithm should not be artificially set. It is more reasonable that its voting weight should be larger when a subneural network performs well and vice versa. In the AdaBoosting algorithm theory, the weight information is updated with the classification error rate, but the weight update is problematic when the error rate is higher than 50%. In order to avoid this problem, considering that good performance classifiers should be rewarded and poor performance classifiers should be punished, this paper proposes a weighted sum voting algorithm. The algorithm of weighted summation is to add the weights of the three networks to output the same result, respectively, and regard the sum of the weights as the fusion result. This is also a simple and effective information fusion algorithm.In order to solve the multiple classifier weight problem, this paper introduces the weighting function. This paper used the classification accuracy to determine the weight coefficient of each classifier. Equation (3) shows how to solve the accuracy of each classifier, and we need to set the corresponding weighting function to determine the weight coefficient of the classification. The image of the weighting function is given in Figure 6, and its expression is as shown in equation (5), wherein the expression of the reward function is indicated in equation (4). It can be seen that the derivative value of the reward function (Deriv_reward) has a negative correlation with the value of the abscissa, which is why this paper chooses it as a reward function. Such a function can make the model with good performance get larger reward. When the accuracy εt is less than 40%, the weight should be reduced, so the weight coefficient is taken as ωi⋅expεi−1; similarly, when the accuracy εt is more than 40%, the classification performance of the weak classifier can be considered great, and its weight should be increased, so the weight should be taken rewardεt. Meanwhile, in order to make the new weight available in [0,1], this paper normalizes c by using equation (6). In addition, given that one classifier cannot be made large on its own, this paper sets a minimum threshold of 0.26 for each classifier’s weight. The classification weight of each classifier is obtained according to equation (7). The given ω initial value ω0 is 33.33% and the initial value c0 of c is 1.0.Figure 6
Weighting function diagram.(3)
ε
i
=
n
correct
N
total
,
i
=
1,2,3
,
(4)
reward
ε
i
=
0.5
+
1
1
+
exp
−
5
∗
ε
i
,
(5)
c
i
=
reward
ε
i
⋅
I
ε
i
>
0.4
+
exp
ε
i
−
1
⋅
I
ε
i
<
0.4
,
(6)
c
i
=
c
i
∑
i
=
1
3
c
i
,
(7)
ω
i
=
ω
i
−
1
⋅
c
i
∑
i
=
1
3
ω
i
−
1
⋅
c
i
,
ω
i
>
0.26
,
0.26
,
otherwise
.The next step is to confirm the weight of the classifier. The classification result of each classifier is calculated by using equation (8). When the classification results are the same, the weights of these classifiers should be added and obtained the weight corresponding to each gait phase. This process can be expressed by equation (9), where γk indicates the probability output corresponding to the human gait phase k. The final classification result should be determined by the maximum weight value corresponding to each gait phase, thereby obtaining the final integrated output q, whose expression is as shown in equation (10), where ncorrect denotes the number of samples correctly classified, Ntotal denotes the total number of samples, qi′ denotes the value output by the ith subneural network through the output layer, and ωi denotes the weight of the ith neural network corresponding to the gait phase k, and when k = 1, it represents the starting phase; when k = 2, it indicates the swing phase; when k = 3, it indicates the foot phase.Finally, the task of the VWI-DNN algorithm is to solve the problem of internal parameter update and optimization of each subneural network. The neural network generally updates the internal parameters of the network architecture by optimizing the loss function value. When using neural networks for classification, the usual function is the cross-entropy loss function [39] which characterizes the distance between two probability parts so that the cross-entropy loss function can be used to calculate the distance between the predicted probability distribution and the probability distribution of the real answer. According to the cross-entropy loss function equation (11), we can obtain the loss function equations (12)–(14) of the three subneural networks. When we train this network, we hope that the parameters of the first subneural network would not be changed when we train the other two neural networks. But the reality is that when you train any of the three subneural networks, the parameters of the shared layer will change. Therefore, if the optimizer optimizes the three loss functions separately, the shared layer parameters will be changed reciprocally and the ideal result will not be achieved. In order to improve this situation, this paper proposes a method to optimize the global loss by using a classifier. The optimizer no longer optimizes the three cross-entropy loss functions separately but only optimizes the sum of the three loss functions (loss_sum), which can ensure that the shared layer parameters can achieve a better result and the training speed can be improved. The loss_sum expression is shown in equation (15).(8)cfi=argmaxqi,i=1,2,3,(9)γk=∑i=1Nωi⋅Icfi=k,k=1,2,3,(10)qγk=argmaxγk,k=1,2,3,(11)loss=−∑pxlogqx,(12)loss_1=−∑p1xlogq1x,(13)loss_2=−∑p2xlogq2x,(14)loss_3=−∑p3xlogq3x,(15)loss_sum=loss_1+loss_2+loss_3,where qix denotes the probability distribution of the three subneural networks predicting the phase of the three types of gaits after passing through the Softmax layer and pix denotes the distribution of the real samples.To avoid overfitting, 70% of the sample set was selected for training and 30% for testing. After training the three learning models 10,000 times with the same training set, the same test set was used to test the trained models, and the classification accuracy, macro-F value, and area ender curve (AUC) after the test were recorded. The entire process of this study is shown in Figure7.Figure 7
System block diagram.


## 3. Results and Discussion

### 3.1. Evaluation Methods

Comparing the classification performance of different classifiers cannot determine the effectiveness of the algorithm by a single metric and there are many other methods commonly used to obtain a full census. The evaluation metrics including Precision, Recall, Accuracy, and F1-score are used to compare different methods. Precision and Recall are widely used in the fields of information retrieval and statistical classification to evaluate the quality of results, where the higher the Precision and Recall value, the better the method performs. F1 combines the results ofP and R, and when F1 is high, it indicates that Precision and Recall are both high, and this evaluation index is relatively effective. However, the classifier of this paper performs multiclassification task. We hope to comprehensively investigate the Precision and Recall on several binary confusion matrices, and the most direct way is to calculate macro-F1 [40]. While, Accuracy reflects the ratio of the samples correctly classified by the classifier to the total samples for a given test data set. According to equations (16)–(21), we can calculate these evaluation factors, where TP, TN, FP, and FN, respectively, represent true positive, true negative, false positive, and false negative.In order to better analyze the performance of the classifier, this paper introduces the AUC under receiver operating characteristic (ROC) as the evaluation index of the algorithm. Spackman was the first to adopt ROC diagram for machine learning, and he proved the value of the ROC curve in evaluation [41]. In recent years, it has been applied more and more in machine learning and data mining research, partly because people realized that simple classification accuracy is usually not a good indicator to measure performance [42]. The AUC of each algorithm can be calculated to compare, and the algorithm that has the largest AUC will have the best diagnostic value:(16)Accuracy=TP+TNTP+FP+TN+FN,(17)Pi=TPTP+FP,(18)Ri=TPTP+FN,(19)macro−P=1n∑i=1nPi,(20)macro−R=1n∑i=1nRi,(21)macro−F1=2×macro−P×macro−Rmacro−P+macro−R.


### 3.2. Results

The joint confusion matrix of three gait phase recognition results at different synchronization speeds are, respectively, shown in Figures8–10. According to Figures 8–10, we can easily get Tables 3–5 which, respectively, classifies the performance for each training function in terms of HS, FF, HO, and SW phase under three kinds of sync speed. According to Tables 3–5, it can be observed that all of Bagging, Boosting, and VWI-DNN have macro-F1 of HS and SW phase recognition nearly up to 100%. While from the results obtained by F1, Bagging, and AdaBoosting have poor recognition effects on FF and HO phases. In particular, Bagging has a case where macro-F1 of the FF and HO phases is 0. It can also be clearly seen from the observation of Figure 8 that the Bagging algorithm can easily recognize the FF phase as the HO phase and the HO phase as the FF phase. The Bagging algorithm is extremely poor in HO phase and FF phase recognition. It can be seen from Table 5 that although Bagging and AdaBoosting have poor recognition of FF phase and HO phase, VWI-DNN algorithm proposed in this paper still has more than 98% macro-F1 value for the FF and HO phase. The three training functions have higher accuracy for SW and HS phases recognition at three paces, generally reaching more than 98%. As aforementioned, macro-F1 can comprehensively measure the two indicators of Precision and Recall. It was observed that macro-F1 value of VWI-DNN is more than 98% for any phase at any pace.Figure 8
Confusion matrix of three gait patterns derived from bagging classification under three pace settings: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c) classes.
(a)
(b)
(c)Figure 9
Confusion matrix of three gait patterns derived from AdaBoosting classification under three pace settings: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c) classes.
(a)
(b)
(c)Figure 10
Confusion matrix of three gait patterns derived from VWI-DNN Classification under three pace settings: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c) classes.
(a)
(b)
(c)Table 3
Summary of classification performance of bagging at unsynchronized speed.
Pace
0.78 m/s
1.0 m/s
1.25 m/s
Phase
HS
FF
HO
SW
HS
FF
HO
SW
HS
FF
HO
SW
Precision (%)
100.0
51.6
100.0
100.0
100.0
0
47.4
100.0
100.0
48.2
0
100.0
Recall (%)
98.9
100.0
8.2
100.0
100.0
0
100.0
100.0
100.0
100.0
0
100.0
F1 (%)
99.4
68.1
15.1
100.0
100.0
0
64.3
100.0
100.0
65.1
0
100.0Table 4
Summary of classification performance of AdaBoosting at unsynchronized speed.
Pace
0.78 m/s
1.0 m/s
1.25 m/s
Phase
HS
FF
HO
SW
HS
FF
HO
SW
HS
FF
HO
SW
Precision (%)
99.7
99.4
99.20
100.0
100.0
78.2
94.8
100.0
100.0
78.3
99.7
100.0
Recall (%)
99.5
99.4
99.40
100.0
99.7
96.9
71.4
99.5
88.0
99.7
86.9
100.0
F1 (%)
99.6
99.4
99.30
100.0
99.9
86.5
81.5
99.7
93.6
87.7
92.9
100.0Table 5
Summary of classification performance of VWI-DNN at unsynchronized speed.
Pace
0.78 m/s
1.0 m/s
1.25 m/s
Phase
HS
FF
HO
SW
HS
FF
HO
SW
HS
FF
HO
SW
Precision (%)
100.0
99.4
98.8
100.0
100.0
99.4
99.5
100.0
99.7
99.7
100.0
100.0
Recall (%)
99.5
99.1
99.7
100.0
100.0
99.4
99.5
100.0
100.0
99.7
99.7
100.0
F1 (%)
99.7
99.3
99.3
100.0
100.0
99.4
99.5
100.0
99.9
99.7
99.8
100.0In order to comprehensively measure macro-F1 in four gait phases, macro-F1 was introduced in this paper. According to equations (16)–(20), the corresponding macro-F1 can be calculated, and the corresponding Table 6 was obtained. According to Table 5, the recognition accuracy of the VWI-DNN algorithm is as high as 98% or more, while the other two training functions have lower accuracy. Especially, the Bagging algorithm has a phase recognition accuracy of less than 77% at three paces. It can be clearly seen from Figures 11 and 12 that the VWI-DNN algorithm is higher in accuracy and macro-F1 than the other two algorithms at any of the paces. By observing the AUC, we can also see that the VWI-DNN algorithm can reach 1.0, which is high. Figure 13 also illustrates the relationship between the three algorithms corresponding to the AUC at the unsynchronized paces. From Figure 14, it can be found that the Accuracy, macro-F1, and AUC of the VWI-DNN algorithm do not change much with the increase of the pace, which is relatively stable.Table 6
Summary of classification performance for different training functions.
Pace
Training function
Classification rate
Accuracy (%)
Macro-F1 (%)
AUC
0.78 m/s
Bagging
76.9
70.7
0.98
AdaBoosting
95.7
95.7
1.0
VWI-DNN
99.6
99.5
1.0
1.0 m/s
Bagging
74.4
66.1
0.95
AdaBoosting
92.4
91.9
1.0
VWI-DNN
98.9
99.7
1.0
1.25 m/s
Bagging
74.4
66.3
0.98
AdaBoosting
93.5
93.6
1.0
VWI-DNN
99.1
99.7
1.0Figure 11
More tag set classifier accuracy distribution at three paces.Figure 12
More tag data set classifier macro-F1 distribution under sync speed.Figure 13
ROC curves of three classifiers at three paces: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c).
(a)
(b)
(c)Figure 14
VWI-DNN algorithm evaluation factor changes with pace.


### 3.3. Discussion

This study demonstrated the capability of the proposed system to detect gait phases based on acceleration signals. To support this hypothesis, this paper proposes to use the voting-weighted integrated neural network to identify the gait phase and compares it with other integrated learning algorithms to verify the effectiveness of the algorithm.


#### 3.3.1. Acceleration Signals Analysis

Walking activity emanated from the human body is important, and this information can be extracted through the use of acceleration signals. Although the VWF-DNN algorithm has shown certain validity in the classification of acceleration signals for gait event detection, it still needs to be further optimized in the future. In this study, the inertial sensor module needed to be placed at a designated location on the instep, lower leg, and thigh of each subject. However, due to the height, weight, gender, etc. of each subject, the sensors cannot be accurately placed in the specified position and can only be installed at an approximate designated position, which needs further investigation [43].To characterize acceleration signals, there are three main cascaded modules which are data processing, feature extraction, and classification methods. It should be noted that the classification accuracy depends greatly on the features extracted. Moreover, four combined features is better than a single or two features for upper limb movement. This shows the network responses of five TD features. By observing Figures8–10, it can be seen that all the training functions have clearly classified the HS and SW phases and there is very low classification error between the two. Interestingly, we can see through the confusion matrix that the Bagging and AdaBoosting misinterpreted the FF phase and HO phase, which results in a low-recognition precision for the FF and HO phases. Also, by analyzing the results of Tables 3–5, it can be shown that the model has a poor recognition effect on the FF and HO phases. This may be due to the fact that the two adjacent phase features are too similar. In addition, Figures 8–10 also illustrate that the phase difference between the FF and HO phase characteristics are not obvious, but the proposed VWI-DNN algorithm in this paper can significantly improve this situation.Regarding the effective classification of acceleration signals, the five TD features provide better classification of gait events and the average accuracy of the VWF-DNN algorithm for HS, FF, HO, and SW phases is 99.2%. This study was then compared to some of the previous research studies. With regard to the gait event, different walking conditions by IMU located on foot show 82.2% accuracy using the ANN [39]. Similar result is achieved when five gait phases were classified using IMUs 82% accuracy [40]. In addition, this is important for the development of assistive devices for the lower leg, as they have strong relationships with the gait event [41]. To propose a system that may be applied to any individual, the generalization of trained VWF-DNN algorithm was tested on unlearned data of acceleration signals. This study found that the proposed system could predict the gait event successfully for the unlearned data. In general, the detection of HS, FF, HO, and SW phases based on acceleration signals seemed reliable.In reviewing the literature, the reliability of IMUs was questioned. It is interesting to note that the percentage of stance and swing phases of footswitch data was in line with the theory of the gait cycle as 60% of the complete cycle was the stance phase while the remaining percent was swing phase 40% [42]. According to Observation Tables 3 and 4, it can be found that the recognition of FF and HO phases by Bagging and AdaBoosting is generally low, while other two phases is very high. In addition, according to observations of Figures 8–10, we can also see that Bagging and AdaBoosting divided FF phase into HO phase and also divide HO phases into FF phases. These results indicate that the features we extracted may require further discussion.


#### 3.3.2. Gait Phase Detection

The purpose of this study was to apply a machine learning to predict HS, FF, HO, and SW from acceleration signals. In support of the hypothesis aforementioned, this study proposes the VWI-DNN algorithm and uses it to successfully predict HS, FF, HO, and SW phases. The results of learned data indicated that the acceleration signals had low variability and stability during walking on the ground. Compared with the research carried out by Nazmi et al. [1], this study can obtain higher recognition accuracy, but the neural network model used in this study was too complicated, which may lead to longer training time. Some portable gait event detection applications require functional electronic simulators, dynamic gait monitoring, and gait biofeedback [44], but currently no wearable sensors meet these requirements.The VWI-DNN algorithm used a voting mechanism to fuse results and used three subneural networks to vote. Whether the three subneural networks are set up properly needs further exploration. The selection of the bonus penalty function takes the derivative changes and actual effects into account, but it still avoids the occasional occurrence of improper rewards and punishments, resulting in the final classification results are not ideal. Nevertheless, the model used in this paper can still achieve the recognition accuracy and the macro-F1 value, which were higher than 98%. And as can be seen from Figure13, the AUC value of VWI-DNN algorithm reaches the maximum value of 1. It can be seen from the performance of each classifier in the AUC that the classification result obtained by the VWI-DNN algorithm is more reliable.In terms of the generalization of the proposed system, this study revealed the VWI-DNN algorithm achieved better performance in gait phase recognition. The VWI-DNN algorithm based on the voting weighting mechanism detects HS, FF, HO, and SW phases with higher recognition accuracy, macro-F1, and AUC than existing Bagging and AdaBoosting. However, the macro-F1 of the FF and HO phases obtained by Bagging and AdaBoosting are very low. According to Figures8–10, these results indicate that the HS and SW phase was reasonably accurate and FF and HO phases should yield more warnings. Even so, using the VWI-DNN algorithm proposed in this paper still obtains a good recognition effect on the FF and HO phases, and in some sense compensates for the defects of dividing the two phases. The study also shows that the proposed use of vector difference to distinguish between ST and IL phases does have a certain effect. In addition, it is possible to explain that the VWI-DNN algorithm proposed in this paper has strong performance in the field of gait phase division.


#### 3.3.3. Limitations

There are some limitations to this study. Even though VWI-DNN has shown its usefulness in classifying acceleration signals for gait event detection, a further evaluation is needed using other machine learning approaches. Future works should improve the classification accuracy by improving the method of extracting features, gait phase recognition algorithm, etc. In this study, the wearing three inertial sensor modules were assumed to be an acceptable wearable sensor compared to other wearable sensors. However, the wearing of the sensor in practice may have a potential impact on the gait of the person who has not yet been investigated.The detection of gait phase in this study relied on data collected by IMUs. Although acceleration sensors have low cost and fast dynamic response, the accuracy might be affected by the circuit design and placement of sensors. Different walking styles could lead to erroneous placement of IMUs. However, as the sensor processing advances and algorithm innovations, these errors are further reduced. Therefore, IMU can possibly be applied in large scale in the direction of gait detection in the near future.


## 3.1. Evaluation Methods

Comparing the classification performance of different classifiers cannot determine the effectiveness of the algorithm by a single metric and there are many other methods commonly used to obtain a full census. The evaluation metrics including Precision, Recall, Accuracy, and F1-score are used to compare different methods. Precision and Recall are widely used in the fields of information retrieval and statistical classification to evaluate the quality of results, where the higher the Precision and Recall value, the better the method performs. F1 combines the results ofP and R, and when F1 is high, it indicates that Precision and Recall are both high, and this evaluation index is relatively effective. However, the classifier of this paper performs multiclassification task. We hope to comprehensively investigate the Precision and Recall on several binary confusion matrices, and the most direct way is to calculate macro-F1 [40]. While, Accuracy reflects the ratio of the samples correctly classified by the classifier to the total samples for a given test data set. According to equations (16)–(21), we can calculate these evaluation factors, where TP, TN, FP, and FN, respectively, represent true positive, true negative, false positive, and false negative.In order to better analyze the performance of the classifier, this paper introduces the AUC under receiver operating characteristic (ROC) as the evaluation index of the algorithm. Spackman was the first to adopt ROC diagram for machine learning, and he proved the value of the ROC curve in evaluation [41]. In recent years, it has been applied more and more in machine learning and data mining research, partly because people realized that simple classification accuracy is usually not a good indicator to measure performance [42]. The AUC of each algorithm can be calculated to compare, and the algorithm that has the largest AUC will have the best diagnostic value:(16)Accuracy=TP+TNTP+FP+TN+FN,(17)Pi=TPTP+FP,(18)Ri=TPTP+FN,(19)macro−P=1n∑i=1nPi,(20)macro−R=1n∑i=1nRi,(21)macro−F1=2×macro−P×macro−Rmacro−P+macro−R.


## 3.2. Results

The joint confusion matrix of three gait phase recognition results at different synchronization speeds are, respectively, shown in Figures8–10. According to Figures 8–10, we can easily get Tables 3–5 which, respectively, classifies the performance for each training function in terms of HS, FF, HO, and SW phase under three kinds of sync speed. According to Tables 3–5, it can be observed that all of Bagging, Boosting, and VWI-DNN have macro-F1 of HS and SW phase recognition nearly up to 100%. While from the results obtained by F1, Bagging, and AdaBoosting have poor recognition effects on FF and HO phases. In particular, Bagging has a case where macro-F1 of the FF and HO phases is 0. It can also be clearly seen from the observation of Figure 8 that the Bagging algorithm can easily recognize the FF phase as the HO phase and the HO phase as the FF phase. The Bagging algorithm is extremely poor in HO phase and FF phase recognition. It can be seen from Table 5 that although Bagging and AdaBoosting have poor recognition of FF phase and HO phase, VWI-DNN algorithm proposed in this paper still has more than 98% macro-F1 value for the FF and HO phase. The three training functions have higher accuracy for SW and HS phases recognition at three paces, generally reaching more than 98%. As aforementioned, macro-F1 can comprehensively measure the two indicators of Precision and Recall. It was observed that macro-F1 value of VWI-DNN is more than 98% for any phase at any pace.Figure 8
Confusion matrix of three gait patterns derived from bagging classification under three pace settings: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c) classes.
(a)
(b)
(c)Figure 9
Confusion matrix of three gait patterns derived from AdaBoosting classification under three pace settings: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c) classes.
(a)
(b)
(c)Figure 10
Confusion matrix of three gait patterns derived from VWI-DNN Classification under three pace settings: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c) classes.
(a)
(b)
(c)Table 3
Summary of classification performance of bagging at unsynchronized speed.
Pace
0.78 m/s
1.0 m/s
1.25 m/s
Phase
HS
FF
HO
SW
HS
FF
HO
SW
HS
FF
HO
SW
Precision (%)
100.0
51.6
100.0
100.0
100.0
0
47.4
100.0
100.0
48.2
0
100.0
Recall (%)
98.9
100.0
8.2
100.0
100.0
0
100.0
100.0
100.0
100.0
0
100.0
F1 (%)
99.4
68.1
15.1
100.0
100.0
0
64.3
100.0
100.0
65.1
0
100.0Table 4
Summary of classification performance of AdaBoosting at unsynchronized speed.
Pace
0.78 m/s
1.0 m/s
1.25 m/s
Phase
HS
FF
HO
SW
HS
FF
HO
SW
HS
FF
HO
SW
Precision (%)
99.7
99.4
99.20
100.0
100.0
78.2
94.8
100.0
100.0
78.3
99.7
100.0
Recall (%)
99.5
99.4
99.40
100.0
99.7
96.9
71.4
99.5
88.0
99.7
86.9
100.0
F1 (%)
99.6
99.4
99.30
100.0
99.9
86.5
81.5
99.7
93.6
87.7
92.9
100.0Table 5
Summary of classification performance of VWI-DNN at unsynchronized speed.
Pace
0.78 m/s
1.0 m/s
1.25 m/s
Phase
HS
FF
HO
SW
HS
FF
HO
SW
HS
FF
HO
SW
Precision (%)
100.0
99.4
98.8
100.0
100.0
99.4
99.5
100.0
99.7
99.7
100.0
100.0
Recall (%)
99.5
99.1
99.7
100.0
100.0
99.4
99.5
100.0
100.0
99.7
99.7
100.0
F1 (%)
99.7
99.3
99.3
100.0
100.0
99.4
99.5
100.0
99.9
99.7
99.8
100.0In order to comprehensively measure macro-F1 in four gait phases, macro-F1 was introduced in this paper. According to equations (16)–(20), the corresponding macro-F1 can be calculated, and the corresponding Table 6 was obtained. According to Table 5, the recognition accuracy of the VWI-DNN algorithm is as high as 98% or more, while the other two training functions have lower accuracy. Especially, the Bagging algorithm has a phase recognition accuracy of less than 77% at three paces. It can be clearly seen from Figures 11 and 12 that the VWI-DNN algorithm is higher in accuracy and macro-F1 than the other two algorithms at any of the paces. By observing the AUC, we can also see that the VWI-DNN algorithm can reach 1.0, which is high. Figure 13 also illustrates the relationship between the three algorithms corresponding to the AUC at the unsynchronized paces. From Figure 14, it can be found that the Accuracy, macro-F1, and AUC of the VWI-DNN algorithm do not change much with the increase of the pace, which is relatively stable.Table 6
Summary of classification performance for different training functions.
Pace
Training function
Classification rate
Accuracy (%)
Macro-F1 (%)
AUC
0.78 m/s
Bagging
76.9
70.7
0.98
AdaBoosting
95.7
95.7
1.0
VWI-DNN
99.6
99.5
1.0
1.0 m/s
Bagging
74.4
66.1
0.95
AdaBoosting
92.4
91.9
1.0
VWI-DNN
98.9
99.7
1.0
1.25 m/s
Bagging
74.4
66.3
0.98
AdaBoosting
93.5
93.6
1.0
VWI-DNN
99.1
99.7
1.0Figure 11
More tag set classifier accuracy distribution at three paces.Figure 12
More tag data set classifier macro-F1 distribution under sync speed.Figure 13
ROC curves of three classifiers at three paces: 0.78 m/s (a), 1.0 m/s (b), and 1.25 m/s (c).
(a)
(b)
(c)Figure 14
VWI-DNN algorithm evaluation factor changes with pace.


## 3.3. Discussion

This study demonstrated the capability of the proposed system to detect gait phases based on acceleration signals. To support this hypothesis, this paper proposes to use the voting-weighted integrated neural network to identify the gait phase and compares it with other integrated learning algorithms to verify the effectiveness of the algorithm.


### 3.3.1. Acceleration Signals Analysis

Walking activity emanated from the human body is important, and this information can be extracted through the use of acceleration signals. Although the VWF-DNN algorithm has shown certain validity in the classification of acceleration signals for gait event detection, it still needs to be further optimized in the future. In this study, the inertial sensor module needed to be placed at a designated location on the instep, lower leg, and thigh of each subject. However, due to the height, weight, gender, etc. of each subject, the sensors cannot be accurately placed in the specified position and can only be installed at an approximate designated position, which needs further investigation [43].To characterize acceleration signals, there are three main cascaded modules which are data processing, feature extraction, and classification methods. It should be noted that the classification accuracy depends greatly on the features extracted. Moreover, four combined features is better than a single or two features for upper limb movement. This shows the network responses of five TD features. By observing Figures8–10, it can be seen that all the training functions have clearly classified the HS and SW phases and there is very low classification error between the two. Interestingly, we can see through the confusion matrix that the Bagging and AdaBoosting misinterpreted the FF phase and HO phase, which results in a low-recognition precision for the FF and HO phases. Also, by analyzing the results of Tables 3–5, it can be shown that the model has a poor recognition effect on the FF and HO phases. This may be due to the fact that the two adjacent phase features are too similar. In addition, Figures 8–10 also illustrate that the phase difference between the FF and HO phase characteristics are not obvious, but the proposed VWI-DNN algorithm in this paper can significantly improve this situation.Regarding the effective classification of acceleration signals, the five TD features provide better classification of gait events and the average accuracy of the VWF-DNN algorithm for HS, FF, HO, and SW phases is 99.2%. This study was then compared to some of the previous research studies. With regard to the gait event, different walking conditions by IMU located on foot show 82.2% accuracy using the ANN [39]. Similar result is achieved when five gait phases were classified using IMUs 82% accuracy [40]. In addition, this is important for the development of assistive devices for the lower leg, as they have strong relationships with the gait event [41]. To propose a system that may be applied to any individual, the generalization of trained VWF-DNN algorithm was tested on unlearned data of acceleration signals. This study found that the proposed system could predict the gait event successfully for the unlearned data. In general, the detection of HS, FF, HO, and SW phases based on acceleration signals seemed reliable.In reviewing the literature, the reliability of IMUs was questioned. It is interesting to note that the percentage of stance and swing phases of footswitch data was in line with the theory of the gait cycle as 60% of the complete cycle was the stance phase while the remaining percent was swing phase 40% [42]. According to Observation Tables 3 and 4, it can be found that the recognition of FF and HO phases by Bagging and AdaBoosting is generally low, while other two phases is very high. In addition, according to observations of Figures 8–10, we can also see that Bagging and AdaBoosting divided FF phase into HO phase and also divide HO phases into FF phases. These results indicate that the features we extracted may require further discussion.


### 3.3.2. Gait Phase Detection

The purpose of this study was to apply a machine learning to predict HS, FF, HO, and SW from acceleration signals. In support of the hypothesis aforementioned, this study proposes the VWI-DNN algorithm and uses it to successfully predict HS, FF, HO, and SW phases. The results of learned data indicated that the acceleration signals had low variability and stability during walking on the ground. Compared with the research carried out by Nazmi et al. [1], this study can obtain higher recognition accuracy, but the neural network model used in this study was too complicated, which may lead to longer training time. Some portable gait event detection applications require functional electronic simulators, dynamic gait monitoring, and gait biofeedback [44], but currently no wearable sensors meet these requirements.The VWI-DNN algorithm used a voting mechanism to fuse results and used three subneural networks to vote. Whether the three subneural networks are set up properly needs further exploration. The selection of the bonus penalty function takes the derivative changes and actual effects into account, but it still avoids the occasional occurrence of improper rewards and punishments, resulting in the final classification results are not ideal. Nevertheless, the model used in this paper can still achieve the recognition accuracy and the macro-F1 value, which were higher than 98%. And as can be seen from Figure13, the AUC value of VWI-DNN algorithm reaches the maximum value of 1. It can be seen from the performance of each classifier in the AUC that the classification result obtained by the VWI-DNN algorithm is more reliable.In terms of the generalization of the proposed system, this study revealed the VWI-DNN algorithm achieved better performance in gait phase recognition. The VWI-DNN algorithm based on the voting weighting mechanism detects HS, FF, HO, and SW phases with higher recognition accuracy, macro-F1, and AUC than existing Bagging and AdaBoosting. However, the macro-F1 of the FF and HO phases obtained by Bagging and AdaBoosting are very low. According to Figures8–10, these results indicate that the HS and SW phase was reasonably accurate and FF and HO phases should yield more warnings. Even so, using the VWI-DNN algorithm proposed in this paper still obtains a good recognition effect on the FF and HO phases, and in some sense compensates for the defects of dividing the two phases. The study also shows that the proposed use of vector difference to distinguish between ST and IL phases does have a certain effect. In addition, it is possible to explain that the VWI-DNN algorithm proposed in this paper has strong performance in the field of gait phase division.


### 3.3.3. Limitations

There are some limitations to this study. Even though VWI-DNN has shown its usefulness in classifying acceleration signals for gait event detection, a further evaluation is needed using other machine learning approaches. Future works should improve the classification accuracy by improving the method of extracting features, gait phase recognition algorithm, etc. In this study, the wearing three inertial sensor modules were assumed to be an acceptable wearable sensor compared to other wearable sensors. However, the wearing of the sensor in practice may have a potential impact on the gait of the person who has not yet been investigated.The detection of gait phase in this study relied on data collected by IMUs. Although acceleration sensors have low cost and fast dynamic response, the accuracy might be affected by the circuit design and placement of sensors. Different walking styles could lead to erroneous placement of IMUs. However, as the sensor processing advances and algorithm innovations, these errors are further reduced. Therefore, IMU can possibly be applied in large scale in the direction of gait detection in the near future.


## 3.3.1. Acceleration Signals Analysis

Walking activity emanated from the human body is important, and this information can be extracted through the use of acceleration signals. Although the VWF-DNN algorithm has shown certain validity in the classification of acceleration signals for gait event detection, it still needs to be further optimized in the future. In this study, the inertial sensor module needed to be placed at a designated location on the instep, lower leg, and thigh of each subject. However, due to the height, weight, gender, etc. of each subject, the sensors cannot be accurately placed in the specified position and can only be installed at an approximate designated position, which needs further investigation [43].To characterize acceleration signals, there are three main cascaded modules which are data processing, feature extraction, and classification methods. It should be noted that the classification accuracy depends greatly on the features extracted. Moreover, four combined features is better than a single or two features for upper limb movement. This shows the network responses of five TD features. By observing Figures8–10, it can be seen that all the training functions have clearly classified the HS and SW phases and there is very low classification error between the two. Interestingly, we can see through the confusion matrix that the Bagging and AdaBoosting misinterpreted the FF phase and HO phase, which results in a low-recognition precision for the FF and HO phases. Also, by analyzing the results of Tables 3–5, it can be shown that the model has a poor recognition effect on the FF and HO phases. This may be due to the fact that the two adjacent phase features are too similar. In addition, Figures 8–10 also illustrate that the phase difference between the FF and HO phase characteristics are not obvious, but the proposed VWI-DNN algorithm in this paper can significantly improve this situation.Regarding the effective classification of acceleration signals, the five TD features provide better classification of gait events and the average accuracy of the VWF-DNN algorithm for HS, FF, HO, and SW phases is 99.2%. This study was then compared to some of the previous research studies. With regard to the gait event, different walking conditions by IMU located on foot show 82.2% accuracy using the ANN [39]. Similar result is achieved when five gait phases were classified using IMUs 82% accuracy [40]. In addition, this is important for the development of assistive devices for the lower leg, as they have strong relationships with the gait event [41]. To propose a system that may be applied to any individual, the generalization of trained VWF-DNN algorithm was tested on unlearned data of acceleration signals. This study found that the proposed system could predict the gait event successfully for the unlearned data. In general, the detection of HS, FF, HO, and SW phases based on acceleration signals seemed reliable.In reviewing the literature, the reliability of IMUs was questioned. It is interesting to note that the percentage of stance and swing phases of footswitch data was in line with the theory of the gait cycle as 60% of the complete cycle was the stance phase while the remaining percent was swing phase 40% [42]. According to Observation Tables 3 and 4, it can be found that the recognition of FF and HO phases by Bagging and AdaBoosting is generally low, while other two phases is very high. In addition, according to observations of Figures 8–10, we can also see that Bagging and AdaBoosting divided FF phase into HO phase and also divide HO phases into FF phases. These results indicate that the features we extracted may require further discussion.


## 3.3.2. Gait Phase Detection

The purpose of this study was to apply a machine learning to predict HS, FF, HO, and SW from acceleration signals. In support of the hypothesis aforementioned, this study proposes the VWI-DNN algorithm and uses it to successfully predict HS, FF, HO, and SW phases. The results of learned data indicated that the acceleration signals had low variability and stability during walking on the ground. Compared with the research carried out by Nazmi et al. [1], this study can obtain higher recognition accuracy, but the neural network model used in this study was too complicated, which may lead to longer training time. Some portable gait event detection applications require functional electronic simulators, dynamic gait monitoring, and gait biofeedback [44], but currently no wearable sensors meet these requirements.The VWI-DNN algorithm used a voting mechanism to fuse results and used three subneural networks to vote. Whether the three subneural networks are set up properly needs further exploration. The selection of the bonus penalty function takes the derivative changes and actual effects into account, but it still avoids the occasional occurrence of improper rewards and punishments, resulting in the final classification results are not ideal. Nevertheless, the model used in this paper can still achieve the recognition accuracy and the macro-F1 value, which were higher than 98%. And as can be seen from Figure13, the AUC value of VWI-DNN algorithm reaches the maximum value of 1. It can be seen from the performance of each classifier in the AUC that the classification result obtained by the VWI-DNN algorithm is more reliable.In terms of the generalization of the proposed system, this study revealed the VWI-DNN algorithm achieved better performance in gait phase recognition. The VWI-DNN algorithm based on the voting weighting mechanism detects HS, FF, HO, and SW phases with higher recognition accuracy, macro-F1, and AUC than existing Bagging and AdaBoosting. However, the macro-F1 of the FF and HO phases obtained by Bagging and AdaBoosting are very low. According to Figures8–10, these results indicate that the HS and SW phase was reasonably accurate and FF and HO phases should yield more warnings. Even so, using the VWI-DNN algorithm proposed in this paper still obtains a good recognition effect on the FF and HO phases, and in some sense compensates for the defects of dividing the two phases. The study also shows that the proposed use of vector difference to distinguish between ST and IL phases does have a certain effect. In addition, it is possible to explain that the VWI-DNN algorithm proposed in this paper has strong performance in the field of gait phase division.


## 3.3.3. Limitations

There are some limitations to this study. Even though VWI-DNN has shown its usefulness in classifying acceleration signals for gait event detection, a further evaluation is needed using other machine learning approaches. Future works should improve the classification accuracy by improving the method of extracting features, gait phase recognition algorithm, etc. In this study, the wearing three inertial sensor modules were assumed to be an acceptable wearable sensor compared to other wearable sensors. However, the wearing of the sensor in practice may have a potential impact on the gait of the person who has not yet been investigated.The detection of gait phase in this study relied on data collected by IMUs. Although acceleration sensors have low cost and fast dynamic response, the accuracy might be affected by the circuit design and placement of sensors. Different walking styles could lead to erroneous placement of IMUs. However, as the sensor processing advances and algorithm innovations, these errors are further reduced. Therefore, IMU can possibly be applied in large scale in the direction of gait detection in the near future.


## 4. Conclusion

In order to recognize the walking gait phase accurately, this work proposed a VWI-DNN model to analyze multidimensional acceleration signals and detect different gait events including HS, FF, HO, and SW. It consists of three main parts, data preprocessing, multistream integrated neural network, and voting-weighted function, where data preprocessing employs PCA dimensionality reduction, four-phase division, and key feature selection in time domain. In addition, multiple refined DNNs are applied to design a multistream integrated neural network, which utilizes the mixture-granularity information to form a high-dimensional feature. Finally, a voting-weighted function is developed to fuse dissimilar submodels as a unified representation for distinguishing small discrepancy among different gait phases. It constructs a general neural network allowing for fusing different voting decisions at each submodel and demonstrates its use as a practical way to massively increase model capacity. Experiments and discussion demonstrate the effectiveness of the VWI-DNN with higher accuracy and macro-F1 up to 99.5%, which outperform other voting methods.The network generates large number of parameters, which increases the time for model classification. Therefore, the model can only be trained on the GPU and the IMU data cannot be classified online on a convenient mobile device. Our future work is to try a lightweight network to compress the model parameters and speed. And we will attempt to combine our method with the newly updated work for other gait phase detection applications, such as rehabilitation training robot and medical Internet of Things.



---

*Source: 4760297-2020-01-08.xml*