**3.2 Data cleaning**

Data cleaning attempts to fill in missing values, smooth out noise, and correct inconsistencies in the data.

Fig. 5. Interpolation of missing data in left toe

#### **3.2.1 Missing data**

In the walking data measured by the motion capture systems, there are some missing data because the system can not detect the markers at a moment. Many interpolation methods could be used, such as nearest neighbor interpolation, linear interpolation, cubic spline interpolation, piecewise cubic Hermite interpolation and *N-*th degree polynomial interpolation. We choose the spline method to interpolate the missing data because the cubic spline interpolation is a piecewise continuous curve, passing through each of the values in the source data. An example is shown in Fig. 5.

#### **3.2.2 Noisy data**

In acceleration data, there are many noisy data, as shown in Fig. 6. We should try to identify and cut these noisy data from the source data.

Fig. 6. The noisy data in acceleration data

And there are some noisy data in motion data caused by vibration. Since the walking signal resides in the low frequency range, it is easily affected by interference from other signal and noise sources. Butterworth low-pass filter is used to reduce noise by passing signal which frequency below twice walking cadence. Some examples are shown in Fig. 7 to Fig. 8.

Fig. 7. Velocity data of left toe (No filtering & Filtering)

Fig. 8. Acceleration data of left toe (No filtering & Filtering )

#### **3.2.3 Inconsistent data**

368 Health Management – Different Approaches and Solutions

Data cleaning attempts to fill in missing values, smooth out noise, and correct inconsistencies

In the walking data measured by the motion capture systems, there are some missing data because the system can not detect the markers at a moment. Many interpolation methods could be used, such as nearest neighbor interpolation, linear interpolation, cubic spline interpolation, piecewise cubic Hermite interpolation and *N-*th degree polynomial interpolation. We choose the spline method to interpolate the missing data because the cubic spline interpolation is a piecewise continuous curve, passing through each of the values in

In acceleration data, there are many noisy data, as shown in Fig. 6. We should try to identify

Noisy data Useful data Noisy data

**3.2 Data cleaning** 

**3.2.1 Missing data** 

**3.2.2 Noisy data** 

Fig. 5. Interpolation of missing data in left toe

the source data. An example is shown in Fig. 5.

and cut these noisy data from the source data.

Fig. 6. The noisy data in acceleration data

in the data.

Because of the faults of the measure systems, one marker can be identified as two or more. In the source file, there is more than one column to store them. So these inconsistent data must be processed by the mean methods, see Equation (4).

Human Walking Analysis, Evaluation and Classification Based on Motion Capture System 371

Theoretically, the means of X and Y should be '0', that of Z should be '-1'. But actually, it is not true. The coordinate of acceleration data is not parallel with the space coordinate because the accelerometer is set up in gradient, see Fig. 10 so we need to adjust the

g(*z*) g'(*z*)

The method of adjusting is to rotate the accelerometer in correct position, as shown in Fig. 11. Adjusting rule is that the means of X and Y should be '0'. Firstly, calculate rotation matrix R with Homogeneous Coordinate used Equation (5), and then adjust the acceleration

(⊿*x*, ⊿*y*, ⊿*z*) (⊿*x,* 0*, SQRT*(⊿*y* (0, 0, -1) 2

 

*A' = A*×

1 0 0 0 cos( ) 0 sin( ) 0 0 cos( ) sin( ) 0 0 1 0 0 0 sin( ) cos( ) 0 sin( ) 0 cos( ) 0 0 0 01 00 0 1

*RR R x y* (5)

g'(*x*)

*Y* 

*+*⊿*z* 2 ))

  *X* 

 

 

*R* (6)

*X'* 

*Y'* 

*Z* 

*Z'* 

*Z''* 

*Y* 

*Y'* 

*<sup>β</sup> <sup>α</sup>*

**3.3.2 Adjusting acceleration data** 

Fig. 10. The accelerometer set up in gradient

data to vertical position by Equation (6).

*Y* 

*X* 

*Z''* 

*Z'* 

*Y'* 

*Z' Z* 

*Z* 

Fig. 11. Title of figure, left justified

An example of adjusting is shown in Fig. 12.

*X X'* 

coordinate.

$$\begin{cases} \overline{\mathbf{x}} = \frac{1}{N} \sum\_{i=1}^{N} \mathbf{x}\_i \\\\ \overline{\mathbf{y}} = \frac{1}{N} \sum\_{i=1}^{N} y\_i \\\\ \overline{z} = \frac{1}{N} \sum\_{i=1}^{N} z\_i \end{cases} \tag{4}$$

#### **3.3 Data transformation**

Data transformation converts the data into appropriate forms for analysis further. The coordinate of acceleration data is not parallel the space coordinate because the accelerometer is set up obliquely, so we need to normalize the coordinate.

#### **3.3.1 Calibration**

The aim of calibration is to transform raw data to acceleration of gravity (g). The standard of vibration amplitude is maintained in terms of electrical output of reference accelerometer corresponding to a known value of displacement. Acceleration singles are sampled at 90Hz using purpose-written software and saved on computer for subsequent analysis. To calibrate the accelerations before each testing session, they ware placed with each of the orthogonal axes vertically, first pointing up, then down, which enabled the device to be statically calibrated to estimate the ±1g values. An example is shown in Fig. 9.

Fig. 9. Calibration of acceleration data

#### **3.3.2 Adjusting acceleration data**

370 Health Management – Different Approaches and Solutions

1

 

is set up obliquely, so we need to normalize the coordinate.

**3.3 Data transformation** 

**3.3.1 Calibration** 

shown in Fig. 9.

Fig. 9. Calibration of acceleration data

*x x N*

1

*<sup>y</sup> <sup>y</sup> <sup>N</sup>*

1

*z z N*

Data transformation converts the data into appropriate forms for analysis further. The coordinate of acceleration data is not parallel the space coordinate because the accelerometer

The aim of calibration is to transform raw data to acceleration of gravity (g). The standard of vibration amplitude is maintained in terms of electrical output of reference accelerometer corresponding to a known value of displacement. Acceleration singles are sampled at 90Hz using purpose-written software and saved on computer for subsequent analysis. To calibrate the accelerations before each testing session, they ware placed with each of the orthogonal axes vertically, first pointing up, then down, which enabled the device to be statically calibrated to estimate the ±1g values. An example is

1

*N i i N i i N i i*

1

(4)

1

Theoretically, the means of X and Y should be '0', that of Z should be '-1'. But actually, it is not true. The coordinate of acceleration data is not parallel with the space coordinate because the accelerometer is set up in gradient, see Fig. 10 so we need to adjust the coordinate.

Fig. 10. The accelerometer set up in gradient

The method of adjusting is to rotate the accelerometer in correct position, as shown in Fig. 11. Adjusting rule is that the means of X and Y should be '0'. Firstly, calculate rotation matrix R with Homogeneous Coordinate used Equation (5), and then adjust the acceleration data to vertical position by Equation (6).

Fig. 11. Title of figure, left justified

$$R = R\_{\chi} \times R\_{\mathcal{Y}} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos(a) & \sin(a) & 0 \\ 0 & -\sin(a) & \cos(a) & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \times \begin{bmatrix} \cos(\beta) & 0 & -\sin(\beta) & 0 \\ 0 & 1 & 0 & 0 \\ \sin(\beta) & 0 & \cos(\beta) & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \tag{5}$$

$$A' = A \rtimes \mathbb{R} \tag{6}$$

An example of adjusting is shown in Fig. 12.

Human Walking Analysis, Evaluation and Classification Based on Motion Capture System 373

The acceleration data and motion data come from different systems, the sampling rates are

so we must find which point of motion data is correlative with which point in acceleration data.

*P*1(*x*1, *y*1, *z*1)

*P*2(*x*2, *y*2, *z*2)

*Y* 

*P*3(*x*3, *y*3, *z*3)

1. Computing the acceleration with motion data by Equation (7), as shown in Fig. 15.

*Z* 

different, the time of starting measurement are not same, as shown in Fig. 14

**3.4.2 Aligning the acceleration data with the motion data** 

Fig. 14. Title of figure, left justified

The aligning method has two steps.

*X* 

Fig. 15. Computing acceleration with motion data

Fig. 12. An example of adjusting result

#### **3.4 Data integration**

Data integration combines data from multiple sources to form a coherent data store. Metadata, correlation analysis, data conflict detection, and the resolution of semantic heterogeneity contribute toward smooth data integration.

#### **3.4.1 Converting the coordinates**

The coordinate of acceleration data is different from that of motion data, so we should match the acceleration data and motion data in the same coordinates. We define the coordinates, as shown in Fig. 13, x: anterior, y: left, z: superior.

Fig. 13. Converting the coordinates
