## 4 System Implementation and Experimental Results
### Shoulder Joint Abduction-Adduction Exercise  
Before the exercise session, we attach the wearable device to the subject's upper arm. During this exercise session, the subject performs abduction and adduction of the shoulder joint for his right upper limb. The sensor's on-board processor estimates the node's orientation angles \(\phi\), \(\theta\) and \(\psi\). Then, it calculates the shoulder rotation angles \(\theta_{1}\), \(\theta_{2}\), \(\theta_{3}\) based on the procedure described above. The results are presented in Figures 7-9, \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Trajectory** & **MAE [m]** & **MaxError [m]** & **RMSE [m]** \\ \hline \hline \multicolumn{1}{c}{Wrist} & 0.0126 & 0.0509 & 0.0161 \\ End-Effector & 0.0182 & 0.0706 & 0.0229 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Elbow joint’s MAE, maximum and RMSE errors. Figure 6: Wrist and hand trajectories during elbow joint flexion-extension exercise – Comparison with Shimmer3 sensor nodes. accordingly, while the corresponding elbow angles \(\theta_{4}\) and \(\theta_{5}\) are fixed, during this exercise. As it is shown in the aforementioned figures, the shoulder's joint angles, as extracted from both sensor nodes, are almost identical. Therefore, an accurate reconstruction of the upper limb movement can be achieved either using a shimmer sensor node or the proposed custom-made one. Figure 8: Shoulder rotation angle \(\theta_{2}\)—Abduction-Adduction DoF. Figure 7: Shoulder rotation angle \(\theta_{1}\)—Flexion-Extension DoF. The trajectories of the shoulder, the elbow, the wrist and the tip of the hand in \(x\), \(y\), and \(z\) axes are presented in Figure 10. Deviations in the \(y\) axis occur, while the subject's motion took place in the \(x-z\) (sagittal) plane. This was caused because of the not ideal mounting of the node on the subject's upper arm and, thus, a sensor-to-body frame transformation should be defined. Figure 10: Joints trajectories coordinates in \(x\), \(y\), \(z\) axes for shoulder abduction-adduction exercise—Custom-made sensor node. Figure 9: Shoulder rotation angle \(\theta_{3}\)—Internal-External rotation DoF. An issue that might occur during this motion is the gimbal lock problem. This results from the use of the Euler orientation angles \(\phi\), \(\theta\) and \(\psi\) to find, after processing, the position and orientation of the corresponding segment. Actually, the shoulder joint can perform three rotations. When the \(\theta_{2}\) angle rotation comes up to the furthest point, the shoulder joint axes \(z_{0}\) and \(z_{2}\) of the first and third shoulder's DoF, accordingly, are collinear. This is a singular configuration and only the sum \(\theta_{1}+\theta_{3}\) or the difference \(\theta_{1}-\theta_{3}\) can be determined. One solution is to choose the one angle arbitrarily and then determine the other using trigonometric equations. Nevertheless, the range of motion in the present exercise is not affected by the gimbal lock issue. The 3D reconstructed trajectories of each upper limb joint are presented in Figure 11, noted with 'o' symbol, for the case of the custom-made sensor node. A few consecutive repetitions of abduction-adduction exercise are performed, which explains the deviations of the visualized points. The extracted upper limb segments' trajectories for the case of the Shimmer3 unit are also presented in the same figure. As in the comparison of the previous exercise (elbow flexion-extension), the trajectories of the upper limb segments, which are extracted from the Shimmer3 sensor's measurements (noted with light blue, deep purple and deep red color), are more limited than the corresponding ones resulted from the custom-made motion capture sensor node. This results from the minor differences in the calculated shoulder DoFs' ranges between the two sensors nodes. Once again, in this experiment, it was observed that the shoulder angles' ranges were related to the accuracy of the calibration parameters for each sensor.