## 2 Materials and Methods
### Verification Experiments  
The designed system was proven by two types of verification tests. The first type is to control a stepper motor to rotate the designed IMU and to compare the rotation angle obtained from the IMU with the rotation angle of the controlled stepper motor. As shown in Figure 9, the nine-axis sensor was fixed above the center axle of a stepper motor before the experiment was conducted. The experiment used a microcontroller to output the control signal to the drive circuit of the motor, which drove the nine-axis sensor to rotate forwards from 0 to 270 degrees with an increment of 18 degrees and then backward from 270 back to 0 degrees with a decrement of 18 degrees (\(0^{\circ}\leq\theta_{motor}\leq 270^{\circ}\)). For every 18 degrees of motor rotation (\(\Delta\theta_{motor}=18^{\circ}\)), the microcontroller records the quaternion \(q\) of the nine-axis sensor. Equations (15) and (16) are used to derive the angle value \(\theta\) of the current nine-axis sensor rotation along the central axel \(u\) of the motor (the \(z\)-axis of the nine-axis sensor is parallel to \(u\)). The angle of rotation of the stepper motor \(\theta_{motor}\) was used as the control group, and the angle value measured by the nine-axis sensor \(\theta_{imu}\) was used as the experimental group. The mean absolute error was calculated between the two sets of samples. \[q=\left[ \begin{matrix}a,\overrightarrow{b}\end{matrix} \right]=\left[\cos \left(\frac{\theta}{2}\right),\sin\left(\frac{\theta}{2}\right)\mathrm{u}\right] \tag{15}\]  
\[\frac{\theta}{2}=\cos^{-1}(a)\Rightarrow\theta=2\cos^{-1}(a)^{\circ} \tag{16}\] \begin{table}
\begin{tabular}{l l l} \hline \hline
**Prescription Variables** & **Source/Equation** & \\ \hline weight load \(\mathrm{m}_{load}\)(kg) & data input from App & \\ \hline repetitions \(N_{reps}\)(times) & data from repetition event & \\ \hline training capacity \(V_{tra}\)(kg) & \(V_{tra}=\mathrm{m}_{load}\times N_{reps}\) & (12) \\ \hline work \(W_{rep}\)(J) & \(W_{rep}=\mathrm{m}_{load}\)gh & (13) \\ \hline average power \(P_{rep}\)(W) & \(P_{rep}=W_{rep}/\mathrm{D}_{rep}\) & (14) \\ \hline explosive \(P_{max}\)(W) & the maximum \(P_{rep}\) of a set & \\ \hline rest time between sets (s) & duration from previous set to current set & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: List of exercise prescription variables. Figure 9: Experimental environment set-up—front (**left**, IMU is shown) and back (**right**, stepping motor & drive circuit is shown) of the acrylic panel. The second type of verification test is to use a camera with an open source optical human body pose estimation system, Mediapipe Pose [23], to calculate the position of the wrist and the angles of upper arm and forearm between the \(Z\)-axis, and these calculated data are compared with the designed system. This is to verify the reliability of the motion tracking algorithm. MediaPipe Pose is a machine learning-based human pose tracking algorithm that can identify and mark 33 human body feature points from RGB images of the whole body, as shown in Figure 10. An experimental environment where a camera is placed facing a wall with a white board was setup. We connected a camera to the computer, ran the Python script in Anaconda environment, captured the RGB image of the human body through the camera; input the image to the Python API provided by MediaPipe Pose to find the left shoulder, left elbow, and left wrist coordinates of the human body (\(p_{shoulder}\), \(p_{elbow}\), and \(p_{wrist}\) in Figure 10 [4] at locations 11, 13, and 15); and mark these coordinates on the original image. In the M system (MediaPipe Pose estimation system), a rectangular coordinate system is defined and the positions of each feature in the image are denoted as \(f_{features}\), and the left shoulder, elbow, and wrist are denoted as \(f_{shoulder}\), \(f_{elbow}\), and \(f_{wrist}\), respectively.