*2.3. Data Analysis*

Only continuous strides walked along straight paths were considered for the analysis, excluding turns and freezing episodes. Gait events (i.e., foot contact and foot o ff) were automatically identified from the angular velocity around the medio-lateral axis of the shank [35]. For each subject, stride time was calculated as the di fference between two consecutive foot contacts of the same leg.

For the assessment of gait symmetry, the di fference between left and right leg of stride time sequences was tested per subject using the Kruskal–Wallis test (statistical significance 5%), since normality of distribution was not verified (Shapiro–Wilk test).

sEMG data were bandpass filtered at 20–450 Hz [36,37], then processed by a double threshold statistical detector to provide the onset and o ffset time instants of TA and GM activity [38]: per muscle, an amplitude threshold ζ and a numerosity threshold *r*0 were defined; if at least *r*0 out of m consecutive samples, in absolute value, are above ζ, activation is considered on and set to 1; elsewhere

activation is considered OFF and set to 0. On-set instants are identified with transitions of the activation from 0 to 1, o ff-set from 1 to 0.

The behavior of the double-threshold detector is determined by three parameters: the amplitude threshold ζ, the numerosity threshold *r*0, and the length of the observation window m. The values of ζ and *r*0 are statistically selected to minimize the value of false-alarm probability and maximize probability of detection for specific signal-to-noise ratio (SNR) and background noise. To guarantee the performance of the threshold detector, only signals with a minimum SNR value of 10 were considered; the value was chosen according to literature [38]. The values of the background noise level and the SNR were estimated using the statistical approach proposed by Agostini et al. [39]. The length duration of the observation window m was set to 60, i.e., 30 ms, as suitable value for the study of muscle activation in gait analysis [38].

Muscle activation events and intervals (o ff-set—on-set) per gait cycle were normalized with respect to the corresponding gait cycle duration, then, the number *n* of times the muscle was activate within a single gait cycle was calculated to define the n-activation pattern per gait cycle and per muscle.

To quantify the frequency of occurrence of each n-activation pattern, muscle activations of each muscle were gathered according to the number of detected intervals within each gait cycle and the occurrence frequency of the single n-activation pattern was calculated per muscle and per subject as:

$$\text{Occurrenze Frequency} \ (n) = \frac{\text{Number of guit cycle with activation pattern}}{\text{Total number of guit cycle}}$$

Then, mean and standard dispersion (SD, i.e., standard deviation divided by the square root of the number of strides) values of occurrence frequency of each n-activation patter of each muscle were calculated over subjects.

To characterize the timing of each n-activation pattern, mean and SD of normalized activation events were calculated per n-activation pattern, per muscle, and per patient.

For the co-activation investigation, only patients showing a SNR greater than 10 for both muscles in at least one of the two limbs were considered.

To characterize co-activation [4], per GM n-activation pattern:


Coactivation was identified when both concurrent GM and TA normalized n-activation patterns were above 0.1. Matlab R2018a (MathWorks BV, USA) was used for data analysis.
