# Real-Time Detection of At-Risk Movements Using Smartwatch IMU Sensors
## 3 Materials and Methods
### Learning Algorithm for At-Risk Situation Classification  
The data were collected at 50 Hz using the acceleration sensor of the wearable watch SM-R900. The three-dimensional acceleration data were transformed into a one-dimensional signal vector magnitude (SVM) by calculating the Euclidean norm of the x,  
Figure 1: Visualization of acceleration data with representative raw data per class converted to feature vectors. (**a**) Walking, (**b**) running, (**c**) desk working, (**d**) at-risk movements.  
y, and z values, as shown in Equation (1). The one-dimensional data reduction is advantageous for designing real-time algorithms on smartwatches with limited memory and computing power.  
\[||a||=\sqrt{x^{2}+y^{2}+z^{2}} \tag{1}\]  
This transformation minimizes rotational interference, ensuring an accurate representation of a user's movement to recognize various physical activities. This process is essential as the triaxial data include rotational components that could otherwise distort movement recognition [15].  
To distinguish at-risk situations in daily life, actions were divided into normal behaviors and at-risk behaviors. Normal activities were collected through walking, running, and desk work (typing, writing, stretching, etc.), and at-risk situations were collected by simulating threatening situations such as picking up, pushing, and shaking. Each action maintained data collection for a duration of 6 s.  
As a neural network model, we used a 1D CNN (one-dimensional convolutional neural network) because it can effectively analyze time series data. This model is specialized in processing one-dimensional time series data, and the experimental data were transformed into a one-dimensional SVM signal. A simple 1D CNN with two convolutional layers was constructed to fit the one-dimensional data characteristics.  
The 1D CNN structures in the time domain and frequency domain are shown in Figures 2 and 3, respectively. The dataset collected to train the 1D CNN consisted of 5534 samples. Each sample has three axes of acceleration data (ax, ay, az), which are integrated into one value through SVM transformation, i.e., a size of (300 \(\times\) 1), corresponding to a time of 6 s per sample. As shown in Figure 2, the 1D CNN structure in the time domain takes the collected time series data directly as input. These data are then processed within the network layers to perform feature extraction. The hidden layers use the ReLU activation function. The output from the convolutional layers passes through the flatten and dropout layers; finally, the softmax activation function outputs the prediction values corresponding to four behavioral classifications.  
In the frequency domain, the data collected over a period of time are subjected to a fast Fourier transform (FFT) to extract the frequency components. Only the magnitude of these components is used as input to the model, as shown in Figure 3. As a result, excluding phase and the DC component, which represents the average signal, the remaining data are used as the input for the 1D CNN.  
In the frequency domain, the data collected over a given period undergo a fast Fourier transform (FFT) to extract their frequency components, with only the magnitude being used as input for the model in this paper. Consequently, excluding the phase and the DC component, representing the average signal, the remaining data serve as input for the 1D CNN as shown in Figure 3.  
Figure 2: One-dimensional convolutional neural network (1D CNN) architecture of the time domain.