*2.2. Experimental Setup and Procedure*

Patients were investigated in a practical medication-off state, i.e., on the morning after overnight withdrawal (>12 h) of all dopaminergic drugs (meds-off). Kinematic data were recorded using two IMUs (Opal, APDM), at a sampling rate of 128 Hz, placed bilaterally on the outer anklebones. Each sensor was placed with its vertical axis aligned with the tibial anatomic axis. Surface leg muscle activity as measured by 10 EMG probes (FREEEMG 1000, BTS) was recorded bilaterally on tibialis anterior (Ta), soleus (S), gastrocnemius medialis (Gm), gastrocnemius lateralis (Gl), and vastus lateralis (Vl) at a sampling rate of 1000 Hz.

Two transistor–transistor logic signals (TTL) were provided at the beginning and end of each trial to both EMG and IMU devices to make data synchronization possible. Patients started walking barefoot after a verbal signal at their self-selected speed along a large ellipsoidal path of about 60 m in length (Figure 1). We recorded between three and six trials (243 ± 71 s in duration) of unperturbed, steady-state, overground walking according to the clinical condition of each subject. Overall, 26 walking trials with a total duration of 105 min were obtained.

**Table 1.** Demographic and clinical features. Meds-off: practical medication-off state, i.e., overnight withdrawal (>12 h) of all dopaminergic drugs. Meds-on: medication-on state 30–60 min after receiving 1 to 1.5 times the levodopa-equivalent of the morning dose. UPDRS-III is presented as total score/tremor sub-score left/tremor sub-score right/bradykinesia-rigidity sub-score left/bradykinesia-rigidity sub-score right. Abbreviations: Hoehn and Yahr stage (H&Y); Levodopa equivalent daily dose (LEDD); Unified Parkinson's Disease Rating Scale motor part (UPDRS-III).


**Figure 1.** Top-view scheme of the experimental setup, with a patient depicted at the starting position of the circuit. Patients were asked to continuously walk along an elliptical circuit of approximately 60 m around the workstation. The inner boundary of the circuit was marked with four objects at its corners (gray dots). A clinician was close to the patient during all recordings.

−

#### *2.3. Selection of EMG Channels*

We focused on the muscles of the lower leg, which are highly involved during the gait cycle. Ta and S are distal monoarticular muscles with distinct and synergistic contributions to human gait [39]. According to [40], they are the most active muscles during gait and display the lowest inter-subject variability. We, therefore, hypothesized that models based on bilateral pairs of these muscles may be particularly suitable and potentially sufficient for predicting gait-related angular velocity profiles. The gastrocnemius muscle (biarticular) was added for a comprehensive evaluation of the triceps surae. Note that since medial and lateral gastrocnemii fulfill somewhat independent roles [41,42], both were added. Given the knee flexor activity of the gastrocnemius muscle, we then positioned the last available probe on the Vl, a major (monoarticular) knee extensor muscle.

Models based on different muscle combinations were compared to the model including all five pairs of muscles. We were interested in identifying minimal subsets of EMG probes that would make accurate IMU reconstruction possible. Thus, we further exhaustively tested all possible 2<sup>5</sup> <sup>−</sup> 1 = 31 sets containing between one and five pairs of distinct muscles. Note that all considered models included either none or both the left and right EMG signals for each studied muscle. Thus, all models comprised an even number of muscles between two and ten.

#### *2.4. Data Preprocessing*

Figure 2 depicts a summary of data preprocessing (green box). EMG data were bandpass-filtered, rectified, and down-sampled to 200 Hz. IMU traces were up-sampled to 200 Hz using nearest-neighbor interpolation. IMU and EMG data were aligned to the rising edge of the first TTL signal for synchronization. A number of preprocessing steps were devised to facilitate the prediction of angular velocity traces from EMG data. To smooth out local extrema occurring due to noise, IMU data were processed with a movingmedian filter with a 100 ms window length, followed by a moving-mean filter with a 40 ms window length. To achieve a similar degree of smoothness, EMG data were processed with a moving-median filter with a 200 ms window length, followed by a moving-mean filter with a 40 ms window length. All moving filters were centered. As a simple high-pass filter, the minimum in a moving window of 10 s in length was subtracted from the EMG data. To standardize scales across patients, EMG activation time courses were further normalized by subtracting the 1st percentile and dividing by the 95th percentile. Percentiles were estimated separately for each recording. Each recording was cropped to the exact on- and offsets of the walking period.

### *2.5. Extraction of Biomechanical Parameters*

Swing peak velocity (SWP), heel contact (HC), and toe-off (TO) events were extracted from the angular velocity profiles measured with respect to the medio-lateral axis by the IMUs (see [43,44] for an extensive description of gait event detection using IMU data). This was performed separately for the left and right IMU sensors as follows: First, SWP events were identified as local maxima with at least 150◦/s peak height and 0.7 s inter-peak distance. Two consecutive SWP events defined one gait cycle. Next, local minima within each cycle were used to define the corresponding HC and TO events. The HC event was defined as the earliest local minimum occurring in the sub-interval between 10% and 45% of the cycle. If no local minimum could be found, the global minimum within that sub-interval was used. Similarly, the TO events were defined as the latest local minimum occurring in the sub-interval between 55% and 90% of the cycle. Again, if no local minimum could be found, the global minimum within that sub-interval was used. At random, events extracted by the described algorithm were checked by an expert (C.P.) and were in agreement with manual determination based on the same IMU data. The procedure was used to define "ground-truth" gait events from recorded IMU data, as well as approximate event timings derived from reconstructed angular velocity time series based on EMG activity (see below; Figure 2, yellow and blue boxes).

**Figure 2.** Schematic representation of data analysis. Thirty-one regression models corresponding to all possible muscle combinations were built and evaluated. Each model was trained on all patient data except for one, left out for the testing phase (Ntrain = 5, Ntest = 1; pink box).

#### *2.6. Prediction of Angular Velocity Profiles Using EMG*

We used multiple linear regression to approximate the angular velocity with respect to the medio-lateral axis of the left and right ankle using the combined activation traces of multiple muscles within a window around the prediction point. The regression coefficients were fitted to minimize the mean-squared error between measured and approximated IMU traces on *training* data, consisting of pairs of IMU and EMG activity traces. To enable the prediction model to utilize the temporal dynamics of the EMG channels around the prediction time point, the temporal embedding of the EMG time series was performed. To this end, each selected EMG channel was complemented by temporally shifted versions <sup>e</sup>*xm*(*t*) = [*xm*(*<sup>t</sup>* <sup>+</sup> *<sup>τ</sup>*1), . . . , *<sup>x</sup>m*(*<sup>t</sup>* <sup>+</sup> *<sup>τ</sup>K*)]*<sup>T</sup>* , *m* = 1, . . . , *M*, where *xm*(*t* + *τ*) is the activity of the m-th EMG sensor at time *t* + *τ*. Here, we used *K* = 21 equally spaced shifts, ranging from *τ*<sup>1</sup> = −500 ms to *τ*<sup>21</sup> = +500 ms in steps of 50 ms. Thus, the prediction of the IMU signals at time *t* was based on EMG information within a window around *t* of one second in length. The relation between the embedded signal of all *M* EMG sensors, <sup>e</sup>*x*(*t*) = [e*x*1(*t*), . . . , <sup>e</sup>*xM*(*t*), 1] *T* (including an offset term), and angular velocity *y*(*t*) (either at the left or right ankle) was assumed to be linear according to the model *y*(*t*) = *β <sup>T</sup>*e*x*(*t*). The (*K*·*M* + 1)-dimensional coefficient vector *β OLS* = *X*e*X*e *T* −<sup>1</sup> *Xy*<sup>e</sup> *<sup>T</sup>* was estimated using ordinary least-squares (OLS) regression, where *<sup>X</sup>*<sup>e</sup> <sup>=</sup> [e*x*(1), . . . , <sup>e</sup>*x*(*T*)], *<sup>y</sup>* <sup>=</sup> [*y*(1), . . . , *<sup>y</sup>*(*T*)], and *T* denotes the number of available paired measurements of EMG and IMU activity in the training set. Using the fitted model, EMG-based IMU predictions were obtained as *y*ˆ(*t*) = *β OLST*e*x*(*t*).
