## 2 Method  
### Data Preprocessing  
Since a fall action generally lasts 1-3 s, and the original data collection's length is about 15 s, the original data must be intercepted to collect valid data information. The sampling frequency is 25 Hz. Thus, a sliding window with a length of 75 is selected. That is, the detection time is 3 s. In order to intercept effective information, the Algorithm 1 is adopted. ```
1:for signal in signals://Each group of data has 21 sensor signals
2: index = getBiggestChangePoint(signal)
3: array = arrayAppend(index)
4: index = getMode(array)
5: windowSignal = signals[index-(windowSize/2), index + (windowSize/2)]Take the x axis acceleration signal as an example, and the signal before and after the window interception ass shown in Figure 1.

As shown in Figure 1, in the original signal with a length of 15 s, only the data within a period of about 5-8 s are valid data. Using our window interception algorithm, effective data were extracted, which is very important for subsequent feature extraction. ### Feature Extraction

Since people's activities of daily living (ADLs) and falls are a dynamic process, the data collected by sensors on wearable devices are usually non-stationary signals. The wavelet packet decomposition can orthogonalize the collected signals in any independent frequency band without omission. The information components contained in the sensor signal are not the same in different fall postures. After wavelet packet decomposition, different frequency bands' energy values can be used as feature variables to express a specific fall posture or action. Therefore, the time-domain features and the features obtained by WPT can be combined as feature variables. #### 2.2.1 Extract Wavelet Packet Transform Features

We used wavelet packet decomposition to divide the signal into different frequency bands and measure the energy of each frequency band as a feature vector. When performing n-layer wave packet transformation, we chose \(db3\) wavelet. Each column of data can obtain \(2^{n}\) groups of different frequency components, and the energy of each frequency component is calculated as follows:

\[e_{n,m}={\sum_{i=1}^{j}{\left|{x_{m,i}}\right|^{2}}} \tag{1}\]

where \(m=0,1,2\ldots 2^{n}-1,i=1,2\ldots j\), \(j\) is the number of discrete sampling points of the signal and \(x_{m,j}\) is the amplitude of the discrete points. The decomposition process is shown in the Figure 2.

A certain column of timing signals can be expressed as

\[E_{i}=\left[{e_{n,0},e_{n,1},e_{n,2}\ldots e_{n,m}}\right] \tag{2}\]

Then, all timing signals can be expressed as

\[E=\left[{E_{1},E_{2}\ldots E_{s}}\right] \tag{3}\]

Figure 1: Comparison before and after window interception: (**a**) original signal; (**b**) processed signal. #### 2.2.2 Extract Time Domain Features

Feature extraction based on statistical methods is the most commonly used to extract statistical features from time-series signals as feature vectors. This type of feature is suitable for time series signals with prominent statistical characteristics of signal waveforms. For the window signal after preprocessing, we extract certain features with good discrimination from the perspective of statistical methods, and the extracted features are shown in Table 1:

### Feature Selection

Through feature extraction, hundreds of features can be obtained, but not all features have a positive effect on model classification and recognition. Therefore, it is necessary to reduce the dimensionality of features to eliminate irrelevant features. Random forest is an algorithm that integrates multiple trees through the idea of ensemble learning. Its basic unit is a decision tree, and its essence belongs to ensemble learning. Random forest combines hundreds of decision trees, trains each decision tree on slightly different observation sets, and considers only a limited number of features in each tree to split nodes. The final prediction of random forest is through averaging the predictions of each tree.