# Time-Frequency Analysis of Daily Activities for Fall Detection
## 2 Materials and Methods
### Fall Detection Strategy  
Using the time and frequency information obtained from the accelerometer signal, a fall detection algorithm is proposed. This proposed algorithm utilizes a hierarchical classification strategy following two stages. Figure 2 illustrates the fall detection schema.  
In the first stage (Stage A), acceleration data from daily activities are analyzed in the time-domain to distinguish between low-impact, non-rigorous (i.e., standing, sitting, walking, stepping) and more rigorous activities exhibiting high impacts (i.e., running, jumping, falls). Non-rigorous activities are easily distinguished from activities that are more rigorous by setting a critical acceleration threshold (TH1). In the literature, TH1 ranges from 2-3 g and has tremendous effect on sensitivity and specificity of fall detection algorithms. Additionally, because more rigorous activities such as running, jumping, and falls exhibit overlapping peak acceleration magnitudes in the time domain, the specificity of time domain analysis is reduced.  
To improve fall detection accuracy, improved classifiers to differentiate fall events from other rigorous activities are needed. Analyzing data in the frequency domain may provide additional unique information to improve detection. Thus, rigorous activities identified in Stage A exhibiting high impacts and exceeding TH1 are further analyzed in the frequency domain using PSD calculations in Stage B. Once a potential fall event is identified in Stage B, the algorithm performs a posture validation procedure to confirm the fall event. As falls occur in either the anterior-posterior (z-axis) or lateral (y-axis) directions, this results in a change in sensor orientation and hence, which sensor axis is aligned with the direction of gravity. Following a forward/backward fall, the z-axis will be oriented in the direction of gravity; in a lateral fall, the y-axis will be reoriented in the direction of gravity. Thus, to confirm a fall event, the detection algorithm checks if the acceleration magnitude of the y-z plane, Accyz, exceeds a critical threshold (TH2), where:  
\[\text{Acc}_{\text{yz}}=\sqrt{\left(\text{A}_{\text{y}}\right)^{2}+\left(\text {A}_{\text{z}}\right)^{2}} \tag{3}\]  
Figure 2: Fall detection schema. Stage A analyzes acceleration data in the time domain. Stage B uses frequency domain analysis to differentiate fall events from other high impact activities.  
Finally, the proposed fall detection algorithm is tested for sensitivity and specificity using the half of the dataset not utilized for algorithm development and optimization. Sensitivity and specificity are calculated as follows:  
\[\text{Sensitivity}\;=\;\frac{\text{\# TP}}{\text{\# TP + \# FN}} \tag{4}\]  
\[\text{Specificity}\;=\;\frac{\text{\# TN}}{\text{\# TN}+\text{\# FP}} \tag{5}\]  
where:  
* # TP: true positive. fall event is correctly detected
* # FP: false positive, non-fall event incorrectly identified as fall
* # TN: true negative, non-fall event correctly _not_ identified as fall
* # FN: false negative, fall event incorrectly identified as non-fall