1 Introduction

Falls are a major problem for elderly people and fall-related injuries are one of the most common causes for hospital admission or death. The long-lie problem is frequently associated with falls: elderly people may remain on the ground for a long period because they are shocked, injured, or too weak to get to their feet (Wild et al. 1981; Tinetti et al. 1993; Gurley et al. 1996). The problem of long-lie can be reduced through the use of a personal emergency response system, a small device equipped with a “help” button that can be carried or worn by the user. Unfortunately, in many circumstances, one may not be able to press the button, e.g. because of a loss of consciousness or as the result of severe injuries. A solution to this problem is represented by automatic fall detection systems: after a fall the system, without human intervention, sends an alarm message to the caregiver or to the patient’s relatives. From the technical and research points of view, the most challenging part of the process is recognizing a fall, as it is an ill-defined process and it is difficult to characterize.

Some fall detection systems are based on the idea of instrumenting, with sensing devices, the environment where the patients live. Solutions include tracking of patients’ movements with a camera (Anderson et al. 2006), infrared sensors placed in proximity of beds (Sixsmith and Johnson 2004), floor mats equipped with pressure sensors, or vibration and acoustic sensors (Zigel et al. 2009). Nevertheless, instrumenting the environment requires significant set up costs and poses some privacy concerns. Other techniques, on the contrary, are based on the idea of sensing the patients’ movements through one or more sensors (accelerometers and/or gyroscopes) attached to the users’ body. The number of required devices is a critical factor for obtaining a reasonable system usability, thus in the following we focus only on those solutions where monitoring is carried out by means of a single sensing device. In particular, we concentrate on methods based on accelerometric information, since it proved to be more useful with respect to angular velocity for detecting falls (Lindemann et al. 2005). Other critical factors that influence the usability and the acceptability of fall detection systems are their sensitivity and specificity: the former is the capacity of a system in detecting all falls, whereas the latter is its ability in detecting only real falls (filtering all fall-like impacts caused by activities of daily living, such as sitting on a chair).

In some previous work, information concerning the orientation of the sensing device is used to infer user’s posture and therefore to reduce the number of false alarms (Karantonis et al. 2006; Kangas et al. 2008; Bourke et al. 2010). The basic assumption behind the techniques based on postural analysis is that the user is lying after a fall: a possible fall is confirmed only if the user’s body is horizontal after an impact. In fact, posture recognition proved to be of paramount importance for the reduction of false alarms in fall detection systems. Unfortunately, the recognition of lying posture using a single accelerometer poses two requirements that significantly reduce system usability: (i) one of the reference axes of the device must be aligned with the longitudinal axis of the user’s body, (ii) the device must be integral with the user’s body. Consider, for example, the use of a smartphone placed into a pocket: the alignment between the device and the longitudinal body axis can not be assured. Thus, in order to correctly apply postural recognition, the user would be forced to perform a calibration phase each time he/she changes the orientation of the device (for example, when extracting and reinserting the phone from/into the pocket). In summary, calibration, to the purpose of fall detection, consists in virtually aligning one of the device’s axes with the longitudinal axis of the user’s body (Avvenuti et al. 2013; Gietzelt et al. 2012).

In this paper we propose a technique that enables the detection of lying posture without affecting system usability. Users are allowed to wear the device without paying attention to its orientation and without a manual setup phase. This is achieved through dynamic and automatic calibration: the direction of the longitudinal axis of the user’s body, in the coordinate system of the device, is automatically detected taking advantage of walk recognition. A specific walk recognition algorithm was designed and tested for this purpose. We then evaluated the benefits introduced by the use of posture detection: experimental results show that such information can reduce the number of generated false alarms by \(\sim 98\,\%\), increasing significantly the trustworthiness of the fall detection process. A corollary contribution of this work is a comparative evaluation of the filtering effect of posture with respect to other information commonly used to distinguish real falls from false alarms. Results show that posture detection provides the greatest benefits, and highlight the importance of using such information in future research on fall detection.

The remaining of this paper is organized as follows. In Sect. 2 we describe the state of the art regarding user’s posture in fall detection systems, walk recognition, and smartphone-based fall detection. Section 3 presents the principle of operation of our approach: posture information can be obtained through walk recognition and then incorporated in a fall detection system. The experimental settings and the data acquisition campaign are described in Sect. 4. In Sect. 5 we present the algorithm for the detection of walk segments. Then, in Sect. 6 we show how the posture information obtained from the walk segments increase the specificity of fall detection. Finally, we present our conclusions in Sect. 7.

2 State of the art

Here we recall the most significant work on: (i) the use of posture information in fall detection systems; (ii) recognition of walk segments in similar contexts; (iii) smartphones as a platform for the detection of falls. Then, the major contributions of our work with respect to previous literature are highlighted.

2.1 Use of posture information in fall detection systems

One of the first papers describing the use of an unobtrusive and smart device for the classification of human movements and the detection of falls is Karantonis et al. (2006). The device, equipped with a tri-axial accelerometer, is firmly attached at the user’s waist and aligned with the longitudinal axis of the human body. Thus, the system is able to determine the posture of the user by measuring the angle between the axis of the device aligned with the user’s body and gravity. The tilt angle is then compared with fixed thresholds to discriminate between standing, sitting, and lying postures. A possible fall, detected by means of a threshold on the acceleration magnitude, is upgraded to a fall only if: no significant activity is recorded for at least \(60\) s; the user is in the lying posture.

A comparison between low-complexity fall detection algorithms for wearable accelerometers is presented by Kangas et al. (2008). The three algorithms under evaluation are based on the following features: impact \(+\) posture; start of fall \(+\) impact \(+\) posture; and start of fall \(+\) velocity \(+\) impact \(+\) posture. Posture information is calculated similarly to Karantonis et al. (2006). Besides the performance of the three algorithms, it is important to notice that posture information has been considered as fundamental and its analysis has been always included.

A similar study is described by Bourke et al. (2010), where a number of fall detection algorithms have been compared by measuring their performance against a rather large dataset. The experimental results showed that an algorithm that uses velocity, impact, and posture information can obtain a low false alarm rate (less than 1 per day) still having high sensitivity. Also in this case, it is required to firmly attach the device to the user’s body (using a standard belt and a modified commercial mobile-phone carry case).

Two other works requiring a predefined orientation of the device are Estudillo-Valderrama et al. (2009) and Tolkiehn et al. (2011). Estudillo-Valderrama et al. (2009) presented a distributed fall detection architecture: the adopted algorithm is the one described by Estudillo-Valderrama et al. (2008), and lying posture is detected similarly to Karantonis et al. (2006). Tolkiehn et al. (2011) used tilt variations to detect falls and fall directions. In this system, a barometric pressure sensor is combined with the accelerometer to slightly improve detection accuracy.

Gjoreski et al. (2011) provided further evidence about the importance of posture as a method for increasing accuracy of fall detection: about 20 % accuracy improvement can be obtained. Nevertheless, also in such work, detection of posture relies upon predefined placement of accelerometers to the user’s body. Moreover, an individual calibration phase is required to compensate for the slightly different ways people wear the device.

All of the above described systems confirm the importance of posture information in fall detection systems. Nevertheless, the user is forced to wear the device according to a predefined orientation. The use of posture detection when the device orientation is unknown is addressed by Curone et al. (2010). This system aimed at the context of worker’s surveillance and relied on a fundamental assumption: the user is upright while dressing the device. This assumption cannot be applied in our reference scenario.

2.2 Walk recognition

Recognition of human activities by using the accelerometer that is embedded in commonly available smartphones is described by Kwapisz et al. (2011). The authors evaluated different classification systems (J48, logistic regression, and neural network) in recognizing six different activities, including walking, on a set of 29 users carrying a smartphone in theirs pants front leg pocket. As far as walking is concerned, all the three classifiers obtained accuracy values of approximately 90 %.

Other work showed that it is possible to obtain effective human activity recognition also when the position of the device is not known a priori (Xu et al. 2012). In particular such work showed that, through sparse signal representation, activities such as making a step can be reasonably recognized and, at the same time, the position of the device can be estimated (out of 14 possible activities and 7 possible locations). In this case, movement information (accelerometer and gyroscope signals) is collected using wireless sensor nodes (TelosB motes) and not commonly available smartphones.

Recognition of walking activity and its use for inferring some properties of the device has been discussed also by Kunze et al. (2005), where the authors describe a technique to automatically recognize the part of the body where the sensing device is located (wrist, head, trouser pocket, breast pocket). The technique operates in two stages: first it detects the time segments where the user is walking, then a classifier is used in such regions to select the most probable location of the device. The good classification results and the fact that walking is the most common human activity advocate the use of walking as a source of useful information for inferring device properties.

2.3 Smartphone-based fall-detection systems

Detection of falls by using the patient’s mobile phone is obviously an attractive idea, as it would not force the user to carry an additional device. Moreover, smartphones already include all the communication functionality needed for sending alert messages to the caregivers, and are nowadays provided with enough computing power to support the use of non trivial signal analysis methods (Sposaro and Tyson 2009; Yavuz et al. 2010).

Abbate et al. (2012) presented a smartphone-based fall detection system. The system can acquire kinetic information using both the smartphone internal accelerometer or an external sensing unit. In both cases, the sensing device is attached to the user’s belt. The implemented technique is able to recognize some fall-like activities, like sitting on a chair or lying on a bed, so that they are not confused with real falls and thus reducing the number of false alarms. The system shows excellent performance in terms of accuracy and the user is not forced to wear the device according to a predefined orientation, since the detection algorithm uses only the magnitude of acceleration. Nevertheless, the device cannot be placed in the pockets of the user’s trousers, as it would be subject to spurious movements.

PerFallD is another smartphone-based fall detection system (Dai et al. 2010). PerFallD can operate in two modes: using only the smartphone’s accelerometer or using also an additional element that must be carried by the user attached on his thigh. This additional element is made of magnetic material and causes peculiar variations on the magnetic field that are detected by the smartphone’s compass. However, while this element may increase the performance of the system, its use is also detrimental in terms of usability.

The problem of fall classification by machine learning using mobile phones is studied by Albert et al. (2012). The authors evaluate the performance, in terms of sensitivity and specificity, of five machine learning classifiers using data collected through a smartphone. The device was attached to the users’ body through a belt and it was placed in a standard position so that the direction of the three axes was known. The evaluation has been carried out using a rather large set of acceleration features, avoiding a manual selection of the most relevant ones and relying on the machine learning classifiers.

All the previous systems are characterized by sensitivity and specificity values that range from good to excellent. Nevertheless, they all force the user to attach the device to the user’s body in a rather unnatural way: it cannot be carried in one of the user’s pockets, they all require to fix the device on his/her belt. Moreover, either the orientation of the device is fixed and known (placing an additional burden on the user) or the techniques cannot use the distinct acceleration values available on the three axes. It is clear that the performance of fall detection systems could only get better if the techniques proposed so far would make use of disaggregated acceleration information.

2.4 Contribution

With respect to the state-of-the-art techniques and systems, the major contributions of this work are summarized as follows.

  • For the first time, the reduction of false alarms associated to the use of posture information in fall detection is evaluated and compared to other commonly used filtering criteria, such as vertical velocity or post impact activity. All these criteria can be considered as the “building blocks” of more complex fall detection techniques, thus the evaluation of their effect in increasing the specificity of fall detection is important for the design of future systems.

  • The use of walk segments for passively collecting information about device orientation and user’s posture in the context of fall detection is here presented and, as far as we know, it is completely novel with respect to previous work. The reduction of false alarms obtained in the real world (97 h of monitoring) is approximately 98 %.

  • The adoption of these techniques in a smartphone-based fall detection system provides significant benefits for the user in terms of usability: (i) the user is no longer forced to wear the device according to a fixed orientation; (ii) the calibration phase is no longer needed.

3 Method

Fig. 1
figure 1

Lying posture detection with aligned device. In this example, VD is aligned with the \(y\) axis of the device. The tilt angle between \(y\) and gravity is measured and compared against a threshold (e.g. \(50^\circ\)) in order to detect postural transitions from standing to lying

Fig. 2
figure 2

Lying posture detection with misaligned device. The direction of gravity while the user is known to be upright is used to estimate the direction of VD. The tilt angle between VD and gravity is then monitored and used to detect postural transitions

The acceleration measured by accelerometers always includes a component due to gravity, which can be extracted through low-pass filtering of raw acceleration samples (Mizell 2003). The component due to gravity can be used to find the direction of gravity with respect to the current orientation of the device.

Let us call vertical direction (VD) the direction of the longitudinal axis of the human body. If one of the axes of the device is aligned with VD, posture can be detected as shown in Fig. 1. In this example, the tilt angle between the \(y\) axis and gravity is used for posture detection.

A more realistic scenario is shown in Fig. 2. The device is not aligned with the user’s body and VD is unknown with respect to the coordinate system of the device. The estimation of VD is generally achieved with a calibration step, during which the user is required to stay upright for a few seconds. Indeed, gravity and VD are almost aligned when the user is upright and the direction of gravity can be used to estimate VD.

In order to automatically find VD and detect the posture without requiring a calibration step, we propose a technique based on the idea of measuring the direction of gravity while the user is walking. The reason for taking advantage of walk is threefold: while walking, the user is known to be upright; walk is a frequently occurring activity; walk can be recognized with high specificity by computer programs. Obtaining VD by means of walk recognition not only removes the necessity of wearing the device according to a predefined orientation, but also allows the user to freely reposition the device while in use (VD is automatically updated as soon as the user walks).

The posture detection method we propose can be used in a fall detection system as follows: (i) whenever the user is walking, VD is estimated; (ii) VD is used after an impact to understand whether the user is standing or not; (iii) if after an impact the user is standing, then the event is discarded as a false alarm. A flowchart representation of the proposed method is shown in Fig. 3. More detailed descriptions of the walk recognition and fall detection algorithm are given in Sects. 5 and 6, respectively. Such an approach to posture detection greatly increases the usability of the system, as it removes the need of placing and keeping the device according to a predefined alignment. Even with a binary meaning (i.e., upright/lying), posture can be used to classify a large number of impacts as non-falls, thus improving the trustworthiness of the fall detection system by reducing the number of false alarms.

Fig. 3
figure 3

Flowchart representation of the proposed method: walk recognition is executed in parallel with impact detection, in order to keep the estimation of VD updated. Whenever an impact is detected, the latest VD estimation is used to infer the user’s posture and confirm a possible fall

4 Experimental setup and data acquisition

Table 1 Volunteers’ characteristics

We carried out a data acquisition campaign to evaluate the performance of both the walk recognition algorithm and the fall detection system that we designed and implemented.

Movement traces have been acquired using a Shimmer 2r device (RTI 2010), which is equipped with a tri-axial accelerometer. The Shimmer device has been encapsulated in a smartphone-like container to mimic the form factor of commonly available smartphones and thus to obtain acceleration traces that are consistent with those obtained in real-world settings. Besides the size, also the weight of the smartphone-like container has been calibrated to correspond to the weight of an ordinary smartphone (130 g, approximately the weight of an iPhone 4). We did not directly use a real smartphone for three main reasons: first, on smartphones, the scale of accelerometers is often limited in the \(\pm 2g\) range,Footnote 1 and thus too small to capture the large variations that occur during falls; second, this enabled a fine-grained control of the sampling activities without the restrictions imposed by mobile operating systems; third, since the same device has been used to collect acceleration data also during some falls, the use of a real smartphone has been discouraged by its fragility.

Acceleration has been sampled at \(51.2\) Hz and stored using the persistent memory of the device. Then, traces have been transferred onto a PC for off-line analysis and to ensure repeatable evaluation of the proposed techniques. During data acquisition, the device has always been worn in a front trouser pocket. Although this is not the only position where a smartphone can be placed, other possibilities include bags and jackets, trouser pockets are the most common placement. We preferred to defer the analysis of different locations until a later time. Moreover, it is important to notice that several walk-based techniques proved to be robust also when the device is placed in the user’s jacket (Kunze et al. 2005). As far as orientation is concerned the device has been worn with no specific attention, as it is usually done with smartphones.

Ten volunteers have been involved in a collection campaign. Gender, age and physical characteristics of the volunteers are shown in Table 1. The campaign included both short walk sessions, aimed at evaluating the walk recognition and orientation procedures, and long monitoring sessions, to assess the final goal of the system, i.e. its ability to remove possible false alarms, in terms of falls, occurring during the normal activities of daily living.

5 Real time walk recognition and estimation of device orientation

The algorithm for the recognition of walk segments has the following specific requirements: (i) low computational load; (ii) high specificity; (iii) reasonable level of sensitivity.

Having a low computational load is fundamental for an application that is going to be executed on a smartphone. To reduce the computational load, our walk recognition algorithm does not operate in the frequency domain, but it is based only on temporal analysis of the samples of the acceleration magnitude (Euclidean norm). High specificity in detecting walk segments is strictly connected, in our system, with fall detection accuracy. A misdetected walk segment would lead to a wrongly estimated VD and, thus, to errors in lying posture detection. The effect of these errors on fall detection accuracy may be detrimental, since posture is used for both identifying false alarms and confirming real falls. Finally, a reasonable level of sensitivity in detecting walk segments is required in order to quickly update VD when the user changes the orientation of the device.

5.1 Description of the walk recognition algorithm

Fig. 4
figure 4

Example of acceleration pattern during a short walk: the groups of peaks produced by each step have been highlighted and numbered

Fig. 5
figure 5

Walk detection as a finite state machine

During a walk each leg goes through two fundamental states: the stance phase, when the foot is in contact with the ground; and the swing phase, when the leg swings forward and all the body weight is placed on the other leg (Lai et al. 2009).

The cyclic repetition of these states produces a typical acceleration magnitude pattern, as the one shown in Fig. 4. It can be observed the presence of a group of peaks for each step made. These groups are generated at the end of every swing state, when the foot hits the ground. Conversely, relatively lower accelerations are produced while a leg is swinging.

Another interesting consideration concerns the different characteristics of the odd and even groups of peaks, clearly visible in Fig. 4. This difference is due to the fact that the device is carried in a trouser pocket, thus the peaks produced by the leg corresponding to the side of the body where the sensor is placed are generally higher (even numbers in Fig. 4).

The algorithm for the recognition of walk segments can be represented as a finite state machine (shown in Fig. 5). When the machine is started, no groups of peaks have been found yet and the current possible walk segment is empty. The machine is in the Group start search state, where it analyzes the acceleration magnitude of samples waiting for a new group of peaks. We define an acceleration magnitude peak as a sample greater than the previous and the next samples. A new group starts when a peak greater than the peak_intensity threshold is detected. After that, the group start has been found and the machine moves to the Group end search state.

In this state, possible new peaks are searched and added to the current group of peaks. This process ends as soon as one of the following conditions occurs: (i) no new peaks are found for a time longer than the group_int_max interval; (ii) a time longer than group_dur_max has passed since the start of the group. When the group ends, the following information is saved and added to the current walk segment: group_start, corresponding to the time the first peak in the group occurred; group_end, corresponding to the time the last peak in the group occurred; group_time, calculated as the middle time between the start and the end times of the group. At this point, the machine moves to the Step length test state.

In our algorithm, the duration of each step is estimated using the difference between the group_time values of consecutive groups of peaks. In the Step length test state, the machine tests whether the duration of the last step lies between two thresholds: step_dur_min and step_dur_max. If the last step meets the duration requirements, the machine moves to the Segment duration test. Otherwise, the current walk segment is reset and the machine returns to the Group start search state.

In Segment duration test, the duration of the current walk segment is checked. This duration is calculated as the difference between the end time of the last group of peaks and the start time of the first group in the segment. If the duration of the segment is shorter than a seg_dur_min interval, then the machine returns to the Group start search state. Conversely, if the segment is long enough, the machine moves to the Step regularity test state.

In Step regularity test, two standard deviation values are calculated: Odd Step Durations (OSD) and Even Step Durations (ESD). Such values are calculated using the durations of the odd and the even steps respectively. The test is passed only if both OSD and ESD are smaller than a step_dev_max threshold. If the test is not passed, the first group of peaks belonging to the current possible walk segment is discarded and the machine moves back to the Group start search. Instead, if the regularity test is passed, the current possible walk segment is actually identified as a walk segment. Thus, it can be used to estimate VD in the coordinate system of the device. In our implementation, this estimation is done averaging the values of the acceleration samples belonging to the walk segment, considering the \(x\), \(y\), and \(z\) components separately. After this estimation has been calculated, all other information about the walk segment is discarded and the machine returns to the Group start search state.

5.2 Selection of thresholds

The minimum duration of a walk segment seg_dur_min has been chosen on the base of the following considerations. If the minimum duration of a segment is too short, then the estimation of VD may be highly inaccurate for at least two reasons: first, because the estimation is made on a relatively small set of samples; second, because it is more difficult to ensure the specificity of walk recognition by testing the regularity of a small number of consecutive steps. On the other hand, we expect short walks to be very frequent. This is true especially indoors where, due to the limited space, long sequences of steps are rare. According to our experimental data, a minimum duration of \(6\) s represents a satisfactory trade-off between walk recognition sensitivity and the accuracy in estimating VD.

All the other thresholds have been tuned according to the following procedure. First, the peak_intensity, group_dur_max, and group_int_max thresholds have been found by means of exhaustive search: all the possible triplets in a reasonable search space have been used to evaluate walk recognition results on the training set (maximizing the number of detected walk segments). The triplet that provided the best results has been used to determine the remaining thresholds. In particular, the tuning algorithm selects the longest step_dur_min, the shortest step_dur_max, and the lowest step_dev_max which do not lead to a reduction in the total number of walk segments detected.

5.3 Walk recognition results and discussion

Table 2 First detection times
Table 3 Walk recognition results on long monitoring tracks
Fig. 6
figure 6

Device placement examples during long monitoring experiments. While the user is standing, the movements of the device inside a pocket are expected to affect only the \(x\) and \(y\) components of VD in the coordinate system of the device

A first evaluation has been carried out using our dataset of short walk tracks. To reduce the dependency of results from the training set, we used the leave-one-out cross-validation technique: let \(N\) be the number of users, the walk recognition algorithm has been tuned using the tracks of \(N-1\) users and evaluated on the tracks of the remaining user; the procedure has been repeated \(N\) times.

A performance index that is particularly interesting in our case of study is represented by the first detection time, defined as the end time of the first walk segment found in a walk track. This index is relevant because it corresponds to the delay introduced by the system to compute the first VD estimation since the user started walking. Table 2 shows the first detection time obtained in the worst and average case for every user in our dataset. In the global worst case, the walk recognition algorithm was able to find a walk segment after \(7.21\) s. This confirms the effectiveness of the walk recognition method (note that each segment has a duration of \(6\) s, thus the initial transient phase that is not included in the walk segment is slightly above \(1\) s).

A second evaluation has been carried out using the long monitoring tracks. The walk recognition algorithm has been evaluated on each user’s track, using the parameters obtained from the walk tracks of the other users. Table 3 shows the results. For each user, the duration of the long monitoring track, the number of walk segments found, the average and the maximum interval between consecutive walk segments are shown. The last row of the table shows the global results.

To the purpose of fall detection, the average interval between consecutive walk segments is particularly significant, as it determines the time needed for obtaining a new VD estimation. This interval is influenced by two main factors: first, by how frequently the user actually walks; second, by how much the algorithm is able to detect walking when it happens. The first factor is not under our control, while the second depends on the sensitivity of the walk recognition algorithm. Analyzing the long monitoring tracks more in detail, we were able to find out that the longest intervals without walk segments were registered when users had been sitting for a long time (e.g. driving, working at the office, watching TV). Conversely, when users were performing less sedentary activities (e.g. visiting shops), the walk recognition algorithm proved to be able to find a new segment with adequate frequency (within few minutes).

Fig. 7
figure 7

a VD estimations against time, b absolute deviation over standard deviation ratio on the z axis

Fig. 8
figure 8

a VD estimations against time with a wrong estimation performed while driving, b absolute deviation over standard deviation ratio on the z axis

The long monitoring tracks were labeled with the actions performed by users. However, to reduce the burden, users were asked to annotate the activities/locations at a rough level, e.g. at home, at the office, shopping, driving, specifying the start and end time with minute precision. This approximate annotation made it impossible to calculate the specificity of the walk recognition algorithm, as this would have required second-level precision (each segment is \(6\) s long) and a detailed specification of activities (e.g. by recording a video).

Nevertheless, some assumptions can be made if we consider the placement of the sensor during the long monitoring experiments. As illustrated in Fig. 6, the device was placed in a front trouser pocket, with the \(z\) axis of the device almost orthogonal to VD. Hence, we expect the VD component along the \(z\) axis to remain almost constant and close to \(0g\) across different estimations. Also, we expect only minor variations regarding the \(x\) and the \(y\) components of consecutive VD estimations, if correctly produced by the walk recognition algorithm. Significant differences are possible only if the device is extracted from the pocket and repositioned in a different way. In the latter case, we expect an abrupt change along the \(x\) and the \(y\), followed by estimations that confirm the new orientation of the device with respect to the user’s body. In any case, the \(z\) component of the estimated VD should remain close to \(0g\) during our experiments.

To verify this hypothesis, we plotted the VD estimations obtained for each user against the time when they were found. Figure 7a shows one of these plots where the acceleration on the \(z\) axis is almost constant and very close to \(0g\), while the acceleration along the \(x\) and \(y\) axes is characterized by some fluctuations. Figure 7b highlights the dispersion on the \(z\) axis: for each value it is shown the ratio between the absolute deviation from the average and the standard deviation. The maximum absolute deviation from the average is \(3.1\) times the standard deviation in the example.

Figures 8a and b, instead, have been produced by artificially adding the recognition of a walk segment during an activity that does not correspond to walking (driving, in this particular case). Such a wrong estimation can be immediately identified simply from the observation of the plots. In particular, in Fig. 8b it can be noticed that the absolute deviation over standard deviation ratio on the \(z\) axis presents an abnormal value corresponding to the fake walk segment. The fake walk segment produces a value on the \(z\) axis with an absolute deviation from the average equal to \(7.6\) times the standard deviation.

We inspected all the traces and verified that the pattern corresponds to the expected one. This information cannot be used to state that all walk segments were collected when the user was actually walking. However, we can state with reasonable confidence that no segment was collected while the user was in a non-upright position, such as lying or sitting.

6 Use of posture in a fall detection system

In general, accelerometer-based fall detection systems detect impacts by means of a fixed threshold on the acceleration magnitude (Karantonis et al. 2006; Kangas et al. 2008; Bourke et al. 2010; Abbate et al. 2011, 2012). Unfortunately, these impacts include real falls as well as fall-like impacts due to activities of daily living (ADLs), such as sitting or walking, that lead to false alarms. Approaches for reducing false alarms try to discriminate between ADLs and real falls using vertical velocity estimation (Degen et al. 2003; Bourke and Lyons 2008), post-fall activity detection (Karantonis et al. 2006; Abbate et al. 2012), and posture information (Karantonis et al. 2006; Kangas et al. 2008; Bourke et al. 2010).

The major drawback of existing approaches based on posture is the need for a fixed alignment of the device with respect to user’s body, or for a manual calibration. Additionally, in case of manual calibration, the procedure must be repeated each time the orientation of the device changes. The walk recognition technique described in Sect. 5 can be used to address this limitation, since it allows the fall detection system to automatically and dynamically estimate VD each time the user walks.

In the following, we describe a fall detection system that uses our technique for the automatic estimation of device orientation to infer posture information. The performance of the fall detection system is then evaluated on the long monitoring tracks of our dataset, to measure both the overall results achieved by the system and the relative contribution to filter false alarms provided by posture information with respect to other filtering techniques.

6.1 Fall detection algorithm

Fig. 9
figure 9

Fall detection as a finite state machine

The fall detection algorithm can be described through the finite state machine shown in Fig. 9. The initial activity of the fall detection algorithm (Peak search state) is finding a fall-like impact, called impact thereafter, and defined as follows. An impact is found when the magnitude of the acceleration signal exceeds a predefined impact_peak threshold. Values ranging from \(2.5\) to \(3.5g\) have been used in the literature for this threshold (Bourke et al. 2007; Li et al. 2009). In our implementation, we set impact_peak to \(3g\): the \(3g\) value is small enough to avoid false negatives, as real falls are likely to produce a peak that exceeds such threshold, but not too small to generate numerous false alarms.

After an impact has been detected, the machine moves to the Post-peak wait state and starts a bouncing_timer. This timer is used to wait for the end of the impact phase. During the interval specified by the timer, the acceleration samples are still analyzed: if another magnitude sample above \(3g\) is detected, the timer is restarted. When the timer finally fires, the machine moves to the False alarm tests state.

In False alarm tests, the algorithm performs a set of tests in order to confirm that the impact is a real fall. The set of tests that we have implemented includes: post-impact activity test (PAT), vertical velocity estimation test (VVT), AAMV index test, activity ratio test, and lying detection test. Only if all of these tests are passed the impact is definitely classified as a real fall.

The PAT is based on the assumption that, immediately after a fall, the user generally lies on the ground and produces little or no variations in the acceleration signal. The PAT has been implemented as described by Abbate et al. (2012). In particular, only an interval of \(2.5\) s after the impact was considered, in order to allow fast detection of falls. If enough movement is detected, the impact is discarded as a false alarm.

The VVT has been used to reduce the incidence of false alarms (Degen et al. 2003; Bourke and Lyons 2008). The estimation is based on the numerical integration of the acceleration magnitude after gravity has been subtracted. In order to increase the estimation accuracy, the acceleration signal related to the impact is low-pass filtered with \(15\) Hz cut-off frequency, as described in Bourke and Lyons (2008). The vertical velocity threshold has been selected analyzing the database of falls presented by Abbate et al. (2012): setting this value to \(0.7\) m/s seems to be a reasonable choice to minimize the risk of false negatives. If no velocity estimations above the threshold are found, the impact is discarded as a false alarm.

The use of the Average absolute Acceleration Magnitude Variation (AAMV) index has been discussed by Abbate et al. (2011) and Abbate et al. (2012). According to the experimental results, falls are expected to produce faster variations in the acceleration magnitude with respect to sitting or lying. We implemented the AAMV index test (AAMVT) as described by Abbate et al. (2012), using a threshold equal to \(0.26g\). If the value of the index is below the threshold, the fall-like impact is ignored.

The Activity Ratio Test (ART) is based on the Activity Ratio Index (ARI) described in Abbate et al. (2012). ARI measures the level of activity in an interval of \(700\) ms properly centered at the fall-like impact. It is calculated as the ratio between the number of samples not in \([0.85g,1.3g]\) and the total number of samples in the \(700\) ms interval. Fall-like impacts are discarded as false alarms if the ratio is below \(0.45\).

Finally, posture information is considered through the Lying Detection Test (LDT), which has been implemented by measuring the angle between the automatically estimated VD and gravity. If this tilt difference is below \(50^\circ\) the impact is discarded. We decided to set a \(50^\circ\) threshold to be conservative and reduce the risk of filtering out real falls. At the beginning of the track it may happen that a VD estimation has not been found yet: in this case, LDT is not executed.

6.2 Fall detection results and discussion

Table 4 Long monitoring tracks, duration of activities
Table 5 Fall detection algorithm: impacts above \(3g\)
Table 6 Fall detection specificity results (%)
Table 7 Walk segments statistics

The fall detection algorithm was tested on the long monitoring tracks of our dataset. As no real falls occurred during the recording of these tracks, this test can be only used to measure the specificity of the fall detection algorithm. For the sensitivity, we tuned the filtering thresholds and parameters in order to ensure that all the simulated falls of the dataset presented by Abbate et al. (2012) were properly detected (100 % sensitivity).

As mentioned in Sect. 5.3, users were asked to annotate their current activity or location occurring during the long monitoring tracks. These were categorized at a rough level using the following labels: home, office, transport, city, and outdoor. Home includes activities such as resting, watching TV and housekeeping; office mainly includes short walks and long periods sitting at the desk; city refers to visiting shops or bars and walking outdoors; transport is used for the periods spent in a car or public transportation; finally, outdoor (performed only by user 10) includes activities mainly performed in the countryside, such as walking, jumping, kneeling, and bending. The percentages of different activities performed by each user are shown in Table 4.

The first step of the fall detection algorithm consists in the detection of impacts, and it is based on the \(3g\) acceleration magnitude threshold. The results of impact detection applied to the long monitoring tracks are shown in Table 5, in terms of total number of impacts and impact rate (impacts per hour). These figures highlight the need for techniques able to reduce the incidence of false alarms. Also, it can be observed a great variation in the impact rate of different users. This variation can not be solely explained by the peculiar activities a user performed. For example, user 9 showed an impact rate about \(5\) times greater than user 2, despite having performed similar activities. It is also worth noting that no impacts were produced while the users were traveling in a car.

The second step of the fall detection algorithm consists in filtering out false alarms by means of the five tests described in Sect. 6.1. Table 6 shows the results obtained by the different tests in terms of specificity (%), where the specificity reached by each filter is calculated as the ratio between the number of impacts recognized as false alarms and the total number of impacts. These results highlight the importance of the use of posture for the filtering of false alarms: in fact, the LDT was able to filter an average \(98.4\,\%\) of the impacts, bringing a leading advantage over all the other techniques. Post-impact activity detection techniques, i.e. PAT, AAMVT and ART, also bring a significant improvement (\(82.3\), \(69.5\) and \(51.6\,\%\), respectively), while vertical velocity, i.e. VVT, seems to be the least relevant test (\(12.3\,\%\)).

The high specificity achieved when filtering on the base of posture information suggests that most of the false alarms were produced while users were upright or walking. In order to evaluate if a relationship holds between walking and the impact rate of each user, we calculated the statistics shown in Table 7. For each user, the number of Walk Segments per hour (WS/h) and the Average Highest Peak (AHP) index are reported. The former can be used as a measure of the user’s activity level, while the latter indicates the user’s tendency to produce high acceleration peaks, and thus impacts, while walking. AHP has been calculated by averaging the highest acceleration magnitude peaks of walk segments. The combination of these two indexes together with the activities performed seems to offer a reasonable explanation of the impact rate experienced by each user. For example, the relatively low AHP value of user 1 determined a low number of impacts, while the relative high walking rate and high AHP value of user 10 determined the highest impact rate of the dataset.

Finally, it is worth highlighting that the use of posture on these long monitoring tracks was made possible by our technique based on automatic estimation of VD. The traditional approaches would have been inadequate, since they require manual calibration and/or predefined orientation of the device.

7 Conclusions

We presented a novel technique for increasing both usability and trustworthiness of fall detection systems. By finding segments of acceleration corresponding to walk periods, the orientation of the sensing device with respect to the user’s body (and vice-versa) can be automatically determined. The advantage is twofold: manual calibration and alignment constraints are no longer necessary (as, instead, are with fall detection systems presented so far); and the sensing device can be worn in the user’s trouser pockets. Such passively collected information is then used to understand whether, after an impact, the user’s body is horizontal or not, thus reducing significantly the number of false alarms. Both the walk recognition algorithm, specifically designed for being included in a fall detection system, and the filtering effect due to posture information have been evaluated using a set of long monitoring tracks. Experimental results confirmed that the proposed method is able to improve the accuracy of a fall detection system, in terms of specificity.

Future work will focus on understanding how the different ways of carrying a smartphone (in a bag, in a jacket pocket) impact the proposed technique, as well as on the analysis of the energy consumption introduced by the proposed walk recognition algorithm.