*3.2. Joint Angle Measurement Considering External Acceleration*

In the presence of an external acceleration, the proposed algorithm's effectiveness was verified by simulating zero-mean white Gaussian noise to the acceleration measurements of all three IMUs. Zero-mean Gaussian noise was used to create external acceleration as IMU noise is best fitted by a Gaussian distribution, and the noise in IMU is white Gaussian in nature [13,47]. Figure 10a shows the sample raw accelerometer data without external noise, and Figure 10b displays the sample raw accelerometer data with external noise, which was contaminated at 20 dB signal-to-noise ratio (SNR) for one wearable IMU.

**Figure 10.** Raw accelerometer data (**a**) without noise and (**b**) with external noise.

In Figure 11, the joint angle is shown, estimated using the proposed algorithm that takes into account the noisy accelerometer data, and compared to the angle obtained using the proposed algorithm with clean accelerometer data. Table 9 displays the root mean square error associated with calculated joint angles when an external acceleration is present. Figure 11 and Table 9 both demonstrate that the suggested algorithm was exceptionally resistant to the effects of acceleration from the environment, as the RMSE was 0.996◦ after the addition of external noise. Moreover, the RMSE value was below the threshold of 5◦, which is considered clinically acceptable [13].

**Figure 11.** Measured angle using proposed algorithm (PA) with and without external noise.

**Table 9.** RMSE (◦) of the joint angle (external noise added).


#### *3.3. Limitations*

In this experiment, the attachment location of the sensors was not precisely regulated, especially the shoulder sensor; nonetheless, while the measurements were being taken, they were aligned approximately in the sagittal plane. The reference sensor may face unwanted motion in real-world scenarios. Thus, this straightforward way of attaching sensors is significant for real-world clinical applications, but to get a high level of measurement accuracy in real-world clinical applications, the sensors themselves need to be precisely positioned, or their positions need to be measured. On the other hand, determining the placements of the sensors to achieve high measurement accuracy with patients may be challenging. In this study, the joint angle measurement error was minimized. However, the motion speed was not detected while the rigid body was in motion. Here, the sensor movement caused by the muscles or tendons was not considered. Moreover, this study only focused on the joint angles in the sagittal plane. However, it is desirable to measure the abduction and adduction angles and internal and external rotation angles. In addition, there is a possibility of challenges in dealing with stroke patients, especially those suffering from upper limb tightening or contracture. Nevertheless, the developed system in this study is thought to have attained a good level of accuracy when practical applications are taken into consideration.
