Physiotherapy: Design and Implementation of a Wearable Sleeve using IMU Sensor and VR to Measure Elbow Range of Motion

Range of motion (RoM) is the measurement of angular movement of joints that defines the joints flexibility. It is crucial to measure RoM while performing musculo-skeletal diagnostics. The physiotherapy and the visits to hospitals can be very costly and demands a great deal of time; also most of the current digital instruments, used to measure RoM, are very expensive and hard to use. In this paper a digital wearable sleeve device is designed and tested which is cheap, time efficient and easy to use. The designed device is tested to be within 95 % agreement with Universal Goniometer (UG) when tested using Bland Altman Plots. Patients can take their measurements on their own and visualize results on their desktops or mobile phones. Patients also have graphical feedback, highlighting the extent of variation between their exercise performance and standard exercise. In addition to this; patients can also compare their current exercise from previous exercise using KalmogorovSimronov (K-S) test automatically. To make exercising more fun, we have developed 3D VR (Virtual Reality) gaming environment for elbow flexion, elbow supination and pronation and elbow extension exercises where patient can exercise in an interactive environment and visualize their progress side by side. Keywords—Range of Motion (RoM); physiotherapy; Inertial Measurement Unit (IMU); Virtual Reality (VR)


I. INTRODUCTION
Range of motion (RoM) is the measurement of angular movement of joints that defines the joints flexibility. These joint ranges of motion measurements are used to assess the patient's progress and to determine impairment ratings, when a patient is unable to return to his or her prior level of function. RoM measurement using manual methods is a timeconsuming process [1]. Patients recovering from joint fractures and dislocations need to constantly visit physiotherapist and they need to maintain a regular exercise schedule. This can be very costly and demands a great deal of time also the current digital instruments, used to measure RoM, are very expensive and hard to use [2]. This paper discusses the design of a wearable digital device that measures RoM along with a user interface which helps patient exercise and monitors their progress in an easy and convenient manner without having to visit hospitals on regular basis. Patients can visualize their progress/results in graphical format. These graphs are created by statistically analyzing and comparing standard exercise and current exercise using Kalmogorov-Simronov (K-S) test. K-S test is a very efficient method to determine if two data sets are significantly different from each other. Through a virtual reality application this system will provide patient an interactive environment to perform exercise; this will also isolate them from external disturbance. This is a complete system, through which patients will be able to perform physiotherapy at home without needing regular assistance from doctors. Compared to existing digital devices [3,4] this system is cheaper and easy to use. The software applications instruct patients on how to perform exercises and display results on run time, making the system more user friendly than other ( purely hardware based) digital devices. This device will contribute to the health sector in a way that people would not need to ignore their physical health due to lack of time or money. It will also increase productivity of doctors and hospitals that will be able to give time to more patients as they would not need to perform complicated measurements manually.
The paper is organized as follows. Section 2 discusses the relevant work done in the field. Section 3 discusses the design of the digital sleeve, the experimental setup, and hardware and software implementation methodologies for the exercises of interest. Section 4 elaborates the results and discusses their analysis whereas Section 5 concludes the paper.

II. RELATED WORKS
Visual estimation of RoM is the most preferred and commonly used method because of time constraints in occupational medical practice. This method can be used for all joints, and no additional equipment is needed but this method cannot be relied on to provide precise angular values and may give ambiguous results when assessor changes angle while visualizing RoM. Universal Goniometer (UG) is the most widely used device, to measure joints range of motion. It offers high accuracy, reliability in both inter-rater and intrarater rehabilitation. It is, cheap, portable and noninvasive. But this instrument needs trained experts for evaluation. It is difficult to accurately position and requires clear visual estimation. In comparison to these manual methods digital photography provides slightly better accuracy, printable and savable records and ability to perform offsite measurement [1]. In this method accuracy is highly dependent on motion capture analysis and the whole camera setup is quite complex to arrange.
Laboratory based motion capture equipments are time consuming and costly thus they cannot be used for everyday www.ijacsa.thesai.org tasks. An easy to handle wearable device is a better alternative for day to day monitoring of joint RoM [5]. According to [6] most examiners adopt neutral-zero method while measuring RoM where the patient moves the distal segment away from a fixed starting position, around a certain axis of rotation.
Digital instruments provide a more objective and scientific assessment of patient's condition [7] but in order to be used in occupational practice these instruments must be easy to use and fast in application. A digital goniometer (Electrogoniometer) is an instrument which is similar to the electro potentiometer. It can also be used to measure joint range of motion, such that a change in joint position lead to the change in the resistance of the potentiometer and after some rectifications and calibrations, this resistance can be read as joint angle, the precision of electro goniometer is better than universal goniometer, but this precision depends upon the operator's ability to consistently place landmarks. This instrument is mostly used for clinical research. HALO [8] is another digital device which measures joint ROM. It is laserguided digital goniometer. HALO uses lasers, magnetic system and accelerometer to guide alignment with anatomical landmarks. It has a digital display with memory feature. It is easy to handle but whenever, HALO is displaced off the horizontal plane the altered position of measuring system intermittently creates marked measurement errors, necessitating recurrent measurements.
Compared to these handheld instruments RoM measurement taken using Kinect are not tester dependent, thus Kinect provides better precision but, according to [9], Kinect cannot evaluate scapular motion and it cannot be used to measure neck and feet RoM.
The Inertial Measurement unit (IMU sensor) [10] contains an accelerometer, gyroscope, and magnetometer to calculate relative orientation in 3 dimensional space. IMU has already been used for RoM measurement of multiple joints in laboratory settings at the knee [11], cervical spine [12,13] or shoulder. Although IMU provides high accuracy for continuous orientation estimation under ideal conditions, the presence of magnetometer may introduce orientation noise in sensor when placed in vicinity of ferromagnetic materials [14]. To eliminate this noise wooden chair, tables and couches were arranged [15]. These limitations are hard to avoid in occupational physiotherapy clinics however according to [16] considerable field accuracy has been achieved. The gyroscope component on the IMU tends to severely drift over time without the use of filtering or other navigation systems reference [17].
There is no rigid connection between IMU and human limb which may introduce soft tissue artifacts. In order to covert IMU orientation to anatomical angle the sensor requires anatomical calibration. To eliminate gyroscopic drift and to provide anatomical calibration a gradient descent algorithm can be used for IMU estimation [18]. The magnetometer and accelerometer data is used to estimate and compensate gyroscope error using quaternion representation of Euler's angles. This algorithm is designed for wearable inertial human motion tracking system in rehabilitation applications. The algorithm has same level of accuracy as Kalman filter with static RMS error <0.8° and dynamic RMS error <1.7°.
In addition to these measurement techniques augmented reality is being frequently used in physiotherapy to provide patients an interactive virtual game-like environment in order to motivate them to exercise regularly. In [19] bio sensors along with Virtual Reality (VR) application and Kinect are used to provide Parkinson disease (PD) patient with an isolated rehabilitation environment to exercise while continuously monitoring their vital using biosensors.
This study discusses the design and implementation of a wearable digital device which is more time efficient than other manual devices and cheaper than other digital devices because it uses only one IMU sensor. This wearable device can be wirelessly connected to software applications which provide not only provide 3D visualization of arm movement but also provide analysis of patient performance and gives result on their improvement. Unlike other studies where VR application is used along with expensive hardware (like Kinect), this study uses Processing software to create a VR application which can be easily connected to the wearable device.

A. Sleeve Design
In this study RoM measurements of elbow joint were taken using the digital wearable device. An IMU (Micro-processer Unit (MPU) 6050) sensor was sewn in a stretchable band as shown in Fig. 1. This band was worn over the distal segment (forearm in this case). The program was burned in node Microcontroller Unit (MCU) (ESP8266) module sewn in a band which was wrapped around the upper arm using Velcro strips, the subjects' angular motion was displayed on a small Organic Light-Emitting Diode (OLED) screen sewn adjacent to node MCU. As done in conventional examination, the subject started in a joint specific neutral starting-position and moved the adjacent, distal segment (forearm) to the end of range of motion, and the angle starting from stationary position to the fully extended distal segment was measured by both the UG and digital wearable device. Difference between the starting and current orientation of one IMU at the distal joint segment provided the angular measurement for IMU. The minimum and maximum angular values were noted and stored. The IMU was sewn in wearable band so examiner did not need to concern with manual handling of device.

B. Study Design
In this study we have evaluated the validity, reliability and objectivity of this system by adopting the procedure in [20] but instead of adopting the visual estimation as comparison standard we have used UG for comparison. The validity is evaluated by comparing the measurement results to RoM measured using goniometer. The reliability is evaluated by analyzing repeatability under constant conditions. The objectivity is evaluated by analyzing the intra-rater agreements of measurements and examiner ratings.
Five subjects with age ranging from 23-80 years, weight 55-75 kg, and height 183-170cm volunteered to participate in the study. They gave their written consent to volunteer for this research study. Two of these volunteers were males and three were females. The subjects recruited were healthy without any known functional deficit. Functional deficit could occur due to a joint disease or recent joint injury. In order to ensure that subjects did not suffer from any musculo-skeletal complaints we checked patient's medical history of one month prior to examination. The joint examination using UG and the designed digital ROM measurement system was conducted by a physiotherapist. Examination rooms with a couch, digital wearable device and a laptop was provided to examiner. Fig. 2(a) shows how the stretchable band containing IMU was worn on forearm approximately one inch away from elbow joint for extension and flexion measurement. Fig. 2(b) shows position of band for supination and pronation measurement; the band was worn on forearm, one inch away from the wrist joint. Node MCU was connected to sensor. The examiner helped the patient in getting equipped. It took approximately one minute for subjects to get equipped and the removal took approximately thirty seconds. In order to avoid warming up or training effects each subject practiced the exercises three times. After warming up, each RoM measurement was repeated 5 times. The examiner measured RoM using UG while the IMU measured data simultaneously. All RoMs of elbow joint were examined actively and passively. For UG, measurement, the flexion and extension RoM were measured with shoulder in 90 degree forward flexion and forearm in maximum supination. The acromion and radial styloid process were landmarks for the goniometers' arms and the lateral epicondyle as the center of rotation. Supination and pronation were measured with a neutral position of the shoulder (0 degree shoulder abduction) and 90 degree of elbow flexion and a pencil placed over the distal palmar groove of the hand. The center of rotation for pronation and supination was over the head of the third metacarpal and the goniometers' arms were placed parallel to the humeral midline and parallel to the pencil. To achieve uniformity in participant's physical state all measurements of each participant were conducted in one day consecutively.

D. Hardware
An IMU (MPU 6050) is used to measure angular data. The evaluation of sensor data was done using gradient descent algorithm which was implemented using arduino Integrated Development Environment (IDE). An ESP8266 module serves as controller and wifi module. The device was wirelessly connected to processing three desktop applications, through which each subject's data for all exercises was automatically stored in Microsoft excel. The IMU was further calibrated by comparing anatomical angular readings against a geometric protector and recording change in IMU readings per 10 degrees. Then a simplified sensor change per degree algorithm was programmed in Node MCU and applied to sensor. IMU roll data was used for extension and flexion measurement while pitch data was used for supination and pronation assessment. A 0.96 inch programmable OLED display is used to display evaluated and calibrated RoM readings.

E. Software
The arm movement can be visualized in Desktop, Mobile and VR application. The application is created using Processing 3 software. Fig. 3 shows few fundamental exercises for elbow physiotherapy. The software application designed provides game environments for these fundamental exercises of elbow extension, flexion, supination and pronation. Fig. 4 shows 3D objects, being visualized in user interfaces which are created using Blender 3D. These 3D objects mimic user's arm movement in applications. Objects for forearm and upper arm are created separately because rotation is applied to the forearm object in Processing while the upper arm remains stationary.
Whenever user moves his arm, score is incremented; speed and time taken are also calculated. The arm under -instructional exercise‖ in Fig. 5 is used to instruct user on how to perform exercise. When user clicks the -Record data‖ button the exercise data is recorded in an excel file. If user wants to visualize recorded exercise, they can enter the name of exercise, click -load the excel file‖ and click -play recorded‖. User can switch between exercises by clicking -Exercise 1‖,‖ Exercise 2‖ or -Exercise 3‖. 448 | P a g e www.ijacsa.thesai.org 1) Game1: Fig. 5 shows how Elbow flexion exercise is designed as a game 1, when the user moves the arm holding a dumbbell (or any weight in reality) from 130 degrees to 0 degrees the score is incremented. When the arm reaches 0 degrees a timer starts which counts to 30 seconds. When user completes this exercise five times the level is incremented.
2) Game 2: Elbow supination and pronation exercise is designed as game 2 as shown in Fig. 6, when user moves the arm holding drumstick (or any weight in reality) from 0 degrees to 90 or -90 degrees the score is incremented. When the arm reaches 90 or -90 degrees the drumstick strikes the drum which changes color on every strike. When user completes this exercise five times the level is incremented.
3) Game 3: Fig. 7 shows how elbow extension exercise is designed as game 3, when user moves the arm holding box from 0 degrees to 140 degrees, while collecting the coins in box, the score is incremented. When user completes this exercise five times the level is incremented.
All these games can be played in VR mode in a separate VR application as shown in Fig. 8. (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 9, 2020 449 | P a g e www.ijacsa.thesai.org  (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 9, 2020 450 | P a g e www.ijacsa.thesai.org  (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 9, 2020 451 | P a g e www.ijacsa.thesai.org

A. Data Analysis
The IMU readings were compared with UG measurements. The data was stored in Microsoft excel. The validity of elbow RoM measurement using device was evaluated by comparing the UG and device measurement with standard elbow RoM values of healthy adult. For intra-rater reliability evaluation, under uniform condition, the mean standard deviation between five repetitions was considered. Table I shows the mean of elbow RoM values of all subjects as measured by the device and UG. Elbow extension, flexion and supination RoM values measured by UG and device lie in the range of expected RoM values of healthy adults but the measured RoM values of elbow pronation (66 degrees to 76 degrees) were below the expectations (90 degrees), the gonimeter measurements were more close to the expected mark.

1) Validity of measurement:
2) Intra-rater repeatability: The mean Standard Deviation (SD) between five repetitive measurements is given in Table  II. The mean SD in device measurements for active RoM ranges from 1.35 degrees to 6.3 degrees and 1.1 degrees to 6 degrees for passive RoM measurement. This is approximately equal to the mean SD range of UG measurement 0.7 degrees to 6 degrees (for active RoM) and 1.1 degrees to 6.4 degrees (for passive RoM). But considering the whole range of measurements the device has higher SD as compared to UG.
3) Agreement between UG and wearable device: The agreement between validity and repeatibility of both tools can be further be analysed using Bland Altman plot. The Bland Altman plot is used to assess agreement between two sets of measurements. Difference between measurements is plotted on y-axis while average of measurements is plotted on x-axis. Fig. 9 and Fig. 10 show Bland Altman plot for agreement between UG and the wearable device. The cental Bias line indicate the average difference between measurement and if the differences lie between Upper Limit of Agreement (LOA) and Lower Limit of Agreement then both measurement tools agree with each other, which means they can be used interchangeably with 95% probablity of providing similar readings. The deviation between these from central bias indicates presence of systemetic and random errors. These errors do not occur due to the measurement tools but they occur due to limitations of measurement procedure and human error. Any deviation outside the Upper and Lower LOA indicate lack of agreement between devices (less than 95% probabilty of similar readings) for that particular measurement.

4) Testing on patient:
The purpose of this system is to make physiotherapy easy, so people who do not have any technical knowledge of physiotherapy can perform physiotherapeutic exercises in their homes while keeping a check on their performance. To help a common man figure out how well they performed, the current performance of patient is statistically compared against standard exercise data set (stored in application) using K-S test. Graph of both the standard and current data are plotted using cumulative frequency formula which relies on how many times a particular reading appears in data set. The frequency of appearance of these readings is added and plotted on y-axis while ROM readings are plotted on x-axis as shown in Fig. 11. The green curve represents standard performance while the blue curve represents patient's performance User just needs to click the -Compare Data‖ button (shown in Fig. 5) to make these comparisons. Whenever the button is clicked the software application provides a summary of patient's performance in comparision to their previous performance as shown in Fig. 12 nd 13.

C. Discussion
The purpose of this study was to discuss the design and implementation of a digital wearable sleeve which can be used as a physiotherapeutic aid for doctors as well as patients who want to perform physiotherapeutic exercises from home. To www.ijacsa.thesai.org judge the accuracy and precision of device measurement, these measurements are compared with measurements taken using Universal Goniometer (UG). The accuracy and repeatability of measurement tool were found to be acceptable.

1) Validity:
The accuracy of device is judged by comparing the mean of all device measurements for each elbow joint RoM with mean of all UG's measurements and with RoM values for healthy adults. The device gave valid joint angle measurement for all cases except elbow pronation where the device gives error of approximately +-10 degrees because, when supination and pronation RoM is measured, the strechable band containing IMU is worn close to wrist. Some of the subjects had thin arms which may have caused displacement of sensor during readings thus introducing error in measurements.
2) Inter-rater repeatibility: The precision of device measurements for reptitive readings is jugded through performing immediate repititive measurements of each patient. It is necessary to maintain uniformity while taking consecutive measurements so the measurements do not deviate due to change in measurement procedure and deviations due to device limitations can be properly analysed. We tried to maintain uniformity by starting arm movement from horizantal position (neutral zero position) and keeping the rate of arm movement approximately constant for all readings. The SD between repititve measurements of each patient is calculated. The extent of precision between measurements is given by mean SD for all readings. The less the deviation the better the repeatibilty of device. The device shows good repeatibility for all measurement. The SD decviation for supination and pronation is higher than average but compared to UG's SD for those readings, it is acceptable.
3) Agreement between UG and wearable device: According to the Bland Altman plots shown in Fig. 9 and Fig. 10 the wearable device and UG can be used interchangeably and 95% of times they will give similar reading. Except for one measurement that lies below the lower LOA. This reading indicates that if device is used in place of UG for pronation measurent then the probablity that it will give similar readings is less than 95%.

4) Testing on patient:
We tested this device on a 27 year old female patient who suffered from elbow hemarthrosis. Initially she couldnt move her arm at all (which happens in hemarthrosis) so RoM for flexion and extention is 0 degree. After two weeks of injury, a phsiotherapist prescribed patient to perform elbow flexion and extension exercises. According to the patient the device motivated her immensely to perform exercises regularly due to its game-like features and the graphical comparisons helped her keep a check on her performance without needing to contact a physiotherapist on regular basis. The patient was able flex their albow upto 120 degrees within 2 weeks of exercising.

V. CONCLUSION
This wearable sleeve is a cheap, easy to use device which can be used in both clinical RoM measurements and for performing regular physiotherapeutic exercise. The device along with software application helps patient to maintain a regular exercise schedule. Compared to UG the accuracy and precision of device are good enough for performing clinical measurements. In future, the device could be further modified to cover wrist, hip, knee, shoulder, neck, spinal and feet joint. In addition to RoM measurement the features of device can be further extended to include muscle contraction measurements and muscle testing under load. By incorporating EMG (Electromyography) sensors in device, it can be used for detecting muscle pain. The software applications can be further extended to cover muscular pain reduction exercises in addition to joint movement exercises.
There are few limitations in this study. First, only the elbow joint RoM was considered so no definite conclusion can be drawn about device performance for other joints. A second limitation is that the agreement between active and passive measurements relies highly on examiner so it is hard to draw a direct comparison, between active and passive measurements, which depends on device and not the examiner. Finally, .the placement of IMU was also an issue. IMU was sewn in a stretchable band and depending on varying thickness of each patient's arm, it was hard to maintain a uniform position of sensor placement for all patients.