*2.3. Signal Processing*

The sEMG signals were focused on the time domain because of the time-sequence. The amplitude extracted from the raw sEMG signals was used for the training of the RFPCA, similar to the work done by the authors of [16], who directly used the envelopes of the EMG signal to train the network. This feature was carried out from digital filtering and using simple math. A Butterworth band-pass filter (band length of 10–500 Hz, 4th order) was used to filter interference signals and extract effective signals. After that, a full-wave rectification of the sEMG signal was conducted, and the signal was then filtered through a low-pass filter (Butterworth at 6 Hz, 2nd order) [23]. One of the representative examples of the sEMG signal processing of one trial is shown in Figure 4.

**Figure 4.** The signal processing of sEMG.

For processing the kinematic data of the knee, the vector *VAB* consisting of Markers A and B represents the direction of the thigh, while vector → *VBC* consisting of Markers B and C represents the direction of the shank. The motion angle of knee could then be calculated approximatively as:

$$\theta\_{kucr} = \arccos\left(\frac{\overrightarrow{V}\_{AB} \cdot \overrightarrow{V}\_{BC}}{\left|\overrightarrow{V}\_{AB}\right| \left|\overrightarrow{V}\_{BC}\right|}\right). \tag{1}$$

→

In order to keep the data synchronized with the knee and facilitate subsequent knee movement prediction, the sEMG signal, after the original processing, was resampled at 100 Hz. Thus, a set of data *<sup>E</sup>*VL,*t*, *<sup>E</sup>*RF,*t*, *<sup>E</sup>*VM,*t*, *<sup>E</sup>*GM,*t*, *<sup>E</sup>*GL,*t*, *yknee*,*<sup>t</sup>* at time *t* was obtained, where *Ei,t* represents the envelope of *i* sEMG signal after processing, and *yknee,t* represents the knee angle θ*knee* at time *t*.

For the study of the sEMG historical influence, the data from one trail of each subject was chosen for training, in order to establish the estimation models. The influence of previous sEMG signals was studied by the number of previous sEMG signals used as a feature vector in the learning course. A typical sample is a combination of sEMG and knee angle [*Xt*, *Yt*], where the sEMG *Xt* is the input, while the knee angle *Yt* = *yknee,t* is the output. In this work, the sEMG input *Xt* at time *t* is defined as follows:

$$\mathbf{X}\_{t} = \left\| \mathbf{x}\_{t-n\Delta t\prime}, \mathbf{x}\_{t-(n-1)\Delta t\prime}, \dots, \mathbf{x}\_{t-\Delta t\prime}, \mathbf{x}\_{t} \right\|\_{\prime} \tag{2}$$

where, *xt* is the vector of sEMG at time *t* after processing, namely [*<sup>E</sup>*VL,*t*, *<sup>E</sup>*RF,*t*, *<sup>E</sup>*VM,*t*, *<sup>E</sup>*GM,*t*, *<sup>E</sup>*GL,*t*]; *n* is the number of previous sEMG signals used as the input, Δ*t* is the sample interval which is 1/100 Hz. The input dimension of *Xt* increases as *n* increases.

For the sample size, *n* was zero, and all of the processed data of each subject was segmented into groups according to the GC. One group contains different sampling numbers for different subjects, which are listed in Table 1. For each subject, 61 complete groups of data (GDs, approximately 7808 samples) were selected for the following work.

**Table 1.** The average sampling numbers contained in a gait cycle (GC) of different subjects.

