Foot Motion Measurement for Home based Rehabilitation Using Distributed Wearable Sensor

This paper presents a wearable sensors based foot motion measurement method for rehabilitation applications. Two commercial wearable sensors were adopted with three measurement units fixed on feet. Quaternions were employed to represent three-dimensional orientation and a proportionalintegral-filter (PIF) algorithm was used to calculate the quaternion derivative. Foot position and orientation were estimated and the effectiveness of the proposed method was validated on healthy subjects. Experimental results demonstrated that the proposed method is capable of providing consistent tracking of human foot without significant drift, with less than 0.5% position error, which matches that of Kalman based methods. The aim of this work is to allow therapists to make use of the biofeedback information to create biofeedback rehabilitation protocols, which can be used to monitor and evaluate rehabilitation progresses by the performance of patients doing prescribe corrective body movement and gesture. Moreover, this method could be applied to other cyclical activity monitoring.


INTRODUCTION
Human gait is human behavior characteristics of lower foot coordination in the process of walking, involving personal exercise habits, health, gender, age, occupation and other factors, human gait detection is of great significance in many fields, for instance, in the domain of telemedicine, portable gait analysis equipment can reduce the need of long time monitoring by nursing staff.With regard to personal navigation, the pedestrian locomotion trajectory information can be achieved based on the calculation of wearable sensors in the absence of the position of the GPS system.The most important function of gait analysis tend to be medical rehabilitation application, gait analysis offers an easy manner to evaluate recovery process of human feet.In the past, the nurse in the hospital might collect the patient's vital signs data artificially three times per day, including body temperature, blood pressure and heart rate, etc.In the digital era of big data, we can collect much more physiological data per minute.More physiological data and details offer a better way to evaluate rehabilitation process, thereby to determine the following treatment priority accurately.According to the statistics of National Health Service (NHS), stroke occurs approximately 152,000 times a year in the UK and it is the third single largest cause of death.The damage caused by a stroke can be widespread and long lasting.Most patients suffer from foot movement disorder and need to have a long period of rehabilitation before they can recover their former independence.Fortunately sequela can be significantly alleviated by formal rehabilitation training, and reducing the need for therapy at hospital might lead to an optimal solution for therapy efficiency and expense issues.In literature, great interest has been drawn toward the development of home based rehabilitation schemes [1] [2].Bamberg et al. [3] developed a smart shoe for gait analysis using force sensitive resistors and IMU sensors.Sabatini [4] and Wang et al. [5] adopted wearable inertial sensor in walking distance calculation and walking pattern classification.
In this study, we use the inertial measurement unit in combination with wireless sensor networks (2.4GHz) and Ethernet network to set up a set of gait analysis system, the system directly measured the acceleration, angular velocity change and earth magnetic field in the process of walking.According to the characters of human movement, the raw sensor signals are filtered by both high pass and low pass filter to eliminate signal noise, filtered sensor data is then transmitted to a handheld device through the 2.4GHz wireless network and eventually delivered to PC by network cable.In the upper machine, the application software process the sensor data using the proposed gait analysis algorithm including digital filtering, threshold detection, sensor data fusion so as to obtain gait parameters, i.e. walking velocity, stride length, stride frequency, walking cycle and foot angle.An improved zero velocity update (ZUPT) algorithm [6][7] is used to eliminate the integral error step by step, make it suitable for different experimental scenarios.
The rest of this paper is organized as follows: Section 2 describes the components of the system and the algorithms used to estimate the gait parameters during walking; Experimental results are given in Section 3; the potential applications of gait analysis are discussed in Section 4 and Section 5 concludes the paper.

SYSTEM OVERVIEW AND ALGORITHMS 2.1 Hardware Platform
The hardware platform of the measurement system is composed of two inertial sensor measurement nodes and a handheld device as shown in Fig. 1.The sensor chips in measurement nodes are ADIS16448 (Analog Devices), including a tri-axial accelerometer, tri-axial gyroscope, and tri-axial magnetometer each.The sensor performance specification is summarized in TABLE 1.The handheld device contains an ARM microprocessor and a 16Mega bit flash.Each sensor node is powered by 2000mAh lithium polymer battery, which enables the sensor node work more than 10 hours.The function of the handheld controller is data collection control and data transmission.The handheld controller is connected to computer via network cable and the communication between the handheld controller and inertial measurement nodes is 2.4GHz wireless.We chose cable to transmit data at the final step because we wanted to minimize the data loss.The sampling rate of the data collection system is 400Hz and the collected data are processed offline using MATLAB 2010a.The commercial (accurate, lightweight and non-invasive) sensor platforms like Shimmer, Xsens or X-IO IMU were not adopted by the authors because of the limited adjustability and the relatively lower sensitivity, which is not high enough to achieve high accuracy positioning.Meanwhile, the expandability of commercial sensor platforms is a challenge.

Algorithm Steps of Proportional-integralfilter
The specific algorithm steps of Proportional-integral-filter (PIF) proposed in this paper are as follows： Step one, updating attitude estimation equation R ˆ Step two: Calculated bias correction b ˆ Step three: calculate the deviations between y Step four: let the error as the controller input, get the correction vector of rotating angular velocity  e Step five: Calculate the revised angular velocity vector Step six: attitude updating based on quaternion   T q q q q q  (10) where y  represents the skew symmetric matrix, b is constant bias, P k and I k are proportionality coefficient and integral coefficient of PI filter parameters, respectively;  is measured value of gyroscope; Initial quaternion estimation 0 q can be obtained according to the accelerometer, and then a correction can be built through comparison with the relatively accurate attitude estimate q ˆ using the deviation between the two estimations.The correction is then used as an input variable of PI controller.Eventually, the output of PI controller is selected as a corrected value of gyroscope output angular velocity measurements  , it is assumed that the sum of  and  is more close to the true value of rotating angular velocity.

System Initialization and Alignment
When the subject is standing still on the ground, the gravity vector[0, 0, g] T is calculated as [ , , ] T x y z in sensor frame with rotation matrix.In the same time, the measurement value by After the initial alignment, the proposed method calculate the corresponding gait parameter step by step, the flowchart is shown in Fig. 2. ZUPT represents the wildly used zero velocity updates algorithm, which is based on the fact that the foot swings to stance phase periodically during human locomotion and the foot is stationary in stance phase.Zero-velocity updates are well suited for limiting the error growth of a foot-mounted motion tracking, because the foot returns to a stationary state on a regular ground during ordinary gait cycle [6].In this case, the information of when the foot has zero velocity is used to calibrate the accumulated errors since the last zero-velocity update.Then we are able to calculate step lengths and orientation at each detected step based on the results of ZUPT algorithm, so as to compute the absolute position and orientation of a subject during walking process.In literature, some approaches assume smooth walking on horizontal surfaces, while others are still valid for uneven terrain with complicated gait patterns.In this study, we assume the ground as horizontal and even.

EXPERIMENTAL RESULTS AND VALIDATION
To evaluate the effectiveness and accuracy of the gait analysis algorithm proposed in this paper, several experiments were carried out.The inertial measurement nodes were attached to the ankles using special elastic straps, and the data acquisition unit was held in hand by the subjects, as shown in Fig. 3.We have studied the impact of the position of the sensors on the body and found that the ankle is an ideal position for sensor data acquisition.Four subjects participated in the experiments.In each walking trial, subjects were requested to stand still for 2~3 seconds before walking, and then walk forward in a straight line and rectangular route respectively at comfortable speeds.Fig. 4. shows the sensor data collected during a ten steps straight line walking trials.Each 'peak' denotes a maximum value of angular velocity during walking, the total number of 'peak' equals the step number of the whole walking process.

Orientation and Position Estimation
It is always required to get motion information in ground frame (G) rather than sensor frame (S).However, the WEARABLE sensor merely output data in its own sensor frame.Hence the key is to transform the sensor frame acceleration into the ground frame and eliminate the gravitational acceleration g  : 2 2 1 2 2 q q qq q q qq q q N qq qq q q qq qq q q q q q q q q q q Fig. 3. Sensor attachment and sensor data acquisition

Stance Detection
In literature, gait cycle is divided to two phases [6][8], four phases [9] or even more.It does not matter when it comes to velocity and position estimation by numerical integration of inertial sensor data.Since we only care about when the foot is swing in the air or stand steady on the ground.We tend to integrate the forward acceleration to obtain travelled distance and correct the integral error when we detect the foot is at rest on the ground.The key is to divide the sensor data into observation windows based on the detected peaks, followed by detecting stance phase using the proposed threshold.In this case, false stance detection shown in Fig. 4 can be avoided accordingly.

Fig.4. False detection of stance phase
The heel-strike movement is normally selected as the beginning of a stride.Under normal circumstances, accelerometer and gyroscope measurement can be used to detect stance phase.The stance phase lasts from Foot-flat to Heel-off and corresponds to about 25% ~35% of the gait cycle [9].It was reported that the gyroscope readings are more reliable to detect the two main phase [6].In our study, a phase detection algorithm based on peak-peak detection and an adaptive threshold is applied to gyroscope data to determine the stance phase [11].Experimental results have shown that no false stance detection occurred throughout the trials.

Position Estimation Error analysis
In level walking trials, the stride length L in horizon plane can be calculated as: where x p and y p represent position values in x-axis and y-axis, respectively.Table 2 shows the experimental results of distance estimation of rectangular route walking using proposed method.
The subject was asked to walk along the rectangular route from the origin for one lap, two laps and four laps, respectively.Note that all the steps are correctly detected, i.e. our system can be used as a reliable pedometer.The percentage error of total distance is not more than 0.5%, which matches or even exceeds Kalman Filter based method [12] [13] [14].It should be note that the subjects were not walking exactly along the rectangle route, in this case, the actual walking distance for four laps is not expected to be 4 times the distance of one lap.As for the number of steps, even the same subject might perform diverse step numbers during several experiments.Fig. 6.Error analysis of stride length estimation in compare with ground truth In literature, nearly all the researchers merely focus on the total travelled distance error; it is worth noting how the error changes during the trials.Fig. 6 illustrates a specific analysis of step size error during the one lap clockwise walking trial.VICON, a commercial motion tracking system is used to provide ground truth and validate the accuracy of the proposed method.There are 28 steps totally, the maximum error exists on 13rd step with 0.0212m, the mean error is 0.0077m and the standard deviation is 0.0087m.Fig. 7 indicates the corresponding frequency histogram, kernel density estimation and normal distribution fitting.As we can see from the statistical analysis, the position estimation algorithm is feasible and effective, and the errors are well controlled.

DISCUSSION
In fact, most of individuals have some degree of bow-leg or knock-knee, which then lead to the outside of the heel contact with the ground first while walking or running.This assumption can be confirmed with excessive abrasion on the outside of our shoe's heel.It can be noted that at the beginning of each step, there is a negative abduction-adduction angle which means twist inward of knee as shown in Fig. 8.
The foot rolls in and the weight is applied to the foot when the corresponding foot contacts with the ground after heel-strike.In the case that the ankle acts as a connect joint, the foot rolling in causes inward twist of the ankle (ITA), which often results in ankle sprains and pain.This causes pain at the bottom of the foot such as plantar fasciitis.
In the same way, the ITA causes the shank to twist inward, which causes damage to the ligaments and cartilage of the knee.This may leads to chronic knee pain and injuries.Up again, the inward twist of the knee (ITK) causes an inward twist of the thigh and hip, which causes a forward pelvis tilt which strains the lower back, this in turn leads to lower back injuries and chronic pain.Fig. 8 illustrates the above mentioned physiological explanations of lower limbs pain.Therapists may come to a better understanding of the pathogenesis and rehabilitation process from the joint information of the patients.In conclusion, an accurate estimation of foot angle can be useful for rehabilitation therapy.The rapid developing BSN technologies [15][16] have provided new solutions of foot motion analysis, which offers us another way to monitor our health conditions, it might one day become as relevant as blood pressure as an indicator of overall health, however, it still take time to see how useful it is to doctors and patients.Significant impact of wearable technology on medical services may be far-reaching, including improve the nursing standard, reduced healthcare costs, improved employee health and wellness, and better support for networked society.

CONCLUSION
In this paper, foot motion data collected by wearable sensors were analyzed using the proposed method.The experimental results show that our method is effective, which is validated by the ground truth.And the results are comparable or even better than similar research work [4][9].Furthermore, the proposed method has the potential to be applied in in clinic treatments and exercise rehabilitations.The barometric sensor will be integrated in the system to strengthen the estimation of vertical position component.Future work is underway to evaluate both healthy and pathological subjects at a wider movement range.We aim to set up a training database for the sake of facilitating related research of rehabilitation treatment.

Fig. 1 .
Fig.1.The profile of foot motion measurement system accelerometer is [ , , ] T a b c , we can get error vector [ , , ] T x y z e e e by doing the vector product of [ , , ] T x y z and [ , , ] T a b c .The rotation matrix can be corrected using this error vector.However, the correction can merely superpose the X-O-Y plane of sensor frame and ground frame.As for the rotating around the Z axis, i.e. the yaw angle, we can only rely on magnetometer to do further compensation.The measuring object of tri-axial magnetometer is the geomagnetic field with fixed magnitude in a relatively pure electromagnetic environment, the angle between the direction of the geomagnetic field and the horizontal plane is constant with regard to each location on the earth.The geomagnetic component in ground frame is denoted as [ , , ] T u v w , the measurement value by magnetometer is [ , , ] T l m n .Suppose the vector change to [ ', ', '] T l m n with the accelerometer compensation (coordinate system rotation)we transform the treated vector [ ', ', '] T l m n to sensor frame, and do the vector product again to get error vector, then we can use the new error vector [ ', ', '] T x y z e e e to correct the rotation matrix at the second time.In this way the yaw angle compensation is complete, and we have obtained a precise initial quaternion.Initial quaternion is used to describe the initial note orientation information, and the attitude change of an object can be gained by quaternions multiplication based on the initial quaternion.The theoretical value for the initial quaternion is [1, 0, 0, 0] T .

Fig. 8 .
Fig.8.Physiological explanations of lower limbs pains.(a) foot angle during normal walking, (b) the relationship between lower limbs pains and foot angle.

Table 1 THE
PERFORMANCE OF ADIS16448