1 Introduction

Fall, according to [1] is defined as.

“An event which results in a person coming to repose unintentionally on the ground or any other lower surface”.

This definition has been adopted by many fall detection and fall-risk assessment studies, and covers most types of falls targeted by fall detection research. The different variations of the definition of falls also have been found in divergent perspectives of seniors, health care providers and research communities.

There are two factors can be associated with falls specially for elderly called intrinsic and extrinsic factors [2, 3]. The elements of intrinsic factors are, ageing, Parkinson’s disease, weakness in muscle strength, low vision, neurodegenerative and balance disorder. The extrinsic factors are, medication effect, poor lighting, slippery floors and obstacles. The risks of fall increases with respect to age, as old age people become physically weak, the risk of fall is more likely to occure. According to the reference [4], falling is one of the major causes of severe injuries in elderly and the second topmost cause of accidental deaths worldwide. Here, elderly refers to a person aged 65 years of more. One of every third person falls (approximately 28% to 35%) [5]. Falls in elderly could lead to different consequences, such as major or minor wrist or hip fractures, broken ribs or in some cases it could be severe enough to cause death or permanent disability. Figure 1 shows analysis from the World Health Organization report [5], indicating that fall rate with fatal consequences increases exponentially in male and females with the most number of falls for 65+ of age. It also indicates that the men suffered from fatal falls more than women due to their involvement in physical activities especially in outdoor locations which may tend to have high risk of fatal fall.

Fig. 1
figure 1

Fatal fall rates by age and sex group [5]

According to the [6], the death rate caused by accidental falls of elderly is 16% in USA. In the case of Pakistan this rate may be much higher, as most of the cases are not even reported.

If there is no any assistance available at the time of fall then this situation leads to “long lie”. The term “long lie” is used for a state in which a person had a fall then he/she remain involuntarily on the floor about an hour or more [7]. This could be effect on person’s psychological and physical health. For example, fear of falling again (leads to limit his/her activities), this is a psychological effect while physical outcomes may lead to, dehydration, damages to the muscles, pneumonia, hypothermia or in some cases it could be severe enough to cause death [7, 8].

An early fall detection system could be helpful to minimize these damages caused by a fall. Therefore, a lot of research has been done so far in the developed countries, where some early fall detection systems as commercial products are available, but the condition in under developed countries like Pakistan is very poor, where fall is not even considered as a serious issue. All previously given stats belong to USA or other developed countries, in fact injuries and mortality rate caused by fall are not even recorded in Pakistan.

There are many fall detection systems, which have been proposed since the last two decades. In these systems, many types of sensors have been used. These sensors may be categorized as external sensors and the wearable/body attached sensors. Cameras, and ambient sensors (such as pressure sensors and infrared (IR) sensors), embedded on the floor/surroundings are examples of external sensors. These external sensors, specially the cameras have been used in different non-intrusive systems, which looks more effective but have certain limitations, such as computational cost and the number of cameras to be installed in surroundings. These systems may be complex and highly expensive due to the infrastructure, necessary for the installation. Another factor that may create the legal problems, is the exploitation of individual privacy. Therefore, elderly/patients are reluctant to use these systems. The alternate solution is the use of wearable sensors in fall detection systems. Wearable sensors are low cost, easy to use, and generally non-invasive devices. A wearer feels comfortable in using these sensors. Therefore, these sensors are extensively used in research, related to elderly fall detection. There are many fall detection systems, which were proposed by using the wearable sensors. Some of these systems have employed the supervised learning techniques, such as Support Vector Machine (SVM) [9,10,11,12], Decision Trees (DT) [13,14,15], k-Nearest Neighbors (k-NN) [16], and Artificial Neural Network (ANN) [17]. The main problem of such classifying techniques, is their computational cost, specially required while training the algorithm [18]. Another category of fall detections approaches exists which is termed as the threshold-based methods. Most of these methods involve a point-based processing, where only one observation sample is taken into consideration. The threshold-based algorithms generally have a high probability of generating the false alarm, which happens because of the noise in sensor data. To overcome this problem multiple observation samples are considered. Generally, a sliding window is used to get the multiple observation samples, which is necessary to compensate the noise effect. There exist several fall detection techniques, which follow the above strategy, such as studies [19,20,21] have used the fixed size of sliding window up to 1.8 seconds with an overlap of 0.6 seconds. Although these algorithms are based on the sliding window, but the length of sliding window is kept same for each individual. Generally, each daily life activity, such as walking, sitting on and getting up from a chair, and standing still have a unique pattern. The periodic length of patterns not only varies with activity, but also with persons. For example, the periodic length of walk activity for two persons may be different. If the length of sliding window is kept same for each activity, and for each individual, then partially extracted patterns may cause a problem in fall detection, which in turn lowers the effectiveness of fall detection systems. To cope with this problem, we propose a new fall detection algorithm that adjusts the length of sliding window with periodic length. The adjustment is made to capture the full activity pattern. As the periodic length differs from activity to activity, and from person to person, the length of current periodic pattern may differ from patterns of reference data set. Euclidean distance and other distance based techniques are not capable of making a fair comparison between the two patterns, having different periodic lengths. Therefore, Mahalanobis distance is employed to find the similarity between two patterns. The computational cost of Mahalanobis distance is comparatively low (i.e. O(nd2) discussed in section 4.1) to the techniques discussed earlier and their computation cost can be found in [18]. To the best of our knowledge, Mahalanobis distance is not been used in wearable sensor based fall detection systems. However, it is used in image-based fall detection system [22]. The idea behind using the Mahalanobis distance as a measure, is based on following aspects: 1) it is capable of making a fair comparison between two patterns, even if the patterns have different periodic lengths; 2) it takes into account the correlation in data; 3) in multivariate calibration, it has been used for different purpose, such as detecting outliers, selecting the calibration samples from a large set of measurements, and investigating the representativity between two data sets. In pattern recognition, it is applied in clustering and discriminating techniques. In order to make a comprehensive analysis, we have compared the fall pattern against each activity one by one, the results are comparable to the state-of-the-art fall detection techniques. For data Acquisition, SHIMMER™ platform [23] based accelerometer is used.

The rest of the paper is organized as follows. In section II, we present related work and our gap analysis. Section III presents our proposed Fall Detection System prototype including materials and methods used in proposed system. Section IV presents results and discussion including comparison of our proposed algorithm with other techniques. Finally, the conclusion and future work is discussed.

2 Related work

A fall detection system generally consists of sensor devices deployed on human body connected to any computational device and an alert system. Sensor nodes capture the physical parameters and send the data to connected computational device which compute the data and based on data, if fall occurrence is detected than an alert is generated to inform the caregiver. In this section, we classified the existing systems, based on literature review, into two major categories: wearable sensors based fall detetion systems and smartphone based fall detection systems. In first, wearable sensors based fall detection systems have been discussed.

2.1 Wearable sensors based fall detection systems

Erdogan and others [24] proposed a k-nearest neighbors (k-NN) algorithm based fall detection system in which a tri-axial accelerometer sensor is placed on the waist of the subject used to detect the fall event of a subject only from standing position. Authors claimed that they have achieved 89.4% accuracy with a precision of 85% and recall of 100%.

Baek and others [25], proposed system based on a tri-axial accelerometer and gyroscope embedded in one sensor node and placed on the neck of in the form of wearable necklace. The ADLs performed by different individuals are Lying, Standing, Sitting in the chair, Sitting on the floor, Walking, Go upstairs, Go downstairs, Running, Bending and some fall types are also simulated which are Fall leftward (LF), Fall rightward (RF), Fall forward (FF), Fall backward (BF), Fall on the stairs. The fall is detected using the threshold algorithm based on angular velocity, posture angle and the acceleration. If the values of gyroscope and accelerometer are exceeded from predefined threshold value, then fall event was detected. According to the authors, their proposed algorithm achieved 100% accuracy for ADLs and 81.6% total sensitivity.

A Back Propagation Neural Network (BPNN) based fall detection system algorithm was proposed in [26]. For data acquisition, a wearable tri-axial accelerometer was placed on the waist of the subject. Activities were categorized in to three classes, falling activities, slow motion activities, and sudden motion activities. To differentiate slow motion activities with other activities, a threshold was set and if that threshold is exceeded, then decision will be taken through BPNN to determine a fall event. Authors claimed that their algorithm produced overall sensitivity up to 96.25% and the specificity was up to 99.5%.

In [27], Chen and others proposed a threshold based wireless fall detection system using accelerometer. Their system was comprised of two modules, fall detection module (placed on subject’s waist) and the remote monitoring module. Both modules were communicated with each other using ZigBee wireless protocol. The fall detection module works without the remote module and the remote module was used to receive and store kinematic characteristics for future long-term analysis and to raise fall alarms. There are four types of falls; (BF, FF, RF, LF) and six ADL were performed. The results show the 97% sensitivity and 100% of specificity.

In [28], a fall detection system was proposed which was mainly based on a Gaussian distribution of Clustered Knowledge (GCK), an Augmented Radial Basis Neural Network (ARBFNN) and a multilayer perceptron (MLP). A wearable triaxial accelerometer (placed on the waist of the subject) was used for data collection. The collected data was sent wirelessly to a receiver board. If the magnitude of the acceleration was exceeded from a predefined threshold, then the discrete wavelet transforms (DWT) was used for further filtration of the acceleration signal and to reduce the sampling rate. This filtered data then send to the ensemble classifier: MLP and an ARBFNN. The method of fusion of GCK with this system has successfully achieved 100% sensitivity on ingroup falls, 97.65% on outgroup falls, 99.33%.

Another fall detection system by using wearable sensors, is proposed in [15]. The well-known SHIMMER platform based sensors have been used for data acquisition. These motes are equipped with a tri-axial accelerometer, tri-axial gyroscope and use Bluetooth for wireless communication. In this study, two SHIMMER motes were placed on subject’s chest and right thigh. The vector magnitudes of acceleration and angular velocity with raw data are selected as input features for a decision tree C4.5 classifier. Four types of fall (FF, BF, RF, LF) were aimed to be distinguished from ADLs. Eight healthy subjects performed these four types of falls and ADLs. Authors claimed that they have achieved 99.45% accuracy for training with 7 subjects, but it decreases up to 98.91% when training with 3 subjects.

2.2 Smartphone based fall detection systems

uFast, a prototype of a ubiquitous fall detection and alert system was proposed in [29]. uFast consists of accelerometer and sensors embedded in the Smartphone. The smartphone was placed in the left pocket of chest and the falling events were calculated utilizing true positives, false positives, true negatives and false negatives. The performance metrics was predicted on the substratum of sensitivity, specificity. Their result showed that the proposed system achieves 95.33% precision level.

In [30], Sposaro and Tyson have proposed Android based Fall application, iFall, which used android phone having accelerometer sensor for gathering data. iFall was basically based on threshold algorithm in which the root sum square of accelerometer’s tri axial determines the total acceleration which then determines the amplitude of threshold. iFall’s reliability is based on the service memory consumption and user interaction, thus only invokes the service when a fall is suspected or requested by user. The accuracy of iFall is not much high since it produces a large number of false alarms.

Tacconi and others [31] proposed an android Smartphone based fall detection system and used instrumented Timed-Up-and-Go (iTUG) application. The Smartphone used in this study was HTC Desire and three subjects performed different simulated intentional falls. Authors mention in their study, that there is a need to have a ubiquitous sensing user-friendly device with full connectivity of Wi-Fi, 3G/4G, Bluetooth etc. For this aspect, authors made a fall risk assessment by collecting and analyzing data of Timed-Up-and-Go device iTUG which uses Smartphone (in this case Android Phone) accelerometer sensor placed on waist belt. The algorithm used was threshold based. When a fall was detected, the fall events were sent to remote server on a VPN (Virtual private network). For this application, three members performed fall-based events, therefore the reliability of this application is definitely low.

Dau, and others [32] in 2014 have developed a classifier from a Genetical Programming learning based approach for fall detection. Genetical Programming GP is a global search technique inspired by biological evolution. The basic process of GP training involves generating an initial population of computer programs to solve the problem at hand. A fitness function is used to evaluate each program individual, and the better-performed programs are chosen to undergo genetic operation to create the next generation. This iterative process ceases when a terminating condition is met, in this case, a solution with 100% accuracy is found or the maximum number of generation is reached. Experiment was performed with male individuals with tight pant and loose pant pocket-placement options. The data collected was then compared with popular threshold methods described in [30, 33] which showed that a reliable fall detection can be obtained from GP method. The performance metrics included were accuracy, true positive rate and true negative rate. Some other mobile based studies are [35, 36].

2.3 GAP analysis

Most of the prototype devices are made-up of microcontrollers while some devices are available as a commercial product. In today’s world, the sensors are embedded in smartphones, as smartphones are now becoming a necessary part of individual’s lifestyle. Due to this, most fall detection systems are based on mobile phone sensors. Fig. 2 shows the statistics of devices used in fall detection systems discussed in this paper.

Fig. 2
figure 2

Devices used in fall detection systems

There are mainly two types of techniques used in fall detection systems, learning-based and threshold-based. Learning-based detection techniques are further categorized into two groups, supervised learning and unsupervised learning. There are some classification techniques were discussed and implemented in our previous work [34] for activity recognition. While the threshold based techniques are more common due to involvement of less computation. The probabilities of false alarming in threshold based fall detection systems are very high as discussed earlier. Therefore, some researchers used threshold with classification techniques. Figure 3 shows the methodologies discussed in this paper where abbreviation of terms are TB (Threshold Based), DT (Decision Tree), BPNN (Back propagation Neural Network), KNN (K Nearest Neighbors), GP (Genetical Programming).

Fig. 3
figure 3

Methodologies used in fall detection systems

The core idea behind using Mahalanobis distance is, its ability to find distance between the two points of two different data groups without any requirement of data size limitation while in other distance measure technique such as Euclidean distance, the data size of all the groups should be equal. Also in this paper, a two-dimensional analysis is also performed. In first, every activity is compared to fall, then one by one, window size is selected according to single activity pattern and compared it with fall activity. In contrast to the work discussed in [29,30,31,32], in this paper, a third-generation wearable sensor technology SHIMMER3 produced by SHIMMER sensor Ireland [23] is used. SHIMMER3 provides a flexible platform using third generation of sensors in the form of different kits suitable for various applications.

The inertial measurement sensors of tri-axial accelerometer connected through Bluetooth with the PC (Laptop) as sink in the form of Wireless Body Area Network (WBAN). In addition, our fall detection technique is based on Mahalanobis distance. We believe this methodology of applying Mahalanobis distance technique on real time data from 3rd generation SHIMMER sensors is novel as Mahalanobis distance is not used in wearable sensors based fall detection system. Also, Most of the techniques discussed earlier in this paper, are based on predefined threshold values, while in this paper a two-dimensional analysis carried out for fall detection. In first, a sliding window size is selected as per the fall event window size, while in second step the sliding window size is varied according to the window size of the activity pattern. Therefore, in each setting, the threshold should be varied according to the activity pattern.

3 Proposed fall detection system prototype

In this section, the hardware, experimental setup, data acquisition and the proposed algorithm used in our prototype is defined. A general block diagram is depicted in Fig. 4.

Fig. 4
figure 4

Fall detection block diagram of proposed algorithm

3.1 Hardware platform

In this paper, the hardware platform which is used for data acquisition is Sensing Health with Intelligence, Modularity, Mobility and Experimental Reusability (SHIMMER) [23]. SHIMMER mote is very tiny, slim and most robust wearable Bluetooth based wireless sensor engendered to date. It proposes a flexible wireless sensor platform with wide range of applications, control over capturing the data, and scientifically reliable data for interpretation. It uses MSP430 microcontroller for core computation and ChipCon CC2420 radio for communication. The Revering Network RN-42Bluetooth (class 2) device has a range up to 10 m, a default baud rate (transmission rate) up to 115 kbaud. Beside this, the micro SD card socket is also given with the support of 2 GB. It has the variety of sensing capabilities like kinematic, physiological and ambient sensing through their daughter board add-ons. It also allows software development in different tools such as C#, MATLAB, Android and LabVIEW. In this experimental study, SHIMMER based tri-axial accelerometer is used for data acquisition. Figure 5 shows Shimmer3 sensor device that are designed to fit comfortably for the wearer, and be easily adjusted to preferred size. It can easily be used with a strap.

Fig. 5
figure 5

SHIMMER3 sensor device with default axis directions

3.2 Experimental setup

In order to acquire the data from tri-axial accelerometer or G-sensor the SHIMMER sensor was placed on the waist of the subjects using adjustable elastic strap as it was suggested by most of the researches [14, 35,36,37] to achieve optimal results. Waist is the region which is the nearest to the center of the gravity of the body. Thus, the readings of the waist mounted accelerometer or G-sensor will not be affected much or not adding unwanted signal components (noise) in data by relational changes in the body movement of the subjects. This insusceptibility to position-based relational change enables better performance than from the other sensor placement, also it is comfortable for the wearer [38]. The SHIMMER mote is connected through Bluetooth to a remote pc (Laptop in this case with Bluetooth dongle) where the received data is stored for further processing through a logging application running on that laptop. The application contains multiple fields like user name, age, gender, height and weight. MATLAB is used for data processing and implementation of proposed algorithm. The sampling frequency was set to 51 Hz (51 data samples per seconds) which is adequate for accelerometery data. Figure 6 shows the system architecture of the proposed prototype.

Fig. 6
figure 6

Proposed system architecture

Data acquired and saved into the laptop for later processing. In order to determine the probability of fall event, the streaming data is compared against the fall data, where a Mahalanobis distance is computed to determine the proximity between two data. If the proximity is high, then a message/alarm is sent to the concerned personnel (e.g. caregiver, doctors, any family member etc.) through a mobile application.

3.3 Data acquisition

After careful review of the literature, three activities from daily life, such as standing still, walking, and sitting on chair/getting up from chair were selected. These are the most common in daily life, and elderly people are more prone to fall while doing such activities in their daily life routine. For data acquisition, the experiment was conducted on 114 healthy subjects. A consent form was also filled by subjects who were asked to perform three daily life activities such as standing (approximately 5 s), sitting on chair and getting up from chair (3 times) and walking (approximately 6 m).

An example of data acquisition is demonstrated in Fig. 7, where a SHIMMER sensor can be seen on subject’s waist with adjustable elastic strap. In this experimental study, only one fall type was considered and that was fall on dominant side of the performing subject. It comprised with enough identical components in data pattern to differentiate it with other daily life activities used in this study. Data acquisition is conducted in both raw and calibrated forms. The data was acquired from tri-axial sensors (low noise accelerometer, wide range accelerometer, gyroscope and magnetometer).

Fig. 7
figure 7

Acquisition of walking activity

Standing Posture

While collecting this posture, the subjects were asked to stand straight without any movement for 5 seconds. An example of accelerometry raw data of standing position shown in Fig. 8.

Fig. 8
figure 8

An example of standing position (RAW data)

Sitting on chair and getting up

This activity is an example of merged transition activity. The subject was asked to sit on an armless chair and get up three times. Figure 9 shows an example of tri-axial acceleration data of sit to stand to sit activity.

Fig. 9
figure 9

An example of sit to chair and get up (RAW data)

Walking

For this activity, subjects were asked to walk on a leveled surface for approximately 5 to 6 m. The tri- axial accelerometry raw data of walking pattern can be seen in Fig. 10.

Fig. 10
figure 10

An example of walk activity (RAW data)

Fall

Four subjects were asked to perform fall event intentionally on a mattress. Since this is not an unintentional fall, but it showed a notable change in all three axes of acceleration data from other collected ADLs as depicted in Fig. 11. Data collection was done on three different places, Shaikh Zayed Islamic Centre, University of Karachi [39], Darul-Sukoon Old Age Home [40], Edhi old age home Sohrab Goth, Karachi [41].

Fig. 11
figure 11

An example of intentionally fall (RAW data)

3.4 Feature extraction

Although the data was collected from all the inertial sensors (i.e. accelerometer, gyroscope and magnetometer), we only utilize the accelerometer data. This decision was taken due to the notable variatyion, observed in accelerometer readings while conducting the three activities. Once the data was collected, then it was organized into two separate groups, according to the age and weight of the participants. Since the elderly and heavy weight persons are more prone to fall events while conducting their daily life routines, it is more appropriate to categorize the data regarding age and the weight attributes. These groups were further categorized in subgroups as follows:

Weight Groups

Since risk of fall for a person increases with increase in weight, it is necessary to organize the dataset in different weight groups. This categorization may help in interpreting the analysis of fall detection regarding weight groups. Table 1 shows the organization of data set according to the weight of participants.

Table 1 Organization of data by weight groups

Age groups

Ageing is another critical factor that increases the probability of fall for elderly. Therefore, the study of fall detection for elderly may have a significant role in healthcare. The persons with age greater than 50 are considered as elderly. The age groups are categorized as shown in Table 2.

Table 2 Organization of data by age groups

3.5 Fall detection technique

Since, the data of accelerometer consists of multi-features, all the three features are incorporated to identify the fall event. Mahalnobis Distance (MD) is used as a key measure to determine the proximity between two sets. It takes into account the co-relation among three features. Since, it is calculated using the inverse of a weighted covariance matrix, the computation of inverse covariance may cause a problem. If the data sets have too many features, then the data contains much redundant/ co-related information. This multi-collinearity of the data often leads to singular, or nearly singular covariance matrix that can not be inverted. Fortunately, the accelerometer data have three features, which avoids the generation of singular covariance matrix. Here the three features of the data sets, refer to three variables, named (x, y, z). The Mahalanobis distance between two sets (i, j) MDij is defined as:

$$ M{D}_{ij}=\sqrt{{\left({\overrightarrow{\mu}}_i-{\overrightarrow{\mu}}_j\right)}^T{S}^{-1}\left({\overrightarrow{\mu}}_i-{\overrightarrow{\mu}}_j\right)} $$

Where superscript T indicates the transposition of the function and S−1 shows the inverse covariance of the function and μ the mean vector which is defined as:

$$ \overrightarrow{\mu}=\left[\sum \limits_{k=0}^K{x}_k,\sum \limits_{k=0}^K{y}_k,\sum \limits_{k=0}^K{z}_k\right] $$

Another cause of using the Mahalnobis Distance is, its capability to make a comparison between the two sets, having different number of samples, which makes it a preferred measure for identifying the fall events.

As discussed earlier, the collected data consists of four ambulation activities such as standing, walking, stand to sit to stand on chair, and fall. It is to be noted that the standing is a static activity while others are dynamic. It is further classified that stand to sit, or sit to stand is a transition activity which cause a significant change in subject pose. An accelerometer generates the unique patterns for daily life activities, which are shown in different Figures, such as walk in Fig. 10, sit to stand and stand to sit in Fig. 9, and standing still in Fig. 8. These periodic patterns can be used to identify the respective activities. It is also being noted that due to versatility in human nature, the patterns of ADL activities also varies from subject to subject, so it is almost impossible to find a generalized pattern of an activity performed by the different subjects. By knowing this fact, first three activities (Walking, Standing, sit to chair and get up from chair) of each individual have its own unique pattern over a time period. The example of this statement is validated through Fig. 10 which is a walking data of a subject.

figure a

Taking an example of Fig. 10, which shows periodic pattern with three axes (x, y, z) in walk activity data, if a data window is defined for capturing the periodic pattern, then continuity of ongoing activity can be recognized by sliding that window to compare with the ongoing activity. If activity pattern consists of q data samples, then the data window of size (3*q) is defined for sliding over current activity data. The defined (3*q) window contains all three axes data for current q data samples. The aggregated q data samples can be compared with a reference data (in this case fall event). The fall is an instantaneous activity, and normally has a very short span as shown in Fig. 11. During a fall event, a disturbance occurs in all three axes (x, y, z) that may destroy the periodic pattern of ongoing activity.

Proposed fall detection algorithm is described as follows:

A window SW is slided over ADL data to detect the fall event. First, fall event data FE is obtained from given fall data. When ADL streaming starts, the size of SW is set regarding ADL periodic pattern. The sliding window extracts instant data samples from ADL. For example, if SW is located at px, k data samples from px to px + k-1 are extracted from ADL. The extracted data is compared with FE to detect the fall event. Here the Mahalanobis distance MD is computed to determine the proximity between FE and the extracted data. As Mahalanobis distance is bound in the interval [0, ∞], the proximity of fall detection is determined by taking the exponential of -MD. The expectation of fall event (Y) is determined as follows:

$$ Y=\Big\{{\displaystyle \begin{array}{c}1,\exp \left(- MD\right)\ge T\\ {}0, otherwise\end{array}} $$

Here represent the threshold value. If the probability is greater than T, then the occurrence of fall event is highly expected. In this case, the value of threshold is carefully selected up to 0.95. The selection of threshold value is done through experimental study of varying the values.

4 Results and discussion

Three activities from daily life were selected to detect fall. The Mahalanobis distance measured from fall data to ADL data. The window size of fall event is carefully predefined and slide over the ADL data to find similarity between. If similarity is very high, then there is a high probability of fall. It means that the lower the distance higher the similarity resides between data windows. To find a probability between 0 to 1 inverse exponential of Mahalanobis distance (-MD) is taken.

In standing position (Fig. 8), it is clearly shown that there is no any pattern found therefore it is negligible to find any similarity between standing position and fall event. It is also depicting in Fig. 12 which shows the very low probability of fall in standing position.

Fig. 12
figure 12

Fall probability in standing position

In sitting to chair and get up from chair scenario (Fig. 9), it is clearly shown that, however a pattern may be identified in this merged activity but as far as similarity with fall event is concerned, it is clearly indicating very low probability in Fig. 13. The same trend is shown in walking activity (Fig. 10) or with little high as shown in Fig. 14.

Fig. 13
figure 13

Fall probability in sitting to chair and get up activity

Fig. 14
figure 14

Fall probability in walking activity

To find out the probability of fall activity, fall activity data (Fig. 11) is also tested through proposed algorithm. It produced a very high probability as shown in Fig. 15. The main reason behind the high probability for fall is the sudden changes in all three axes.

Fig. 15
figure 15

Fall probability in fall activity

The strength of Mahalanobis distance is, its ability of multivariate measurement between two groups of data. Therefore, it can be used to detect the outliers (similarities) between the groups having same number of features.

A two-dimensional performance analysis is also carried out in this paper to add another aspect to analyze the performance of the Mahalanobis distance.

In first, all the activities perform by a subject is combined with fall event (FE) as shown in Fig. 16, so one can analyze the effect of varying the sliding window size according to the patterns of any activity and also varying the size of the pattern (time-period) of the activities. The periods of the pattern are selected as 100%, 95%, 90%, 85%, 80% and 75%. Each activity data samples are tagged with that particular activity name e.g. walk, standing sit to chair and getup etching Fig. 16, one can easily find the time-period of the pattern of an activity.

Fig. 16
figure 16

Combination of all activities

Fig. 17 shows the probability of the fall in all activities while selecting the window size according to the pattern of standing position. Although there is no any pattern found in standing posture but there is a minor change found in standing position and it was assumed as a pattern.

Fig. 17
figure 17

Fall probability in all activities with window size of Standing posture is selected

Figure 18 shows very low levels of probability of fall, mainly because the window size selected as shown in Fig. 9 for the merged activity which is the combination of stand to sitting to the chair and stand. As one can see in Fig. 9 that the span of the selection window is very wide due to cover the complete pattern, therefore to find similarities in two different data groups (reference and sliding window) are very difficult. So, the threshold value for this kind of selected window size should be as low as 32% (for 100% pattern size) to 43% (for 75% pattern size).

Fig. 18
figure 18

Fall probability in all activities with window size of stand to sitting to stand posture is selected

Walking activity is a dynamic activity and it is shown in Fig. 10. A periodic walk pattern is selected as depicted in Fig. 10 for sliding window size. The maximum probability of the similarity between reference and sliding window (which is 78%) was found when the size of the sliding window reduced to 75% of the original window size. The minimum value of likelihood is 65% when the window size is up-to 100%. This trend is depicted in Fig. 19. Therefore, the minimum threshold value may be selected as 65% when the sliding window size is selected as per complete walking pattern.

Fig. 19
figure 19

Fall probability in all activities with window size of walking posture is selected

In last, to determine the working ability of the proposed technique, an experiment was also carried out that if the sliding window size is selected according to the fall event as depicted in Fig. 13, then what impact it has? Figure 20 shows a very high probability (up to 96%) when the period of sliding window was selected as 90% of the complete window. It mainly because the size of referenced window (F.E) almost same as the size of sliding window at 90%. While the minimum probability (92%) achieved at 100% sliding window. Therefore, one can easily select the minimum threshold value more than 91% when the size of sliding window is taken according to the fall activity data.

Fig. 20
figure 20

Fall probability in all activities with window size of fall event is selected

The results show significance effect of proposed fall detection technique by using Mahalanobis distance. Another important parameter of getting higher probability is the careful selection of fall event window which is used to slide over the data of other activity. If fall event window is not selected carefully then this proposed algorithm produced very poor results. This is the main drawback of proposed algorithm.

4.1 Time complexity analysis

Time complexity analysis is carried out in this section. It is assumed that a single non-iterative task takes t seconds. The Mahalanobis distance works on the mean of two windows having l and m data samples respectively so, it takes (l*m)t seconds. The first window represents the FE (fall event) and the latter is used for ADL, therefore, if ADL has n data samples then it takes (l*m*2n)t seconds. Each window has d dimensions (variables), now it takes (d2*l*m*2n) t seconds. Therefore, if ignoring the constants then, this expression may be written in big O notation as O(d2lmn). As the values of l and m are so little, therefore, one may write this as O(nd2).

4.2 Comparative analysis

There are so many fall detection algorithms proposed in last 10 to 15 years. Table 3 shows the comparison of the proposed algorithm with some existing wearable sensors based fall detection techniques. The proposed algorithm is based on probability and it achieve the maximum probability of fall detection up-to 96%. As discussed earlier, the window size should be selected carefully for getting promising results.

Table 3 Comparison table

5 Conclusion & future directions

Fall is one of the major cause of injuries and mortality in elderly population. Therefore, in this field a lot of work has been done so far. In this paper, a novel fall detection system is proposed using SHIMMER sensor (tri-axial accelerometer) based on Mahalanobis distance. It is simplest but effective technique to detect fall especially in elderly. Initially the proposed fall detection algorithm produced some very promising results in controlled environment with one type of simulated fall. During this experiment, a dataset was also developed for implementing and testing different fall detection algorithms and it should also be extended in future by collecting data for more simulated fall types and daily life activities associated with muscle fatigue by using SHIMMER EMG (Electromyography) with SHIMMER IMU kit. Also, some more fall types should be added to the dataset. Initially the proposed algorithm was tested on MATLAB and in future an Android application will be developed for real-time monitoring. In future, a self-organized algorithm for real-time selection of the window size should also be proposed which can be integrated with this technique to overcome the shortcomings of the proposed technique.