# Human Activity Recognition Using CSI Information with Nexmon
## 5 Propagation Model of Radio Signal  
As the CSI data is significantly altered based on human activities, let us consider the time-variant model of the Wi-Fi signal propagation in an indoor environment. For the reader's convenience we briefly summarize the signal theoretic foundations of the propagation model used and refer to [5; 28] for further details. Human activities and their effect on Wi-Fi signals propagation is shown in Figure 3.  
Assuming LOS scenario, as shown in Figure 3 with the propagation path \(d_{LOS}\) and multipath scattering propagation along the path \(d_{t}\) to \(d_{t+n}\). The receiver power \(P_{R}\) can be described using the Friis transmission Equation (1) as follows:  
\[P_{R}(d)=\left(\frac{\lambda}{4\pi d}\right)^{2}G_{T}G_{R}P_{T}, \tag{1}\]  
where \(\lambda\) is the wavelength and \(G_{T}\) is the transmitter gain, \(G_{R}\) receiver gain, and \(P_{T}\) transmitted power [32]. As the distance \(d_{t+n}\) varies w.r.t. time (t) and the human positioning, the received signal's PSD varies as represented in Equation (2)  
\[P_{R}(d_{t+n})=\left(\frac{\lambda}{4\pi d_{t+n}}\right)^{2}G_{T}G_{R}P_{T}, \tag{2}\]  
where \(t\in\{1,2,\ldots,m\}\) and \(n\in\{1,2,\ldots,m\}\). While analyzing HAR based on signal strength alone is possible in principle (see e.g., [33]), much more fine-granular data than signal strength is available, namely channel state information (CSI). In the sequel we closely follow the notation from [34]. Assuming \(M\) antennas and denoting the OFDM symbol of the sender as \(g(t)=\sum_{n=1}^{N}s_{n}e^{-\mathrm{i}\pi mA_{t}}\), \(t\in[0,T]\), where \(T=1/\Delta_{f}\) is the symbol duration, \(\Delta_{f}\) is the subcarrier spacing, and \(s_{n}\) is the modulated information onto the \(n\)th subcarrier [5], then the \(l\)th baseband received signal vector \(\mathbf{x}^{(l)}(t)\), containing the signals received is  
\[\mathbf{x}^{(l)}(t)=\sum_{q=1}^{Q}\mathbf{\alpha}(\varphi_{q})\gamma_{q}^{(l)}g(t- \tau_{q})+\mathbf{n}^{(l)}(t)\quad\in\mathbb{C}^{M\times 1}, \tag{3}\]  
where \(l\in\{1,\ldots,L\}\) and \(L\) is the number of snapshots taken, the vector \(\mathbf{n}^{(l)}(t)\in\mathbb{C}^{M\times 1}\) is modeling additive noise for every antenna and \(\gamma_{q}^{(l)}\) is the complex attenuation along  
Figure 2: Experimental setups. the signal path \(q\). The \(m\)th entry \(\alpha_{m}(\varphi_{q})\) of the array response vector \(\mathbf{\alpha}(\varphi_{q})\in\mathbb{C}^{M\times 1}\) is the response of the \(m\)th antenna to the \(q\)th path arriving from angle \(\varphi_{q}\) and depends on the antenna geometry. Substituting into (3) and sampling the received signal at rate \(N\) times the symbol rate \((1/T)\), i.e., at time instants \(kT/N\), the received signal vector becomes (\(b_{n}\) denoting the sampled \(s_{n}\))  
\[\mathbf{x}_{k}^{(l)}=\sum_{q=1}^{Q}\mathbf{\alpha}(\varphi_{q})\gamma_{q}^{(l)}\sum_{n =1}^{N}b_{n}e^{-\mathrm{j}\pi n(k/N-\Delta_{f}\tau_{q})}+\mathbf{n}_{k}^{(l)}. \tag{4}\]  
Collecting \(N\) samples and applying \(N\)-point discrete Fourier transformation, results in  
\[\mathbf{x}_{n}^{(l)}=\sum_{n=0}^{N-1}\mathbf{x}_{k}^{(l)}e^{-\mathrm{j}2\pi n\frac{N}{ N}}=s_{n}\sum_{q=1}^{Q}\mathbf{\alpha}(\varphi_{q})\gamma_{q}^{(l)}e^{-\mathrm{j} \pi n\Delta_{f}\tau_{q}}+\mathbf{n}_{n}^{(l)}. \tag{5}\]  
The knowledge of \(s_{n}\) can now be obtained from the network chip set (Nexmon) because it can be calculated from the known training symbols and the received data as  
\[\mathbf{h}_{n}^{(l)}=\frac{s_{n}^{*}}{|s_{n}|}\mathbf{x}_{n}^{(l)}=\sum_{q=1}^{Q}\mathbf{ \alpha}(\varphi_{q})\gamma_{q}^{(l)}e^{-\mathrm{j}\pi n\Delta_{f}\tau_{q}}+ \mathbf{w}_{n}^{(l)}\ \in\mathbb{C}^{M\times 1}, \tag{6}\]  
where the channel measurement noise at subcarrier \(n\) is expressed by \(\mathbf{w}_{n}^{(l)}\), \(n\in\{1,\ldots,N\}\). Fundamental to applying CSI to HAR is the fact, that \(\mathbf{\alpha}(\varphi_{q})\) in (6) contains geometric information such as the AoA and the arrival time (time of flight or ToF) that is heavily influenced by human activities.