# Internet of Things for Sensing: A Case Study in the Healthcare System
## 3 S-Band Sensing and Data Processing  
The proposed method uses the S-Band sensing technique for tracking human activities. The S-Band sensing technique exploits wireless channel information to obtain signals by use of wireless devices such as an omni-directional antenna as a receiver, and a card that is connected to the receiving antenna.  
The S-Band sensing technique is channel sensing based on frequency spectrum sensing using the orthogonal frequency division multiplexing transmission at 2 to 4 GHz frequency range. The transceiver has higher efficiency because it uses frequencies that are orthogonal increasing the robustness. The orthogonal frequency division multiplexing is composed of 64 frequencies spaced 312.5 KHz apart [32]. The spacing is selected because of the FFT sampling size. The IEEE 802.11n uses 52 frequencies for data, eight as null frequencies, and four as pilot carriers over a channel. The card primarily reports 30 different frequencies for data processing and form one channel information (CI) packet. The main advantage of obtaining multiple frequencies is that any one or more than one frequencies can be used for analysis.  
The wireless channel parameters such as carrier frequency, bandwidth, delay spread, and Doppler spread are extremely sensitive to variations in the spatial domain, causing multipath fading. We thus use such CI data that are affected by multipath reflections generated by human motion in a room or free space with a transmitting-receiving antenna. To discern the signals amplitude and phase information unique to motion, we need a second level of processing. The variances of amplitude and phase information for activity recognition generated by motion have to be looked at for uniqueness in their CI signatures.  
The method we present efficiently detects various human activities such as walking, squatting, sitting on chair, pushups, and narcolepsy sleep attacks using the S-band sensing technique, which can be reported in a human understandable format. The raw phase information retrieved via the network interface card is extremely random and inapplicable for the detection of sleep episodes. Hence, the proposed design fully exploits both amplitude and calibrated phase information by applying a linear transformation on the raw phase data discussed in the subsequent section. Furthermore, SVM, KNN, and RF classifiers are used to segregate human activities and detect sleep episodes. The performance metrics such as accuracy, precision, recall, specificity, Kappa, and F-measure were used to evaluate the three classifiers.  
An RF signal is received from a transmitter through multiple paths in an indoor environment when the transceiver pair is connected via network interface card. The received signal can be expressed as  
\[Y_{j}=X_{j}\times\ WCI_{j}+N, \tag{1}\]Here, \(Y\) and \(X\) denote the received and transmitted signals, respectively, for \(j\)th frequency. The CI data is the wireless channel information; that carries the channel frequency response (CFR) and \(N\) is the random noise. The raw CI data can be denoted as follows:  
\[WCI_{j}=\left|\left|WCI_{j}\right|\right|e^{j\angle WCI_{j}}, \tag{2}\]  
where \(\left|\left|WCI_{j}\right|\right|\) represents the amplitude information and \(\angle WCI_{j}\) is the phase data for all \(j=\left[1,30\right]\). A packet or channel matrix specifies the amplitude and phase information measured for a certain period of time. The wireless channel information over a time period for a particular frequency can be expressed as  
\[WCI_{time\_history}=WCI_{j}^{1}+WCI_{j}^{2}+WCI_{j}^{3}\ldots WCI_{j}^{z}, \tag{3}\]  
Here, \(j\) is the particular frequency number and \(z\) is the total number of CI packets received.