# Human Activity Recognition Using Cell Phone-Based Accelerometer and Convolutional Neural Network
## 4 Experiment Study
### The Activities  
In this research study, the activities that are taken into consideration are: walking, going upstairs, going downstairs, sitting, jogging and standing. There are two reasons why these activities were selected. Firstly, these activities are quite common, and many people perform them in their everyday lives. Secondly, these activities also involve movements of the body that take place for a considerable amount of time, hence recognizing them becomes an easy task. Moreover, most of these activities show repetitive patterns in body movements, which can make their recognition easier [12]. When the data are recorded for respective activities, the accelerometer readings (acceleration values) are recorded in the three axes, viz., \(x\)-axis, \(y\)-axis and \(z\)-axis. For this study, the horizontal motion of the subject's leg is captured in the \(x\)-axis. The upward and downward motion of the body is  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **User ID** & **Activity** & **Time** & \(\mathbf{x}\) & \(\mathbf{y}\) & \(\mathbf{z}\) \\ \hline
0 & 33 & Jogging & 49105962326000 & \(-\)0.6946377 & 12.680544 & 0.50395286 \\
1 & 33 & Jogging & 49106062271000 & 5.012288 & 11.264028 & 0.95342433 \\
2 & 33 & Jogging & 49106112167000 & 4.90332  
captured in the \(y\)-axis. Lastly, the forward motion of the subject's leg is captured in the \(z\)-axis. Figure 1(a)-f shows six plots for each activity performed by a typical human subject who had participated in the experiment. Before depicting the accelerometer values of the three axes in their graphical forms, a check for null or missing values was performed. It was found that there were no null values in the reading, thus ensuring that the data are well-filtered before representation. Every plot consists of three subplots representing acceleration values concerning the \(x\), \(y\), and \(z\)-axis. As mentioned before, the data are recorded at a frequency of 20 Hz, i.e., 20 samples per second. As only 180 records are considered from the beginning, each plot illustrates an interval of 9 s for the respective activities (calculation: 0.05 \(*\) 180 = 9 s). It could be observed that sitting and standing activities as seen in Figure 1(e),f, respectively, do not display recurring behaviour but do possess distinguishing patterns with respect to points on the \(x\), \(y\) and \(z\) axes. In contrast, the rest of the four activities (Figure 1(a)-d), which involve carrying out repeated motions, do show recurring patterns in the plots. An important aspect of the plots in Figure 2 that should be noted is that the values of the y-axes have the highest magnitudes of acceleration compared with other axes. This is because of Earth's gravity, which causes an acceleration of 9.8 m/s\({}^{2}\) towards the centre of the earth. Due to this, the accelerometer measures 9.8 m/s\({}^{2}\) in the direction of the Earth's centre. The approximate periodic patterns for the activities shown in Figure 1(a)-f show a relationship between time and accelerometer reading values. Additionally, as per expectation, standing and sitting activities have constant acceleration values when there is a negligible motion before and after sitting or standing. The plot for walking shown in Figure 1(a) shows more variations and many peaks as it involves more motion. The distance between two consecutive peaks on the \(y\)-axis and \(z\)-axis represents the time taken by the subject to perform a stride while walking. The adjacent values of the \(x\)-axis plot are lesser in magnitude comparatively and display the peaks in association with the remaining two axes. For jogging activity (Figure 1(d)), similar trends such as walking are seen for the data related to the \(y\)-axis and \(z\)-axis. Nonetheless, the extent of magnitudes of acceleration on the \(y\)-axis is more than that present in walking, with an observable shift in the negative direction. Additionally, it can be observed that jogging involves comparatively more variation and higher frequency due to repetitive motions of the body.