## 2 Methodology
### Experiment Setup  
Ten healthy individuals (6 male and 4 female) were recruited as volunteers to participate in the experiment. They had no previous medical history of neurological and muscular diseases. Subjects' consent was obtained before the experiment. Ethical approval was obtained from the Shijiazhuang Central Hospital, Shijiazhuang, Hebei Province, China. Their physical body conditions are shown in Table 1.  
A pair of distal antagonistic muscles, tibialis anterior (TA) and soleus (SL), were selected in this experiment because the EMG signals of the distal muscles show lower inter-subject variability than the proximal [39]. The skin of the selected muscles was shaved and cleaned with 75% alcohol before the experiment [40]. Three Ag-AgCl electrodes of 5 mm in diameter, including a reference and two differential amplification ones [41], were attached to the ankle and the surface of the selected muscles, respectively. The location and distance of the electrodes are referred to in [42]. The EMG signals were acquired by a two-channel EMG device.  
Two circular force sensing resistors (FSR), ranging from 20 to 20,000 g, were attached to the flat area of the heel and hallux to collect the GRF signal for the stride division [43]. The resistance change of the FSRs was linearly converted to a voltage change by proportional operational amplifiers and then converted to digital signals by analog-to-digital converters (ADCs) embedded in STM32F103C8T6. Both the EMG and GRF signals were sampled at a frequency of 2000 Hz, which is adequate for terrain classification compared with other studies, and transmitted to PC via Bluetooth. A JavaScript script  
\begin{table}
\begin{tabular}{c c c} \hline
**Height/cm** & **Weight/kg** & **Age** \\ \hline
175.70 \(\pm\) 6.63 & 66.20 \(\pm\) 9.19 & 20.80 \(\pm\) 1.40 \\ \hline \end{tabular}
\end{table}
Table 1: Mean and standard deviation of the physical body conditions of the 10 volunteers.  
Figure 3: The flowchart of the experiment and data process procedure.  
was written, which automatically obtained the system time and added it to the end of each message sent to the PC. Finally, the EMG and GRF signals with the same particular timestamp were aligned, and then all of the synchronized datapoints were used for further analysis.  
The participants were instructed to walk at comfortable speeds according to their walking habits. It is worth noting that the EMG profiles would change slightly when walking speeds varied, i.e., shifting less than 10% and 1% in peak amplitude and peak timing, within a certain range around normal walking speed [30; 44], which are acceptable for classifying three to five different terrains, and therefore the developed protocol is also applied in other relevant studies [19; 32]. When the start command was issued, the participant stepped out on the leg with the device. Data acquisition started at the first heel strike. The participants were instructed to walk a forty-meter flat ground four times, and then walked back and forth twenty times on a slope with a length of 5 m angled at 5.2 degrees. Similar ramp angle degrees are also found in other relevant studies and they are summarized in Table 2 for comparison with our work [19; 22; 27; 31; 35].  
The participants were fully warmed-up to familiarize themselves with the protocol to ensure they walk naturally with the measurement device, and rested for 15 min after each level walking task and 5 consecutive slope walking tasks in order to prevent muscle fatigue [45]. At the end of all the trials, the participants performed a maximum isometric voluntary contraction (MIVC) for the EMG normalization.