A Wearable Fall Detection System Based on Body Area Networks

Falls can have serious consequences for people, leading to restrictions in mobility or, in the worst case, to traumatic-based cases of death. To provide rapid assistance, a portable fall detection system has been developed that is capable of detecting fall situations and, if necessary, alerting emergency services without any user interaction. The prototype is designed to facilitate reliable fall detection and to classify several fall types and human activities. This solution represents a life-saving service for every person that will significantly improve assistance in the case of fall events, which are a part of daily life. Additionally, this approach facilitates independent system operation, since the system does not depend on sensor or network units located within a building structure. This article also introduces fall analysis. To guarantee functional safety, a hazard analysis method named system-theoretic accident model and processes (STAMP) is applied.


I. INTRODUCTION
Fall detection is gaining in importance not only in aging societies but also in working societies and in daily activities. According to the World Health Organization (WHO), fatal falls are estimated to be the second leading cause of accidental or unintentional death worldwide each year. People over 65 years of age suffer the most fatal falls [1]. In everyday life, we are often confronted with the risk of falling. Working in hazardous working conditions is another risk factor of fall events. An exemplary event could be one in which a worker falls during the night shift in a factory with no one available to provide prompt assistance. Another example could be a technician that falls while maintaining isolated wind turbines. In these events, the consequences can be fatal for the affected people. The WHO stated that 37.3 million fall events annually are severe enough to require medical treatment [1]. Fall events lead to physical inactivity and loss of balance, especially among old people. Elderly people are scared to fall again; this uncertainty increases the risk of repeated falls. To counteract these life-threatening events, fast assistance is The associate editor coordinating the review of this manuscript and approving it for publication was Mahdi Zareei . necessary due to the fact that an unconscious person may not be able to call for emergency services. An approach could be the continuous tracking of medical and / or physical parameters via a wearable sensor network (see Figure 1).
A prototype in the form of a belt has been developed that includes an electrocardiogram (ECG) harness and is based on a five-sensor-node body area network (BAN). Each sensor node of the belt continuously acquires acceleration data, including the timestamp and the sensor node of the ECG harness. In case of a fall, the system should be able to autonomously call for emergency services. By combining physical and medical sensors, we expect to improve the reliability of fall detection and possibly fall prevention. Another expectation is that the integration of medical sensors may facilitate the classification of different fall types. Detecting and classifying falls are critical in situations that may lead to loss of life if detected incorrectly. A BAN generates a large amount of data in real time. Therefore, data analysis technologies have to be used [2]. Complex event processing (CEP) [3] is a data analysis technology that is used to manage and monitor in real time a large volume of information that arrives in the form of events with the lowest latency time. The CEP technology requires the usage of special software, i.e., a CEP engine. Each CEP technology provides a language called an event process language (EPL). The EPL is used to detect relevant situations in real time by defining event patterns; in our case, these relevant situations correspond to the detection of fall events. There are imperative, rule-oriented and streamoriented EPL types. For our research, a stream-oriented EPL is used, which is introduced in subsection III-B. Since testing the system plays an essential role in verifying the reliability of our fall detection prototype by simulating all possible fall events, the IoT-TEG tool [2], [4] is used. With reference to the development of a reliable fall detection solution and the abovementioned expectations, our ongoing research must answer the following questions: • Will the integration of medical sensors improve the reliability of the fall detection system? • Can the system achieve a high level of acceptance among people? The paper is structured as follows. Section II describes the related work regarding fall detection. In this section, a short overview of existing solutions and different approaches to fall detection is given. Section III describes the basic principles upon which our ongoing fall detection research is based, which contain the basic knowledge about falls, CEP [3] and test event generation. In the subsequent section (Section IV), a detailed description of the fall detection prototype, including the generation of test events, and the results of fall analysis are introduced. Additionally, this section presents the usage of the ECG sensors and the detected problems. Section V introduces the STAMP hazard analysis method [5], which is applied to the fall detection prototype. Section VI discusses the findings of our ongoing research. Finally, in Section VII, a conclusion is given, including some indications for improvement that could be applied in future work.

II. RELATED WORK
In this section, an overview of several fall detection approaches is given. There are several techniques that can be applied to the detection of fall events. Igual et al. [6] illustrate the following different types of fall detection systems: • Context-aware systems • Wearable systems The functionality of context-aware systems depends on the environment, since the sensors and actuators must be installed in the living area (e.g., an apartment or nursing home) to detect possible fall situations. The video-based context-aware solutions have the advantage of providing accurate and reliable detection of falls with fast assistance, but these systems have an issue regarding privacy. Patients using this solution are monitored non-stop, limiting patient compliance. Additionally, the high purchase price is an obstacle for many patients, and the dependency on the environment makes this approach useless in many application scenarios, because it would not detect fall events that occur outside the networked area.
The other category of fall detection systems analyzed by Igual et al. [6] involves wearable solutions worn on the body and are based on a BAN. These solutions are capable of providing fall detection that is independent from the environment, in contrast to context-aware systems. The analysis of this study illustrates wearable fall detection systems using sensor fusion with accelerometer and gyroscope data and built-in systems in the form of smartphone sensors. For both categories of fall detection solutions (context-aware and wearable solution), several techniques have been used. The following methods have been applied for context-aware systems: • Image processing and threshold-based recognition • Image processing and classification models The techniques used for fall detection via wearable solutions are the following: • Threshold-based approach • Fall detection based on machine-learning-based data analysis A detailed overview of the environmental-based fall detection methods, which use RADAR and RGB-D sensors, was presented by Cippitelli et al. [7]. The two methods were compared with each other. Both approaches offer the advantage of contactless operation, which means that the user does not have to wear any sensors, but their functionality is limited due to the environment. Another disadvantage is the limited range of the RADAR and RGB-D sensors. For a greater range, the surroundings would have to be equipped with several of these sensors to ensure reliable fall detection. Another approach to fall detection is presented by Damodaran and Schäfer [8] and Damodaran et al. [9]. This study enables a device-free detection of fall events and general movement patterns. The person does not have to wear any sensors attached to the body; the detection is based on the WiFi channel state information generated by the WiFi routers in a room. A machine learning algorithm is trained and applied based on these data. Taking into consideration the fact that it is an essential advantage to focus on a wearable solution independent of the external infrastructure, the work of Li et al. [10] serves as an example [2]. Their solution includes VOLUME 8, 2020 two wearable sensor nodes that are based on a BAN. These sensor nodes consist of an accelerometer and gyroscope and are placed on the chest (Node A) and on the thigh (Node B, see Figure 2).
The system distinguishes between two different motion sequences, which are used for activity categorization: • Static postures: -Standing, sitting, lying • Dynamic postures: -Activities of daily life (ADLs) → walk, go up / down stairs, sit, jump, lie down, run -Fall-like motions → quick sit-down upright, quick sit-down reclined -Flat surface falls → fall forward, fall backward, fall right, fall left -Inclined falls → fall down stairs A 3-phase algorithm for fall detection is proposed by Li et al. [10]. The first phase of the fall detection algorithm examines if the person is in a static or dynamic position. If the analyzed position coincides with static postures in the second phase, it will be verified whether the posture corresponds to lying. If in the lying position, it will be confirmed whether the transition to this posture was intentional or unintentional (3 rd phase). To do so, the previous 5 seconds of data are used. When the posture is unintentional, the event is classified as a fall. The proposed approach by Li et al. uses a threshold-based technique that is applied in different phases of the algorithm. The weakness of this approach is the need to differentiate between activities of daily life and falling. Collado-Villaverde et al. [11] propose a wearable fall detection solution based on a smart watch using acceleration data in combination with machine learning techniques.
A different approach to detecting fall events is presented by Lüder et al. [12], who apply an air pressure sensor in addition to the accelerometer. The hardware architecture proposed in this study depicts a wearable solution that is worn on the hip and provides wireless data transmission via Bluetooth. To take meteorological disturbances into account, Lüder et al. incorporate an external barometric sensor as a reference. This is an essential advantage that facilitates the possibility of preventing falls by activating a body airbag. However, the system has difficulties in distinguishing between falls and ADLs when a person abruptly moves.
Another method for fall detection based on the sensor fusion techniques is described by Gjoreski et al. [13]. Accelerometer and ECG data are used to detect fall events. This solution is capable of identifying a person's movements and fall situations using wearable sensor nodes. These nodes are placed on the chest and thigh, which is similar to the approach of Li et al. [10]. The advantage of the solution proposed by Gjoreski et al. is the integration of medical sensors. The fusion of acceleration data and ECG signals facilitates the detection of anomalies in a person's behavior and heartrelated problems that may lead to falls. According to their analysis, differences in the ECG signals for different postures were detected. Lower beat rates in the static positions of lying and sitting than those during walking were determined. Comparing the beat rates of both static postures (lying and sitting), differences were observed, with the beat rate of lying being lower than that of sitting. Melillo et al. [14], [15] confirm by their research that the information from medical sensors helps to reduce false alarms but also enables reliable fall prevention and prediction. ECG sensors are used to determine the heart rate variability of patients suffering from cardiovascular diseases. These people have a higher risk of falling. The advantage of the approach proposed by Melillo et al. is not only the detection of falls but also fall prevention and prediction. In addition, this approach allows the prevention of cardiovascular events (e.g., stroke, myocardial infarction), which is confirmed by the work of Sajid Butt [16].

A. FALL EVENT ANALYSIS
The fall detection prototype is based on the approach proposed in [13], [17]. To detect a fall event, a typical physical behavior is used that comprises the following phases [18]: Figure 3 shows the mentioned phases. The acceleration used to determine the abovementioned phases and the orientation of the person are the accelerometer readings, which are used as a reference. The prefall phase considers a stationary position of the person, where the measured acceleration is approximately 1g (9.81 m/s 2 ). During the free-fall phase, the acceleration decreases to 0g (0 m/s 2 ). Upon impact, the acceleration reaches its maximum value for a short period of time. Subsequently, the acceleration decreases to approximately 1g (9.81 sm/s 2 ), which represents the postfall lying phase. For impact detection, the acceleration magnitude is used, which is calculated with eq. (1), and to determine the body's orientation, the components of the acceleration α = (α x , α y , α z ) are analyzed: Assuming that the person is in a standing position (static posture), the x-component of the acceleration (α x ) corresponds to 1g (9.81 m/s 2 ), and the other two axes (α y , α z ) will be close to 0g (0 m/s 2 ). As soon as the person changes his posture, the gravitational force will act on one of the other two axes (α y , α z ), and the x-acceleration will be 0g (0 m/s 2 ). Combining this information with the acceleration magnitude (see eq. (1)), the system is able to detect the fall and additionally determine the type of fall. To apply this knowledge, the EPL of EsperTech (herein, Esper EPL) [3] is used.
To ensure reliable fall detection, the system must be able to detect various types of falls. For this reason, the development of the fall detection prototype is also based on the creation of a test protocol covering different types of falls. Li et al. [10] and Pannurat et al. [19] are our references, as they not only represent possible solutions for fall detection but also offer a versatile overview of possible fall scenarios.

B. FALL PATTERNS BASED ON ESPER EPL
The EPL used is the Esper EPL [3], which is a streamingoriented language and uses the CEP engine to execute queries. The main reasons for its usage are as follows: • The syntax is based on SQL → complex events can be easily formulated.
• It can be embedded in Java applications.
• It is open source.
• The CEP engine of EsperTech processes approximately 500,000 events per second on a workstation and between 70,000 and 200,000 events per second on a notebook (according to its developer) → This is an essential feature for simulating time-critical applications. In comparison to SQL, which is based on tables, EPL works on the continuously incoming data stream. Therefore, a row from an SQL table corresponds to an event in the event stream.
To define rules in CEP, the incoming event should be characterized in detail to specify incoming data for the CEP engine. After the event creation, rules, also called event patterns, should be determined to categorize the incoming input in fall events or daily activities. Example 1. Fall pattern based on Kozina et al. [2], [17].

//1. Definition of the event -incoming data for
double,accelS2 double,timestamp string) The illustrated EPL query (see Example 1) is based on the physical principle shown in Figure 3 (see subsection III-A). It should be highlighted that two nodes were used for this EPL query (one frontal node and one lateral node) to apply fall detection, but in the future, this query will be extended to all the sensor nodes of our prototype BAN. The four-node BAN architecture is currently used only for redundancy purposes. In Example 1, the following event properties are used for the definition of the event pattern: • a1.accelS1 → initial acceleration of sensor node 1. • a2.accelS1 → successive acceleration of sensor node 1. • a1.accelS2 → initial acceleration of sensor node 2. • a2.accelS2 → successive acceleration of sensor node 2. Referring to the selected properties this example checks, if the initial acceleration of node 1 (a1.accelS1) is <= 9.81 m/s 2 , the person is in a stationary position. Subsequently, it will be checked whether the difference between the subsequent acceleration (a2.accelS1) and the first acceleration (a1.accelS1) within 1 second is >= 9.81 m/s 2 . If this condition is fulfilled, it is an indication that the person has suffered an impact. Adding the OR disjunction, the second sensor node can be integrated, and the statement is able to detect a fall in the event that one of the node's data points matches the Esper EPL query and the values of the acceleration correspond to the same person.

C. TEST EVENT GENERATION
IoT-TEG [2], [4] is a Java-based tool that takes an event-type definition file and a desired output format JSON, CSV and XML, the most common across IoT platforms. IoT-TEG is made up of a validator and an event generator (see Figure 4). The validator ensures that the definition follows the rules set by IoT-TEG. The generator takes the definition and generates the indicated number of events according to it.
Previous studies suggested there were no differences in testing effectiveness between using events generated by IoT-TEG or events recorded from various case studies [4]. Moreover, thanks to its implementation, IoT-TEG can be used to carry out different types of tests: functional, negative, integration, stress, etc.; indeed, an example of its usability can be found in [20], where IoT-TEG was used to apply mutation testing [21]. These results confirm that IoT-TEG can simulate many types of events occurring in any type of application. It can perform different types of tests and can solve the main challenges developers face when they test event-processing programs: a lack of data for testing, the need for specific values for the events, and the need for a source to generate the events.
Apart from the mentioned challenges that IoT-TEG solves to test event-processing programs, it incorporates a specific functionality for testing programs that use the Esper EPL [3]. This functionality helps to automatically generate events with specific values in accordance with the program that will process them. IoT-TEG analyzes the Esper EPL queries and generates events depending on the logical and relational operations. Moreover, the last version of the tool includes a new functionality that allows defining the behavior of an event attribute using arithmetic operations.

IV. FALL DETECTION SYSTEM PROTOTYPE A. ARCHITECTURE
A first prototype was described in [2], [22], [23]. This article presents an improved version of the previously developed prototype, which includes essential developments that contribute to reliable operation of the system. Additionally, the improved hardware design meets the requirement for patient compliance. A more user-friendly design facilitates the freedom of movement for the user. As a safety critical system for medical purposes, a redundant hardware design protects the system against a total system failure, which would have severe consequences in the case of fall events. Referring to Jämsä et al. [24], the best approach is to position the accelerometer near the waist. Taking these aspects into consideration, a wearable belt solution was developed, which is based on a four-sensor-node BAN (see Figure 5). The four sensor nodes (S1 -S4) positioned on the belt act as peripherals and continuously acquire acceleration data, which are sent via Bluetooth Low Energy (BLE) to a smartphone (central device). Four-sensor-node BAN -belt [22], [23].
The central device receives the incoming sensor data, which is stored in separate data files to evaluate the event. The belt solution reflects the above criteria of safety critical systems. The proposed architecture (see Figure 5) is based on a mirroring principle of the opposite sensor nodes, which provide identical acceleration values, only with different signs. If a sensor node fails during operation, the opposite node can be used as a reference to ensure accurate evaluation of the event. Considering the following scheme (see Figure 6), this fall detection belt solution facilitates the recognition of different fall event types and human activities. The positioning of the nodes around the hip allows carrying out a precise fall and human activities characterization.
The abovementioned advantages of our architecture, which include redundancy and sensor positioning, are not reflected in the solutions of the referenced literature (see Section II). This renders our presented prototype unique in terms of its architecture and approach to effectively identify fall events and movements. To optimally benefit from these advantages, we proceed as follows: 1) Considering the belt architecture (see Figure 5), the sensor node S1 is the anterior node. Each node has its own coordinate system based on the three-axis reference scheme (see Figure 6). S1 is our reference sensor; this means that we use the orientation of S1 as a reference. Data vectors of sensors S2, S3 and S4 are rotated, respectively, by π 2 , π and 3 2 π around the yaxis to S1. Their coordinate systems are matched to the orientation of S1 using rotation matrices: • Rotate Sensors S2, S3 and S4 to S1: where S n depicts the rotated axis values of nodes S2 to S4 and S n stands for the axis values of sensors S2 to S4. n is an index from 2 to 4, and the rotation matrix R y represents a rotation of π 2 , π and 3 2 π around the y-axis. 2) After mapping sensors S2 to S4 to the S1 orientation, the arithmetic mean value of the respective axes is calculated. With this procedure, an averaging of the sensor values and a reduction in noise can be achieved. The following equation is used to calculate the arithmetical mean of every single axis: where S x,y,z depicts the mean value for the x-, y-and z-axes and S x i ,y i ,z i denotes sensors S1 to S4. 3) Based on the calculated mean values of the respective x-, y-, and z-axes using eq. (3), the acceleration magnitude is calculated, which is used for impact detection. For this purpose, the formula presented in Section III (see eq. (1)) is used. The abovementioned procedure, which includes eq. (1) to eq. (3), is used to determine human activities and fall events. The calculated mean acceleration values identify the body orientation on the basis of the defined orientation scheme (see Figure 6), which corresponds to the sensor S1 orientation. Additionally, the acceleration magnitude is calculated using the average values of the sensors. This information is used to determine whether the person suffered an impact, which is categorized by the peak in the acceleration. This behavior is described in Section III. Using the Esper EPL query (Example 1) stated in subsection III-B, the system is able to detect a general fall event based on the physical principle proposed by [17].
To provide the real-time requirement for the volume of data to be processed, a distributed application architecture is prepared that receives a large volume of data with low latency and analyzes it with the help of an embedded CEP engine. Stream processing systems such as MQTT or Kafka can be used [26]- [28]. The following figure (see Figure 7) illustrates the concept of a distributed system architecture.
Taking into consideration the test protocol stated in Section III, typical fall events (e.g., rolling out of bed) in nursing homes and hospitals can be detected by this solution. In addition, the use of this prototype is suitable not only for older people but also for people who are exposed to a particular risk of falling due to their profession. If a firefighter suffers a fall during a rescue operation inside a burning building, a rapid intervention is required to save the fireman. Another use case could be wind turbine technicians who fall during maintenance work on a turbine. Since these plants are usually located in uninhabited areas, fast assistance is required.
In the subsequent subsection, the behavioral analysis of the acceleration values during one of the mentioned typical fall events is presented, i.e., the fall against wall (FAW). Additionally, test events are generated to simulate the FAW fall type.

B. FALL SIMULATION TEST EVENTS
The fall type considered to generate the test events consists of the impact of a person against a wall, followed by that person falling to their knees and then on their chest or back, i.e., an FAW. This study was conducted with healthy volunteers. Each participant gave written consent to allow measurement data and images to be anonymized and used for publications. A risk assessment was established with assistance from the medical doctor, safety officer and occupational safety specialist of the university [29], which includes safety precautions to minimize all possible injury risks. These precautions have to be strictly respected, and all participants were instructed and encouraged to follow our instructions before starting the tests to prevent injury. Our study was conducted in accordance with the ethical principles of the Declaration of Helsinki [30].
In this analysis, the following steps were taken:

1) DATA ANALYSIS
To use the sensor information from all our nodes for motion analysis (see subsection IV-A), we conducted an analysis of the FAW. Following a procedure involving eqs. (1)-(3), a more detailed analysis is carried out, as shown in the subsequent figure (see Figure 8). The goal is to study the acceleration behavior during a fall to generate test events; thus, the acceleration values are conformed to standard gravity g (1g = 9.81 m/s 2 ). After the conformation, the impact peaks are detected. While performing the data analysis, it has to be taken into account that the values suffer disturbances because of several factors: the person's movement, the person bouncing against After applying the previous rule to all of the fall data and taking care of the disturbances, the impacts are detected.

2) FALL IDENTIFICATION AND ANALYSIS
To have complete data from all four sensor nodes, which are necessary to obtain the respective averaging of the axial accelerations and magnitude, the data are mathematically synchronized and interpolated using the nearest neighbor method. This becomes necessary because of the synchronization problem mentioned in Section IV-D and in the STAMP analysis in Section V. Figure 8 illustrates the FAW event pattern, which depicts the sensor readings in g.
From α x , α y , α z , the person is in a standing position, as we constantly measure 1g on the y-axis (see Figure 6). The magnitude confirms this assumption, as it also corresponds to 1g. When the subject starts to walk, this is noticeable in the respective axis values as well as in the magnitude. The values start to fluctuate. The first peak in the magnitude, which is greater than 2g, indicates that the person has suffered a hard impact against the wall. The peaks in the individual axes illustrate the impact phase. After the impact phase, a short time window is visible, which represents the temporary standing of the person (see magnitude about 1g; α y also corresponds to 1g). After that, the person starts to fall (critical phase), which is represented by a decrease in the magnitude. α y decreases, which is a sign that the person is no longer in the standing position. Before the person hits the floor with his upper body, he first hits the floor with his knees (second peak at 1.6g, first impact phase). Afterwards, the person turns and falls with his back onto the floor (third peak, at 2.03g, second impact phase). Now the subject is lying with his back on the floor (postfall phase), which can be confirmed by the respective α x,y,z values. On the z-axis, a value of 1g confirms that the person is lying on his back. The combination of the magnitude used for impact detection and the respective axis values used for body orientation (see Reference Scheme, Figure 6) enables a detailed and reliable description and detection of fall events.
Illustration 9 represents the acceleration magnitude of the FAW of sensor S1. Our system should reliably detect falls. Since this type of fall consists of two significant impacts (see arrow indicators: impact wall and impact floor), it was analyzed whether, due to the redundant architecture of the system, all four sensors reliably detect these two impacts.
The analysis of all four sensors resulted in the conclusion that all four sensors reliably detect the two impacts within a t = 132ms. This shows that the redundancy of the architecture facilitates reliable detection of fall events, even if the individual sensor nodes fail. Nevertheless, the result will be investigated in more detail in the future to reduce the t, which is caused by the previously mentioned synchronization problem. For this purpose, a STAMP analysis approach is presented in Section V, which is intended as a support to solve this problem.
When considering the performance of our prototype, we were able to achieve the following results which are illustrated in the successive confusion matrix. For a more detailed performance evaluation of our proposed prototype the accuracy, precision, specificity and sensitivity were also calculated by the following formulae: where TP, FP, TN and FN depict the true and false positives and negatives. Using the abovementioned eq. (4) - (7), 97.56% of accuracy and 95.24% of precision were reached. The sensitivity and specificity are 100% and 95.24%, respectively, out of 20 fall events and 21 non-fall events [31]. Since it is an ongoing research further measurement sessions are planned to collect more data.
The following table shows the performance of existing systems. This serves as a comparison to our system. A more detailed overview is presented in [6], [7], [19], [32]. where the following abbreviations stands for: Sens = Sensitivity, Spec = Specificity and Prec = Precision.
Considering the listed methodologies in Table 2, certain differences in performance can be observed. This is due to the different approaches used by the respective authors. The approach presented by Li et al. [10] features a sensitivity of 91% and a specificity of 92%. Because this approach has the difficulty to distinguish between jumping into bed and fall against wall with seated position the quantitative result is affected.
Damodaran et al. [9] propose an approach which is based on a supervised machine learning algorithm using WIFI channel state information. The method features a high sensitivity and specificity 100% and 92%, respectively, however the precision is 62%. There are some difficulties classifying activities like sitting down and a fall since after the person is sitting down a static position is reached which makes the signal very similar to a fall event.
Gjoreski et al. [13] provide a high sensitivity but the precision value features only 66.67%. The reason for the low precision value is due to the problem of distinguishing the non-fall activity quickly lying from fast fall event since both events consist of a high acceleration value.
Comparing our prototype with the solutions shown in Table 2, our solution has the benefit that the sensors are placed in the form of a belt around the hip, which enables more reliable detection. We also consider a fall event in four different phases as described in Section III, subsection III-A which was used in a modified way by Noury et al. [18]: • Prefall phase • Falling phase • Impact phase • Postfall phase This segmentation allows a more precise differentiation between non-falls and fall events.

3) DEFINITION OF A FALL EVENT
Once the fall acceleration behavior has been observed, the next step is to define the fall event to generate test events with IoT-TEG [2], [4].
Thanks to the included properties and parameters in the new IoT-TEG functionality, the desired behavior rules that follow the standard gravity acceleration values can be defined. It is essential to emphasize that to obtain these rules to define the behavior of the standard gravity acceleration, several tests must be carried out. Once we obtain the desired results, the test events are generated as necessary. Figure 10 shows the acceleration values of some of the FAWs generated using IoT-TEG with the new functionality.

C. SENSOR FUSION
Analyzing the literature regarding fall detection, the existing solutions show certain weaknesses in the reliable detection of falls [6], [10], [12], [19], [24], [33]. Considering the approach of Gjoreski et al. [13], the results obtained via the fusion of physical sensors and the ECG sensor increase in reliability. Particularly, the evaluation of the ECG signal leads to an essential improvement in the system's accuracy. According to [13], the ECG signal can be used to distinguish between different postures. The inclusion of medical parameters can even enable fall prediction [14], [15], which would represent significant progress in health care and prevent fatal injuries. Based on these results, the proposed fall detection belt is upgraded with a portable 3-channel ECG sensor. The following illustration (see Figure 11) depicts the BAN structure of the updated prototype architecture. The updated BAN includes four sensor nodes placed on the belt (S1 -S4) and an additional node placed on the chest (S5). These five nodes act as peripherals and continuously provide sensor data to the smartphone (central) via BLE. Sensor nodes S1 to S4 send the acceleration data, and the ECG sensor sends ECG signals to the central device. Fusing this information, the central device analyzes the events for possible fall events.
Before the ECG sensor can be fully integrated into the prototype, some tasks must be solved. The first task to solve is a continuous recording of the ECG during a person's daily activities. When the ECG electrodes lose contact with the skin surface because of movement, this leads to increased noise in the signal. Therefore, a solution for obtaining a reliable ECG recording must be developed. The second task is to perform a validation of the ECG sensor. For this purpose, the ECG measurements must be compared with measurements taken by a clinical ECG device. Based on Gjoreski et al. [13], the ECG signal can be helpful in detecting fall events, as mentioned in Section II. Based on this, another task is the determination of ECG patterns that provide relevant information for fall events.
The first test measurements with the ECG sensor confirmed the production of a noisy and unstable ECG signal during movements. To ensure a stable and continuous signal during daily activities, an adjustable and flexible ECG harness was developed with prefabricated electrode positionings and the ability to adapt to any body shape (see Figure 12).

FIGURE 12. ECG harness.
After completing the development of the ECG harness, the measurements were repeated using the harness solution.
A more stable signal resulted; especially during walking and the sitting procedure, the stability of the ECG signal was improved significantly. The artifacts in an ECG signal resulting from motion may be used as a recognition pattern for fall events. After the positive results regarding the improvements in the signal stability, validation tests were conducted in a medical lab with the assistance of a physician. In clinical settings, ECG devices with 12 electrodes are used, but for wearable or emergency purposes (e.g., in an ambulance), a 3-channel ECG device is recommended because it provides less wiring and satisfies the aspect of patient compliance [34]. According to a study by Antonicelli et al. [35], the use of a 3-lead ECG may be essential to avoid delayed treatment of specific heart diseases, such as for elderly people who suffer from chronic heart disease and need continuous ECG monitoring. In addition, the analysis conducted by Antonicelli et al. led to the result that a 3-lead ECG provides a qualitatively similar evaluation to that of a 12-lead ECG. Comparing the measurements taken in the medical lab with the ECG measurements provided by our ECG sensor, the correct functionality of our sensor could be confirmed. Based on this result, ECG measurements are performed during the fall simulations based on [10] and [19] as part of a master thesis [16]. The aim of this work is to evaluate the ECG patterns for essential artifacts during a fall and to apply machine learning methods to improve the system ability to detect fall events and, if possible, predict fall events with the additional information from the ECG sensor. The application of machine learning techniques based on accelerometer data is also investigated.

D. DETECTED PROBLEMS
After testing the fall detection prototype, some problems were found. Moreover, some considerations arose for future tests.
First, we explain the problems related to the current prototype. The synchronization in the prototype is an issue. There is a lack of synchronization not only in the amount of data but also in the timestamp. Some sensors transmit more data than others. The four sensors were in operation during the FAW test, but the obtained acceleration values were from only three of them, as one of the sensors did not transmit data in one period of the test. As previously mentioned in Section IV-B2, the data were artificially synchronized and interpolated for data analysis.
A hardware issue is the durability of the battery, which can last 2 to 3 weeks depending on its use. If we want to use this system in everyday life, we have to make sure that the battery life is extended. If we consider the used ECG sensor architecture, we encounter differences in signal quality that include noise and baseline shifting (see Figure 13).
The reasons for these distinctions in signal quality were explained by the supervising physician. Baseline wander (BW) disturbances are caused by variations in electrode-skin impedance and the patient's movement and breathing during the ECG measurements. Muscle contraction is common for people that suffer from tremors or fear the FIGURE 13. Measured ECG signal -baseline shifting ECG signal [16].
ECG measurement and for disabled people. Certified clinical devices have an integrated filter that can be applied to smooth the signal [34], [36]. To solve this problem, the application of a high-pass filter in our setup is considered, which was analyzed by Sajid Butt [16]. ECG filtering was applied by F. Sajid-Butt, which started with analyzing the frequency spectrum of our signals. The BW and power line interface (PLI) were detected in the amplitude-frequency diagram. Several different techniques exist in the literature to remove noise from ECG signals. Some use a wavelet transform to remove the baseline drift and reduce the overall noise, whereas most of them still use conventional methods such as using IIR (infinite impulse response) or FIR (finite impulse response) filters [37]- [39], [40], [41]. After analyzing the current trends in the literature, we chose the elliptic filter to filter our ECG signal. The elliptic filter better fit the data compared to the previous ones. It not only removed the PLI in the signal but also considerably improved the baseline wander. The performance of the filtration process was mainly tested by an amplitude-frequency diagram, which was obtained by first performing the Fourier transform of the signal and then plotting each frequency against its amplitude. An amplitude-frequency diagram of a signal before and after the filtration is shown (see Figure 14, 15).
Though this filter worked for most of the cases, there were signals for which the noise was too high, and this filter did not give the desired results. We did not want to excessively filter  the signal because it can cause the loss of certain frequencies that might be associated with a fall and hence are of interest to us. The following illustration depicts the improvements achieved by applying the previously mentioned techniques to the ECG signal (see Figure 16).
Regarding the analysis of the acceleration values, it was observed that some values could lead to misinterpretation. The reason was that the test persons quickly got up after the fall simulation instead of lying on the ground. Since not only the measured values but also the video recordings of the fall simulations were analyzed to achieve a profound analysis, the problem could be determined. In a real situation, if a person falls and is able to stand up quickly, it means that the person is conscious and able to move. In contrast, if the person falls and does not get up after a while, it means that the person may be unconscious or unable to make an emergency call. Therefore, waiting at least 10 seconds in our test scenarios is helpful to perform an accurate fall analysis during testing.

V. EXAMPLE APPLICATION OF STAMP AS A HAZARD ANALYSIS METHOD
A. INTRODUCING STAMP A fall detection system is a safety critical system requiring certification according to a safety standard (e.g., IEC 60601-1-11) [42]. To satisfy functional safety requirements, it is fundamental to apply hazard analysis methods during all development phases and operation to analyze the behavior of the system in the event of malfunction [43]. In the following, STAMP is applied in some architectural parts of the fall detection system for functional safety validation.
STAMP is a comprehensive hazard analysis method based on system theory. A major goal of this approach is to control or eliminate hazards. This approach, proposed by Leveson [5], is used to identify probable accident causes that are categorized as follows: • Accidents based on hardware and software component failure • Unsafe interactions among components • Complex human machine interfaces and human error models • Errors in system design • Faulty requirements STAMP treats accidents as a control problem. To prevent accidents, safety constraints derived from system safety requirements must be enforced inside the different system hierarchy levels. If the given safety constraints are violated, accidents may occur. Checking the enforcement of safety constraints leads to an additional layer of system testing.
B. STAMP -HAZARD ANALYSIS STAMP begins on the system level and proceeds top down according to the system hierarchy. The hierarchical-based analysis in STAMP is based on control loop structures, which are iterated from the high abstract level (overall system view) to the lower system levels to build up hierarchical system models [5]. The controller unit of the control structure acts as a master and includes a process model to determine control actions that are executed by the actuators to control the defined process (controlled process). A feedback loop (measured variables) is provided by the sensor unit, which informs the controller about the process state. This information is used by the master to initiate a control action (controlled variables) to run the system within predefined limits.
Exemplary STAMP procedures: • Definition of accidents: A person has fallen, and the fall was not detected by the system.
• Definition of hazards: Data from 1 to 4 sensors of the belt are not sufficiently correlated in time (synchronization error).
• Definition of safety requirements and constraints: The safety requirements and constraints are based on the hazard that causes the accident. Safety constraints are used to describe nonpermissible system operations to ensure safe operating conditions. A top-level safety requirement is the real-time detection of fall events.
The timestamps of all four nodes must be synchronized. If constraints are violated, the system migrates to the unsafe or hazardous state.
• Definition of safety control structure: A high-level safety control structure should be defined such that it contains the system's components and the process that should be controlled. The control structure below (see Figure 17) depicts the control loop of the controlled process, i.e., the movement of the person. The sensors provide sensor data to the controller (smartphone application). The smartphone contains a data acquisition algorithm to collect the incoming data and a fall detection algorithm to analyze these data. If the event corresponds to a fall, the alert system on the mobile device will call emergency services for intervention. The actuator part of the system contains the controlling factor of the data acquisition process, i.e., timers, sleep mode, etc.
The lower-level control loops (see Figures 18 and 19) illustrate a detailed internal control structure of the controlled processes. These processes act as the controller in the lowerlevel structures. Taking into consideration the second-level safety control loop, the movement process control (controller) receives the sensor data. Based on the data, a control command is executed to control the BAN, which sends feedback to the movement process controller. The third-level control loop zooms into the BAN control, which is the master (controller) that actuates the wake-up procedure of the sensor nodes to control the nodes. These deliver the sensor data, including the time, to the BAN control.
To provide a more detailed hazard analysis, two more control loop layers were created, which are illustrated in the following illustration (see Figure 19). The fourth level of the system's control structure zooms into the sensor node control (controlled process in Figure 18), which is the control unit (controller). Considering this control layer, the controller receives the sensor services and characteristics, which are provided via BLE and contain the sensor values. The sensor node control initiates a scanning command (actuator) to detect the sensor properties, which are provided by the BLE interface (controlled process: Bluetooth sensor detection control).
Taking into consideration the fifth level of the control loop, which is depicted in Figure 19, an accurate view of the controlled Bluetooth sensor detection control process in level 4 is provided. The master Bluetooth sensor detection control (controller) actuates a connection command via BLE (actuator) to establish a connection with the sensors (controlled process: Bluetooth connection control), which sends a list of available sensor services and characteristics to the controller.
All these hazards (see red labels in Figures 17, 18 and 19) lead to safety constraints. Some of the safety constraints are defined as follows when considering the control loop structures of the second and third system levels: • Second-level control structure → to avoid data loss and provide a reliable evaluation of events by the movement process controller, the sensors should provide synchronized data.  • Third-level control structure → a synchronous wake-up procedure for all sensors in the BAN must be ensured to avoid data loss. If the control structures of the fourth and fifth system levels are considered, some of the safety constraints are defined as follows: • Fourth-level control structure → it must be ensured that the sensor information (services & characteristics) is transmitted completely. • Fifth-level control structure → a reliable and stable BLE connection to all nodes of the BAN must be established.
Violating one of the abovementioned safety constraints, a chain reaction of hazards (nonpermissible operations) is triggered in all system layers, which leads to malfunction of the system. The following scenario, which reflects a possible chain reaction of hazards, shows the possible effects on the system functionality. The incomplete list of sensor services and characteristics (control loop -lower level 5) and sensor node jam (control loop -lower level 4) can lead to clock drift (control loop -lower level 3) and unsynchronized data (control loop -lower level 2) in the upper levels. Merging all the hazards from the lower levels may cause the synchronization error (see the description in subsection IV-D) in the top-level control structure (see Figure 17) and lead to violation of the safety constraint t <= 50 ms between the timestamps of the sensor nodes. The combination of these possible hazards makes the system unable to detect falls in real time.
It is important to emphasize that this is only the beginning of a complete STAMP analysis, which represents a fraction of the system. In the future, we will use it for all parts of the complete architecture.

VI. FINDINGS WITH RESPECT TO THE RESEARCH QUESTIONS
Our ongoing research solved part of the research questions (see Section I). The following subsections relate our results to the corresponding research questions. VOLUME 8, 2020 A. WILL THE INTEGRATION OF MEDICAL SENSORS  IMPROVE THE RELIABILITY OF THE FALL  DETECTION SYSTEM? Considering the reliability of the fall detection based on the additional integration of medical sensors, it can be concluded that they significantly increase the reliability of fall detection. Consultations with physicians confirmed this finding [34]. Falls can have a disease-related cause, for example, anomalies in a person's health or heart-related diseases that lead to these events. The inclusion of medical parameters will also enable fall prevention, which could limit the occurrence of serious consequences for the affected person [13]- [15]. There are numerous portable fall detection systems, but they are still limited in their ability to reliably detect a fall event. Their limitation is due to the exclusive use of position and acceleration sensors without including medical sensors [44]. The quite frequent false diagnoses of presumed fall situations with high acceleration values or changes in position, such as climbing stairs, jumping or sitting down quickly, is also problematic and currently represents one of the major sources of error in the practical use of these systems [10]. This can lead to a lack of acceptance for using this technology in everyday life. By including medical parameters, system reliability can be further improved.
Additionally, our ongoing tests performed with the ECG sensor harness indicate that the ECG provides relevant information for accurate fall detection. The current work analyzes disturbances of the ECG signal and explores the use of machine learning methods to detect relevant normal and abnormal medical patterns [16].

B. CAN THE SYSTEM ACHIEVE A HIGH LEVEL OF ACCEPTANCE AMONG PEOPLE?
To evaluate the acceptance of our system, a usability test was conducted with the test candidates. Three of the test candidates were female, and 7 were male. The usability test included the following questions: • How is the wearing comfort of the system? • Is mobility restricted by wearing the system? • Would you wear this system in public? According to the feedback from our test subjects, 70% of the test persons answered with positive feedback regarding the wearing comfort. 30% would like to wear a smart watch to measure ECG signals. According to the respondents, this is considered more comfortable.
The result of the second question regarding mobility showed that 90% of the test persons had no mobility restrictions due to the use of the system. Positive feedback was given, especially on the belt architecture. The belt architecture is very comfortable and inconspicuous, as reported by those who usually wear a belt. 10% of the test persons wanted the sensors to be attached to the clothing or directly as selfadhesive sensors on the skin.
The evaluation of the last question gave a 100% positive result. All test subjects would wear the system, as it increases their sense of safety. The functionality of the system is not dependent on the environment and can therefore be used both outside and inside buildings. The unobtrusive design of the system was appreciated by the test subjects.

VII. CONCLUSION
This proposed portable fall detection system aims to provide rapid and efficient assistance to people who are in lifethreatening situations due to falls.
The test measurements performed with the test subjects resulted in positively regarding the detection of fall events and the acceptance of wearing this system. Incorporating the ECG sensor proved the effectiveness of the concept of Gjoreski et al. [13], i.e., combining physical and medical sensor information (acceleration values & ECG) to ensure more accurate detection of falls and, if necessary, fall prediction. Concerning the ECG signal acquisition we plan to improve the design of the ECG harness. In addition, we are looking for alternative measuring locations for an ECG. A possible option that we are considering is the usage of a smart watch. The efficiency of this option will be analyzed in the further development process.
Using the IoT-TEG tool [2], [4] facilitates the generation of events to recognize falls based on [17]. We have the ability to assign behavior rules to as many event attributes as the event type contains, and the event attribute values follow the specified behavior. IoT-TEG has the ability to adapt the behavior of the analyzed event attribute, because it was designed to generate events of any event type to test systems that manage events. In the further development process, the plan is to use machine learning and complementary CEP to use certain ECG patterns in combination with the acceleration data. These should enhance the reliable detection of falls. To take advantage of the low latency and real-time capabilities of CEP, it is desired to implement the previously presented distributed system architecture (see Figure 7). Thereby, an efficient system design is provided, which can perform a realtime analysis of large amounts of data.
However, first, the synchronization problem of the BAN must be solved, which can compromise the system functionality. Performing the STAMP analysis (see Section V) revealed the cause of the synchronization error, which led to the conclusion of using an RTOS-based hardware platform. The new hardware platform contains a real-time operating system (RTOS), which facilitates the synchronization of different tasks in a wireless sensor network. The idea is to define a synchronization time by the RTOS that enables the synchronization of all nodes to a common timestamp. Each node has its individual timer, which runs until the defined synchronization time of the RTOS. As soon as all nodes have reached this time, the individual times of the sensors will be reset and are synchronized to a common timestamp.
Using the RTOS also enables extended battery life, as it offers several battery saving modes that can be integrated into the functionality of the nodes. Furthermore, the built-in sensors are more power efficient compared to the built-in sensors used in this prototype. In addition, the new microcontroller should also meet other requirements of patient compliance.
Referring to the research questions (see Section I), several aspects have been solved (see Section VI). Due to the complex nature of the problem, ongoing research is being done to enhance the quality of the solution.

APPENDIX A RISK ASSESSMENT
Reference [29] is a document that contains safety precautions for minimizing all possible injury risks for test subjects. This document has been prepared with great attention to detail. The health of the volunteers is the main focus in the development of this risk analysis, and every volunteer is obliged to strictly observe all protective regulations to avoid injuries. A very important safety measure is the use of protective clothing, which is mandatory for every test person. The location of the tests is also an important aspect of this risk assessment. Depending on the conditions of the testing area, multilevel safety precautions are provided.

APPENDIX B DATASETS
[31] is a dataset repository that contains fall simulation data, fall analysis, IoT-TEG-generated test events and fall simulation video clips.