## 2 Materials and Methods
### Feature Engineering and Model Development  
We developed a custom MATLAB code to import data, segment based on type of activity, and calculate features. A list of features generated is displayed in Table 1. For each task cycle shown in Figure 2, portions of the task were segmented, and measures were calculated from raw EMG and accelerometer signals from each of the four wearable sensors placed on low back and thighs. The EMG signal was filtered using a Butterworth filter in the 30 Hz and 300 Hz bands [39; 60]. Features from EMG sensors included the peak and mean amplitude of muscle activity recorded by each of the four sensors on LES, LBF, RES, and RBF for each activity portion. All peak values were normalized for  
Figure 2: Illustration depicting experimental tasks of repetitive and intermittent trunk flexion task cycles and activities of standing still (SS), bending (B), sustaining bent posture (SUS), retraction (R), and relaxation performed within each task. (Note: procedure shown in this illustration was repeated for asymmetric as well as symmetric postures). each EMG sensor on the back and legs obtained from MVC trials. Time-series data were converted to the frequency domain to calculate the median frequency of the signal. Each EMG sensor was accompanied by an Inertial Measurement Unit (IMU) sensor. Data from IMU were filtered using a 2 nd-order lowpass digital Butterworth filter with a normalized cutoff frequency of 10 Hz. We calculated mean, standard deviation, and variance of the norm of acceleration from each IMU sensor over each portion of the task. In addition, all features were normalized for the entire condition based on the values for the first task cycle and were added as additional features. All features were calculated for each activity within each task cycle, including standing still at start/end, sustained bending, bending, and retraction (Figure 2). Overall, three separate datasets were prepared with all features representing (a) kinematics (160 features), (b) muscle activity (280), and (c) kinematics and muscle activity (440). Machine learning classification algorithms, namely Support Vector Machine (SVM), Random Forest (RF), and XGBoost (XGB), were applied to detect fatigue level. Figure 3 depicts a flowchart showing the complete procedure of model development. Testing of models varied according to factors of sensors (four sensors placed on low back and leg on each side), measures (muscle activity, kinematics), fatigue region (low back and legs), level and grouping style (binary or tertiary). Obtained fatigue level values in the range of 0 (no fatigue) to 7 (medium-high fatigue) were categorized based on three separate arrangement methods. Specifically, three grouping styles for labelling RPE levels were adopted for binary and tertiary grouping of both back and leg ratings (0-7), as depicted in Table 2. We also utilized three classification algorithms (SVM, RF, XGB), each with three \begin{table}
\begin{tabular}{c c c} \hline \hline
**Type of Measure from Sensor** & **Number of Features** & **List of Features** \\ \hline \multirow{7}{*}{Low Back and Leg Movement (Inertial Sensors)} & \multirow{7}{*}{160} & Mean (MeanEMGMU), maximum (maxEMGMU), minimum (minEMGMU), standard deviation (stdEMGIMU), and variance (varEMGIMU) of the norm of acceleration, change in mean (n\_meanEMGMU), maximum (n\_maxEMGIMU), minimum (n\_minEMGMU), standard deviation (n\_stdEMGIMU), and variance (n\_varEMGIMU) of the norm of acceleration. (for each activity within task cycle from all four sensors) \\ \hline \multirow{7}{*}{Muscle Activity (Electromyography)} & \multirow{7}{*}{280} & Peak amplitude (AmpEMG), mean amplitude (MeanEMG), median frequency (MedianFrequency), standard deviation (stddevRMS), change in peak amplitude (n\_AmpEMG), change in mean amplitude (n\_AmpEMG), change in median frequency (n\_MedianFrequency), change in standard deviation (n\_stddevRMS). (for each activity within task cycle from all four sensors) \\ \hline \hline \end{tabular}
\end{table}