# IoT-Based Patient Movement Monitoring: The Post-Operative Hip Fracture Rehabilitation Model
## 5 IoT System Performance
### Data Collection and Activity Recognition
Another potential reason for these differences could be the variety in the footsteps (shorter or longer steps) taken by subjects while performing such a type of activity. In the case of other activities, i.e., LM, LTU, SLTS, LOB, and LOS, there is a high degree of overlap across the overall range of subjects. However, if we consider the individual subject range, overlap is observed only among some activities. For instance, in the case of male subject 2, LM, SLTS, and LOB overlap with each other and LTU overlaps with LOS. A similar trend is observed where different activities overlap, which varies from subject to subject. Figure 4: Personalized activity recognition comparison of five male subjects vs. overall subject range with respect to \(\text{Cf}_{\text{MA}}\). Figure 3: Personalized activity recognition comparison of five male subjects vs. overall subject range with respect to maximum amplitude. On the other hand, if we take the Cf\({}_{\text{MA}}\) parameter (as can be seen Figure 4) into consideration, the overall subject range similarly has a high degree of overlap with almost all activities--whereas for each individual subject range, some activities overlap partially and others with a high degree. For instance, in the case of the activities of male subject 2, LM, LTU, LOB and LOS overlap with each other to a high degree, but their amplitudes vary, which that makes it easier to classify such types of activities. On the other hand, for male subject 1, only the LTU activity overlaps with LOB. Therefore, based on the comparative activity data analysis and discussion of five male subjects, it is evident that setting a particular threshold range for all the subjects to recognize an activity is not feasible. This is because the activities parameters overlap with a high degree, and it would be difficult to classify one activity from the other. Herein, personalization can play a crucial role. With personalization, the recognition parameters can be adjusted and specified for a particular subject. Based on a personalized approach, activities such as static state, slow walking, and fast walking can be easily recognized with high precision as only the amplitude parameter is considered for classification and very marginal overlap is observed due to the nature of the activity behavior. However, for the other hip movement-related activities, both the amplitude and frequency parameters are considered for recognition and have some degree of overlap between them. This overlap could be avoided to some degree, based on the activity transitional rules implemented on the movement history data for the past one minute as described in the following section. To investigate the significance of personalization over the overall subject range in recognizing a particular activity, the subject was instructed to perform a long-term group-based activity for a period of 3 min (where each activity is conducted for a period of 1 min) and analyzed considering the different scenarios. A sample example of such scenario is illustrated while considering two cases. These are as follows:  
**Case 1:** In case 1, and as presented in Figure 5, the subject was instructed to perform the LTU (1 min), static state (1 min), and swinging leg to a side activities (1 min). This is highlighted in black marker as the activity performed. Results show that based on the personalized approach, as highlighted in purple marker, the LTU activity is 87% accurate, overlapping with LOS by 13%. The static state of a subject is 100% accurate for both personalized and overall subject range as there is no movement from the subject and the axis is oriented in a specific direction. Swinging leg to a side is 74% accurate and an overlap with LM of 26%. In comparison to the overall subject range, which is highlighted with orange marker, it is observed that the LTU activity overlaps with four different activities, i.e., LM, SLTS, LOB, and LOS. However, the same is also observed with the SLTS activity, which overlaps with four different activities, i.e., LTU, SLTS, LOB, and LOS.