Keywords

1 Introduction

Surface electromyography (sEMG) is acknowledged as a non-invasive approach, specifically suitable to monitor muscle activity during dynamic tasks, such as walking [1]. In general, gait events, such as the instant of foot-floor contact and ground clearance, need to be assessed in order to characterize the muscular activity under the temporal and the spatial dimensions.

A fundamental task in this context is to identify and classify the different gait phases. While the entire gait cycle can be divided in 8 distinct sub-phases [1], the two main ones are stance and swing, which identify the functional subdivisions of total limb activity within the gait cycle. For each leg, the stance phase is the time period in which the foot touches the ground while during the swing phase the foot is in the air [1].

Different kind of equipment is typically used to provide synchronization of sEMG signals within gait cycle, such as foot-switch sensors [2], pressure mats [3], stereo-photogrammetric systems [4], and inertial measurements units (accelerometers and gyroscopes) [5]. However, expensiveness of the equipment, limited volume of observation and relative invasive experimental protocol could affect the use of stereo-photogrammetric systems and pressure mats in clinical practice, while wearable sensors have problems of encumbrance and can require particular care for the correct placement and the need of specific calibration procedures, especially for application in pathology.

Furthermore, biological signals (as sEMG) have the advantage, over movement measuring instruments, of being accessible prior to the movement, thus being more suited for specific applications such as robotic exoskeletons, which requires characterization of the motion’s intention [6]. For these reasons, novel techniques to detect and classify gait events from sEMG signals alone are desirable. In this paper we investigate the use of (Deep) Neural Networks to classify stance and swing phases from sEMG signals during adult walking at self-selected pace. We train a distinct Neural Network classifier for each subject and we attempt at classifying walking phases in unlearned steps sequences of the same subject. Our experiments resulted in an average classification accuracy over the population of 95.2%, ranging from 92.6% to 97.2%.

Few works in literature uses Machine Learning techniques to addresses this task. [7] applies support vector machines to classify stance and swing phases using novel bilateral muscles features from the sEMG signal, while [8] uses extracts hand crafted features from sEMG signals and provides them as input to a Multi Layer Perceptron (MLP) classifier. Differently from previous works, we investigate a featureless approach, by operating on sEMG signals with only standard pre-processing. Our research direction is to understand if and to what extent a Neural Network can effectively learn hidden features without requiring humans to engineer or select signals features. Furthermore, while previous researches focused on treadmill walking, we evaluate our approach on signals acquired during conditions more similar to daily life walking, i.e. ground walking including straights and curves.

2 Related Works

While several Machine Learning based approaches have been proposed in literature to analyse EMG signals during different tasks, few of them address walking gait phases classification.

Kaczmarczyk et al. [9] applied neural networks for gait classification in post stroke patients. Wang and Zieliska [10] designed an EMG-based method for detecting the variability in gait features depending on footwear, by applying vector quantization classifying network and clustering competitive network.

Few woks attempt to classify stance and swing phases, in a treadmill walking setting, using engineered features extracted from sEMG signals. In [7], the use of novel features, which consider the bilateral activation of 7 muscles for each leg, is proposed. A limitation of this study is the small population (two subjects). A neural network, fed with engineered features was also used in [8, 11, 12], Multi Layer Perceptrons classifiers are trained to recognize stance and swing phases from time-domain features extracted from sEMG signal during treadmill walking.

Unlike previous works, in this paper we investigate a Deep Learning approach based on learning latent features from the original sEMG signal. In our experiments, no feature engineering and selection is performed and only standard pre-processing is applied. In addition, in the present study we consider a population of 12 subjects and data is captured in a ground walking situation, including direction changes and curves, with the goal of assessing the technique in realistic conditions.

3 Materials and Methods

3.1 Dataset

The dataset included signals recorded from 12 healthy adults (6 females and 6 males), acquired in the Movement Analysis Laboratory of Università Politecnica delle Marche, Ancona, Italy. Mean (±SD) characteristics were: age = 22.9 ± 1.5 years; height = 171 ± 11 cm; mass = 64.1 ± 11.0 kg; body mass index (BMI) = 20.8 ± 2.1 kg/m2. Subjects with joint pain, neurological pathologies, orthopedic surgery, abnormal gait or a body mass index (BMI) higher than 25 (overweight and obese subjects) were not recruited. The research was undertaken in compliance with the ethical principles of the Helsinki Declaration and was approved by an institutional expert committee. Participants signed informed consent prior to the beginning of the test.

Fig. 1.
figure 1

The basographic signal acquired from foot-switches and the sEMG signals recorded for the 4 muscles of the right leg.

3.2 Signal Acquisition and Pre-processing

sEMG and basographic signals were acquired as reported in [13] and [14], while the approach discussed in [15] was used to process the foot-switch signals as to identify the different gait cycles and phases (stance and swing). As done in related works, we treated the results as a ground truth and measure the performances of our classifier against it.

Electromyographic signals were processed by a band-pass, linear-phase FIR filter (cut-off frequency: 20–450 Hz). Then, sEMG signals were full-wave rectified and the envelope was extracted (2nd-order Butterworth low-pass filter, cut-off frequency: 5 Hz). A min-max normalization of each muscle signal was performed within each individual, thus mapping the values in the [0–1] interval.

Figure 1 shows an example of the acquired signals, including pre-precessed EMG signals and the basographic signal, corresponding to a complete gait cycle of the right leg of a sample subject.

4 Gait Phase Classification Experiments

4.1 Dataset Preparation

Our classification task is to assign the correct label to 10 ms time segments of the subject walking activity, according to the walking phase it belongs to (label 0 for stance and 1 for swing). For simplicity, in our experiments we consider the phases with respect to the right leg of each subject, but we calculate predictions using signals from both legs. In order to get data into the proper format for feeding the neural networks, we build an input vector for each 10 ms window. Such a vector, depicted in 2, is composed by 20 samples (1 every 0.1 ms). Each sample contains 8 values, corresponding to the activation of the muscles (4 per leg) registered at the sampling instant.

Referring to Fig. 2, \(L1_i\), \(L2_i\), \(L3_i\), and \(L4_i\) corresponds to the activation of the following muscles respectively: tibialis anterior, gastrocnemius lateralis, hamstring, vastus lateralis. \(R1_i\), \(R2_i\), \(R3_i\), and \(R4_i\) represented the correspondent element for the right leg.

We then assigned a 0 (stance) or 1 (swing) label to each aggregated sEMG segment as follows. If the basographic signal corresponding to all the samples of a sEMG segment are equal to 0 (or 1), we assigned the 0 (or 1) label to the sEMG segment. We exclude those segments that include a phase transition, in this case not all the corresponding basographic samples are 0 or 1, thus we cannot classify it as stance or swing.

In summary, the dataset is composed by around 23 thousand labeled segments for each of the 12 subjects. Each segment corresponds to a 10 ms time slot and contains 20 samples of the sEMG signals corresponding to the 8 muscles (4 per leg).

4.2 Training the Classifiers

After having processed the data as described in Sect. 4.1, we split the data corresponding to each patient into 10 folds. More specifically, we temporally divided the walking activity into 10 equal slots (each one approximately 30 s long). We then perform 10 different training for each subject, each time using a different slot as test set and the remaining 9 as training set. Walking activity might change over different time slots, especially in our experimental conditions (ground walking at self-selected pace), averaging the classification performances on different time slots for each subject, provides a more realistic evaluation of the technique.

Fig. 2.
figure 2

The structure of EMG vectors fed as input to the ANNs

As our aim is to provide a first assessment of deep learning approach to gait phase classification, in our experiments we consider three simple Multi Layer Perceptron (MLP) architectures. The first is a shallow network with a single hidden layer composed of 128 units (referred to mlp(128)), the second is a two layer network of 256 and 128 units (mlp(256, 128)), and the last one is has three layers of 512, 256 and 128 units (mlp(512, 256, 128)). We used the ReLU activation function to provide non linearity between hidden layers.

For all the network, we applied the Stochastic Gradient Descent (SGD) optimization algorithm with Binary Cross Entropy (BCE) as a loss function. Finally, we trained the classifiers using a early-stop technique: if accuracy on the validation set (random 10% of the training set) does not increase within 10 learning epochs, we save the best configuration and evaluate it on the test set.

As said, we use the processed signal from foot-switches as a ground truth [16]. It represent the gold standard in gait segmentation since each gait phase can be associated with a specific value of the sensor output [17]. Furthermore, in order to obtain the best accuracy, in this experiments data from three foot-switches (instead of two often used in previous studies) were considered, as suggested in [15].

5 Results and Discussion

The average accuracy obtained with 3 different classifiers is reported in Table 1. In this table, mean accuracy over the 10 folds obtained from each subjects, is averaged over the 12 subjects.

We observe that mlp(128), a very simple network, is able to achieve relatively good classification accuracy (94.471%) and that the performances slightly increase as the complexity of the network grows. The best result is obtained with mlp(512, 256, 128), which reached an accuracy of 95.183%.

In Fig. 3 we show the mean accuracy over the 10 folds for each one of the 12 distinct subjects. From this figure figure one can see that mlp(512,256,128) performed very well for some subjects (e.g., s6 and s8, over 97% of accuracy), but results have a relatively high variability, showing that certain subjects are easier to learn. In the worst case (s12) the mean accuracy (92.58%) is still relatively good.

Table 1. Average classification accuracy (%) obtained with 3 different neural networks.
Fig. 3.
figure 3

Variability of average classification accuracy over 10 folds for the 12 subjects

Finally, in Table 2 we distinguish between classification performances obtained for stance and swing phases, reporting precision, recall and F1-score for the two distinct prediction tasks.

In line with what was reported in literature [1], the segments belonging to a stance phase were more frequent (around 60%) that those belonging to a swing phase. This is because in normal walking the stance phase duration is 60% of the gait cycle (while the swing phase duration is the remaining 40%) on average. Despite this, results obtained for swing labeled segments (96.331%) are sensibly better than those obtained for stance labeled segments (93.519).

Table 2. Precision and recall in recognizing (a) swing and (b) stance phases.

6 Conclusions and Future Work

The results of present study support the suitability of Artificial Neural Networks in classifying the main gait phases from sEMG signals alone, without needing human intervention in selecting relevant signal features.

In particular, the direct comparison among the performances of three different Multi Layer Perceptron models in our healthy population of 12 healthy subjects showed a high accuracy (around 95%) for all the models, independent from the increasing complexity. A further interesting finding of the study is the higher network performances in the prediction of the swing phase compared to stance phase. Future developments of the study could involve the increase of the experimental population for testing purposes and the attempt of classifying not only swing and stance phases but also the three main sub-phases of stance, i.e. heel strike, flat foot contact, and push off.

Finally, in this study we attempted at automatically classifying signals of subjects whose walking activity was previously recorded (including foot-switches), by using it to properly train a classifier for the given subject. An interesting research directions is that of attempting to classify signals from unlearned subjects, as well as to understand if a classifier trained on more subjects could achieve even better performances.