Author: CheChang Yang (20060901); recommended:
YehLiang Hsu (20060901).
Note: This article is Chapter 5 of CheChang Yang’s Master thesis “Development
of a Portable System for Physical Activity Assessment in a Home Environment.”
Chapter 5. Algorithm design for
posture and movement identification
This chapter
describes the development of the algorithm embedded in the microcontroller of
the DAU for posture and movement identification. It is designed to identify
three still postures and five posture transitions from the signal output of the
accelerometer attached to the waist. The test results of the algorithm are also
presented.
5.1
Acquisition of the trunk tilt angle and
acceleration components
Human body
movement produces complex variations of accelerations and trunk inclination.
Both piezoelectric and capacitance accelerometers respond to constant
acceleration such as the force of gravity. This can be used for calibration of
the accelerometers and measurement of the tilt angle. Highpass filters with
low cutoff frequencies are often used to eliminate the interference of DC
response. [Bouten et al., 1997,
Mathie, 2003, 2004]. This study also uses a DCresponsive accelerometer.
However, instead of using highpass filters to eliminate DC response, mathematical
formulas are used in this study to calculate tilt angle and accelerations. It
is expected to obtain accurate results regardless of existence of DC response.
Figure 5.1
illustrates the orientation of the accelerometer moving with human body at a
given instant. The Z and Y axes of the accelerometer initially
coincide with the anteroposterior (horizontal) direction and the vertical
direction, respectively. At this instant, acceleration produced by the movement
can be decomposed into a horizontal component _{} and a vertical component
_{}. The movement also causes a trunk tilt angle q. The Z axis voltage
output (_{}) and Y axis
voltage output (_{}) can be expressed as Equation (5.1) and Equation (5.2),
respectively. Note that in the equations, 1.65V is the voltage output at zero
gravity, and 0.66 is the coefficient for per 1g acceleration. The trunk tilt angle q represents tilt angle relative to the vertical or horizontal line.
Due to the response to constant gravitational force (1g), the actual vertical component acquired by the
accelerometer is _{}. The trunk tilt angle q can be obtained by Equation (5.3) and Equation (5.4).
Figure 5.1 Acceleration with inclination
_{} (5.1)
_{} (5.2)
_{} (5.3)
_{} (5.4)
With the trunk tilt
angle q obtained from Equation
(5.4), the vertical acceleration _{} can be obtained
with Equation (5.5) or Equation (5.6) derived from Equation (5.1) and Equation
(5.2).
_{} (5.5)
or
_{} (5.6)
Finally, the
anteroposterior acceleration component _{} can be obtained
by the simple trigonometric relation:
_{} (5.7)
Figure 5.2 shows
an example of the signal outputs of the Y
and Z axes during normal sittostand
posture transition. Figure 5.3 shows its trunk tilt variation, and Figure 5.4
shows the acceleration components _{} and _{} converted from
the signlas.
Figure 5.2 Signal outputs of the accelerometer during
sittostand posture transition
Figure 5.3 Trunk tilt angle variation during
sittostand posture transition
Figure 5.4 Acceleration variations in vertical and
anteroposterior directions during sittostand posture transition
5.2
Algorithm design
This section
describes the algorithm designed to identify three postures (lying still,
sitting still, and standing still), four postural transitions (sitstand,
standtosit, sittolie and lietosit) and walking movement. Detection for
possible falls is also designed in this algorithm.
5.2.1 Structure of the Algorithm
Figure 5.5
describes the process flow of the algorithm. In this figure, each block
represents a separate program section for signal processing or identifying one
possible posture or activity. As shown in Figure 5.5, the algorithm includes five
main parts: data sampling (Cx), preprocessing (Px), dynamic posture transition
identification (DBx), still posture identification (DAx)
and possible fall detection (DCx).
The data sampling
process consists of the primary stage (C1)
and secondary stage (C2). Initially,
the process D1 detects whether any
sign of dynamic movement exists from the 0.5s data collected in the primary stage.
If no dynamic movement is detected (D1=No),
the 0.5s data is used to identify one of the possible still postures in the
processes DAx. If dynamic movement is detected (D1=Yes), the secondary data collection stage (C2) is immediately activated to collect the subsequent 2.0s data.
The 2.5s data collected in both stages is then combined to represent an “event”
for the following stepbystep identification processes. This dualstage data sampling
strategy ensures that the data of one event can be acquired within the same
sampling interval.
In the
preprocess, three data sets in series of an event, q, _{} and _{} are inputted into
the algorithm. Median filtering is first employed to the data series in section
P1. Section P2 simplifies the data series, then Section D2 determines whether the event is a dynamic movement. If the trunk
tilt changes apparently throughout the data spectrum, the event will be
regarded as a possible posture transition (D2=Yes).
Four posture transitions (two sitstand transitions and two
liesittransitions) and walking are identified in the following sections (Sections
DBx). If the event is recognized as a still posture (D2=No), Sections DAx will be used to
identify one of three possible postures. As shown in Figure 5.5, Sections DCx
are used for fall detection. All the identified results are stored in the
variable STATE. In the case where there is no definite result determined
throughout the processes, the event will be recorded as an “Uncertain movement” or an “Uncertain posture”.
Figure 5.5 Flowchart of the algorithm
Computation capability
and program capacity of the PIC microcontroller used in this study are
relatively limited compared to powerful mathematical computation software on
PCs. Therefore it is crucial to save memory and minimize time delay within the computation process when designing the algorithm. In
addition, all signals are processed in time domain analysis in the algorithm
because batch data analysis in frequency domain method yields inaccurate
results. In this study, the triaxial signals are analyzed to identify one of
the eight events every 0.5 or 2.5 seconds. The sampling rate for A/D conversion
is set 60Hz due to the conclusion that most human movements are below 20Hz
[Bouten et al, 1997].
5.2.2 Preprocessing and action determination
As shown in
Figure 5.5, preprocessing is applied for the 2.5s combined data after the
secondary stage (C2). Preprocessing includes
median filtering (P1) and data
simplification (P2). Median
filtering is a common technique to remove high frequency spikes in the data. Data
simplification is then conducted for all the data series of the accelerometer
outputs. The “slope mapping” technique is used in action determination (D1, D2) following preprocessing. Note
that median filtering and data simplification processes are not employed to the
data collected in the primary stage to save computation time.
(1)
Median filtering (P1)
In the
beginning, 152 combined data points (V_{Z}, V_{Y}) are collected in a 2.5s time
interval (at approximately 60Hz). The data series for trunk tilt, vertical
acceleration, and anteroposterior acceleration are obtained by Equations (5.1)
to (5.7). Then median filtering is applied to the two acceleration components.
An example of the effect of median filtering is shown in the Figure 5.6. This
comparison reveals that median filtering has the ability to remove excessive
spikes which are far removed from the overall tendency of the data. As a
result, n2 point data series can be
obtained from the original npoint
data series after performing median filtering with window length of 3. In other
words, this technique generates a 150point data series from the original
152point one. From empirical observation, the trunk tilt data series has less
fluctuation and spikes than the other two data series. Therefore, the median
filtering is not applied to the trunk tilt data.
Figure 5.6 An example of the effect of median
filtering
(2)
Data simplification (P2)
In order to
reduce the computational load of the PIC microcontroller, the data series are
further simplified prior to data analysis. Three neighboring points (p_{3i2}, p_{3i1} and p_{3i)} in a
data series are combined to yield one average data point, _{}, as shown in Equation (5.8).
_{} (5.8)
After the
preprocessing, a data series with 3n
data points are reduced to a smaller data series with n averaged points. Equation (5.8) is used to simplify the data
series of trunk tilt and the two acceleration components. This also lowers or
eliminates subtle fluctuations generated by external vibration, power instability,
or even the slight effect of the discharging capacitors on the accelerometer.
Figure 5.7 shows an example of trunk tilt data series during the sittostand
transition. Figure 5.7(a) shows the original data series converted from raw
signal output, and Figure 5.7(b) shows the same data after the preprocessing
by Equation (5.8). This simplification process provides preferable effects in
reducing the amount of data points and undesirable fluctuations, while
preserving most apparent characteristics of the original data series.
Figure 5.7 Simplification for trunk tilt data
series
(3)
Action determination (D1, D2)
Sections for action determination (D1, D2) determine whether the event is a dynamic movement by
examining the variation of the trunk tilt angle. Section D1 processes the 0.5s data collected in the primary stage (C1), and Section D2 processes the 2.5s combined data.
The “slope mapping” technique is used to detect whether there is
apparent fluctuation in the trunk tilt data series. Consider a simplified trunk
tilt data series _{} for i=1 to n. The slope _{} between two
neighboring data points _{} and _{} is calculated and
a segment slope series _{} with n1 data points is obtained from the
original npoint data series.
The segment slope series S
is then mapped to another data series C,
which is used to record whether there is apparent fluctuation in the simplified
trunk tilt data series by checking the slopes in the segment slope series S. As shown in Equation (5.9), if the
absolute value of the slope s_{i} is equal to or greater
than a predefined threshold, then _{} is registered 1 in the data series_{}. On the contrary, _{} is registered 0 if
s_{i} does not reach that threshold. Figure
5.8 shows the result of the slope mapping for the trunk tilt data series of a
sittostand transition. Finally, if the amount of _{} registered 1 is
greater than a predefined number, this event is classified as a dynamic
movement. Section D1 and D2 use the same method but different
parameters. After a few trials, the parameters used in D1 are _{}, _{}, while the parameters used in D2 are _{}, _{}.
_{} (5.9)
Figure 5.8 Slope mapping for trunk tilt data
5.2.3 Identification of sitstand transitions
Referring to
Figure 5.5, if an event is identified as a dynamic movement in Section D2 (D2=Yes), Section D3 decides whether the upper body of
the tester is in an upright position by checking if the trunk tilt angle is
within 30 degrees forward or backward from the vertical plane. An “upright” state is recognized if more
than 35 data points out of the total 50 data points in the simplified trunk
tilt data series are in this tilt range.
If an event is
recognized as “dynamic” and “upright” in Section D2 and D3, it might be classified
as either one of the sitstand transitions or a walking action. Sections DB1 and DB2 determine whether the event is a “sittostand” or “standtosit”
transition.
In order to investigate
the accelemetric characteristics of sitstand transitions, a test was performed
on 15 ostensibly healthy subjects in various ages. The recruited subjects were
healthy in mobility except two elderly subjects who required the aids of the
armrests or sticks for both posture transitions. The subjects were arranged in
three groups according to their ages: young (2035yrs), middleaged (3550yrs)
and elderly (50+yrs), with 5 subjects in each group. The subjects were asked to
perform slow, normal and fast sitstand transitions as close as possible to how
they perform these actions habitually in their activities of daily livings. Each
subject performed each transition in each transition pace at least three times,
respectively. The elder subjects only performed the transitions in normal pace.
There are a total of 98 sittostand data samples and 101 standtosit data
samples collected in the test.
Figure 5.9 and
Figure 5.10 show examples of normal sitstand transition acceleration patterns
acquired from a young subject in the test. As shown in Figure 5.10, vertical acceleration
components are more sensitive than the anteroposterior components in both
sitstand transitions. Therefore, only the vertical components are used to
identify either sittostand or standtosit posture transition.
Figure 5.9 Example of acceleration patterns of a
normal sittostand transition
Figure 5.10 Example of acceleration patterns of a
normal standtosit transition
Figure 5.11
shows an example of the vertical acceleration components of the sittostand
and standtosit transitions. For the sittostand case in this figure, it is
observed that the positive acceleration peak occurs prior to its negative peak
and vice versa for the standtosit case. This pattern exists in all samples
collected in the test. Therefore the first rule in Sections DB1 and DB2 is to compare the order of occurrences of those two peaks. If
the positive peak occurs prior to the negative peak, this event could be a
sittostand transition. On the contrary, if the occurrence of the positive
peak falls behind the negative peak, the event could be a standtosit
transition.
Figure 5.11 Example of common acceleration
patterns of sitstand transitions
Furthermore, the
time interval (or peak distance) between the positive peak and the negative
peak is considered. Figure 5.12 and
Figure 5.13 show an example of vertical acceleration components during fast,
normal, and slow sitstand transitions from the same young subject. Faster
transitions produce shorter peak distance, and vice versa. For example, the
patterns of sittostand transitions shown in Figure 5.12 have the peak
distances in 0.36s, 0.54s and 0.96s for fast, normal, and slow transitions
respectively. In the Figure 5.13, they are 0.16s, 0.72s and 1.82s for fast,
normal and slow standtosit transitions, respectively. Table 5.1 shows the averaged
peak distances of sitstand transitions from all the subjects’ data. These
values also reveal the evident tendency mentioned above.
Figure 5.12 Comparison of vertical acceleration
components during sittostand transitions.
Figure 5.13 Comparison of vertical acceleration
components during standtosit transitions.
Table 5.1 Averaged peak distances of sitstand
transitions in different subject groups

Young

Middleaged

Elder

Sittostand

Slow

0.82s

1.06s


Normal

0.73s

0.69s

0.70s

Fast

0.56s

0.53s


Standtosit

Slow

0.97s

1.16s


Normal

0.83s

0.88s

0.98s

Fast

0.56s

0.69s


Therefore, the
second rule in sections DB1 and DB2 is to compare the peak distance. To
find suitable parameters, the distribution of peak distances in sitstand
transitions of all samples collected in the test is shown in Figure 5.14. For
the sittostand case, most peak distances (95 out of 98) distribute over the
range between 0.3s to 1.3s. For the standtosit case, most peak distances (95
out of 101) distribute over the range between 0.4s to 1.5s. As a result, the
upper and lower bound of the peak distances,_{} and _{}, can be assigned according to the results in Figure 5.14. In
this algorithm, the parameters for sittostand transition are _{}s and _{}s. For standto sit case, they are _{}s and _{}s.
Figure 5.14 Distribution of peak distance in sitstand
transitions among all the subjects
The third rule in
Sections DB1 and DB2 examines the peak acceleration
values. From Figure 5.12 and Figure 5.13, fast transitions tend to produce high
peak values, and vice versa. Table 5.2 also shows the averaged peak values of
sitstand transitions in different subject groups, and Figure 5.15 and Figure
5.16 further show the distributions of the peak values from all samples
collected in the test. According to the data, for the sittostand case, most
positive peak values (88.7%) are greater than 0.1g, and all negative peak values are less than 0g. For the standtosit case, most positive
peak values (76%) are greater than 0.1g,
and most negative peak values (93%) are less than 0.1g. Note that from the empirical results, the
positive acceleration peaks of standtosit transitions are usually higher. It
is primarily due to the effect of the reacting force exerted by the support
(chairs, bed, etc.) when sitting.
Therefore, the threshold
parameters _{} and _{} are given for the
positive and negative peak values, respectively. For the sittostand case, the
thresholds _{}g and _{}g are assigned. For the standtosit case, the thresholds _{}g and _{}g are assigned. If a dynamic event with its positive
acceleration peak greater than _{}, as well as its negative acceleration peak less than _{}, it could be a sittostand transitions.
Table 5.2 Averaged peak values of sitstand
transitions in different subject groups

Young

Middleaged

Elder

Sittostand

Slow

Max. a_{v }(g)

0.16

0.14


Min. a_{v }(g)

0.15

0.20

Normal

Max. a_{v }(g)

0.24

0.26

0.24

Min. a_{v }(g)

0.20

0.28

0.28

Fast

Max. a_{v }(g)

0.48

0.43


Min. a_{v }(g)

0.49

0.41

Standtosit

Slow

Max. a_{v }(g)

0.18

0.17


Min. a_{v }(g)

0.14

0.18

Normal

Max. a_{v }(g)

0.28

0.19

0.37

Min. a_{v }(g)

0.23

0.27

0.30

Fast

Max. a_{v }(g)

0.49

0.32


Min. a_{v }(g)

0.41

0.38

Figure 5.15 Distribution
of positive vertical acceleration peaks of sitstand transitions in different
subject groups
Figure 5.16 Distribution
of negative vertical acceleration peaks of sitstand transitions in different
subject groups
One particular
acceleration pattern shown in Figure 5.17 may occur during faster standtosit
transitions. Overshooting accompanying with a high reaction force may result in
a negative acceleration peak whose position follows the positive peak closely. If
this situation occurs, the algorithm may conclude that it is a sittostand
transition (according to the first rule discussed above). Such a paradox is
solved by searching for a local negative peak which locates prior to the
positive peak when applying the third rule discussed above. The updated data is
then reinputted to the three rules for identification. Therefore, the
standtosit transition with such a special acceleration pattern can be
identified as well.
The “standtosit” or “sittostand transition” can be identified only when all three
rules discussed above are satisfied. Otherwise Sections DB1 and DB2 fail to identify
the dynamic event and result in an “Uncertain
movement”.
Figure 5.17 Particular acceleration pattern of
fast standtosit transition.
5.2.4 Identification of walking movement
Figure 5.18
shows an example of body acceleration patterns when walking at normal gait. The
tendency that positive peaks in the vertical component appear in accordance
with negative peaks in the anteroposterior component can be observed in this
figure. In addition, the magnitude of positive acceleration peaks, which are
caused by the reacting forces exerted by the ground, is higher than that of the
negative ones. Again it is also observed that the vertical acceleration
component is more sensitive to the walking movement than the anteroposterior
component. Therefore, the vertical acceleration component is used to identify
walking movement.
Mathie’s [2004]
study on the interpretation of human movement patterns reported that the
frequencies of walking movement range from 0.7Hz to 3.0Hz. Frequencies in 1Hz
to 4Hz have also been reported in a continuous walking record [Sekine et al, 2000]. Higher walking frequencies
also result in higher positive acceleration peaks in vertical component.
Figure 5.18 Acceleration pattern when walking
In Section DB5, walking movement is identified by
investigating the apparent changes (slopes) in vertical acceleration component.
The slope mapping technique discussed in Section 5.2.2
is applied again here. Figure 5.19 simplifies the vertical acceleration pattern
into the triangular forms in order to define the parameters in the algorithm. In
figure 5.19, slow walking at 1Hz is used as frequency f. Referring to the previous studies, the values of positive and
negative acceleration peaks in the vertical component are approximately 0.4g and 0.3g, respectively. From these values, the slope threshold
for walking movement is 0.07g
per sampled point. However, the threshold was tuned to 0.15 g per sampled point to avoid being too sensitive
to the signal fluctuations or external vibrations.
Finally, a
dynamic event is recognized as “walking”
if the number of the segment slopes whose absolute values are greater than the
slope threshold _{} reaches a given
parameter N_{W}=10 (out of
the total 49 slope values representing an event).
Figure 5.19 Simplified
vertical acceleration pattern of walking for the identification in this
algorithm
5.2.5 Identification of liesit transitions
Liesit
transitions, as illustrated in Figure 5.20, are characterized by rotational
movements of the trunk which result in increasing or decreasing trunk tilt
angles. Therefore, liesit transitions can be easily identified by
investigating the trunk tilt variation.
Figure 5.20 Illustration of liesit transitions
Two rules are
used in Section DB3 and DB4 in the algorithm to identify liesit transitions. The first rule is to
calculate apparent changes in the trunk tilt angle using the slope mapping
technique. Assume that _{} is the segment slope
series of trunk tilt angle of an event to be identified. As shown in Equation
(5.10), in series_{}, c_{i} is registered 1 if the segment slope s_{i} is equal or greater than a positive threshold value (_{} in this case, i.e., the trunk tilt angle increases by 3
degrees); c_{i} is registered 2 if
s_{i} is equal or less than a negative threshold
(_{} in this case, i.e., the trunk tilt angle decreases by 3
degrees). If the number of c_{i} registered 1 reaches
or exceeds 10, this posture transition can be a lietosit transition.
Similarly, a dynamic event can be a sittolie transition if the number of c_{i} registered 2
reaches or exceeds the threshold value 10.
_{} (5.10)
The second rule
is to investigate the posture orientation at the end of the event. The posture
orientation is flat at the end of a sittolie transition, and is upright at
the end of a lietosit transition. In this rule, the last 10 data points out
of the trunk tilt data are used to determine the posture orientation. Out of
the 10 data points, if the numbers of data points with tilt angles between 60
degrees to 105 degrees is larger than 5, the posture orientation is concluded
to be flat. On the other hand, if the numbers of data points with tilt angles between
30 degrees to +30 degrees, the posture orientation is concluded to be upright.
In Sections DB4 and DB5, liesit transitions are identified only when both rules are
satisfied.
5.2.6 Still posture identification
Referring to the
flowchart in Figure 5.5, if the event is not recognized as a dynamic movement
in section D1 (D1=No) or D2 (D2=No), this event can be one of the
three possible still postures: “lying
still”, “sitting still” and “standing still”.
(1)
Lying still (DA1):
Section DA1 determines whether the still event
is a lying posture. Karantonis et al.
[2006] used the posture orientation (i.e., the tilt angle with respect to
vertical line) to classify possible posture states including upright, lying and
inverted. In Section DA1, the trunk
tilt data is also used to identify the lying posture. Among the 50 data points that represent an event to be
identified, if the number of data points with trunk tilt angle exceeds 60
degrees backward from the vertical plane is greater than 35, this event is
identified as a “lying still”.
(2)
Sitting still and standing
still (PA2, PA3)
If a still event
is not identified as “lying still”,
then it can be “sitting still” or “standing still”. However, both postures
have upright trunk tilt angles. Therefore, distinguishing postures of sitting
still and standing still requires the information of previous posture
transitions or movement.
If a still event
is not lying (PA1=No) and the
previous posture transition is “sittostand”
or “walking”, this event is identified
as “standing still”. On the other
hand, the event is identified as “sitting
still” if the previous posture transition is “standtosit” or “lietosit”.
5.2.7 Fall detection
For the elderly
users, detection of accidental falls is an important issue. Intuitively, a fall
can be regarded as a movement accompanying by unusual high acceleration peaks
in a very short time interval. Several studies have suggested similar measures to
characterize the event of a fall. Karantonis et al. [2006] used the signal magnitude vector (SVM) to evaluate the degree of the
movement intensity. In fact, it was modified from the IMA (summation of the time integrals of the accelerometer outputs) proposed
by Bouten et al. [1997] for
evaluating energy expenditure due to body movements. This method has also been
adopted in related studies to distinguish states of activity and rest. According
to the definition given by Karantonis et
al., falls are said to have occurred if at least two consecutive peaks in
the SVM above a defined threshold are
recorded. Its threshold of 1.8g
was justified through formal patient studies. In their design scenario of
realtime identification, if no activity occurs during this 60s postfall
interval after detecting a possible fall, the event is upgraded to a fall.
Caregivers will be informed to take further measures and actions for this
probably emergent situation.
Referring to the
flowchart in Figure 5.5, if a dynamic event is not recognized as “upright” in Section D3, Sections DCx are then used to identify whether a possible
fall occurs. A sign of possible fall is concluded if there are at lest two
peaks at relatively higher magnitudes in either vertical or anteroposterior acceleration
component. The threshold value used in Section DC1 and DC2 is _{}. Therefore, a dynamic event is recognized as “sign of fall” if peak acceleration greater
than 1.0g is detected.
When an event is
identified “sign of fall”, the next
step is to investigate whether the next event is a “lyingstill” posture. If a “lyingstill”
posture is identified right after “sign
of fall”, Section DC2 is
activated (DC2=Yes) to count the number
of “lying still” events in the following
postfall period. A “possible fall”
event is identified in Section DC3 if
the number of “lying still” events
identified by the route of primary data collection in the flow chart in Figure
5.5 (C1èD1èDA1) reaches 30, or by the secondary data collection stage (C1èD1èC2èP1èP2èD2èDA1) reaches 5 in the following
20s period.
5.3
Performance evaluation
In order to evaluate
the performance of the algorithm in still posture and dynamic activity identification,
10 subjects were recruited for the laboratorybased test. Sensitivity and
specificity tests for posture (lying still) and posture transitions (sitstand
transitions, liesit transitions) and walking movement were conducted. Note
that the evaluation did not include the sitting still or standing still
postures due to the fact that both still postures are associated with the
results of previously identified transitions or movement. Falling was not
included either because it was not easy for the testers to simulate “standardized”
falls.
Sensitivity is
related to the degree of “type I error (false negative)”, which is defined as
the error of rejecting something that should have been accepted. In the
definition of sensitivity in Equation (5.11), “false negative” events refer to
actual matches that were not detected, and “true positive” events mean actual
matches that have been detected.
_{} (5.11)
To evaluate the
sensitivity of the algorithm, the subjects were asked to perform separate pairs
of reciprocal transitions (sitstand transitions and sitlie transitions) or
walking movements repeatedly in the identical fashion as they regularly behave
in their daily living. In addition, they were also allowed to vary their
movement paces or time intervals arbitrarily. The subjects performed each item
20 times according to the operator’s instructions, and a total of 200 samples for
each test item were obtained. For the item of lying still, the subjects were in
lying still on a bed for 50 seconds which corresponds to producing 20
identified events from the algorithm. Therefore, according to Equation (5.11), the
sensitivity for each item is obtained with the numbers of the events which are
correctly identified (true positives) divided by the total number of test
samples 200.
Specificity is associated
with the “type II error (false positives)”, which is the error of accepting
something that should have been rejected. In the definition of specificity in
Equation (5.12), “true negatives” refer to nonmatches that have been rejected,
and “false negatives” refer to the nonmatches that have been accepted.
_{} (5.12)
To evaluate specificity
of this algorithm, the five test items were arranged in three courses: Course A
(sittostand and sittolie), Course B (standtosit and walk) and Course C (lietosit).
According to the algorithm, when a subject is sitting still, his possible
posture transition from that state is either the sittostand transition or the
sittolie transition. Therefore in Course A, the subjects were initially in
the sitting still posture and then performed any movements other than the
sittostand or sittolie transitions. For the same reason in Course B, the
subjects were initially standing still, and then performed any movements other
than standtosit transition or walking movement. Similarly for Course C, the
subjects performed any movements other than lietosit transition as they were
initially lying. The subjects performed 50 movements for each course in the
test (for a total of 500 samples for each test course). Therefore, specificity
is obtained with the number of rejected events divided by the total number 500
of performed events.
Note that the
item of lying still is not included in specificity test. Also during the
specificity test, the subjects were asked to avoid performing ambiguous
movements. For example, in Course A, the subjects were asked to avoid performing
a movement similar to the sittolie transition even though they subjectively
considered it a free movement.
Table 5.3 shows
the evaluation results of sensitivity and specificity from 200 and 500 samples,
respectively. The sensitivity and specificity of the algorithm for all posture
identification are at acceptable levels.
Table 5.3 Performance (sensitivity and
specificity) of the algorithm
Posture/activity item

Sensitivity (%)

Specificity (%)

Lying still

100

*

Sittostand

92.2

91.5

Standtosit

95.6

88.5

Sittolie

92.2

99.5

Lietosit

95.6

88.0

Walking

98.9

99.5

Reference
Bouten, C. V.
C., Koekkoek, K. T. M., Verduin, M., Kodde, R., Janssen, J. D., 1997. “A
Triaxial Accelerometer and Portable Data Processing Unit for the Assessment of
Daily Physical Activity,” IEEE Trans.
Biomed. Eng., vol. 44, pp.136147.
Karantonis, Dean
M., Narayanan, Michael R., Mathie, Merryn., Lovell, Nigel H., Celler, Branko
G., 2006. “Implementation of a RealTime Human Movement Classifier Using a
Triaxial Accelerometer for Ambulatory Monitoring,” IEEE Trans. Info. Tech
Biomed., vol. 10, No. 1, pp. 156167.
Mathie, M. J.,
Coster, A. C. F., Lovell, N. H. Celler, B. G., 2003. “Detection of daily
physical activities using a triaxial accelerometer,” Medical & Biological Engineering & Computing, vol. 41,
pp. 296301.
Mathie, M. J.,
Celler, B. G., Coster, A. C. F., Lovell, N. H., 2004. “Classification of basic
daily movements using a triaxial accelerometer,” Medical & Biological Engineering & Computing, vol. 42, pp.
679687.
Sekine, M.,
Tamura T., Togawa T., Fukui Y., 2000. “Classification of waistacceleration
signals in a continuous walking record,” Medical
Eng. and Phy. Vol. 22, pp. 285291.