Recognition of Gait Phases with a Single Knee Electrogoniometer: A Deep Learning Approach

: Artiﬁcial neural networks were satisfactorily implemented for assessing gait events from di ﬀ erent walking data. This study aims to propose a novel approach for recognizing gait phases and events, based on deep-learning analysis of only sagittal knee-joint angle measured by a single electrogoniometer per leg. Promising classiﬁcation / prediction performances have been previously achieved by surface-EMG studies; thus, a further aim is to test if adding electrogoniometer data could improve classiﬁcation performances of state-of-the-art methods. Gait data are measured in about 10,000 strides from 23 healthy adults, during ground walking. A multi-layer perceptron model is implemented, composed of three hidden layers and a one-dimensional output. Classiﬁcation / prediction accuracy is tested vs. ground truth represented by foot–ﬂoor-contact signals, through samples acquired from subjects not seen during training phase. Average classiﬁcation-accuracy of 90.6 ± 2.9% and mean absolute value (MAE) of 29.4 ± 13.7 and 99.5 ± 28.9 ms in assessing heel-strike and toe-o ﬀ timing are achieved in unseen subjects. Improvement of classiﬁcation-accuracy (four points) and reduction of MAE (at least 35%) are achieved when knee-angle data are used to enhance sEMG-data prediction. Comparison of the two approaches shows as the reduction of set-up complexity implies a worsening of mainly toe-o ﬀ prediction. Thus, the present electrogoniometer approach is particularly suitable for the classiﬁcation tasks where only heel-strike event is involved, such as stride recognition, stride-time computation, and identiﬁcation of toe walking.


Introduction
Modifications of motor function associated to different environments or state of health are typically estimated and quantified by means of instrumental gait analysis. To this aim, particularly relevant seems to be the problem of recognizing at least the two main gait phases, namely stance and swing. Single-type sensors or a combination of multiple types of sensors, such as angular velocity, attitude, force, electromyography, and cameras are typically used for gait phase quantification [1][2][3][4][5]. Recent availability of technological advancements is allowing to limit the experimental complexity of gait-analysis set-up, providing a less expensive, less intrusive, and more comfortable estimation of gait data. Robust artificial intelligence techniques for managing a lot of biological data and signals coming from smart sensors such as inertial measurements units (IMU) are undoubtedly among the most used approaches to this aim [6][7][8][9][10][11][12][13][14]. Specifically, the problem of estimating temporal parameters of gait could take great advantage by the development of these new approaches. Frequently, the use of IMUs appears to be suitable for a smart assessment of walking parameters, such as gait-phase duration and timing of heel strike (time when the foot touches the ground) and toe off (time when the foot-toes clear the ground) [11]. Attempts based on artificial intelligence were also applied in a satisfactory way for the assessment of gait parameters during walking [6,7,9,10,[12][13][14][15].
Machine/deep learning techniques are usually implemented for classification of biological signals [13,16]. The introduction of those methodologies has opened a novel perspective also for reducing the complexity of experimental set-up. Predicting gait events from sensors already used in smart gait protocols or in specific environments would avoid the addition of further sensors or systems for the direct measurement of temporal data, such as stereo-photogrammetry, foot-switch sensors, pressure mats, and IMUs [11,[17][18][19]. This would be particularly suitable for specific fields, such as walking-aid devices (mainly exoskeletons) where sensors are already embedded in the system [10,[20][21][22][23]. From this point of view, an interesting attempt has been performed by Liu et al. [10], who proposed a technique for the recognition of gait phases using only joint angular sensors of the exoskeleton robot, containing the position, velocity, acceleration, and further motion data; very promising results were achieved. In the same way, different studies attempted to provide a reliable classification of gait phases and an accurate prediction of heel strike (HS) and toe off (TO) from only surface electromyographic (sEMG) sensors [13,14,21,[23][24][25]. Details about methodology and outcomes of these studies are reported in Section 2 (related works).
Following the line taken by the above-mentioned studies, the present work was designed to propose a novel approach for the binary classification of gait phases and the prediction of gait events, based only on deep-learning analysis of sagittal knee-joint angle measured by a single electrogoniometer. Although promising classification performances were achieved by sEMG-based methods [13,14,21,[23][24][25], gold-standard approaches are not available in literature. Thus, in order to evaluate the robustness of the proposed approach, a direct comparison in the same population was also performed with the sEMG-based experiment [14], which achieves the best performance in HS and TO prediction among the approaches reported in literature (see Section 2). Moreover, another aim of the study is to test if the addition of electrogoniometer data could further improve the classification performance of this state-of-the-art method.

Related Works
The gold standard in gait segmentation is nowadays represented by foot pressure insoles or by footswitches [17,[26][27][28], which allow a direct measurement of foot-floor contact. Otherwise, IMUs and EMG signals are employed as input to gait-phase identification algorithms [11,13,14,21,23]. Recently, data fusion of sensors is suggested as a further reliable approach [29,30]. Artificial intelligence techniques are also satisfactorily employed for the estimation of walking parameters [6,7,9,10,[12][13][14][15]. To the best of our knowledge, no studies attempting to classify/predict gait events from only sagittal knee angles are reported in literature. For the purposes of the present work, sEMG signals are of particular interest, being measured in every gait protocol in order to characterize the neuro-muscular activity and neuro-motor disabilities and being acquired very often together with kinematic data, such as sagittal knee angles.
Not so many efforts are available in literature, providing classification of gait phases from only sEMG signals [13,14,21,[23][24][25]. Most of these studies aim only at classifying gait phases, not providing estimation of gait events (HS and TO). Joshi et al. introduced a control system for a foot-knee exoskeleton based on hand-crafted features computed from eight EMG signals to feed the Bayesian information criteria (BIC) [21]. Linear discriminant analysis (LDA) was then implemented to extract eight gait phases. One single subject was recruited for this experiment. The achieved accuracy ranged from 50% to 80%, with the combination of the BIC and LDA stage. Ziegier et al. employed a support-vector-machine classifier to provide binary segmentation of gait phases, based on a new bilateral feature (weighted signal difference) from EMG signal acquired in seven muscle pairs [23]. Only two subjects were used to test the approach, walking on a treadmill at different speeds. The accuracy ranged from 81% to 96% (mean value around 91%); maximum classification accuracy was identified when training and testing sets were strides from the same subject (intra-subject accuracy). Meng et al. used a hidden Markov Electronics 2020, 9, 355 3 of 14 model and set of EMG-based features to identify five gait sub-phases during treadmill walking [24]. Even in this study one single subject was used to test the classification. The best-case accuracy was 91.1%. The present group of researchers was able to achieve a mean binary-classification accuracy of 95.2%, adopting a multi-layer perceptron (MLP) classifier to interpret EMG data [25]. To this aim, an intra-subject approach was used on twelve healthy volunteers.
As far as we know, only two papers reported outcomes not only on classification of stance and swing but also on identification of heel strike and toe-off timing from sEMG signals [13,14]. Both studies adopted an inter-subject approach, consisting in training neural networks with sEMG signals measured during different strides of a population of homogeneous subjects and then testing the classifier on brand new subjects. Nazmi at al. extracted time-frequency EMG-based features to feed a single hidden layer neural network [13]. Training set was composed of seven subjects walking on a treadmill and testing set included one single unlearned subject. Mean classification accuracy of 87.5% for learned subjects and 77% for unlearned ones were accomplished. Prediction outcomes, computed in unseen subjects, achieved a mean absolute error (MAE ± SD) of 35 ± 25 ms in assessing HS and 49 ± 15 ms in assessing TO. The present group of researchers faced the same assignment, trying to interpret the linear envelopes extracted from sEMG signals by means of a multi-layer-perceptron classifier [14]. The MLP network was trained with sEMG data acquired during walking of 22 subjects and then tested on a brand-new subject. The procedure was performed twenty-three times, each time using a different subject as test-set (23-fold cross-validation). This approach provided an average (over 23-fold) binary classification accuracy of 94.9% for learned subjects and 93.4% for unlearned ones. MAEs in the prediction of HS and TO were 21 ± 7 ms and 38 ± 15 ms, respectively. This latter approach [14] is adopted as a reference experiment for the present study since it achieved the best performance in phase classification and gait event prediction among the inter-subject approaches reported in literature.

Participants
Foot-floor-contact, knee-angle, and surface EMG signals were recorded from 23 healthy adults (11 males and 12 females). Average volunteer characteristics (±SD) were: height = 173 (±10) cm; mass = 63.3 (±12.4) kg; and age = 23.8 (±1.9) years. Subjects have never presented pathological condition or undergone orthopedic surgery that might have affected leg mechanics. Moreover, volunteers with joint pain, neurological pathologies, and abnormal gait were not recruited. Overweight and obese subjects (body mass index ≥ 25) were excluded from the study. The present research was undertaken following the ethical principles of the Helsinki Declaration and was approved by local ethical committee.

Signal Acquisition
Signal acquisition was achieved by means of the multichannel recording system Step32 (Medical Technology, Italy, Version PCI-32 ch2.0.1. DV; resolution: 12 bit; sampling rate: 2 kHz). Volunteers were instrumented with one knee electrogoniometer, three foot-switches, and four sEMG probes for each leg. Experimental set-up is depicted in Figure 1. Then, they walked for around 5 minutes with bare feet at self-selected pace following an eight-shaped path, which includes natural deceleration, reversing, curve, and acceleration. Experiments were performed in the Motion Analysis Laboratory of Università Politecnica delle Marche, Ancona, Italy. An electro-goniometer (accuracy: 0.5 • ) was applied to the lateral side of each leg for measuring knee-joint angle in the sagittal plane. Foot-switches were applied under the heel, the first and the fifth metatarsal heads of each foot for measuring foot-floor-contact signal. sEMG signals were registered by means of three singledifferential probes with fixed geometry placed over tibialis anterior (TA), gastrocnemius lateralis (GL), and medial hamstrings (MH) and one further single-differential probe (minimum interelectrode distance: 12 mm) with variable geometry placed over vastus lateralis (VL). Electrode location and orientation were carried out under the supervision of a skilled licensed physical therapist, complying with SENIAM recommendations [31]. sEMG signals are exactly the same collected for the previous study of the present group of researchers [14]. Characteristics of footswitches are: size = 11 × 11 × 0.5 mm and activation force = 3 N. Foot-switch signals are used to identify stance/swing phases and HS and TO events considered as ground-truth.

Signal Pre-Processing
Knee angles in the sagittal plane measured by electrogoniometers were low pass filtered with cut-off frequency of 15 Hz. Each signal was min-max normalized within each subject, thus mapping the values in the [0-1] interval. An example of normalized flexion-extension knee angle in a representative subject is reported in Figure 2. Footswitch signals were processed for identifying the different gait cycles and phases (stance and swing), according to the approach discussed in [26]. sEMG signals were amplified, high-pass filtered (linear-phase FIR filter, cut-off frequency: 20 Hz) and low-pass filtered (linear-phase FIR filter, cut-off frequency: 450 Hz) for removing motion artefacts and high frequency noise, respectively. After a full-wave rectification, a second-order Butterworth low-pass filter (cut-off frequency: 5 Hz) was applied to extract the envelope of the signal, following the classic indication provided by acknowledged studies by Hermens et al. and Winter et al. [31,32]. Winter proposed a cut-off frequency of 3 Hz, while Hermens suggested a cut-off frequency of 10 Hz. The cut-off frequency of 5 Hz adopted in the present paper seems to be a good compromise between the two approaches. Finally, each sEMG signal was min-max normalized within each subject and for each muscle. Foot-switches were applied under the heel, the first and the fifth metatarsal heads of each foot for measuring foot-floor-contact signal. sEMG signals were registered by means of three single-differential probes with fixed geometry placed over tibialis anterior (TA), gastrocnemius lateralis (GL), and medial hamstrings (MH) and one further single-differential probe (minimum inter-electrode distance: 12 mm) with variable geometry placed over vastus lateralis (VL). Electrode location and orientation were carried out under the supervision of a skilled licensed physical therapist, complying with SENIAM recommendations [31]. sEMG signals are exactly the same collected for the previous study of the present group of researchers [14]. Characteristics of foot-switches are: size = 11 × 11 × 0.5 mm and activation force = 3 N. Foot-switch signals are used to identify stance/swing phases and HS and TO events considered as ground-truth.

Signal Pre-Processing
Knee angles in the sagittal plane measured by electrogoniometers were low pass filtered with cut-off frequency of 15 Hz. Each signal was min-max normalized within each subject, thus mapping the values in the [0-1] interval. An example of normalized flexion-extension knee angle in a representative subject is reported in Figure 2. Footswitch signals were processed for identifying the different gait cycles and phases (stance and swing), according to the approach discussed in [26]. sEMG signals were amplified, high-pass filtered (linear-phase FIR filter, cut-off frequency: 20 Hz) and low-pass filtered (linear-phase FIR filter, cut-off frequency: 450 Hz) for removing motion artefacts and high frequency noise, respectively. After a full-wave rectification, a second-order Butterworth low-pass filter (cut-off frequency: 5 Hz) was applied to extract the envelope of the signal, following the classic indication provided by acknowledged studies by Hermens et al. and Winter et al. [31,32]. Winter proposed a cut-off frequency of 3 Hz, while Hermens suggested a cut-off frequency of 10 Hz. The cut-off frequency of 5 Hz adopted in the present paper seems to be a good compromise between the two approaches. Finally, each sEMG signal was min-max normalized within each subject and for each muscle.

Data Preparation
Classification performances were tested after two different approaches for feeding the classifier: giving only knee-angle signal (knee approach) or giving knee-angle and sEMG signals (KEMG approach) as input to train the classifier.

Data Preparation
Classification performances were tested after two different approaches for feeding the classifier: giving only knee-angle signal (knee approach) or giving knee-angle and sEMG signals (KEMG approach) as input to train the classifier.

Knee Approach
For suitably training the classifier, each knee-angle signal was split into 20-sample windows (corresponding to 10 ms). A chronological sequence of 40-sample vectors was created, where each vector included the two synchronized 20-sample windows from two knee-angle signals (right and left leg). In details, the first sample of the first 40-sample vector of the sequence was the first sample of the knee angle measured in the right leg; the second sample of the first 40-sample vector was the first sample of the knee angle measured in the left leg.
Then, a specific label was assigned to each 40-sample window as follows: if the value of all the samples of the basographic signal corresponding to the 40-sample vector was 0 (or 1), a global label 0 (or 1) was assigned to the 40-sample vector. 40-sample vectors, including swing-to-stance or stanceto-swing transitions, were discarded. This approach including only knee-angle data to feed the neural network is referred to as 'Knee approach'.

KEMG Approach
A similar approach was used when both knee angles and sEMG signals were used to train the network. Each signal (knee angle and sEMG) was split into 20-sample windows. A chronological sequence of 200-sample vectors was created, where each vector included the ten synchronized 20sample windows from the sEMG signals of the eight muscles (four for each leg) and two knee-angle signals. In details, the first sample of the first 200-sample vector of the sequence was the first sample of the knee angle measured in the right leg; the second sample of the first 200-sample vector was the first sample of the EMG signal from the muscle 1 (TA, right leg), and so on up to the 10th signal (MH, left leg). Then a specific label was assigned to each 200-sample vector as follows: if the value of all the samples of the basographic signal corresponding to the 200-sample vector was 0 (or 1), a global label 0 (or 1) was assigned to the 200-sample vector. 200-sample vectors including swing-to-stance or stance-to-swing transitions were discarded. This approach including both Knee-angle and sEMG data to feed the neural network is referred to as KEMG approach.

Knee Approach
For suitably training the classifier, each knee-angle signal was split into 20-sample windows (corresponding to 10 ms). A chronological sequence of 40-sample vectors was created, where each vector included the two synchronized 20-sample windows from two knee-angle signals (right and left leg). In details, the first sample of the first 40-sample vector of the sequence was the first sample of the knee angle measured in the right leg; the second sample of the first 40-sample vector was the first sample of the knee angle measured in the left leg.
Then, a specific label was assigned to each 40-sample window as follows: if the value of all the samples of the basographic signal corresponding to the 40-sample vector was 0 (or 1), a global label 0 (or 1) was assigned to the 40-sample vector. 40-sample vectors, including swing-to-stance or stance-to-swing transitions, were discarded. This approach including only knee-angle data to feed the neural network is referred to as 'Knee approach'.

KEMG Approach
A similar approach was used when both knee angles and sEMG signals were used to train the network. Each signal (knee angle and sEMG) was split into 20-sample windows. A chronological sequence of 200-sample vectors was created, where each vector included the ten synchronized 20-sample windows from the sEMG signals of the eight muscles (four for each leg) and two knee-angle signals. In details, the first sample of the first 200-sample vector of the sequence was the first sample of the knee angle measured in the right leg; the second sample of the first 200-sample vector was the first sample of the EMG signal from the muscle 1 (TA, right leg), and so on up to the 10th signal (MH, left leg). Then a specific label was assigned to each 200-sample vector as follows: if the value of all the samples of the basographic signal corresponding to the 200-sample vector was 0 (or 1), a global label 0 (or 1) was assigned to the 200-sample vector. 200-sample vectors including swing-to-stance or stance-to-swing transitions were discarded. This approach including both Knee-angle and sEMG data to feed the neural network is referred to as KEMG approach.

Reference Approach
As reference experiment for direct comparison in the same population, a recent sEMG-based approach was used [14]. In this reference approach only sEMG signals were used to train the network. Similarly to the KEMG approach, each sEMG signal was split into 20-sample windows. A chronological Electronics 2020, 9,355 6 of 14 sequence of 160-sample vectors was created, where each vector included the eight synchronized 20-sample windows from the sEMG signals of the eight muscles (four for each leg). In details, the first sample of the first 160-sample vector of the sequence was the first sample of the sEMG signal from the muscle 1 (TA, right leg), the second sample of the first 160-sample vector was the first sample of the EMG signal from the muscle 2 (GL, right leg), and so on up to the eighth signal (MH, left leg). Labeling was performed as in the previous approaches. This approach is referred to as the 'Reference approach'. As reported in [14], this approach has been previously validated versus a feature-based method, described in [13].

Training the Classifier
The present approach is based on the attempt at training the neural network classifier by means of sEMG data from 22 subjects out of 23 subjects of the present population (Learned set, LS) and then classifying gait phases in the remaining unseen subject (Unlearned set, US), following the so-called leave-one-out cross validation procedure. To this aim, all the vectors were picked up from the signals of the 22 subjects and then provided as input to the neural network for the training phase. The vectors from the remaining single subject were used for the testing phase, considering the corresponding foot-switch signal as ground truth. The procedure was performed twenty-three times, each time using a different subject as test set (23 folds cross-validation). For measuring the classification performances also for learned subjects, the set was split into training set (LS-train) and test set (LS-test). In details, LS-train includes the first 90% of each subject strand (approximately 3 min and 30 s, 180 gait cycles) and LS-test the remaining 10% (approximately 30 s, 20 gait cycles). Results in each subject were provided as the classification results in a single fold. Population (global) results were provided as mean value (± SD) over the 23 folds.

Neural Network
Multi-layer perceptron (MLP) architecture was implemented in the present study. The model was a deep neural network with three hidden layers composed of 512, 256, and 128 neurons and a one-dimensional output. The output was fed to a sigmoid function and a 0.5 threshold was used to achieve a binary output: when the output of the sigmoid was > 0.5 the label 1 was assigned, otherwise the label 0 was assigned. Rectified linear units (ReLU) were implemented to provide non-linearity between two consecutive hidden layers. In the experiments, stochastic gradient descent was employed as the optimization algorithm and binary cross entropy as the loss function. Eventually, MLP model was trained adopting an early stop technique: the network was trained for a maximum of 100 epochs, stopping when the accuracy on the validation set did not increase for 10 consecutive epochs. The best-performing learned parameters were adopted to evaluate the model performances.

Gait-Event Identification
The foot-floor-contact signal was predicted by chronologically arranging the binary output of MLP network. A vector was provided as output, where sequences of 1 (swing phase) alternate with sequences of 0 (stance phase). Literature reported that stance and swing phase during healthy walking at typical speed last on average around 60% and 40% of gait cycle. Starting from this observation, the predicted foot-floor-contact signal was cleaned by removing the sequences of samples shorter than 500 samples (≈ 23% of gait cycle). Then, gait events were identified in the cleaned signal. Swing-to-stance transitions (heel strike, HS) were assessed as the sample when the sample value switched from 1 to 0. In the same way, stance-to-swing transitions (toe off, TO) were assessed as the sample when the sample value switched from 0 to 1. Performance of predictions was provided in terms of precision, recall, and F1-score.
A predicted HS or TO at time t p was acknowledged as true positive (TP) if an event of the same type occurs in the ground truth signal at time t g such that |t g -t p |< T. T is a temporal tolerance, set to 600 milliseconds. Otherwise, the predicted event was acknowledged as a false positive (FP). For all the true positives, mean absolute error (MAE) was computed as the average time distance between the predicted event and the corresponding one in ground truth signal.

Statistics
Shapiro-Wilk test was used to evaluate the hypothesis that each data vector had a normal distribution. Comparison between two normally distributed samples was performed with two-tailed, non-paired Student's t-test. The analysis of variance (ANOVA), followed by multiple comparison test, was used to compare more than two normally distributed samples. Kruskal-Wallis test was used to compare not normally distributed samples. Statistical significance was set at 5%.

Results
Average classification accuracies in every fold for the Knee, KEMG, and Reference approaches are shown in Table 1 for the learned-test set (LS-test) and in Table 2 for unlearned set (US). Figure 3 depicts a direct comparison of accuracy provided in each fold by Knee (red bars) vs. KEMG approach (blue bars). The direct comparison between mean values (horizontal dashed lines) shows a significant improvement of 4 points (94.6 ± 2.3% vs. 90.6 ± 2.9%, p < 0.05) of the classification accuracy provided by KEMG approach, compared with Knee approach. Starting from stance vs. swing classification, the present study is able to predict also the signal of foot-floor contact and to estimate gait events. An example of predictions of foot-floor-contact signal provided by Knee vs KEMG approaches is depicted in Figure 4. Tables 3 and 4 report the performance in US of HS and TO prediction in terms of mean absolute error (MAE), precision, recall, and F1-score. MAE detected in the prediction of HS provided by the Knee approach is significantly higher than MAE assessed by KEMG and Reference approaches (29.4 ± 13.7 ms vs. 18.8 ± 7.9 ms and 21.6 ± 7.0 ms; p < 0.05). Similarly, a significant higher MAE is observed in TO prediction provided by Knee approach (99.5 ± 28.9 ms vs. 35.9 ± 20.6 ms and 38.1 ± 14.2 ms; p < 0.05). No further significant differences were detected between groups.

Discussion
The goal of this study is to propose a novel approach for classifying stance vs. swing and assessing HS and TO timing, based on deep learning analysis of sagittal knee-angle data measured with a single electrogoniometer per each leg. This so-called Knee approach achieves average stance/swing-classification accuracy over 23 folds (± SD) of 90.9 ± 0.4% in LS-test and 90.6 ± 2.9% in US (last row of Tables 1 and 2, respectively). A reduction of accuracy is detected, compared to Reference approach in both LS-test (3.9 points) and US (2.8 points). This reduction is expected, since only one signal per leg is used in Knee approach vs. the four signals per leg used in the Reference approach (more input information, better classification performance). Despite this, the average accuracy of stance/swing classification is still > 90% and falls in the range identified by the different machine-learning-based approaches (sEMG, angular sensors) reported in literature [10,13,21,23,24] (see Section 2). Moreover, the absence of any significant difference between classification accuracies in US vs. LS-test (p > 0.05) highlights that the network is able to keep the same performance even when tested on brand new subjects (US). Classification accuracy > 90% in US subjects is supposed to be very useful in clinical environments, where brand new subjects are analyzed every day. This outcome is associated also to a limited standard deviation, as in the Reference approach. As expected, SD is higher in US, indicating a large variability of classification for subjects not used during training phase.
Besides the suitable classification performance, a reliable post-processing of model output was implemented for gait-event estimation in US (see Section 3.7), ensuring values of prediction, recall, and F1-score very close to 1 (Tables 3 and 4). These values are not statistically different from the correspondent values provided by the Reference approach. Furthermore, a mean MAE over population of 29.4 ± 13.7 ms and 99.5 ± 28.9 ms is achieved in predicting HS and TO (Tables 3 and 4, respectively).
Compared to Reference value, average MAE value in HS prediction is 7.8 ms higher. However, Knee approach performs better than the sEMG approach proposed in [13], which achieved a mean HS MAE of 35 ms. TO prediction is less accurate: mean MAE value of 99.5 ms vs. 38.1 ms (Reference value, Table 4). It has been reported that it is more challenging identifying toe-offs rather than heel-strikes [13,14,33]. Thus, higher MAE in TO prediction was expected. Liu et al. achieved high accuracy in classifying gait phases with joint-angular-sensor data [10]. However, despite not reporting detailed MAE for TO prediction, they detected the most relevant recognition errors just around the transition from stance to swing (i.e., TO). Differences in toe-off MAE compared to above-mentioned studies would be likely attributable to a different number of signals (and consequently of sensors) used in the different approaches: one single signal per leg in Knee method, two signals in [13], four signals in the Reference approach, and even more in [10]. Thus, the desirable simplification of experimental set-up (one single sensor) is paid with a deterioration of only TO (not HS) prediction. However, this could be a good compromise for general task such as stride recognition, stride-time computation, identification of toe walking, and so on, where only HS event is involved. Moreover, it should be taken into account that present performances are achieved in condition of high variability of foot-floor contact, due to the eight-shaped path followed during ground (not treadmill) walking which includes acceleration, deceleration, curves, and reversing. Larger variability of the signal to predict, indeed, is expected to affect the performance of the classifier.
As mentioned above, promising performances in classifying gait phases and predicting gait events are provided by studies proposing a machine learning analysis of only sEMG signals, [13,14,21,23,24]. All those studies present suitable and reliable outcomes, but, to our knowledge, the best results in terms of mean absolute value in the prediction of HS and TO are achieved in a recent study of the present group of studies [14]. The technique introduced by this study is adopted here as the Reference approach. The present study is further aimed to test if the addition of electrogoniometer data could improve the classification performance of this Reference approach. The approach including both knee-angle and sEMG data to feed the neural network is referred to as KEMG approach. Detailed accuracy values in the 23 folds for stance/swing classification accomplished in LS-test and US are shown in Table 1 and in Table 2, respectively. Comparison analysis (in Figure 3 for US) shows as KEMG approach (blue bars) achieves improved accuracy values in each one of the 23 folds, with respect to Knee approach (red bars), implying a significant increase (around 4 points for both LS-test and US, p < 0.05) of mean accuracy over 23 folds. Mean accuracies of KEMG approach outperform of around 1 point also the Reference approach: i.e., 95.6 ± 0.3% vs. 94.8 ± 0.2% in Learned set and 94.6 ± 2.3% vs. 93.4 ± 2.3% in Unlearned set. As for Knee and Reference approaches, KEMG provides values of prediction, recall, and F1-score very close to 1, in predicting HS and TO (Tables 3 and 4). MAE values are significantly lower than the correspondent values provided by Knee approach (reduction of 36.1% for HS and 63.9% for TO, p < 0.05). It is worth noticing that also SD values decreased (from 13.7 to 7.9 for HS and from 28.9 to 20.6 for TO), suggesting an improved repeatability of prediction quality among different folds. A significant improvement of prediction error in KEMG is observed also compared to Reference approach, in terms of reduction of MAE (18.8 vs. 21.6 for HS and 35.9 vs. 38.1 for TO). These outcomes suggest that the introduction of knee-angle data could improve the performances of sEMG-based approaches, both in classification accuracy and in prediction error.
As introduced earlier, the clinically oriented aim of this work is trying to simplify the experimental set-up associated to instrumental gait analysis, assessing the signal of foot-floor contact from deep learning analysis of sagittal knee-angles measured by a single electrogoniometer. Gait analysis is acknowledged as a suitable procedure for quantitatively estimating the deterioration of motor function in clinics. The issue of cumbersome and time-consuming experimental protocols is getting increasingly relevant, particularly for evaluation in pathology. This is true for classical approaches based on foot-switch sensors, pressure mats, and stereo-photogrammetric systems, but also for the more recently-developed wearable sensors, which could need specific care for the suitable placement and necessity of precise calibration process, not always compatible with the clinical timetable.
Thus, an approach based on a single, reliable, easy-to-attach sensor (electrogoniometer) is truly desirable: the fewer sensors are involved, the simpler is to protect patient comfort. Aforesaid studies seem to indicate that a large data-set of signals from many sensors is needed to classify gait phases and/or estimate gait events during normal or aided walking [10,13,14]. Outcomes achieved here suggest that it is strongly dependent on the task to pursue. If the aim is to classify stance vs. swing phase or to assess gait parameters where only HS event is involved (stride recognition, stride-time computation, identification of toe walking), the present Knee approach provides performances in line with what reported in literature, but with the clinical advantage of using one single simple sensor. When the aim is more complicated to pursue (gait sub-phase recognition, swing and stance time duration and so on) and/or more elevated performances are needed, approaches based on sensor fusion, as KEMG approach proposed here, are preferable. Thus, the main contribution of the present study consists in showing that for specific simple (but essential) tasks such as stride recognition, stride-time computation, and identification of toe walking, the single-sensor approach is able to provide classification performance comparable to those achieved by multi-sensor approaches. The information included in the present study would be particularly suitable for specific environments, such as the walking-aid devices or of portable rehabilitation system [34][35][36][37], where sensors could already be embedded in the system.

Conclusions
The present study proposes a novel methodology for classifying stance vs. swing and predicting gait-event timing, based on neural-network classification of signals acquired by a single knee electrogoniometer during walking. The clinically useful contribution of the study consists in assessing gait events from only sagittal knee-angle signals, avoiding the installation of additional sensors on the human body and promoting the reduction of the sensor-system complexity. Additional goal is to evaluate if the introduction of knee-angle data from the electrogoniometer could improve the classification performance of state-of-the-art sEMG-based methods, in order to provide a sensor-fusion approach useful to face more complex task or to pursue higher classification/prediction performances. The comparison of the two approaches shows as the reduction of set-up complexity implies a worsening of classification performances. However, the choice of the suitable approach should not only be driven by network performance but also (mainly) by patient comfort and clinical needs.