1. Introduction
Human motion and activity detection have received considerable attention in recent years due to its applications in many emerging indoor environments such as healthcare systems, intrusion detection, search and rescue. Notable applications include monitoring patients, fall detection for elderly and physically challenged individuals [
1]. Many human recognition systems have been introduced such as smart homes with human motion detection [
2], and wearable acoustic sensors for detecting human behavior [
3]. The non-invasive, non-contact channel state information (CSI)-based human activity detection using commercial Wi-Fi devices has been extensively used for detecting activities of daily living as it uses small wireless devices such as Wi-Fi router, a network interface card and off-the-shelf antennas operating at 2.4 GHz. Radar-based systems have also been used for tracking human presence by using frequency modulated continuous-wave (FMCW) and orthogonal frequency division multiplexing (OFDM) systems [
4]. In addition, several other research works have demonstrated the detection of human motion based on wireless signals and exploitation of Wi-Fi signals as in [
5].
In addition, Human Activity recognition based on Wi-Fi channel state information and Machine Learning has been presented in [
6]. Another work provides a principle component analysis method that select the appropriate data from the CSI of wireless signal caused by human motion based on Wi-Fi router [
7]. In addition, CSI extracted from human behaviour based on commodity Wi-Fi device is presented in [
8]. The use of wireless CSI-based signal for activity detection system has provided several advantages, such as CSI can capture the small scale multipath propagation using OFDM over multiple sub-carriers, also it provides solutions and resolve the battery issues as compared to wearable sensing devices and also provide wider coverage areas as compared to cameras-based systems [
9].
The CSI-based system has the capability to detect human behaviour through the walls and complex scenarios compared to the other traditional techniques. It is independent of lighting intensity and does not require carrying any wearable device on the human‘s body. This provided basis for CSI extracted from Wi-Fi signals to detect human presence in private places where, cameras systems cannot be used [
10]. Hence, the CSI wireless technology has emerged as a ubiquitous solution for presence detection. Although prior studies offer adequate solution for the detection of human activities in an indoor settings using a Wi-Fi signal. However, the main limitation of extracted CSI data from off-the-shelf small wireless devices is the limitation of only 30 sub-carriers that are revealed. In addition, the data obtained are inconsistent, therefore affecting the overall performance of the system. The loss of OFDM sub-carriers sometimes loses valuable information.
The CSI data obtained using off-the-shelf wireless devices use low-cost Intel 5300 network interface card (NIC) that intrinsically reports only group of 30 data subcarriers. However, the total transmitted by Wi-Fi router is 56. In addition, single or multiple subcarriers carry particular information such as various body motions (i.e., sitting down, standing up, walking and so on). The subcarriers from 31 to 56 that are not revealed by NIC sometimes carry specific body motion. In addition, the frequency range, power level and operating frequency is fixed with NIC [
11,
12].
The research work done prior to this one used off-the-shelf wireless device such as Wi-Fi router (transmitter), network interface card (NIC) that presented numerous limitations. For instance, the transmitter used sent a group of 56 subcarriers, however the NIC only reported 30 subcarriers, nearly 46% of the information lost in this case. In addition, the power level of transmitter was not flexible and could not be modified according to particular human activity. The phase information retrieved through these small wireless devices was also inapplicable due to presence of random noise. In this work, we have used software-defined-radio model University Software Radio Peripherals (USRPs) by transmitting and receiving N number of multiple OFDM subcarriers as compared to its counterpart where limited numbers are available. The proposed system also allows us to modify the power level of transceiver model, change the operating frequency, use self-design antennas and change the number of subcarriers in real-time. The results obtained using USRP based wireless sensing for activities of daily living are highly accurate as compared to off-the-shelf wireless devices each time when activities and experiments are performed.
The main novelty of our work is the design of a flexible, scalable wireless sensing driven by USRP in conjunction with machine learning algorithm to detect human activities. This system can also be used to detect intricate body movements such as respiratory rate of a person by increasing the operating frequency, that enhances the range resolution.
This paper reports three major contributions which are summarized as follows.
- 1.
The first one is development of a flexible and scalable transmitter and receiver model of Software Defined Radio Based test-bed that can transmit and received N number of multiple sub-carriers to extract wireless channel state information that carry information for activities of daily living. This system provides high level of accuracy for subtle changes in environment that are associated to different human activities.
- 2.
The second one is development of a transceiver model on a software level which allows us to change the operating frequency, number of subcarriers, power level and antennas that modifies the range-resolution in real-time.
- 3.
The third one is application of four machine learning algorithms and provide real time classification on the collected data for human activities and provide high classification accuracy for empirical results which can help in future to do proactive detection for health of subject.
The rest of the paper is organized as follows. We first review the related work in
Section 2. In
Section 3, the overview of design software defined radio based on human activity recognition is presented. In
Section 4 the experimental setup and system parameters are described. In
Section 5, we show the result and evaluate its performance. Finally
Section 6 concludes the paper.
3. System Overview
In this section,
Figure 1 shows the block diagram of the MATLAB Simulink model, also we discuss the working principle of generating the channel sensing model using Universal Software Radio Peripheral Platform (USRP).
3.1. Transmission of Multiple Frequency Carrier
Initially, the transmitter model based on OFDM transmitting multiple subcarriers was designed using MATLAB/Simulink in the host computer to generate the transmitted data through the USRP, and transmitting it using an omni directional antenna. This antenna operated to work in the frequency range from 2.4–2.5 GHz to 4.9–5.9 GHz and 3 dB gain. In addition, it is highly recommended for USRP X300/310. Furthermore, directional antennas and Yagi antennas have also been tested on our system and provide similar results. The key advantage of using omni-directional antennas is that it can detect human activities in line-of-sight and non-line-of-sight. After that the generated random bits are sampled and obtained by the signal from the workspace at successive sample times, the random bits have 0.75 probability. Then these bits are converted into symbols and can be mapped using any modulation scheme due to the software flexibility to constitute symbols of source data. These source data symbols are in complex domain. They contain modulation constellation points. During designing the Simulink, we tested basic quadrature phase shift keying (QPSK) transmitter and receiver examples with Simulink and it worked properly. Besides, the performance of QPSK is better than QAM. Consequently, we use QPSK modulation scheme on our own software defined Simulink model. Furthermore, the 4 QAM modulation scheme is tested and works properly with our Simulink design. Next, the quadrature phase shift keying QPSK modulation scheme is used to convert the bits into symbols, every two bits is one symbol and mapped into phase shift format, two bits can also be used to define four possible values. Therefore, one QPSK symbol carries the equivalent of two bits of information. Once the modulation is done, these symbols will link to a single subcarrier system.
Then, they are transferred to serial to parallel converter. Inverse Fast Fourier Transform IFFT is carried out because QPSK symbols are viewed as if they are in the frequency domain and hence IFF block convert them to the time domain. Inter-symbol interference (ISI) always occurs in the OFDM system. This can be removed by appending a cyclic prefix in the guard interval of an OFDM symbol where guard period added at the start of each symbol to avoid multipath propagation of the reflected transmitted signal caused by physical objects. In our system design, we tested the bit error rate (BER) for communication reliability. Whereas, BER is the most significant parameter to analyze the performance of the system of any reliable communication.
Figure 2 shows the BER performance analysis of different digital modulation schemes. It can be seen from the figure that the performance of BER improved when the value of SNR increased. For instance, if we compare BER amoung BPSK, QPSK and 16 QAM then at SNR 10, BER for BPSK is 0 but for QPSK is
and QAM is
. In addition, at SNR 15, QPSK is 0 and QAM is
. Therefore, QPSK performs better than QAM. This verified the design of the system. then the signal is up-converted through Digital-to-Analog Converter (DAC) which is used in USRP devices, and transmitted wirelessly through the USRP antenna.
The designed system was deemed additive white Gaussian noise channel in a laboratory environment. For simplicity in this paper the most commonly used additive white Gaussian noise channel in determining the most appropriate modulation type, modulation order and comparison between the different encoding schemes [
28].
However, this model does not account fading, interference, non-linearity or dispersion [
29].
3.2. Reception of Multiple Frequency Carrier
On the receiver side, USRP X310 is fitted with omni-directional antenna to receive the signal and then analyzes Analogue to Digital Conversion (ADC) of the received signal. This is then converted down to the base-band and passed through a low pass filter to remove the effect of high-frequency terms. Additionally, the carrier tone is removed at the mixer of the USRP. This operation applied at the receiver of the USRP. Besides, OFDM bits are normally sorted into frames so that the received signal needs to be synchronized in time and frequency to obtain the start of the OFDM symbol. In addition, the cyclic prefix is eliminated from each symbol and then Fast Fourier Transform (FFT) is performed to recover the signal from the time domain to the frequency domain. After that data are converted to parallel through a serial to parallel converter to obtain the original signal.
3.3. Data Collection and Standardization
In this experiment, USRP was utilized to collect the CSI signal, whereas the CSI represents the properties of the channel in a wireless communication system. It is explaining how the signal transmits in free space comprises the amplitude and phase of each subcarrier in the OFDM channel.
Figure 3 present the flowchart of data collection in this experiment. The CSI signal can be represented using the following Equation (
1) [
30].
where, H(
) refers to the amplitude information of CSI, and ∠H(
) describes the phase of CSI.
The system collects N of CSI packets and the measured OFDM subcarrier can be represented as follows in [
30].
In our design, the amplitude and phase of channel frequency response (CFR) are measured by IFFT at the transmitter process and FFT at the receiver operation. Channel response measurements of our system are illustrated in Equation (
3) [
31].
where H(
f) represent the channel response of the system, X(
f) is the transmitted signal frequency response Y(
f) refers to the received signal frequency response.
4. Experimental Setup and System Parameters
In this section, we evaluate the performance of the proposed system as follows: (I) data collection using two USRP models. (II) Data analysis using Machine Learning model. The transmitter and receiver involved two Universal Software Radio Peripheral equipments (USRPs) X310/X300 from a national instrument (NI), each equipped with extended-bandwidth daughterboard slots covering DC–6 GHz with up to 120 MHz of baseband bandwidth. The USRP X300 worked as a transmitter and USRP X310 performed as a receiver. The system had two PCs to run the initial trial. Both USRPs were connected to the PCs through a 1 G ethernet cable. Furthermore, the experimental hardware comprised of two omni directional antennas, VERT2450 that were driven by the USRPs. The simulated transceiver model was designed using MATLAB/Simulink program linked to the software-defined radio.
The experimental campaign was undertaken in a lab environment in James Watt South Building, University of Glasgow where volunteers with different age range took part. The core idea is to lay foundation and develop a proof-of-concept prototype that can continuously monitor activities of daily living for elderly people. The trials were performed in a control environment where an individual was monitored for various activities. For future work, we will increase complexity of the data collection by monitoring multiple people simultaneously, increase other movements in the surrounding and so on. The distance between the USRPs was kept as 4 m in line of sight (LOS), in order to achieve optimum performance. Ethical approvals have been acquired through university of Glasgow ethic review committee. The volunteer was asked to perform five different human activities in the area of interest. The subject going under various activities were: (a) walking (b) sitting on a chair (c) standing from a chair, (d) doing exercise and (e) bending down to pick up an object from the ground. Each volunteer was asked to repeat the aforementioned activities 10 times. The test was performed in a 7 by 8 m room having furniture such as tables, chairs, etc. Machine Learning algorithms such as K-Nearest Neighbour (KNN), Discriminant Analysis (DA), Naive Bayes (NB) and Decision Tree (DT) were applied to process and classify the collected data. The experimental setup is shown in
Figure 4.
We performed the experiment in laboratory settings using healthy volunteers and asked them to perform different activities under test. We repeated the experimental campaign multiple times and each time almost identical results were obtained. Due to ethical approval issues outside university environment i.e., on actual patients and elderly people, we only undertook the experimental campaign in a controlled setting. For future work, our aim is to make this system more generalize, acquiring data in elderly care centres or hospitals in different geometrical settings. The CSI at heterogenous environments varies also, we will develop an algorithm for calibration in future work that in independent of geometrical structure.
We performed our experiments with varying parameters to evaluate the performance of the system.
Table 1 lists the parameters which were used in the designed software. The USRPs used in the study had a frequency range from 1 GHz to 10 GHz. Center frequency for both USRPs was set to 5.32 GHz and the operational frequency of omni directional antenna was the same as well, with 3 dBi gain. The gain of USRP was chosen to be 70 for transmitter and 50 for the receiver. The parameters values were used to test the software are summarized in
Table 1.
Table 2 displays the hardware configuration parameters for both transmitter and receiver.
5. Results and Discussion
This section addresses the findings of a comprehensive experimental campaign conducted using the proposed SDR-based human activity recognition system.
Five different activities were considered in this experiment, including walking, sitting on the chair, standing up from a chair, bending down and exercising. When the data were recorded, multiple factors were taken into account. Factors of the environment such as physical objects: chairs, tables, computers and people could affect the wireless received signal or led to attenuation of the collected signal. It could also cause false detection while testing the activity of the human. To address this issue, firstly, we tested our hardware devices with a simple MATLAB simulink QPSK example on the MATLAB simulink software such as QPSK transmitter and receiver with USRP to standardize and configure hardware parameters of the system. After ensuring that the system could receive an RF signal successfully, we then applied the actual Simulink design of our system.
The results divided into two cases: with and without human activity. In the first case:
Figure 5 shows the result when no activity was performed between the transmitter and receiver, as can be seen from the figure that the amplitude of the received signal remains constant ensuring no changes occurred between the transmitter and receiver antenna. The procedure of this case was repeated several times with no amplitude variations observed. The time duration of this case was 10 s and the number of transmitted packets in this trial was 10,000. We received only 8063 packets out of 10,000. A total of 10 repetitions were performed and the same number of packets were obtained. In addition, the packet index represents the number of subcarriers of the OFDM signal. The amplitude and time duration of this signal can be seen clearly in
Figure 5.
In case 2, one volunteer performed the five activities.
Figure 6 illustrates the changes in amplitude when a person is walking. The motion of hands and legs affected the amplitude of the received signal. The variation in amplitude of the collected signal was prominent compared to the original signal as depicted in
Figure 5. The time duration, in this case, was increased to 20 s. It is a suitable time duration to achieve an adequate performance of the behaviour and to observe amplitude variation because once the time duration increases, it needed more real-time data processing for a large number of packets. In addition, for a 20 s time duration, we received 17,640 packets out of 20,000 transmitted packets for each performed activity.
Figure 7 demonstrates the results for the case of sitting on the chair. The chair was located between the USRP transmitter and receiver. In addition, the distance among the USRPs and chair was kept as 2 m. After transmitting the signal, the person commenced sitting on the chair. Therefore, we can observe only small changes in the amplitude of the received signal and drop down according to the sitting actions based on the type of human motion. We noticed the amplitude only changed during the action after that, it remained constant.The time duration in this activity was 20 s and contained the similar number of transmitted and received packets.
Figure 8 presents results for the standing up from chair activity. This action was opposite to the previous activity, when the person started to stand up from the chair, the amplitude of the received signal changed based on the movement and started going up according to human action. The time duration of this activity was 20 s as well.
Besides, the transmitted and received packets were equivalent to the number of packets in the previous activities which, was 20,000 transmitted packets and 17,640 received packets.
Figure 9 helps in explaining walking and bending down activity. From this figure, we can observe amplitude variation in the beginning and then reduced variation based on walking and bending down movement. The time duration of this activity was the same as previous sitting and standing activities including the similar number of transmitted and received packets.
Figure 10 illustrates the variation in amplitude depending on the exercise activity, where different exercises have implemented between USRPs. In addition, the time duration and number of packets sent and received were the same as previously observed.
We can see in the
Figure 6,
Figure 7,
Figure 8,
Figure 9 and
Figure 10 that the variances of amplitude had distinct variation depending on the performance compared with the original waveform and most changes in the amplitudes occurred in walking activity compared to the other behaviors’ waveforms and the original signal.
Figure 6,
Figure 7,
Figure 8,
Figure 9 and
Figure 10 shows the performed activity and amplitude changed for each action. All these activities were repeated 10 times and every time we noticed distinguished amplitude variation.
This change of amplitude represents the human information behaviour and confirms that different human actions implemented between the transmitter and receiver system. Furthermore, Machine Learning algorithms were applied to process and classify the five activities and evaluate the overall performance of the system.
Machine Learning Classification
This section provided details on the discussion of machine learning algorithms used to classify various human activities and present the performance of proposed system based on percentage accuracy. The four algorithms used were K-Nearest Neighbor (KNN), Discriminant Analysis (DA), Naive Bayes (NB) and Decision Tree (DT). The machine learning algorithms were run using the following parameters. KNN is configured using 3 K samples using the Euclidean distance. Discriminant Analysis was configured as linear. Naïve Bayes used the normal distribution method. The Decision Tree algorithm was set up to use 50 splits in the decision tree. The data collected using USRP transceiver model showed the variations of amplitude information against 64 subcarriers. The amplitude information against each human activity as shown in
Figure 5,
Figure 6,
Figure 7,
Figure 8,
Figure 9 and
Figure 10 were visually different from each other. We used raw CSI amplitude information as input for all machine learning classifier used and obtained compared results of each classifier, where KNN algorithm provided the best classification accuracy.
We have used MATLAB tool to process the USRP data and apply different machine learning algorithms. The paramaters and configurations for each algorithms are as: The KNN algorithm used k = 2, standardization = 1, and distance function, Euclidean .
The decision tree algorithm performed classification based using two predictors, ×1 and ×2. To classify and do prediction, it started at the top node, represented by a triangle △.
The first decision was whether ×1 less than the value of 0.5. If it was smaller than the specific value, it followed the branch on left side, and identified the particular tree that classified the data as type 0. When the value of ×1 increased from 0.5, it then followed the right branch of the tree to the lower-right triangle node.
The discriminant analysis algorithm used mean for unweighted data as
, the value for k was selected as 1 in this case. The Naïve Bayes algorithms estimated each class for all activity by assuming equiprobable classes by computing an approximation for the class probability from the training set.
Table 3 details the used parameters for KNN and DT classifiers in this experiment.
The KNN algorithm was used to classify five activities, that provided the optimum results with 10-fold cross-validation leaving one subject out for validation. A total of 755,630 samples were processed for all activities. For the activity exercise, 270,089 samples were classified correctly while a total of 24,423 exercise samples were misclassified as the other activities. The break down of the 24,423 misclassified samples was 13,337 samples classified as picking up an object, 5074 samples classified as sitting down, 2577 samples classified as standing up and 3435 samples classified as walking. These numbers can be seen in the above confusion matrix
Figure 11. It also reveals how the other activities were considered for classification, with a blue representing the correct classification and the other boxes were identified as spurious observations and marked as incorrectly classified.
It can be seen from the
Figure 11 that most of the samples were correctly classified. The overall percentage accuracy using KNN classifier was obtained as 89.73%. Compared to the KNN classifier, the efficiency of the DT algorithm classifier was found to be unsatisfactory providing a total accuracy of 81.20%. For the first activity, there were 272,088 classified correctly. A large chunk of the obtained data, 160 samples were identified as picking up object activity (false negative) and so on with most false negatives being classified as standing up 13,813 as shown in the above confusion matrix in
Figure 12. Similarly, most of the sample was successfully classified in the KNN classifier, providing an accuracy of approximately 81.20%. The other algorithms tested were discriminant analysis and Naïve Bayes which produced poor results compared to KNN and the decision tree algorithms with an accuracy of 49.21% for discriminant analysis and 23.28% for Naïve Bayes.
Table 4 shows the accuracy comparison for different classifiers.