A Dynamic Joint Angle Measurement Device for an Active Hand Rehabilitation System

Traditional methods of measuring a joint angle are neither repeatable nor accurate and cannot instantly display, record, and upload the data onto a cloud drive. These mechanisms require development if they are to be used to evaluate rehabilitation programs. This pilot study aim is to create a simple dynamic joint angle measurement system and develop a hand rehabilitation application for stroke users using small and sensitive 3-axis accelerometers. Using Bluetooth communication technology, an electrogoniometer is developed to measure the free range of motion of lower limb joints and automatically send and save all data on to a cloud drive. The reliability of the proposed device is evaluated by comparison with a commercial electrogoniometer. Five healthy youth subjects and ﬁve health elderly subjects are involved in the evaluation process for this pilot study. The accuracy and repeatability of the proposed device are tested using Bland–Altman plots and linear correlation analysis. Measurements that were made by the proposed device and a commercial electrogoniometer are shown to be comparable and repeatable, as conﬁrmed by Bland–Atman plots. There is also a very high degree of linear correlation ( R 2 > 0.99 for all joint angle measurements) between the lower limb joint angles that are measured using both devices. In conclusion, a portable, highly accurate and repeatable device was designed to be used for clinical assessment and for rehabilitation application that gives increased motivation to the user.


Introduction
Cerebrovascular disease is now the fourth cause of death worldwide. ere are more than 17 million cases of stroke in the world every year, of which more than 5 million result in death and another 5 million in permanent disability. Although the elderly is at great risk of having a cerebrovascular disease such as stroke, increasing numbers of young people lack a healthy diet and lifestyle and are susceptible to stroke [1][2][3][4].
e first three months is the golden time for rehabilitation, and stroke patients can recover 85% of the ability to walk as well as use muscles and limbs [5]. A normal rehabilitation session lasts about 60 to 90 minutes [6] but is tedious to patients and a waste of medical human resources as one functional therapist can only help one patient at a time.
A joint angle range of motion ruler (ROM ruler) is used widely by therapists to assess the joint mobility of patients, to allow appropriate treatment to prevent injuries. Martinez [7] and other researchers used the ROM ruler to measure the hip joint angle as an indicator of the effectiveness of treatment. Rafael et al. [8] used the ROM scale to measure the knee flexion angle and the mobile phone free ROM application to calculate an accuracy ratio. is ROM ruler is easy to operate and does not require training, but measurement is by another person and is only fairly accurate and is not repeatable.
To dynamically measure a joint angle, biometrics has been used to develop a flexible electronic angle measurement instrument (flexible electrogoniometer, FEG), which uses a strain gauge to measure changes in resistance and converts these into an angle [9]. is FEG has been used in many studies to observe daily wrist activity or measure the reliability of a knee joint statically and dynamically in the sagittal plane, lying, sitting, and standing [10,11]. Even though it is highly accurate and repeatable [10], FEG is very fragile and expensive and requires care handle.
In the past decade, researchers have been using inertial measurement units (IMUs), including accelerometers, gyroscopes, and magnetometers, to measure the human body posture. ese units are small, easily portable, easy to wear on the human body, and cheap and can be combined with microcontrollers to allow extensions such as Bluetooth or Wi-Fi data transmission and data can be uploaded onto cloud platforms. e accelerometer is used to measure tilt, a gyroscope is used to measure fast rotation, and a magnetometer is used to measure the horizontal reference direction. Brodie [12] noted that even in the rest state, the sensor gives incorrect values, due to the requirement that the coordinate axis of the sensor must be aligned with the human body's coordinate axis [13]. If the operator is unfamiliar with the equipment, the error is very large, which affects the result. Some studies even investigate posture corrections to correct errors that are caused by misalignment of sensors [14,15].
is pilot study developed a dynamic joint angle measurement and active hand rehabilitation system (DJAM&HRS) with a three-axis acceleration sensor. Using Bluetooth technology, the device was able to instantly display measurement data in the form of a real-time graph and data can be uploaded onto a cloud platform. For rehabilitation applications, the user can control the sensor to complete specified tasks so they can practice at home. e system was also developed to make it very simple to align the sensors correctly with easy practice.

Subjects.
is pilot study recruited five healthy youth subjects (age: 33 ± 6 years old) and five health elderly subjects (age: 68 ± 7 years old). Before each subject participated in the study, an information sheet had been provided and explained to the subject, and each subject was required to sign a consent form.

Equipment.
Twin-axis flexible electrogoniometer (FEG, Biometrics Ltd, UK) and joint angle range of motion ruler (ROM ruler) were used to evaluate our DJAM&HRS. Figure 1, the system architecture consisted of 3 parts: hardware, microcontroller unit (MCU) firmware, and mobile phone application software. e system architecture can be further subdivided into two modes: (1) joint angle measurement mode and (2) rehabilitation mode.

System Architecture for Joint Angle Measurement
Mode. (1). Hardware. It consisted of one host circuit unit and two sensor circuit units ( Figure 2). As shown in Figures 2(a) and 3(a), the host circuit unit (HCU) includes a lithium battery, an MCU (Arduino Pro Mini), a reset button, a Bluetooth module, a 3.3 V voltage regulator circuit, and a micro USB data transfer device. Although there is no USB and DC power socket, or having smaller pin layout than ordinary Arduino UNO, the performance of the Arduino Pro Mini is similar. e entire system of DJAM&HRS was powered by a 7.4 V battery. e acceleration sensor used at the sensor circuit unit (SCU) is the ADXL345 which is a small, slim, and low-power three-axis accelerometer. e ADXL345 comes with I2C communication interface, and this study uses micro USB cable as the data transmission line.
One of the SCU, named proximal sensor circuit unit (PSCU), was attached to the proximal position of the measured joint (Figures 2(b) and 3(a)), while the other SCU, named distal sensor circuit unit (DSCU), was attached to the distal position of the same measured joint (Figures 2(c) and 3(a)). Each SCU measured the angle of the limb part relative to the ground. e joint angle is calculated by subtracting the angle of the two limbs: where Angle (ROG) represents the angle relative to the ground.
(2). MCU Firmware. e MCU at the host circuit unit (Figure 2(a)) connects two external acceleration sensors (Figures 2(b) and 2(c)) via micro USB cable, and the Bluetooth module. e MCU reads the sensors values, calculates the absolute joint angles, and then transmits the data to the mobile phone application software through Bluetooth communication. e flowchart for the joint angle measurement mode is shown in Figure 4. To minimize the error causes by misalignment of the sensors, when the device has been turned on after being wore, it will gather and set the initial value.
(3). Mobile Phone Application Software. is study used the unkable platform to develop mobile phone application software. unkable is a cross-platform that can be used for both IOS and Android systems.
is mobile phone application software instantly and simultaneously records and displays the sagittal and coronal planes' angle value on the screen and plots the angle over time in a graph. Importantly, it also records and displays the maximum angles of flexion, extension, abduction, and adduction in sagittal and coronal planes, as well as the range of motion in sagittal and coronal planes. Besides, it records the user's name and data and saves the data into a text file on the mobile phone. e user can choose whether to upload the file to a cloud platform. Figure 5 shows the interface for the mobile phone application software for the joint angle measurement mode. e CONNECT button connects the mobile phone application software with the Bluetooth module at the host circuit 2 Journal of Healthcare Engineering unit ( Figure 2(a)). e DISCONNECT button disconnects the connection and clears the data and graphs that are displayed on the screen. e STORE button is used to start recording data and UNSTORE button to stop recording data. e DELETE button is used to delete a text file in which the data are stored, and the SHARE button uploads the text file onto a cloud platform.

System Architecture for Rehabilitation Mode. (1).
Hardware. It consisted of a host circuit unit (Figures 6(a) and 3(b)), which was identical to the host circuit unit being used in joint angle measurement mode, and a sensor circuit unit (Figures 6(b) and 3(b)). Only one acceleration sensor (ADXL345) was needed for this mode to calculate the hand's angle and convert it into the corresponding control of the custom-made mobile phone rehabilitation game.
(2). MCU Firmware. Figure 7 shows the flowchart for the rehabilitation mode. e MCU at the host circuit unit ( Figure 6(a)) connects an acceleration sensor (ADXL345) ( Figure 6(b)) via micro USB cable, and the Bluetooth module (HC-06). e MCU reads the acceleration sensor values and then converts these into corresponding control data for the custom-made mobile phone rehabilitation game. After conversion, the control data are transmitted to the mobile phone application software through Bluetooth communication. e control data can be converted to the range of motion performed by the user.
(3). Mobile Phone Application Software. is study also used the unkable platform to develop two custom-made games for hand rehabilitation using a total of four different hand movements (pronation, supination, flexion, and extension). Each game lasts 20 seconds. e first game Gold Catching (Figure 8(a)) allows the user to practice pronation and supination movements of the hand to produce a movement to the left or right in the game. In the second game Alien Invader (Figure 8(b)), flexion and extension of the wrist is used to move an object upward or downward in the game. Figure 8 shows the interface for the mobile phone application software for the hand rehabilitation mode. e CONNECT, DISCONNECT, STORE, UNSTORE, DELETE, and SHARE buttons have the same function with the mobile phone application software for the joint angle measurement mode which has been mentioned in the previous part.

Evaluation in Simulated Joints.
e ROM ruler was used as a simulated joint, and the FEG is used to evaluate the accuracy and repeatability of DJAM&HRS on measuring angle in sagittal plane and coronal plane. e experimental setup for sagittal plane (x-y plane) angle measurement is shown in Figure 9. For coronal plane (z-y plane) angle measurement, the experimental setup is identical, with only both sensor circuit units being rotated 90°along the vertical axis (i.e., the y-axis) and attached themselves onto the ROM ruler.

Evaluation in Human Joints.
Five healthy volunteer subjects participated in this pilot study, with five being a large enough number of samples for the independent t-test that this pilot study is used for statistic analysis. e FEG is used to evaluate the accuracy and repeatability of DJAM&HRS on measuring human joint angle in sagittal plane and coronal plane. DJAM&HRS and FEG are positioned onto the subject as shown in Figure 10. In this study, because movements of the knee and elbow flexion in sagittal plane, and the hip and shoulder abduction in coronal plane are similar, we use knee flexion as an example to evaluate DJAM&HRS for sagittal joint angle measurement ( Figure 10)(a), and hip abduction to evaluate DJAM&HRS for coronal joint angle measurement ( Figure 10)(b).

Statistic Analysis.
To determine whether there are significant differences or consistency between two measurement methods, this pilot study used a Bland-Altman Plot and an independent t-test. Intraclass correlation coefficient (ICC) was used to determine the reliability of all measurements. All data are analyzed in SPSS version 24 (SPSS Inc., Chicago, Illinois, USA).   Table 1 shows the results of the accuracy and repeatability of DJAM&HRS on measuring angle in sagittal and coronal planes of the simulated joints with the number of repetitions is 3 (n � 3), and measurements were performed in the same day. In sagittal plane measurement, the maximum difference between DJAM&HRS and FEG is ±3 degrees, and the maximum error is ±5.0% for flexion and extension of 20°, but the difference between the angles is only 1 degree. e error is large when the denominator for the small angle is small. e standard error for DJAM&HRS is less than ±5 degrees, which demonstrates good repeatability. Moreover, there is no significant difference (p value � 0.968) between the angles measured by DJAM&HRS and FEG in sagittal plane. In coronal plane measurement, the maximum difference between DJAM&HRS and FEG is ±5 degrees, and the maximum error is ±10.0% for adduction of 40°, but the difference between the angles is only 4 degree. e standard error for DJAM&HRS is less than ±2 degrees, which demonstrates good repeatability. Moreover, there is no significant difference (p value � 0.928) between the angles measured by DJAM&HRS and FEG in coronal plane. Figure 11 shows the linear relationship between the angle measured by FEG and DJAM&HRS in sagittal and coronal planes of the simulated joints. In sagittal plane measurement (Figure 11(a)), there is an excellent linear relationship (R 2 � 0.9997) between the angle measured by FEG and DJAM&HRS. Although there is some error, the standard error is minimal. When DJAM&HRS is at 0°degrees, there is an error of -0.8133 degrees compared to FEG. In coronal plane measurement (Figure 11(b)), an excellent linear relationship (R 2 � 0.9996) is found between the angle measured by FEG and DJAM&HRS. When DJAM&HRS is at 0 degrees, there is an error of +2.103 degrees compared to FEG. Figure 12 shows the Bland-Altman plot of the angle measured by FEG and DJAM&HRS in sagittal and coronal planes of the simulated joints. In sagittal plane measurement (Figure 12(a)), the results show that most of the measured data are within ±2 standard deviations and are close to the mean difference. Although 3 exceed ±2 standard deviations, these 3 data points are around 4-5°apart. In coronal plane measurement (Figure 12(b)), the results show that all of the measured data are within ±2 standard deviations and are close to the mean difference. Figure 13 shows the linear relationship between the joint angle measured by FEG and DJAM&HRS in sagittal and coronal planes of human joints. In sagittal plane measurement (Figure 13(a)), using knee flexion as an example, there is an excellent linear relationship (R 2 � 0.9997) between the angle measured by FEG and DJAM&HRS. ere is some error, but the standard error is minimal. When DJAM&HRS is at 0 degrees, there is an error of -0.8133 degrees compared to FEG. Moreover,   (b) Figure 6: Schematic diagram of the (a) host and (b) sensor circuit units being used in the rehabilitation mode. is host circuit unit is identical to the host circuit unit being used in joint angle measurement mode (i.e., Figure 2(a)).

Start End
Read sensor triaxial acceleration value Convert acceleration to corresponding control data Bluetooth transmits data to mobile phone application so ware  independent t-test shows there is no significant difference (p value � 0.998) between the angles measured by DJAM&HRS and FEG in sagittal plane. In coronal plane measurement (Figure 13(b)), using hip abduction as an example, an excellent linear relationship (R 2 � 0.9997) is found between the angle measured by FEG and DJAM&HRS. When DJAM&HRS is at 0 degrees, there is an error of -0.8133 degrees compared to FEG. Furthermore, there is no significant difference (independent t-test; p value � 0.967) between the angles measured by DJAM&HRS and FEG in coronal plane. Figure 14 shows the Bland-Altman plot of the joint angle measured by FEG and DJAM&HRS in sagittal and coronal planes of 5 healthy subjects. In sagittal plane measurement (Figure 14(a)), using knee flexion as an example, the results show that almost all of the measured data are within ±2 standard deviations and are close to the mean difference. Although 1 exceeds ±2 standard deviations, this 1 data point is around 4 degrees apart.
In coronal plane measurement (Figure 14(b)), using hip abduction as an example, the results show that most of the measured data are close to the mean difference and are within ±2 standard deviations, with only 2 data points (about 3 degrees difference) exceeding ±2 standard deviations.
ICC (1, 1) test shows that DJAM&HRS has good reliability on human joint angle measurements in sagittal and coronal planes with the ICC values of 0.999 and 0.990, respectively. Results also show that DJAM&HRS has good repeatability on human joint angle measurements in sagittal and coronal planes with the averaged relative standard deviation of 2% and 4%, respectively.

Rehabilitation
Mode. Five healthy volunteer youth subjects and another five health volunteer elderly subjects have been invited to play the game. Each subject played each game for 3 times. Results show that there is significant difference (p value<0.0001p value < 0.001 for both games) between the points getting from the 2 games by youth and elderly groups ( Table 2). is may be due to the young group's response time and joint range of motion better than the elderly group. According to subjects' feedbacks, these games are fun and easy to play. erefore, the user has an enjoyable means of practicing hand movements during hand and wrist rehabilitation.

Summary.
is pilot study produces a portable, low-cost dynamic joint angle measurement and active hand rehabilitation system that uses a mobile phone screen to instantly display the joint angle and the angle over time in a plot. e user can choose whether to store and upload data to the cloud platform. e accuracy of this system is comparable to commercial FEG. e dynamic joint angle measurement can be used not only for lower limbs, but also for upper limbs. e rehabilitation mode uses an amusing game to motivate users to preform hand and wrist rehabilitation. With a smart phone, the system can be connected and used easily.

Conclusion
DJAM&HRS has been successfully developed, and the accuracy is comparable to commercial FEG. is pilot study uses a mobile device to develop a dynamic system to measure joint angle that can be used for an active hand rehabilitation system. is increases the willingness of users to engage in rehabilitation exercises. Users can practice while playing games and can use this device to measure dynamic joint angles. e measurements are an indicator for physicians and therapists to allow them to assign appropriate rehabilitation treatments and to evaluate the effectiveness of those rehabilitation treatments.
DJAM&HRS is cheap and can be widely used. It is light and convenient to carry and is eminently suited to users in remote areas. It addresses the problem of boat fatigue and immediately records data to clearly demonstrate joint activity and the effect of rehabilitation. Data can be uploaded to a cloud platform. Physicians and therapists can track the progress and effectiveness of rehabilitation for a long period time and allows home-based, efficient, and interesting rehabilitation.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.

Authors' Contributions
Yi-Tai Chen, Tzong Shiun Li, and ien Luan Phan equally contributed to this work as the first author.