4.3 AReM: Activity Recognition from Multisensor data fusion
4.3.2 Decision Tree
Starting from the output given by the sensor data processing block of the proposed activity recognition chain, we arrive to the decision of the user activity output ap- plying to each time-slot data a first layer of classification using a custom decision tree classification algorithm. This classification technique has been successfully ap- plied to activity recognition in numerous previous works [210, 211, 143, 212]. It uses state-of-the-art techniques in order to discriminate a falling activity [213, 214, 215], to recognize the proximity of the user to a meaningful furniture in the environ- ment [216], and to understand if the user is in a horizontal or vertical position [144]. We used a decision tree to discriminate the sub-group of activities to be recog- nized by the specific ESN module (see Section 4.3.3) in the second layer of clas- sification. The advantages of custom decision trees include low computation re- quirements, a simple implementation, and a good understanding of the classifier’s structure. The structure of the custom decision tree constructed is depicted in Fig- ure 4.11. The tree has three binary decision nodes and four leaf nodes, the latter representing the ESN to use except for the first one representing the falling activity.
UPV > UFT OR LPV < LFT PAL,CY ≥ Pτ FALLING Ax > Ay ESN
SITTING LYING BENDING 2
ESN
CYCLING STANDING
ESN
STANDING WALKING BENDING 1
[M, Ax, Ay, PAL,CY, RSSs]
[Ax, Ay, PAL,CY, RSSs]
RSSs [Ax, Ay, RSSs]
RSSs = [𝑃 C,AL, σ(PC,AL),𝑃 C,AR, σ(PC,AR), 𝑃 AL,AR, σ(PAL,AR)]
RSSs RSSs Y N Y N Y N < fall detection > < bike proximity > < user orientation >
Figure 4.11: Structure of the decision tree fusion mechanism.
The first decision node uses the magnitude M of the tri-axial accelerometer data to decide if a falling activity is happening. As proved in [215] the magnitude is a good measure to identify thresholds for falls detection. We define upper and lower fall thresholds as follows:
• Upper Fall Threshold (UFT): set at the level of the smallest magnitude Upper Peak Value (UPV) of 100 falls recorded. The UFT is related to the peak impact force experienced by the body segment (thigh) during the impact phase of the fall.
• Lower Fall Threshold (LFT): set at the level of the smallest magnitude Lower Peak Value (LPV) of 100 falls recorded. The LFT is related to the acceleration of the thigh at or before the initial contact of the body segment with the ground.
Figure 4.12 shows the magnitude plot of one of the test made in the laboratory. Setting up a UFT of 2.74g and a LFT of 0.6g according to the results shown in [215], all the tests made were correctly recognized as falling activity. If the input data LP V = min(M ) is greater than LFT, or U P V = max(M ) is less than UFT, the second decision node is applied to the received time-slot data, otherwise a falling activity is detected. Fall zone Fall zone 0 50 100 150 200 250 0,6 1 2,74 Time [ms] Magnit ude [g] UFT exceeded
Upper Peak Value
LFT exceeded Lower Peak Value
Upper Fall Threshold
Lower Fall Threshold
Figure 4.12: Magnitude plot of the tri-axial embedded accelerometer, with thresh- olds used for falling detection. When stationary, the root-sum-of-squares signal from the tri-axial accelerometers is a constant +1 g.
The second decision node estimates the proximity [216] of the device placed on the user’s left ankle to one of the WSN node placed to the stationary bike. We define a device i to be in-range of device j if the received signal strength at j of the packet transmitted by i, Pi,j, falls below a power threshold Pτ. Thus, the proximity
Qi,j is defined as:
Qi,j =
(
1, Pi,j ≥ Pτ
0, Pi,j < Pτ
(4.6) If the PAL,CY (i = ankle left AL, j = stationary bicycle CY ) is greater than the
assuming that he can be in the cycling or standing state. In this case, the RSSs vector is given as input to the ESN trained to recognize those activities. If not, the third decision node is applied to the received time-slot data. The RSSs vector is composed of the means and standard deviations of the reciprocal received signal strengths of the motes in the body area WSN. Specifically, the RSS between sensors placed at chest and left ankle ( ¯PC,AL, σ(PC,AL)), chest and right ankle ( ¯PC,AR, σ(PC,AR)), and
left and right ankles ( ¯PAL,AR, σ(PAL,AR)).
The last decision node uses the x and y axis accelerometer mean values to deter- mine if the user is in a vertical or horizontal position. As demonstrated in [144], it is clear that if the user is in a vertical or horizontal position, even if it exhibits periodic behavior related to the particular activity, he has distinctive patterns based on the relative magnitudes of the x, y, and z values. Figures 4.13 and 4.14 show that
0 5 10 15 20 25 30 35 40 2 4 x axis y axis 6 8 10 12 x axis y axis z axis Ac ce le ra ti on [m /s 2] Time [s]
Figure 4.13: Acceleration plot for the vertical position.
for vertical position activities like standing, walking, and bending keeping the legs straight (bending 1), the x relative magnitude Ax is usually less than the y relative
magnitude Ay express in the figures as m/s2. Conversely, if the user performs activ-
ities with his legs in a horizontal position like sitting, lying, and bending keeping the legs folded (bending 2), the x relative magnitude Ax is usually greater than the y
relative magnitude Ay (Figure 4.15 shows the two types of bending activity). Based
on this decision we choose which trained ESN to use.