Privacy-Preserving Non-Wearable Occupancy Monitoring System Exploiting Wi-Fi Imaging for Next-Generation Body Centric Communication

Nano-scaled structures, wireless sensing, wearable devices, and wireless communications systems are anticipated to support the development of new next-generation technologies in the near future. Exponential rise in future Radio-Frequency (RF) sensing systems have demonstrated its applications in areas such as wearable consumer electronics, remote healthcare monitoring, wireless implants, and smart buildings. In this paper, we propose a novel, non-wearable, device-free, privacy-preserving Wi-Fi imaging-based occupancy detection system for future smart buildings. The proposed system is developed using off-the-shelf non-wearable devices such as Wi-Fi router, network interface card, and an omnidirectional antenna for future body centric communication. The core idea is to detect presence of person along its activities of daily living without deploying a device on person’s body. The Wi-Fi signals received using non-wearable devices are converted into time–frequency scalograms. The occupancy is detected by classifying the scalogram images using an auto-encoder neural network. In addition to occupancy detection, the deep neural network also identifies the activity performed by the occupant. Moreover, a novel encryption algorithm using Chirikov and Intertwining map-based is also proposed to encrypt the scalogram images. This feature enables secure storage of scalogram images in a database for future analysis. The classification accuracy of the proposed scheme is 91.1%.


Introduction
Nano-scaled structures, wireless sensing, wearable devices, and wireless communications systems are anticipated to support the development of new next-generation technologies in near future. The exponential rise in future Radio-Frequency (RF) sensing systems has demonstrated its applications in areas such as wearable consumer electronics, remote healthcare monitoring, wireless implants, and smart buildings.The advances of low-cost small electronic devices, wireless sensing systems, real-time monitoring, and the Internet of Things (IoT) has played the role of a catalyst that has primarily expanded the horizon of these technologies. In this context, we introduce a privacypreserving, device-free occupancy real-time occupancy monitoring system for energy optimizing in smart buildings.
The smart built environment essentially refers to the man-made environment providing the setting for different human activities including smart cities, large scale buildings, and beyond. It consumes a significant amount of electricity around the world and keeps on increasing day by day [1]. In this context, effective strategies are required to be developed in order to decrease the overall energy consumption while maintaining and improving the thermal comfort of occupants residing in buildings. Several studies indicate that smart lighting systems and Heating Ventilating and Air Condition (HVAC) save energy up to 30%, provided they work based on the suggestions given in [2]. The HVAC system can automatically turn off in unoccupied settings and the ventilation rate can be adjusted as well depending on the total number of occupants present to optimize the energy consumption. In addition to energy-saving, the adaptive crowd density control scheme can be applied by estimating occupant number in various places.
For example, optimized services provided at shopping malls, hotels, restaurants, and transportation stations can be allotted to improve customer care service. Crowd density control and counting can enhance the indoor evacuation process in emergency cases. Hence, the design of a low-cost, robust, accurate, safe, and secure occupancy monitoring system is of utmost importance that can count the number of occupants while keeping the privacy preserved. Presently, the majority of the occupancy monitoring and detection systems use infrared sensors. However, these systems present a huge number of false alarms when occupants are moving slowly. Furthermore, state-of-the-art occupancy detectors estimate the total number of people in the indoor environment as well. Camera-based systems [3] are one of the most used detectors. However, the person has to be in line-of-sight with sufficient light; dedicated cameras have to be deployed; and it raises privacy concerns as well. Several researchers have used Radio Frequency (RF) such as Bluetooth [4], Radio Frequency Identification (RF) [5], and sensor fusion [6] to detect occupants. The limitation of the aforementioned RF technologies is that a person has to carry RF or Bluetooth tags all the time within the area of interest. In addition to the limitation of RF sensing devices, some of the main advantages are that it is inexpensive, robust, and accurate with no issue of privacy. The ubiquitous Wi-Fi routers have been widely used for various application, ranging from remote health monitoring to fall detection, and so on [6][7][8][9]. The Wi-Fi technology is the best possible solution for occupancy monitoring in an indoor setting as it transmits the signal in omnidirections, covering almost the entire indoor area.
The Received Signal Strength Indicator (RSSI) obtained from Wi-Fi signals has been used to estimate occupants. The disadvantage of RSSI is that it suffers from coarse grain resolution, is highly susceptible to noise, and presents fluctuations, making it an infeasible solution for occupancy detection. On the other hand, channel state information extracted from Wi-Fi signals provide multiple frequency sub-channels, where one or more frequency carriers can be used to detect a person in an indoor environment. In this paper, we propose a novel low-cost, easily deployable, device-free, privacy-preserving Wi-Fi technology-based occupancy detection system using commercially available, off-the-shelf wireless devices such as Wi-Fi router, network interface card. and an omnidirectional antenna. In this research, two independent modules were implemented: (i) deep learning for occupancy detection; and (ii) chaos-based scalogram image encryption.

Related Work
Numerous researchers have introduced different RF sensing-based occupancy monitoring systems over the past few years [10][11][12][13][14][15]. In this regards, this section introduces some of the most commonly used RF sensing techniques to estimate the occupant within the area of interest, along with their advantages and limitations. For instance, the authors of [16] used Passive Infrared Sensor (PIR) to detect a person within the specific zone. The system identifies the presence of a person by estimating the variances in radiation emitted from the source (sensor in this case). Furthermore, Duarte et al. [17] exploited the PIR device to measure occupancy in real-time at various zones, comprising of different rooms. Occupancy detection system using two PIR sensors were used in [18,19] to localize the occupant. The main advantage of this technology is its low cost and low power consumption level. However, the PIR sensor fails to detect intricate or stationary occupants due to its limited range resolution. Camera-based technology for occupancy monitoring is another method for crowd estimation and person monitoring. This system uses frames extracted from video recordings, where accurate and precise information about the occupant can be obtained. The image processing classification technique has three main essential steps: background score subtraction from the main body, movement detection, and occupant identification. The limitation of the vision-based technique is that it is dependent on the light intensity and the occupant has to be in line-of-sight of the camera, which raises privacy concerns as well. On the other hand, some researchers have used the Bluetooth Low Energy (BLE) module for crowd counting and occupancy estimation [4]. Deploying multiple iBeacons in the area of interest (indoor setting), the occupant can be estimated using RSSI in combination with machine learning algorithms such as support vector machine, K-nearest neighbor, etc.. The minimum requirement in the deployment of the BLE module is its biggest limitation to being implemented. To the best of the authors' knowledge, none of the existing monitoring systems consider the cost, easy deployment, security, and privacy preservation aspects. This paper addresses all the open areas that have not been addressed so far.

Security and Privacy in Body Centric Communication
Body centric communication systems need specific privacy and security protocol to ensure the privacy, confidentiality, and data integrity of a person's information. A supporting body centric communication infrastructure should deploy particular security measures that ensure all aforementioned features [20]. A comprehensive survey of main challenges (security and privacy) in wireless body area networks is presented in detail in [21]. Preserving and securing privacy of important data from adversaries without modifications, digital model learning, and sharing private information in body centric communication are extremely challenging. In an ideal world, the privacy preservation require available datasets always be secured from outside the data by the users.The private privacy should be enabled throughout the communication process of a given task.However, fool-proof ideal privacy preservation is impossible. For example, deploying fully-secured image encryption techniques including an AES-256 encryption scheme that is used to secure the available information from potential threats can harm typical delivering services in body area network. On the contrary, agreeing with simple and straightforward encryption schemes, such as information anonymization, is ineffective against breaches. The selection of encryption schemes also plays an important role in the designing of preserving data for next-generation body centric communications. Data and information protection schemes make space operations that are limited on the obscure data, while complex data protection techniques must be separate from simple schemes. For instance, a homomorphic encryption system is introduced in [22] to secure information using data mining techniques in the context of plain homomorphic multiplications. In addition, privacy-preserving schemes have a rapid rise in computational costs, thus often making it infeasible to be deployed in real-world applications. For instance, the overall cost of an effective multiplication-based homomorphic encryption algorithm transforming a plaintext number into a 256-byte ciphertext with a 1024-bit security key within 5 s sums to 1500 s for such encrypted ciphertexts. Hence, it is very important to divide the collective workload of encryption schemes to corresponding distributors in relation to the available resources.

Wi-Fi Sensing for Occupancy Monitoring
The received signal strength indicator and the Channel State Information (CSI) extracted are two of the most widely used types of information, applicable in various areas of wireless communication. RSSI measurements only present simple signal strength in the context of signal propagation, which is why this information is inadequate for occupancy monitoring due to its unstable nature. Zou et al. [23] presented an occupancy monitoring system based on RSSI measurements that could obtain an overall accuracy of nearly 70%. On the contrary, the CSI measurements obtained using low-cost wireless devices provide fine-grained information by exploiting multiple frequency subcarriers [24]. The overall proposed architecture based on Wi-Fi signals is given Figure 1.

Deep Autoencoder Network
WiFi Subcarriers The Wi-Fi technology powered by IEEE 802.11 a/a/ac utilizes Orthogonal Frequency Division Multiplexing (OFDM), effectively encountering the multipath propagation effect caused in indoor settings due to physical obstructions such as walls, ceiling, floor, etc. In OFDM, the frequency carrier is divided into multiple (orthogonal) subcarriers where the data stream [25,26]. The Wi-Fi signal received, i.e., the pass-band signal, is converted into message or baseband signal. The orthogonal frequency subcarriers are transformed into the frequency domain from the time domain by applying serial-to-parallel converter on RF signal, and Fast Fourier Transform (FFT) is then applied on all received subcarrier, as shown in Figure 2. A low-cost, off-the-shelf small wireless device, such as Atheros ar5b225, can be used to extract the CSI information from OFDM subcarriers. Open-source network interface card wireless device drivers reveal the measured CSI for all subcarriers, providing fine-resolution wireless channel information, comprising wireless medium characteristics including multipath fading, reflection, refraction, and shadowing effect.

Subcarriers Amplitudes
Let H i represent the CSI data for ith subcarrier that carries complex information and is denoted as follows: where |H i | and H i provide the variances of amplitude and phase information for ith frequency channel, respectively. The phase information extracted from CSI data for single frequency channel i, H i is expressed as: where β is the phase offset for ith frequency subcarrier and mi is the frequency channel number. The internal noise of the network interface card and external noise is denoted as Z, and λ p , λ s , and λ c are the phase errors, sample subcarrier offset, and central frequency offset, respectively. The raw channel state information is sufficient to extract meaningful information for occupancy monitoring due to the random noise present in Wi-Fi signals. In this context, we only use variances of amplitude information extracted from CSI data. The raw CSI measurements for five different activities, including occupant leaving the room, are shown in Figure 3. The proposed system deals with interference produced by other devices working in the 2.4 GHz band (microwave ovens, alarms, remote controls, Wi-Fi networks used for communications, etc.). The technical reasons are discussed as follows: (1) Wi-Fi router is deployed closer to the receiving antenna.
(2) We avoid using other wireless systems nearby common sources of interference, such as power cables, microwave ovens, fluorescent lights, and cordless phones.
(3) We minimize the total number of live devices using the same RF band.
(4) Deploying the Wi-Fi router close to the receiving antenna enables the receiver to get the maximum power, thus other nearby devices operating on same frequency do not affect the proposed system.

Data Processing and Signal Acquisition
The channel station information recorded using the network interface card connected with the Wi-Fi router is discussed in this section. The CSI data are recorded from the data stream obtained from the Internet Control Messages Protocol (ICMP) data. In principle, the overall recorded CSI data are the same when compared to the ICMP data stream. Nonetheless, it was noticed that marginally fewer CSI data packets were transmitted than ICMP packets. To synchronize the frequency of the recorded data packets, we applied linear transformation function on CSI data recorded in raw form. In theory, the OFDM subcarriers that Wi-Fi signal exploit should carry independent data. However, in practice, the neighboring frequency subchannels carry similar information most of the time. To detect occupancy and obtain separate information from each subcarrier, we applied principal component analysis (PCA) to get independent datasets for each observation. The CSI data stream can be easily incorporated into several independent principle components.

Experimental Setup and Trials
We conducted extensive experiments and trials in a hall, as described in Figure 4. The experiment was conducted on 15 subjects who were asked to do five ADLs. The age range of all subjects was 20-60 years. The transmitter (Wi-Fi router) and receiving antenna were placed 5 m away from each other at height of 1 m. The firmware introduced in [7] was used to record raw CSI and was installed in a desktop PC that continuously received OFDM packets. To identify occupants in indoor settings, we performed five sets of activities, as described above. Each human body movement brings a unique change in wireless channel that was inferred to identify activities performed by occupant in indoor environment.

Scalogram for Activity Detection and Occupancy Estimation
The multiresolution scalograms, represented in terms of time-frequency, obtained from channel state information packets were used to estimate the occupancy within indoor settings. The scalograms are energy density function retrieved by applying Continuous Wavelet Transform (CWT) on 1000 CSI data packets. The energy density function E(t, f ) can be obtained from variances of the amplitude information of the CWT function C d (t, f ) by applying a squaring function on a discrete sequence. The time-frequency measurement can be calculated from the CWT C c (t, s) of a Wi-Fi signal x(t), denoted as time t and scale s, as described in Equation (3).
where ψ( v−t s ) is the dilation of the wavelet ψ(t). The expression v − t = τ is scaled down to the value of s as denoted as a function of frequency f, given s = g 1 (w) = g 2 ( f ). The continuous wavelet transform of Wi-Fi signal for CSI data packets are expressed in Equation (4): where x(KT) is a discrete sequence of samples with a time period T = 1/F, and the value of F represents the sampling frequency of an RF signal. The continuous wavelet transform of a discrete Wi-Fi signal can be acquired when the expression x(kT) is substituted with CSI SC (kT), written as: The value of f in Equation (6) was set to 60 Hz, i.e., the sampling frequency of variance of amplitude information of Wi-Fi signals, and the value of T was set to 03 ms. In this study, we chose mother wavelet, which is also known as the "morse" wavelet. The scalogram E(t, f ) of the Wi-Fi signals can be elaborated further as: The CWT-based time-frequency scalograms provided fine-grained resolution analysis, independent of time window size. Consequently, they result in different dilations of morse wavelet. The time-frequency scalograms give significant variations in terms of CSI amplitude information due to the presence of an occupant within the indoor environment and give granular resolution due to small window time size at higher frequencies. Furthermore, the scalograms extracted have the potential to identify intricate features in RF signals due to large time window durations at lower RF frequencies.
The scalograms shown in Figure 5 are produced against the frequency domain (logarithmic scale). The white dotted line represents the cone of influence that splits the region where edge effects are significant to identify occupant presence within the indoor environment.

Autoencoder for Scalogram Classification
The biggest challenge that researchers face is the classification of RF signals due to the limited amount of data as a huge amount of time is required for data collection. To cope with the small number of observations, we used the autoencoder neural network, which delivers the best classification performance when exposed in such scenarios [27][28][29]. The autoencoder classifier provided the input data at the output, as shown in Figure 6. For example, for input value x, the neural network tries to find a function, namely, hw(x) ≈ x. The unsupervised algorithm was introduced to initialize the weights and biases of an autoencoder, which was extremely effective when limited training data were available. This algorithm implements unsupervised data processing (pre-training) by encoding and decoding the available datasets, respectively. It also estimates a nonlinear mapping on given datasets as an input x that is expressed as follows. z i = σ(Ŵe i +b) (8) whereŴ andb are weights and biases, respectively. The autoencoder classifier tries to reduce the error rate by minimizing the following values: To optimize the autoencoder neural network, cost function in conjunction with a sparsity parameter is implemented to drive the neural network for learning the correlation when different inputs are given [30]. In addition to the these parameters, the cost function can be expressed as follows: where h denotes the number of hidden neurons, β is the sparsity proportion, and KL describes Kullback-Leibler divergence and can be expressed as follows:

The Proposed Encryption Scheme
The scalogram images are encrypted with lightweight Chirikov and Intertwining maps. The flowchart of the encryption process is highlighted in Figure 7. One can see in Figure 7 that both confusion and diffusion steps are deployed for protecting the privacy from eavesdroppers. Due to lightweight nature, pseudo-randomness, ergodicity, and dynamic behavior, the chaos-based algorithm is used in this work. Two chaotic maps, Chirikov standard map and Intertwining map, are used during the encryption. Mathematically, Chirikov standard map is written as: = α n + K sin θn mod 2π where K is control parameter, and α n and θ n are real values between (0, 2π). The constant coefficient K influences the degree of chaos exhibited by the map, as highlighted in Figure 8. Each plot is on the θα-plane, and it can be seen that increasing the value of K leads to a rich set of dynamics. It is obvious in Figure 8a that the map has regular values for K = 0. The chaotic region grows for higher values of K. In a chaotic cryptographic primitive, θ and p represent hidden inputs [31], with the other parameters akin to the group setting in Diffie-Hellman, the RSA prime, or the curve used in elliptic curve cryptography. The secret parameters are protected by the difficulty of determining (θ 0 , α 0 , K) given (θ i , α i , K), after the chaotic map has been iterated i times. For a secure crypto-system, the keyspace should be more than 2 100 . If the computational precision is 10 −14 , the keyspace is ≈ 2 140 , which indicates that the output of the Chirikov standard map is secure against brute-force attack. Moreover, slightly different values of α cause different output, which highlights the key sensitivity of the chaotic map, as shown in Figure 9. The key sensitivity test illustrates the strength of the Chirikov standard map.

Encryption and Security Analysis
The proposed scheme was tested on pick up object scalogram. The original and encrypted scalogram of pick up object are shown in Figure 10a,b, respectively. Additionally, encrypted walking scalogram is shown in Figure 11b. In Figures 10b and 11b, it is clear that contents of scalogram are encrypted and an eavesdropper cannot predict the original activity. Visually, it is clear that contents are hidden; however, the security of an encryption scheme should be highlighted thorough a number of parameters, as outlined in our previous work [32,33]. Several parameters in Table 1 indicate the robustness and higher security of the proposed scheme. How such security parameters reflect robustness the proposed scheme can be found in [32,[34][35][36].

Classification Results
We implemented the autoencoder model in a MATLAB tool, where training, validation, and testing were performed on scalograms generated from Wi-Fi signals. The neural network was trained for 200 epochs with a minibatch size of 90. The performance accuracy of the proposed system was obtained by dividing 20% of the training datasets as the validation set, and the model was evaluated after the completion of each iteration.
The adaptive moment estimation technique was used for optimizing the given datasets during the pre-training stage for a fine-tuning learning rate of 0.002. The grid search method was used during the process where optimized values for width and depth overcoming the overfitting problem are shown in Table 2. The three-layer unsupervised autoencoder had layer depths of 200, 100, and 50, respectively. The optimum classification performance in terms of percentage accuracy is 91.1%, as highlighted in Table 2.

Conclusion
This paper presents the application of next-generation body centric communication towards occupancy monitoring that can provide an effective and privacy preserved solution for reducing the energy consumption and carbon footprint. In the proposed model, non-wearable wireless devices such as Wi-Fi router, network interface card, and omnidirectional antennas operating at 2.4 GHz, are used to acquire data. Continuous wavelet transform is applied to the acquired RF signals to obtain Wi-Fi images that are processed using a deep learning algorithm to detect occupancy and to further perform occupancy classification. An unsupervised auto-encoder algorithm is used to classify images corresponding to different human activities of the occupants present in the area of interest. The performance of the proposed system was evaluated in terms of percentage accuracy, providing an overall accuracy of more than 91%. Lightweight image encryption techniques using multi-chaotic maps are proposed to encrypt the scalogram images. This feature enables secure storage of scalogram images for future usage such as improving training and testing accuracy of deep neural model.