Human Sensing by Using Radio Frequency Signals: A Survey on Occupancy and Activity Detection

Applications for human sensing, also known as (human) occupancy detection, include energy management systems for intelligent buildings, intruder detection, e-health systems, the identification of everyday activity, and the monitoring of vital signs. These applications require intelligent decision-making that relies on human sensing. Multiple technologies based on vision, sensors, or radio signals can be used to detect occupancy. Vision-based systems use a multitude of cameras to recognize the human presence, but they are restricted by light availability, line-of-sight coverage, expensive equipment, and privacy concerns. Sensor-based techniques refer to a prospective method that employs various combinations of sensors. These solutions are static and necessitate costly equipment installation and maintenance. Due to technical advancements, radio-based signals, such as WiFi, have been integrated into various forms of infrastructure, including homes, offices, and constructions. Due to how human body movements affect wireless signal propagation, it is possible to detect human motions by analyzing the received wireless signals (such as reflection, diffraction, and scattering). Due to its low cost and non-intrusive nature, wireless-based human activity detection has received substantial attention and become a key topic of study. This article reviews the underlying principles, methodologies, and system architectures of radio-frequency-based occupancy detection systems. We classify the reviewed research studies based on the technical measures and applications they employ. In addition to focusing on the security aspects of occupancy detection and discussing future trends and difficulties, we also discuss practical considerations.


I. INTRODUCTION
The detection and prediction of room occupancy are thoroughly researched and addressed in the literature. Occupancy detection offers a wide range of applications in smart decision-making challenges. In this survey, we address the human occupancy detection (HOD) problem, which is used to detect the presence or absence of a human in a target environment. One well-studied application is the use of human detection in smart buildings, where the goal is to reduce energy The associate editor coordinating the review of this manuscript and approving it for publication was Paul D. Yoo . consumption in the heating, ventilation, and air conditioning systems (HVAC). Another key application is for intrusion detection systems' security. Crowd counting, human identification, and human activity recognition (HAR) are some technical topics linked to human occupancy detection. HAR has received the most attention in the literature on these topics. HOD approaches include camera-based systems, multisensor-based methods, and radio signal-based algorithms. Camera-based systems require a direct line-of-sight optical link with the subject, making them inapplicable in situations where privacy concerns are raised or when the cameras cannot cover the entire area and there are some blind patches.
Physical sensors such as CO2, humidity, infrared motion detectors, ultrasonic sensors, and their combinations have been used to detect human occupancy. The sensor-based strategy necessitates the deployment, installation, and maintenance of sensors in addition to the decision-making system. Both camera-based and sensor-based systems contribute to the system's cost and upkeep. Recently, radio signal-based approaches have drawn the attention of numerous researchers in a wide range of disciplines of study, including occupancy detection. Bluetooth transmissions, particularly the low-energy version (BLE), WiFi signals from access points, and even frequency shift radars are some examples of radiobased technologies utilized for human occupancy detection, in addition to other possible uses in HAR or human counting.
Some of the related works covered in this survey simplify human occupancy detection as HAR, which is a false interpretation, despite the fact that some of the techniques are common. The HOD problem is a binary classification in which the system detects the presence or absence of a human in the covered environment, whereas the HAR problem is a classification in which we classify the pattern into several activities such as walking, running, lying down, and so on. HOD appears to be less complicated than HAR because it only requires identifying a person's presence rather than his or her activities, however, things are different in practice. The simpler task is to detect the patterns in known activities such as walking, which are also regarded as a technique for HOD in the majority of current studies. The patterns for human presence are unknown in advance.
Almost all the authors use the term occupancy detection instead of human occupancy detection. In the rest of this paper, the term occupancy detection is used to refer to the HOD, unless otherwise mentioned.
The general concept of radio-based approaches is relatively straightforward. When a transmitter emits a radio frequency signal, the received signal differs from the transmitted signal. The surroundings can alter the channel parameters of the broadcasting signal, which can be seen in the received signal. As a result, modifying the environment by having some people in the room results in a different pattern of the received signal than when the room is empty. This ancient concept served as the foundation for radar systems. The transmitter of a radar system generates a high-energy signal and examines the returned signals for prospective objects. It should be mentioned that these systems are considered active, which means that the system consumes a significant amount of energy and requires additional equipment.
Recent advancements in WiFi have opened up new possibilities for the human detection problem. Nowadays, it is difficult to discover a location that does not have WiFi connection sites. It has been demonstrated in the literature that machine learning algorithms can be used to extract patterns from received signal strength (RSS) or channel state information (CSI) for occupancy detection, crowd counting, or human activity recognition. In a general system, the transmitted and received signals in the environment must be recorded. These signals are supplied to machine learningbased algorithms, which first learn the data and then extract the appropriate pattern for further classification. Channel state information-based systems are more precise and relevant in real life than RSS-based systems; however, CSIbased systems require information from multiple antennas, also known as multi-input, multi-output (MIMO) systems.
In this survey, we intend to assess the state-of-the-art in human occupancy detection utilizing radio-based signals. In the following sections, we will first review the current surveys and our contributions before moving on to the technical presentation. In addition to discussing current and future issues, we strive to cover both mathematical and practical elements of the subject.

A. EXISTING SURVEYS
Shukri and Kamarudin investigate device-free localization (DFL), taking into account its applications, methodologies, and algorithms [1]. They primarily concentrate on radio tomographic imaging (RTI), which enables the system to recognize persons or objects and image movement inside the perceived region. They also describe many DFL system issues and explore real-world implementation as well as recent improvement ideas for multi-target localization and counting accuracy. They include all related studies published up to October 2016. The survey examines some of the papers connected to our surveys but does not cover recent investigations or occupancy detection applications.
Ma et al. [2] explore the signal processing techniques, algorithms, and applications of WiFi sensing with channel state information. This review includes publications published up to 2018. While addressing sensing issues, the authors cover both theoretical and practical elements of WiFi sensing, categorizing it into four categories: input, processing, algorithm, and applications. This research has received a lot of attention, and as the authors of a comparable survey, we believe it deserves it because of its unique classification. However, the majority of related works have been published after 2018, which are not addressed in [2] while we cover them in our survey. Furthermore, our study categorizes the publications from a different perspective and discusses security and privacy concerns as well as future trends in WiFi-based occupancy detection.
Saha et al. give a literature overview on building occupancy detection and counting, with a focus on mathematical techniques and corresponding metrics. The writers talk about data gathering, cleaning techniques, algorithm use, categorization, and data structures. They also discuss the mathematical strategies used in estimating interior occupancy [3]. The review focuses on papers published prior to 2018.
Wang et al. use the CSI to focus on device-free behavior recognition and review advances in device-free human behavior recognition. They describe the general architecture of through-the-wall recognition, as well as its applications and properties in various contexts. This review study focuses on studies that were published prior to 2019 [4]. Denis, Berkvens, and Weyn investigate device-free localization [5]. They use channel state information to handle RF-based detection, tracking, and identification. They also provide a systematic review and cover crowd estimation in addition to localization for articles published up to 2018.
Al-Qaness et al. use wireless signals to examine human motion detection and activity recognition [6]. They divide WiFi sensing technologies into three categories: received signal strength indicator (RSSI), WiFi radar through softwaredefined radio (SDR), and channel state information. They demonstrate that CSI and RSSI can be regarded as devicefree mechanisms because they do not necessitate complicated installation, however; the WiFi radar mechanism necessitates the usage of a universal software radio peripheral (USRP). They cover obstacles for device-free sensing technology as well as recent improvements in CSI-based sensing. This study focuses on publications published prior to 2019 and excludes machine learning techniques and occupancy detection approaches.
Verma et al. conduct a review of the available literature on managing parameters for smart buildings [7]. The authors discuss intelligent characteristics in smart buildings such as privacy and security, network architecture, health services, sensors for sensing, safety, and general management. They use a 7-layer IoT infrastructure architecture and categorize the technologies as LoRa, ZigBee, WiFi, Bluetooth, UWB, Wireless USB, and IR wireless. The authors take into account ambient sensors, level sensors, touch sensors, and magnetic sensors. They also address the laboratories engaged in smart building research. The study focuses mostly on sensor-based solutions and ignores machine learning approaches and occupancy detection methods.
Liu et al. investigate wireless sensing technologies for human activities and their applications [8]. As related applications, the authors consider intrusion detection, daily activity recognition, gesture recognition, vital sign monitoring, and user identification. They classify methodologies and system structures in order to address wireless sensing systems. They also talk about the future of human activity sensing. The authors consider RSS, CSI, frequency modulated continuous wave (FMCW), and Doppler shift as system inputs. This study addresses room occupancy briefly and does not cover all of the associated topics [8].
Ahmad et al. investigate building occupancy detection while addressing privacy concerns, producing a precise occupancy sensing system [9]. The authors provide privacypreserving occupancy monitoring after reviewing occupancy measuring methodologies and the associated challenges. Along with camera solutions, the authors briefly examine the passive infrared (PIR) sensor, radio frequency (RF) signals, sensor fusion, Bluetooth, and WiFi. The publications discussed in this review were published before 2019.
Wang et al. investigate CSI-based human sensing [10]. The authors discuss model-based channel state information sensing approaches as well as their applications. They describe a CSI signal and a model-based human sensing framework, followed by related models and essential signal preprocessing approaches.
Yang et al. investigate occupants in built settings and address real-time and precise occupant information to meet the exact thermal requirements through particular HVAC control [11]. The authors explore control with an emphasis on occupant information. They also cover the application and occupant information aspects.
Singh et al. review crowd-monitoring approaches and methodologies by categorizing them. The authors initially debate crowd characterization, followed by vision-based and non-vision-based recognition algorithms. They cover some WiFi and radio signal basis approaches, as well as some existing datasets. The authors' primary goal is to provide a comprehensive source of learning that can aid in the development of advanced crowd monitoring tools. [12]. They look over papers written before 2020.
Ding et al. investigate building occupancy detection [13]. They demonstrate that the uncertainty and randomness of occupant behavior lead to discrepancies between reality and forecast. They discuss deterministic and stochastic occupancy prediction schedules, followed by three applications to improve simulation, operation control, and energy management. Based on occupancy monitoring and prediction, they provide theoretical direction for energy conservation and intelligent control solutions. In addition to the RF and WiFi, the paper addresses camera, CO2 sensors, and integrated sensors [13].
Fernandes et al. assess existing approaches for human monitoring and give an analysis of existing solutions addressing channel status information and picture recognition [14]. The authors also discuss the current issues. The papers covered are available until the end of 2021.
Sayed, Himeur, and Bensaali investigate the development of the internet of things (IoT) for energy consumption [15]. They are concerned with optical/thermal cameras, smart meters, and environmental sensors such as carbon dioxide (CO2) and passive infrared (PIR) for gathering occupancy data. The authors primarily examine deep learning (DL) and transfer learning (TL) techniques for occupancy detection.
Mena, Ceballos, and Alvarado-Uribe investigate occupancy detection using sensors [16]. A systematic review of environmental sensors used to detect or estimate occupancy is presented by the authors. The authors discuss the locations chosen for the studies, specifics about sensor deployment, dataset characteristics, and models. They also provide a method for calculating the number of environmental sensors that must be installed.

B. CONTRIBUTIONS
Current surveys address part of human occupancy detection or WiFi sensing. The majority of occupancy detection assessments focus on energy consumption control in smart buildings, leaving security concerns unaddressed. None of the surveys described above give a current review based on 40880 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
both theoretical and practical elements of radio-based occupancy detection. This gap, as well as the unexplored themes, prompted us to conduct an assessment of the present stateof-the-art. We are primarily interested in radio frequency sensing techniques including radar-based, cognitive-radio, BLE, WiFi, and hybrid systems. Due to WiFi's popularity and emergence, the majority of published studies are related to WiFi and employ HAR for occupancy detection. As a result, while we address many WiFi-HAR methods, we also cover the literature on other methods of occupancy detection that are not currently covered. We also discuss machine learning difficulties and examine existing datasets, data collection techniques, and open-source evaluation software. It is also worth noting that some existing related surveys, such as [4], [6], cover the WiFi-based HAR for the papers published before 2019. However, as shown in Fig. 1, After 2019, the number of published papers in the Scoups dataset increased exponentially. In fact, the vast majority of related research articles (60%) are published during and after 2019 as we cover in this paper. FIGURE 1. The Scopus dataset trend on the keyword search as ''((WiFi OR BLE OR Radar OR (cognitive AND radio) OR (radio AND frequency)) AND ((human AND occupancy AND detection) OR (human AND activity AND recognition)))''. This graph depicts the number of related published studies each year.
The following is a summary of our contributions to the literature: • Radars, cognitive radio, and hybrid BLE-WiFi are examples of radio-frequency-based occupancy detection techniques. The previous surveys only cover WiFi-based occupancy and activity detection while neglecting other radio-frequency-based techniques. In this survey, we briefly review the previous related surveys, while focusing on state-of-the-art, published between 2018 and 2022, and address both the WiFi and other radio-frequency-based techniques.
• The existing surveys mainly consider the theoretical aspects of occupancy and activity detection. In this paper, we categorize the covered studies in terms of their application and technical approaches. • We compare the CSI and RSSI-based processing methods in terms of their advantages and disadvantages. We examine the practical challenges of RSSI and CSI data collection, hardware, and setup and configuration for radar-and WiFi-based occupancy detection. We address the existing datasets as well as open-source evaluation methods.
• We address the research gaps, with an emphasis on advancements in machine learning, security, and their applications in the future of human occupancy detection systems. In particular, we introduce a securityrelated use of WiFi occupancy monitoring and transfer learning that has received little attention in the literature. We address some of the emerging related topics including human breath detection and pose tracking. We also briefly discuss the channel perturbation techniques caused by human movements that could be used to improve HAR and HOD in terms of robustness and resolution.

C. METHODOLOGY
Using the Scopus database, we conduct a systematic search to locate relevant publications. Following the completion of the search and collection of papers, the database results were filtered based on title and abstract, followed by a full-text examination of the selected papers. Our primary goal is to cover all related papers that address occupancy detection using radio frequency-based approaches. We cover studies published between 2018 and August 2022, while some earlier studies are also included in this research.
The following steps comprise our methodology: • Selection of scientific studies and clustering them based on the applications.
• Critical review. • Discussion. Our Scopus database searches include (''Occupancy detection'' or ''human'') and (radio or WiFi or Bluetooth). It should be emphasized that some of the studies investigated also deal with human counting or activity recognition. If the studies referenced feature human occupancy detection, we will include them in this survey. We restrict the results of our research to English-language articles in computer science, engineering, and mathematics. To visualize the Scopus data, we use the VOSviewer application [17]. The keyword analysis of the given keywords is presented in Fig. 2 and Fig. 3, where Fig. 2 depicts all keywords charts and Fig. 3 depicts the authors used keywords. In particular, the related keywords are categorized in a cluster and each cluster is presented with a unique color. The distance between two clusters in the visualization approximately indicates the relatedness of those keywords.

D. ORGANIZATION
The remainder of this paper is structured as follows: In Section II, we cover the fundamentals of occupancy detection systems by briefly examining non-radio-based approaches and presenting the main principles of MIMO, RSS, CSI, and radio sensing. Section III presents our categorization of the covered papers, as well as their review and analysis. Section IV discusses the practical issues of radio and WiFi sensing, including open-source tools, datasets, and data collection methodologies. Section V presents the lesson learned, discussion, and challenges for future research directions, and Section VI concludes the paper.

A. ABBREVIATIONS
The abbreviations used in this paper are all addressed in the text and also summarized in Table 1.

B. NON RADIO-BASED METHODS
As related technologies and measurements for a room or building occupancy detection, numerous methods are covered. One popular way is to employ a mix of sensor inputs such as room temperature fluctuations, ambient air, room air, relative humidity, carbon dioxide, total volatile organic compounds, and room light intensity to make an intelligent judgment on occupancy estimation. Audio and digital techniques are also available. Photography measurements are also conducted in conjunction with sensors, but visionbased systems are capable of performing the work independently. Vision-based approaches give line-of-sight coverage, whereas sensors can cover an entire area. Blind spots exist in both sensor-based and vision-based techniques. The thermostat, humidity sensor, gas sensor, light sensor, microphone device, camera, and manual recording are used in these ways to detect occupancy [18]. Camera-based approaches raise privacy concerns, whereas sensor-based systems necessitate an engineering design for deployment, frequent calibration, and maintenance. To make a decision or estimate about occupancy, both camera-based and sensor-based techniques require external hardware devices to be connected to the control center.

C. RADIO-BASED METHODS
In the literature, several radio-based approaches are employed for human detection. RFID, FMCW, LoRa, LTE (5G and 6G), VLC, Bluetooth (BLE), and WiFi are some of the widely addressed ones, which are discussed more below. We put more emphasis on WiFi by providing more information on MIMO, RSS, and CSI.
• RFID: radio frequency identification (RFID) is a shortrange technology that is most commonly used for tag detection and identification. RFID can work with both active and passive tags, and this study focuses on the latter. RFID is inexpensive, and RFID-based occupancy monitoring devices identify several stationery and mobile occupants who may be in close proximity to one another [19], [20].
• FMCW: frequency modulated continuous wave (FMCW) is a long-range active technology that can detect the distance to an object by recognizing the pattern of triangle waves that are typically in the low (KHz) frequency range [21].
• LoRa: long-range radio (LoRa) is a radio frequency method most commonly associated with the internet of things (IoT) that uses spread spectrum modulation and is capable of long-distance broadcasts while consuming little power. LoRa can travel up to a few kilometers with low power usage and wall sensing [22].
• LTE, 5G, and 6G: long-term evolution (LTE) and the next generation of mobile signals have nearly complete coverage. Although the major applications are limited to localization, the movement of the human body may produce a change in the CSI of the LTE signals that can be used for human sensing [23].
• VLC: The visible light communication (VLC) for human detection applications has also been studied in the literature. The method is similar to radio frequency approaches, except that radio reflections are replaced by the shadow of the light source's beam [24].
• BLE: Bluetooth and its low-energy version (BLE) can enable both regular communication and passive human sensing simultaneously. Low power consumption enables battery-powered solutions. The reflected signals, like other radio-based approaches, could be employed for human sensing [25].
• WiFi: In WiFi sensing, two main metrics are used: received signal strength and channel status information. The RSSI represents the received signal strength, which is inversely proportional to the signal propagation distance [2]. Table 2 summarizes the advantages, disadvantages, frequency range, and technical characteristics of the aforementioned approaches. The FMCW is sensitive to small changes in the object position and has large bandwidth, for high-distance resolution. The relation between the frequency, bandwidth, and distance is presented in equation (1)   . The diagram of human sensing techniques that are categorized into radio-based, non-radio-based, and hybrid methods that exploit both radio-based and non-radio-based methods.
from the transmitted signal, BW is the frequency sweep bandwidth, T represents the frequency sweep time, C is the speed of light and R is the distance between transmitter and the reflecting object. Figure. 4 presents a summary of radio-based and non-radiobased sensing methods.

1) MIMO
Multiple-input and several-output (MIMO) is defined in telecommunications and radio signal-based systems as a means of increasing capacity by using multiple transmission and receiving antennas that take advantage of multi-path propagation [26]. MIMO is considered a required component in several wireless communication protocols, including IEEE 802.11. In reality, MIMO implies using several antennas to broadcast and receive signals over the same radio channel while taking advantage of multi-path propagation. MIMO channels are encoded using orthogonal frequency-division multiplexing (OFDM). It should be highlighted that the smart antenna debates over topics like beamforming and diversity are distinct from the MIMO concept. Typically, channel state information is described within the MIMO category.

2) RSSI
The received signal strength indicator is a measurement of the energy received from access points' transmitted signals. RSSI is the energy characteristic of the MAC layer extracted from the WiFi card. RSSI is a relative value that is used to measure the relative quality of a received signal. RSSI can be measured on a scale of 0 to 255, according to the IEEE 802.11 standard, and each chipset manufacturer can define their own ''RSSI_Max'' value. Cisco, for example, has a 0-100 scale, whereas Atheros employs a 0-60 range. RSSI value, on the other hand, is measured in decibels, dBm on a logarithmic scale, or Watt. In many practical applications, 40884 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. such as fingerprint-based localization, we simply need the RSSI [27].

3) CSI
Channel state information is defined in wireless communications as the known channel parameters between a transmitter and receiver that characterize how a signal propagates. The CSI measures the signal's combined effect of physical phenomena such as scattering, fading, and power degradation with distance. In actuality, because the influencing parameters are stochastic, the channel attributes are unknown, and we must estimate the CSI based on the transmitted and received signals. The channel state information in an IEEE 802.11 wireless communication system, such as a WiFi system that uses MIMO-OFDM, could be represented as a three-dimensional (3D) matrix. The complex values in this matrix describe the amplitude attenuation and phase shift of multi-path WiFi channels. In reality, only the amplitude data is used because the phase information frequently has significant frequency bias due to hardware difficulties. Figure. 5 shows a general diagram of the multi-path effect and reflected WiFi signals [2]. As shown in Fig. 5, there are two devices, one acting as a transmitter and the other as a receiver. According to published studies, the receiver is a computer that can be programmed to gather and store data, while the transmitter is a special hardware that enables MIMO and can be configured accordingly. We will go over the limitations of these strategies in further detail in Section IV. It should be emphasized that human detection has been demonstrated to be possible through the walls, which means that in principle, the same existing WiFi access points could be used to monitor the entire building.
While both RSSI and CSI can be derived from the same access point, there are notable distinctions. RSSI is simply determined by having a single real value of energy that is typically returned by the indicator as non-absolute numbers. The RSSI takes an average of the amplitude of the carrier's signal, whereas the CSI includes both amplitude and phase information for each antenna and its associated sub-carriers. For example, if the access point has three antennas and sends data over 30 sub-carriers, we get 90 complex amplitude and phase values for each sampling. The IEEE 802.11n standard allows for CSI measurements to be performed on 52 and 128 sub-carriers, respectively, with 20 MHz and 40 MHz bandwidth for each sub-carrier. The IEEE 802.11ac standard has a higher bandwidth. More resolution demands a broader bandwidth.
The wireless channel can be represented by the equation Y = HX + N , where Y represents the received signal, X represents the transmitted signal, H represents the CSI matrix, and N represents the noise vector. If the transmitted signal is known to the receiver, it can estimate the channel state information matrix. In practice, this is accomplished by transmitting a pre-programmed signal. The receiver attempts to estimate the channel, and the estimated CSI can be displayed as a three-dimensional matrix of complex values. Each CSI might be represented mathematically as a channel frequency response, as indicated in equation (2). The diagram of the CSI matrix is depicted in Fig. 6.
where a i (t) is the amplitude attenuation factor, τ i (t) is the propagation delay, and f is the carrier frequency The transmitter, receiver, and surrounding objects, including humans, influence the CSI amplitude and phase [2]. The wireless properties acquired in CSI can be used for a variety of sensing applications, including occupancy detection. These attributes should first be incorporated into a mathematical model that machine learning algorithms can use.

III. HUMAN OCCUPANCY DETECTION
In this section, we will review and categorize existing and related studies. At first glance, detecting human presence seems to be considerably simpler than detecting human behaviors such as walking. On the other hand, the task of identifying the human presence is substantially more complex. It is important to highlight that the majority of current studies consider human occupancy detection while people are engaged in a certain activity (for example walking in the room). In other words, some of the studies covered in this survey simplify human occupancy detection with HAR, which is not entirely correct. If the occupants engage in activity, HAR may perform human occupancy detection. However, in the absence of a specific activity pattern, HOD is a challenging issue to solve. To perform recognition, both model-based and data-driven approaches are employed.
Model-based approaches that look for predefined patterns in the data are not a promising solution since it is unclear how and what type of data should be collected for the presence detection training process. It is currently assumed that people do not remain completely still for long periods of time. Several studies have addressed breathing detection, which is an important human action [28], [29], [30], [31].
Pattern-based approaches are used to extract features in order to capture the distinct signal caused by human presence. One of the most studied strategies is the correlation matrix of CSI time series, [32], [33], [34], [35]. Features such as eigenvalues are given to a classifier such as a support vector machine (SVM) to determine decision boundaries. Periodicity following continuous wavelet transformation [36], the temporal similarity of CSIs across frequencies [37], histograms of CSI amplitude [38], and statistics from average Doppler spectrum [39] are among the other proposed methods.
One of the major limitations of pattern-based approaches for detecting human presence is that inconsistent human activity affects algorithm performance or algorithm coverage. For example, when the human motion pattern differs from the real-world pattern [40]. Model-based strategies are affected by the direction of movement, the number of people, and other environmental factors [41], [42], [43].
Data-driven strategy uses machine learning algorithms such as neural networks to train the system using obtained data. Categorization in data-driven techniques is typically accomplished by feeding multiple-layer perceptions (MLPs) with the data such as the CSI amplitude and/or phase. MLP can detect human absence as well as working and resting phases [44]. According to Wang et al. [45], one of the fundamental issues with installing deep neural networks is the limited amount of data available relative to the trainable parameters, which causes substantial performance deterioration. one method for addressing this problem is to employ generative adversarial networks (GANs) [46]. Following, we categorize the covered literature. The approaches could be active or passive. Active approaches necessitate carrying a gadget or wearable, such as a Smartphone. The detection procedure in passive approaches, also known as device-free in the literature, is accomplished based on the used infrastructure without interfering with the users. In another sense, HOD can be classified based on how the approaches are used.

A. APPLICATION-BASED CATEGORIZATION
Human occupancy detection is used in energy management, security, and health care systems. Some applications, such as energy management in smart buildings, are well addressed in the literature, whereas others, such as security or regulatorybased monitoring systems in health care, are only mentioned a few times.
Building energy management systems have enormous promise for improving energy efficiency and assessing energy flexibility. Shirsat and Bhole assess occupancy detection in buildings using real-time occupancy data [47]. In terms of service quality and energy savings, the occupancy prediction technique outperformed reactive tactics.
As mentioned earlier, the majority of occupancy detection investigations are focused on energy management in smart buildings. Intelligent building management systems (BMS) are becoming more common as new, powerful data processing techniques emerge. Buildings today are complex systems with numerous interrelated subsystems (heating, ventilation, air conditioning, lighting, and so on) and actors/occupants with varying requirements and behaviors. These systems are designed to make the best use of energy and resources while providing the bare minimum of user comfort. To do so, a variety of data sources must be analyzed [48]. The majority of BMS solutions now in use make use of data pertaining to buildings and equipment. However, they have considerable drawbacks, such as failing to take into consideration residents' individual needs and the numerous activities they participate in on a daily basis. It is preferable to detect the activities taking place inside a structure to optimize the utilization of resources and energy. When events, activities, and building occupancy can be precisely identified, this strategy has been shown to be quite effective. Several ways have been implemented to achieve this goal, including combining techniques such as the Internet of things with machine learning methodologies.
In another application, there are few studies that try to use HOD for Covid-19 related regulations as presented in [68], [69], and [70]. The rest of the covered studies are presented for general applications focusing on technical methods.

B. METHOD-BASED CATEGORIZATION
In this section, we divide relevant works into radar-based, cognitive radio-based, BLE-based, WiFi-based, combined BLE-WiFi, and other strategies depending on their proposed technological methodologies. Other technologies include hybrid WiFi-image and hybrid WiFi-sensory approaches.

1) RADAR BASED
Ishmael, Zheng, and c-Lubecke investigate continuous-wave Doppler radar (CWDR) and provide an additional phase tuning method that takes advantage of the variety of target distances and physiological parameters for multi-target recognition. They design and test a 2.4 GHz single-channel CWDR-based phase correlation device against mechanical and human targets. Their experimental results reveal that separating almost equal-distance targets within an antenna beam is akin to separating physiological signals from two persons seated shoulder to shoulder [71].
Hasan, Pour-Ebrahim, and Yuce focus on social exclusion based on norms and counting the number of people in a small place for Covid-19. Based on impulse radio ultra-wideband radars, the authors propose a system for counting people who pass through a doorway. In the system, two IR-UWB radars are horizontally separated apart to induce a lag effect when a person passes past the radars. This allows us to determine the direction of travel and, as a result, count the number of people in space. The proposed method is flexible for realworld applications because it may be used for both real-time population counts and saved data. The system has been tested by the authors' testing, which shows that the method [68] has a 90% accuracy rate.
Li et al. offer passive IoT radar (PIoTR), a system that passively watches people using RF emissions from IoT devices, in their examination of the use of radio frequency transmissions in the Internet of Things. PIoTR's modular architecture allows it to utilize signal sources such as the Industrial, Scientific, and Medical (ISM) band and WiFi transmissions. PIoTR generates the typical Doppler spectrogram as it determines the phase changes caused by human motion. By comparing the performance of PIoTR with four commercial IoT devices, the authors show that their proposed radar can achieve an average of 91 percent in occupancy VOLUME 11, 2023 40887 Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply. detection (coarse sensing) and 91.3 percent in activity recognition (fine-grained sensing).
Yusuf et al. explore human counting in a below-deck ship compartment environment using the theory of room electromagnetics [72]. They discuss the reverberant cavity and employ room electromagnetics to characterize microwave propagation conditions. The interior environment is viewed as a lossy cavity, with the reverberation time, also known as the power-delay profile (PDP), and its exponential decay rate connected to the overall absorption in the space. The authors confirm the room's reverberant properties by measuring the reverberation time at several sites within the room. The PDPs are calculated using the channel impulse response (CIR) obtained by using the MIMO radio channel sounder. The authors then investigate the relationship between reverberation time and the population in the room. They show that depending on the number of antennas utilized, it is possible to estimate the stationary population. When spatially averaged PDPs are used, the estimation error is just one person, and the success rate is 88 percent. Higher success rates result from more spatial averaging. Furthermore, by utilizing off-theshelf (OTS) ultra-wide band sensors, the number of people in a room may be approximated. According to the findings, temporal averaging of PDPs while people are moving around the room can increase the success rate to 95%. Furthermore, the identification of a lone person falling to the earth is investigated using Doppler analysis of the observed CIRs. It has been proven that the Doppler spread has higher peak values during a fall than during regular activities such as walking and sitting. A fall may be diagnosed with 100% sensitivity and 98% accuracy using only a basic Bayes classifier.
Tang et al. [50] study for maximizing energy utilization in intelligent buildings. With a focus on WiFi-based sensing technologies, the authors present a passive WiFi radar (PWR) technology for occupancy detection and human counting. Their suggested PWR system can be immediately connected to an existing WiFi network without requiring any changes to the WiFi access point. The authors create range-Doppler maps and Doppler spectrograms using the cross-ambiguity function (CAF) processing and time-frequency transforms, respectively. After that, an algorithm is employed to reduce direct signal interference. They employ a convolutional neural network (CNN) and sliding-window feature selection strategy for categorization. In certain experiments conducted in an office setting, four test participants are used.
Kianoush, Savazzi, and Rampa do research on passive detection of human motions in the sub-THz Band [73]. Radio sensing approaches often operate in the unlicensed 2.4-5.0 GHz band, where multi-path effects significantly limit their precision and limit their usefulness. Sub-terahertz (sub-THz) radiation has uses in high-resolution body occupancy detection and vision due to its extremely short wavelength and reduced multi-path effects. The authors use radio equipment broadcasting in the 100 GHz band to process an image of the surroundings for body motion discrimination inside a workstation. The identification of movement is based on the real-time categorization of a series of neural network-based classifiers employing body-induced signatures determined from sub-THz data. The authors undertake tests to validate the proposed methodologies and assess their usefulness in industrial safety monitoring.

2) COGNITIVE RADIO BASED
A cognitive radio is a radio that has the ability to be dynamically configured and programmed to use the best nearby wireless channels to reduce user interference and congestion. There are two primary categories of cognitive radio, depending on the criteria for broadcast and reception: Full Cognitive Radio (Mitola radio), which takes into account all observable parameters by a wireless node (or network). Spectrum-Sensing Cognitive Radio, which solely takes into account the radio frequency spectrum.
Liu et al. research cognitive radio (CR) based human occupancy detection (CRHOD) to detect the presence of persons [74]. However, signal jamming or replaying captured samples can easily generate interference in a wireless situation. As a result, awareness of the RF environment is a critical component of a passive RF signals-based security monitoring system. Rather than retraining detectors with freshly obtained data, future systems can adapt to a new environment by anticipating the RF signatures with human occupancy given the baseline spectrum of the environment recorded without human occupancy. The authors propose using conditional generative adversarial networks to build a system for generating human RF fingerprints, which would synthesize baseline spectrum in the area of interest with human occupancy. First, the trained human RF signatures GAN (HSGAN) model uses the baseline spectrum without human occupancy acquired in the enclosed space to generate passive RF signals with human occupancy. Second, the trained HSGAN model predicts human RF signatures in the enclosed space at a new site using the HSGAN model trained elsewhere. Finally, the quality of the synthesized spectrum for the HSGAN model is quantitatively evaluated using two classifiers: a convolutional neural network model and a k-nearest neighbors (KNN) classifier. The authors demonstrate that the HSGAN produces a 99.5 percent correlation between synthetic human RF signatures and actual human RF signatures.
Liu et al. examine passive cognitive radio for human occupancy detection in a confined space [75]. The authors contend that spectrum variance makes detecting human subjects challenging, and they propose an enhanced human occupancy detection system that dynamically rearranges a CR to collect passive radio frequency data from multiple areas of interest. They use principle component analysis (PCA) and recursive feature elimination with logistic regression (RFE-LR) approaches to determine the frequency bands sensitive to human occupancy when the baseline spectrum varies with location. The authors apply four machine learning classifiers to detect human occupancy: support vector machine (SVM), k-nearest neighbors (KNN), decision tree (DT), and linear SVM with stochastic gradient descent (SGD) training. The authors show that the RFE-LR with SGD produces the best results.

3) BLE BASED
Gutiérrez et al. propose a novel solution to capacity control in indoor spaces that blends machine learning approaches with BLE technology [69]. In a real experiment done at a university, the authors investigate three distinct prediction models using machine learning approaches, specifically logistic regression, decision trees, and artificial neural networks. They show how BLE technology and machine learning methodologies, namely decision trees, can be used to tackle the problem. This Covid-19-related research ensures that there are no false negatives, resulting in an accurate count of the participants in the lab.
Demrozi et al. examine people detection within buildings and propose a low-cost occupancy detection system [76]. Their RSS-based technique is based on detecting variations in Bluetooth Low Energy (BLE) signal induced by human presence. The authors evaluate the success of our strategy by running numerous experiments on five separate datasets, employing a range of pattern recognition models, and contrasting our methods with systems based on IEEE 802.11. In a variety of settings, the system can classify occupancy with an average accuracy of 97.97%.
Demrozi, Chiarani, and Pravadelli [77] propose a lowcost system for distance estimating, occupancy counting, and presence recognition based on BLE wireless signal variation patterns. It overcomes the disadvantages of prior techniques in terms of cost, privacy problems, computing demands, and lack of ubiquitousness. The authors test the strategy's effectiveness using multiple pattern recognition models on four different datasets.
Ng and She research on device-free occupancy detection for IoT applications [78]. The authors propose that RF fingerprinting be used for device-free occupancy detection, with each zone labeled with a 2M-dimensional fingerprint vector. The fingerprint vector is detailed by the received signal strength data from M BLE beacons and their concomitant temporal RSSI variations. As a solution to BLE's noise and sparsity issues, the authors propose a denoising-contractive autoencoder (DCAE), which creates a trustworthy fingerprint before performing device-free occupancy detection. According to the authors' claims on validation of the DCAE's performance, when the noise factor or sparsity ratio climbs to 0.6 and 0.5, respectively, the classifier trained using the fingerprints learned by the DCAE is able to maintain at least 90% accuracy.
The authors investigate IoT-enabled building management systems in terms of both spatial and temporal occupancy and propose a smart occupancy detection [56]. The proposed solution comprises a Bluetooth low-energy micro-location asset tracking system for fog computing known as BLEMAT, as well as wireless access network monitoring, approaches that provide semi-unsupervised indoor location data. Long short-term memory neural networks are trained on data analysis and pattern recognition to forecast occupancy trends. The authors carry out a series of tests to demonstrate the practicality of their proposed approach.
Ng, She, and Ran investigate occupancy detection using a denoising-contractive autoencoder [79]. According to the authors, the majority of works saw considerable performance changes due to uneven received signal intensity. The authors offer a deep learning strategy for occupancy detection in which raw RSSI values are turned into a fingerprint representation as the final layer of classification using a denoisingcontractive autoencoder and supervised softmax function. The authors employ BLE beacons to acquire reliable RSSI data for the study. To accurately capture environmental fluctuations, data were obtained using many devices at different times. Their experimental results reveal that their proposed strategy improves performance significantly when compared to standard methodologies. DCAE can reconstruct noisy, dynamic data with less than 0.047 mean square error. Overall, the DCAE and Softmax classifier-based occupancy detection system achieves sub-room level accuracy on a regular basis.
Billah and Campbell investigate device-free occupancy detection with BLE [80]. Large, expensive, and powerhungry devices are frequently required for device-free occupancy detection, which the authors argue has a poor adoption rate due to deployment issues, scalability limitations, and worries about energy efficiency. As a result, communication latency and energy usage rise. To address these issues, the authors develop a BLE-based device-free occupancy detection system. Their proposed method predicts the occupancy of a room using a kilobyte-sized machine learning algorithm running on the BLE device, delivering energy-efficient realtime analytics. The authors use four nRF52840 BLE radios in their trials in two interior rooms, and they show that the system can recognize occupancy of an indoor environment with 95% accuracy, 96% precision, and 92% recall.
Wang, Chen, and Hong study the impact of HVAC energy optimization on occupancy detection [61]. According to the authors, a person count at the room level does not adequately optimize HVAC system operation since people move around in a space, causing an unequal load distribution. If the spatial distribution of the occupants is not correctly determined, uneven occupant distribution commonly leads to inaccurate conclusions. To bridge this gap, the authors propose a multifeature k-Nearest-Neighbors (k-NN) classification algorithm to extract occupancy distribution utilizing trustworthy, lowcost BLE networks. An experiment was conducted on-site in a typical office of an institutional building to demonstrate the suggested methodology, and the experiment findings of three case studies were analyzed to validate detection accuracy. The authors use city block distance to calculate the distance between the observed occupancy distribution and the ground truth.
Pratama et al. propose a minimally intrusive system that uses tools often present in modern workplaces, such as roomlevel power metering and an app that runs on employees' mobile devices, in their study on multi-user low intrusive occupancy detection [62]. For power metering, the authors collect aggregated power consumption and split down a load of each item. Authors use the RSSI of BLE nodes installed around workstations to locate a mobile phone in a given area. The testing results indicate that when the two sensory modalities are merged, 87-90% accuracy is reached.

4) WiFi BASED
Bernaola et al. [81] discovered that by investigating the features of wireless signals, such as those used by WiFi systems, machine learning models can recognize and classify a wide range of human behaviors without the use of intrusive equipment. The authors concentrate on identifying sitting people in an interior environment using ensemble learning, a subset of supervised learning machine learning models that rely on aggregating the results of many predictors. They assess the extent to which ensemble learners' knowledge models can be used. When trained at a given frequency or channel, such models are utilized to categorize data captured at a different frequency. The authors' experiments show that, while ensembles can accurately predict occurrences, information cannot be efficiently conveyed across different frequencies, which is a new topic of research in the field of frequency domain knowledge transfer.
Liu et al. investigate a WiFi human presence detection system based on the CSI [82]. Their recommended machine learning approach is the convolutional neural network, coupled with pre-processing, post-processing, and eventual presence detection. The authors of this study compare the recurrent neural network (RNN), long-term memory, and MLP to CNN. They show that their proposed CNN is computationally more successful than the MLP and RNN, but the long-term memory approach does not improve human perception because the time-frequency correlation decreases as distance increases. The learning system employs both the magnitude and phase of CSI and the proposed CNN architecture functions in parallel.
Shah et al. investigate wireless sensing [51] to aid in the development of brand-new next-generation technologies in buildings. The authors propose a WiFi imaging-based, nonwearable, device-free, and privacy-preserving occupancy detection system for smart buildings. The proposed system for body-centric communication is built with off-the-shelf, non-wearable components such as a WiFi router, network interface card, and an Omnidirectional antenna. The fundamental idea is to detect a person's presence while they go about their daily life without putting a device on their body. Non-wearable equipment is used to convert WiFi signals into time-frequency scalograms. The occupancy is discovered by using an auto-encoder neural network to classify the scalogram images. The authors go beyond simply recognizing occupancies to identify activities.
Wang et al. use multi WiFi data to investigate occupant counting modeling for intelligent buildings [52]. They propose a classification-based occupant counting method that employs a large number of WiFi sniffers to acquire a rough estimate of occupancy. A persistent frequent item sets with a right-side (RHS)-based occupant correction algorithm is then proposed in order to handle the false negative problem, i.e., those who do not carry a smartphone. According to the authors' final trials, which validate their findings, the classification-based occupant identification strategy employing several WiFi sniffers outperforms the WiFi-sniffer-based method, and the association analysisbased rectification methodology can boost the accuracy.
Miwa et al. examine [83], a WiFi-based indoor positioning system-based occupancy detection scheme. The authors propose that a user's smartphone be used as a human position tracker. Knowing where people are in space might help you manage human resources more effectively. As a result, some systems employ a beacon tag to establish the location, while others use WiFi signals from several access points (APs) to determine the location. Their proposed system relies on the WiFi signaling technique to locate a user's device and determine its location. The WiFi signal receivers pick up a probe request message from the user's device since a probe request message should be sent even if the user's device does not associate with an AP. The authors give a test system for evaluating the effectiveness of their proposed strategy.
Soltanaghaei et al.examine practical WiFi human sensing [53]. On-device learning and a domain-adaptive model are used. In contrast to many laboratory-based research projects, the authors consider real-world restrictions such as untrained installers, cost-effective platforms, and longterm environmental changes. M-WiFi, a completely embedded platform-based user-in-the-loop self-tuning framework for WiFi-based human presence detection with on-device learning and domain adaption capabilities, is introduced by the authors. M-WiFi reliably detects human presence by separating human-specific WiFi signal interruptions from those caused by fixed objects, moving furniture, or even canines. A generalized classification model that initially just requires users to annotate a few key time periods gradually adapts to a new building by incorporating high-level human presence features. They test M-WiFi in 7 different households for a total of 100 days, with a range of pets, sleeping hours, and inactive hobbies. The authors show that after only three days of self-tuning, their domain adaptive model can detect human presence with an average accuracy of 90% in a brand-new home and swiftly achieves a steady-state performance of 98.5% in long-term operations.
Azam et al. research WiFi motion detection and supervised learning for occupancy detection with the goal of energy savings and comfort improvement [54]. In order to estimate occupancy, the authors propose classifying the activity level indicated by an interruption in the WiFi signal using a number of supervised machine learning algorithms. They establish class labels based on the zone's population schedule, and they validate by counting people every hour. Data is collected from an office space in a building for 9 weeks in order to test and assess their proposed framework. The authors show that Random Forest and Decision Tree have the highest accuracy, at 95%. The authors examine the accuracy, cross-val, precision, recall, and F1-score in decision trees, random forests, gradient boosting, extremely randomized trees, support vector machines, Gaussian naive Bayes, multi-layer perceptron, quadratic discriminant analysis, K-nearest neighbors, and Logistic Regression.
Wang et al. investigate the use of WiFi occupancy detection to save energy in buildings [60]. Minimizing energy consumption while still fulfilling building functions for energycyber-physical systems is difficult due to the dynamics of building residents. Ignoring occupant behavior frequently results in energy waste due to overheating and overcooling, as well as discomfort due to insufficient thermal and ventilation services, because occupant behavior is a significant source of uncertainty for energy management. The authors propose an energy-cyber-physical system that is occupancylinked and employs WiFi probes to determine occupancy. Using ensemble classification algorithms, the proposed architecture retrieves three forms of occupancy information. The authors undertake tests to validate the effectiveness of the proposed occupancy-linked energy-cyber-physical systems. With the correct classifier and occupancy data type, the experiment and simulation results show that the proposed approach can save up to 26.4% of energy needed for cooling and ventilation.
Oliveira et al. want to provide better services while saving money by evaluating people's presence in real-time [84]. By analyzing WiFi probe requests from smart devices at certain locations and times, the authors present a method for counting mobile devices. Our objective is to tackle the problem by employing a mechanism that is resistant to MAC address randomization approaches. The idea is to exploit information that has propagated throughout the environment without knowing the actual MAC addresses of the devices. The authors identify the arrival, presence, and departure of things near the sensors using a state machine model and a hardware prototype designed for device detection. The proposed method is compared to manual measurements conducted by researchers to demonstrate connections between the number of mobile devices detected and the actual population of the area.
Kianoush, Savazzi, and Rampa examine the devicefree occupancy inference system architecture by leveraging MIMO-OFDM radio signals [85]. The authors' goal is to provide fundamental signal processing techniques and tools for evaluating the success of passive occupancy inference problems that rely on a joint analysis of many antennas' combined spatial and frequency-domain CSI from the physical layer. The writers consider the multiple-input multiple-output orthogonal frequency-division multiplexing (MIMO-OFDM) radio interface used in high-throughput WiFi networks such as IEEE 802.11 in order to achieve this goal. Their proposed technique investigates relevant CSI features that are more sensitive to the presence of a body first, and then proposes a space-frequency selection strategy based on principal component analysis (PCA). Using an experimental case study involving WiFi networks, the authors show how the detection of targets (i.e., human bodies) randomly moving in the vicinity of the transmitter/receiver is made possible by the joint spatial and frequency domain analysis of radio signal quality indicators. The authors built up commercial WiFi devices to extract and process CSI through common PHY preambles. The standards for system design and evaluation are established through performance analysis.
Yang et al. device-free occupancy detection utilizing WiFienabled IoT devices for smart households [66]. The authors describe a real-time, device-free, and privacy-preserving Internet of things platform for occupancy detection. This platform has the potential to accommodate numerous new applications. The system's design properly balances performance and scalability. This approach provides a productive cloud server for computing via a lightweight connection protocol, allowing commercially available WiFi routers to collect CSI measurements. An occupancy detection system is developed using the CSI curve of human presence to demonstrate the benefits of our platform. The authors develop a platform and an activity recognition system based on machine learning. According to the authors' experiments, the accuracy of our platform in terms of occupancy detection and recognition is 96.8 and 90.6 percent, respectively.
Zou et al. [67] proposed WiFree, a novel device-free occupancy detection and crowd counting system that uses just commercial WiFi enabled IoT devices. The authors present an IoT architecture that offers instant access to fine-grained CSI measurements from common IoT devices. The authors propose an effective occupancy identification approach by comparing the CSI curves of neighboring time series. The authors identify the most representative characteristics that are sensitive to human motion for crowd counting using a feature selection approach based on information theory. The authors also propose a crowd-counting classifier based on transfer kernel learning and information fusion that is resistant to temporal and environmental inequalities. WiFree was tested in three distinct indoor locations of varying sizes using standard WiFi routers. Experiment results show that WiFree is capable of 99.1% occupancy detection accuracy and 92.8 percent crowd counting accuracy over temporal variation while respecting privacy.
Petrovic, Echigo, and Morikawa investigate how the energy usage of WiFi access points can be used to detect occupancy [63]. The authors thoroughly examine the usefulness of using a WiFi router's electrical power utilization in various conditions to estimate the population present. VOLUME 11, 2023 They emphasize the need of a moving average filter for time series data on electrical load, support the relationship between control packets and lower minimal router power consumption, and present our findings on the accuracy of our technique. The authors conclude that the power consumption of a WiFi router should be analyzed separately from the aggregated power consumption whenever possible in order to improve presence recognition in home environments and occupancy estimation in office environments.
Karanam, Korany, and Mostofi conducted a practical study on passive human identification, concentrating on throughthe-wall scenarios [86]. The authors consider a large number of people passing by while relying solely on the strength of WiFi signals from a single WiFi transmitter and a few receivers (arranged in an array) located on one side of the space. They propose a new framework that only takes into account the overall strength of the WiFi signal and describes it in terms of the angles at which signal routes arrive at receivers as well as the motion characteristics of the virtual arrays that moving people replicate. They employ a two-dimensional multiple signal classification (MUSIC) technique to estimate the aforementioned characteristics. They then employ a particle filter in conjunction with a joint probabilistic data association filter to track several people as they move about the area. The authors conducted 40 trials of tracking one to three people using only one transmit antenna and three laptops as receivers (a total of four off-the-shelf Intel 5300 WiFi Network Interface Cards (NICs).
Depatla and Mostofi propose a framework to sense occupancy features of an area, such as the speed of a crowd traversing the area, the total number of people in the area, and the rate of arrival of people into the region, using only the received power measurements of two WiFi networks [87]. They show how the cross-correlation between the two WiFi link measurements and the possibility of crossing a link carries critical information about the occupancy attributes, and they develop a mathematical model to connect these parameters to the essential occupancy attributes. They validated and demonstrated the accuracy of their proposed system for estimating occupancy attributes with the help of 51 trials conducted in both indoor and outdoor settings, where up to 20 individuals moved through the space at various speeds. Their framework has a normalized mean square error (NMSE) of 0.047 (4.7%).

5) COMBINED BLE AND WiFi
Park et al. [49] investigated opportunistic occupancy detection using mobile device connection data. They've introduced CROOD, which is based on the capture and recapture (CRc) technique, previously used for animal population counting. The authors adopt this technique for human occupancy detection. They first estimate the number of mobile devices in a building before calculating the population as a whole, using a basic estimation procedure. Their proposed CROOD creates a link between population density and the number of mobile devices. Through a series of studies, the authors' proposed technique displays adequate accuracy with 1-2 weeks of data coverage. They also show how a long-term experiment can adapt to changing population characteristics, especially when the population is bringing in more mobile devices. J. Chen, H. Chen, and Luo collect occupancy detection data using WiFi and BLE. For occupancy detection, the authors recommend using a connected indoor positioning system. The system combines the standard k-nearest neighbor positioning approach and the stochastic random walk algorithm to collect high-resolution occupancy data via WiFi and BLE networks. The proposed system can find people in a networked area, determine their meshed spatial distribution, and track their movements. The discovered occupancy meshes operate on temperature zones rather than people's coordinates, making them suitable for direct application in building facility management. The authors conducted a pilot experiment in an academic building to validate the viability and correctness of the proposed method. The authors assessed the proposed method for detecting occupancy information using positional distance measurement metrics and matching criteria.
Mashuk et al. investigate an active smartphone-based occupancy detection system and propose an indoor positioning system that uses the smartphone and its integrated sensors, such as WiFi, Bluetooth, accelerometer, and gyroscope, for energy optimization in buildings [64]. By combining WiFi and Bluetooth fingerprinting, their positioning system creates a low-cost multi-floor indoor locating solution. The paper describes the use of indoor positioning technology to handle building occupancy. Positioning is accomplished by combining data from multiple sensors and attempting to use a positioning algorithm. The article describes a method for detecting step-like motion in the absence of an inertial device on the foot. The authors discuss the results of small-scale tests that show the motion's trajectory across the floor area of the Nottingham Geospatial Building.

6) HYBRID
Zhao, Chang, and Tu investigate device-free people tracking with deep intelligent networks [88]. Recent radio frequency sensing systems can detect and locate people who do not carry any equipment and can operate in non-line-ofsight settings. Model-based device-free RF sensing systems detect human presence and movements based on RF signal measurements. However, in order to achieve sub-meter precision, such approaches usually necessitate the careful tuning of a large number of model-dependent parameters. To efficiently provide training data for generic model learning, the authors propose merging deep neural networks with gaze-tracking devices. The method can automatically produce human motion and occupancy images from RF sensor network observations without the need for manual RF model parameter calibration.
Lesla et al. investigate occupancy monitoring in order to reduce energy consumption in smart buildings [55].
The authors propose a wireless monitoring system based on passive infrared sensors while taking into account practical constraints such as sensing holes, battery life, and user comfort. To provide maximum coverage in the presence of holes, the authors formulate the best PIR placement as a mixed integer linear programming optimization problem (MILP). The authors conduct some tests to demonstrate the impact of the optimal PIR site on energy consumption and to assess the effects of holes on detection accuracy. They show that the proposed system can operate for up to 6 years without requiring battery replacement.
Ji, Ok, and Kwon investigate an indoor monitoring system for smart buildings based on IoT [57]. The authors present the results of applying IoT environment sensors to three buildings, as well as a visualization interface based on the analysis and actual environment sensing findings. The authors conduct demonstration experiments with real-world IoT sensors.
Mikkilineni et al. investigate occupancy detection with IR-FPA-based wireless occupancy sensors [58]. The authors present an innovative plug-and-play occupancy sensing technique that allows for the temporal optimization of building energy use while accounting for building usage behavior without compromising privacy. Their suggested wireless occupancy sensing approach is based on long-wave infrared (LWIR) focal-plane arrays (FPAs), which detect thermal energy rather than visible light. To boost precision, the images are combined with radio frequency and ultrasonic-based radar, which the authors utilize to increase data collection at important occupant zone boundaries. To solve the accuracy concerns with typical PIR-based sensing, the authors employ basic filtering and estimating methodologies from the image processing and computer vision fields. The author evaluates the strategy's effectiveness using sensor data.
Sangogboye et al. on the effect of occupancy resolution on the precision of building energy performance modeling. The authors investigate the influence of various occupancy count profile resolutions on accuracy [65]. These occupancy count profiles were extracted from a large academic building. These profiles comprise a precise zone-level occupancy estimate derived from WiFi sensors and stereo-vision cameras, as well as an overall building occupancy distribution, dispersed evenly across building zones. For simulations, a comprehensive white-box model constructed in ''EnergyPlus'' was employed. According to a comparison of ground truth data and simulation results, higher occupancy data resolution does not necessarily increase the accuracy of the building's overall energy use.
The categorization done in this study is summarized in Table 3 and depicted in Fig. 7. In Section V, we will go into suitable methods and upcoming difficulties in further detail.

IV. IMPLEMENTATION
In this section, we cover some implementation comments, as well as the benefits and drawbacks of the methodologies under consideration, before presenting the data collection tools, datasets, and open-source evaluation tools.

A. IMPLEMENTATION NOTES 1) RADAR-BASED HOD
We need to install unique gear inside buildings for room-level occupancy detection when using radar-based approaches. Radar systems detect the presence, range, and direction of static or moving objects. This is achieved by sending out highfrequency electromagnetic field pulses (EMF). One critical issue for radar is its impact on human health, particularly in long-term use. As a result, radar-based occupancy detection systems should not be used for long-term indoor applications.
Radars commonly use RF frequencies ranging from 300 MHz to 15 GHz. The RF energy in this region of the electromagnetic spectrum is known to interact differently with the human body. RF fields below 10 GHz (to 1 MHz) enter exposed tissues and generate warmth due to energy absorption. The depth of penetration is affected by the frequency of the field, which is greater at lower frequencies. To assess how well RF fields are absorbed by tissues, a specific absorption rate (SAR) within a certain tissue mass is used. The SI unit for SAR is watts per kilogram (W /kg). SAR is a method for measuring RF field exposure in the 1 MHz to 10 GHz range. A SAR of at least 4 W /kg is necessary to generate known unfavorable health effects in people exposed to RF fields in this frequency range. The skin surface absorbs RF fields over 10 GHz, with only a small amount of energy reaching deeper tissues. The fundamental dosimetric quantity for RF fields above 10 GHz is the field power density, defined in watts per square meter (W /m2) or, for weak fields, in milliwatts per square meter (mW /m2) or micro-watts per square meter (W /m2). Eye cataracts and skin burns are just two of the negative health effects associated with exposure to RF fields above 10 GHz at power densities surpassing 1000 W /m2, according to [90].

2) WiFi AND BLUETOOTH
Bluetooth and BLE could only provide RSSI, as seen in Table 2, but WiFi access points could provide both RSSI and CSI. However, not all WiFi access points can generate channel state information. Active techniques, in which an extra device, such as a smartphone, is carried by the people in the room, usually involve some localization or tracking mixed with detection. The location of the user's mobile application can be determined based on the RSSI from multiple APs [91]. Some of the studies that have been evaluated additionally monitor the number of connected devices to the APs or even assess the APs' energy usage, which is related to the number of connected devices. They attempt to establish a relationship between the number of connected devices and the number of people in the room or building.
Here, we concentrate on CSI data collection. One of the most frequently mentioned tools for gathering CSI is an opensource tool named ''Atheros CSI'' [92]. It allows for the extraction of detailed PHY wireless communication data such as the received packet payload and CSI (the time stamp, the RSSI of each antenna, the data rate, etc.). Atheros-CSI-Tool VOLUME 11, 2023 should theoretically support all Atheros 802.11n WiFi chipset types, including the tested Atheros AR9580, AR9590, AR9344, and QCA9558 because it is based on ath9k, an open source Linux kernel driver that supports Atheros 802.11n PCI/PCI-E chips. The sub-carrier for each CSI is a complex number (a + bj). The CSI of a packet sent across a 20MHz channel with M transmitting antennae, N receiving antennas, and M × N × 114 if the WiFi bandwidth is 40MHz is a sophisticated matrix of size M × N × 56.
''Linux 802.11n CSI'' [93] is known as another CSI collection tool. The Tool is built with free source Linux wireless drivers and Intel WiFi Wireless Link 5300 802.11n MIMO radios with custom firmware updates. This includes all of the programs and scripts needed to run experiments as well as read and analyze channel measurements. The IWL5300 provides 802.11n channel status data in the form of channel matrices for 30 subcarrier groups, or roughly one group for every two subcarriers at 20 MHz and one in every four at 40 MHz. Each channel matrix element is a complex number, with a signed 8-bit resolution in the real and imaginary portions. The signal strength and phase between a single transmit-receive antenna pair are provided.
PicoScenes is a versatile and effective middleware for CSI-based WiFi sensing research. It assists researchers in overcoming two barriers to WiFi sensing research: a lack of measuring software functionality and a lack of hardware characteristics. PicoScenes supports the most CSI-extractable devices, such as software-defined radio and commercial offthe-shelf (COTS) WiFi NICs. COTS NICS supported include the Intel WiFi 6E AX210 (AX210), Intel WiFi 6 AX200 (AX200), Qualcomm Atheros AR9300 (QCA9300), and Intel Wireless Link 5300. (IWL5300). All universal Software radio peripheral (USRP) versions, as well as additional SDR equipment, are supported. PicoScenes is said to be the first and only publicly accessible platform that supports CSI extraction for 802.11ax-format frames utilizing ordinary WiFi hardware for the AX200 NIC. The platform supports CSI extraction for all formats (802.11a/g/n/ac/ax) and bandwidths (20/40/80/160 MHz). Furthermore, PicoScenes qualifies all overheard frames in monitor mode for CSI measurement, converting all surrounding WiFi devices into excitation signals for your sensing application [94].
There are many general-purpose devices, such as the Arduino, Raspberry Pi [95], [96] and USRP based on software-defined radio devices to provide RF architecture to design, prototype, and deploy wireless systems with custom signal processing [97].
It should be noted that recently produced WiFi routers include advanced capabilities for extracting CSI, which can be used for human occupancy detection and activity recognition. WiFi systems now support a variety of bands, including 2.4 GHz, 5 GHz, and 60 GHz, which provide faster data rates and more bandwidth for transmitting and receiving signals. Furthermore, modern WiFi routers include advanced antennas that use beam-steering and/or beam-forming technologies. These antennas can adjust the direction of the wireless signal dynamically to improve signal strength and reduce interference. This allows for the extraction of highly detailed CSI data, which can then be used to detect and track human presence and activity in indoor environments with high accuracy.

B. EXPERIMENT SETUP
We reviewed several methods for radio frequency HOD in this paper, including radar, cognitive radio, BLE, WiFi, and the combined BLE-WiFi. The majority of the literature focuses on Bluetooth Low Energy (BLE), WiFi, or combined methods. In addition, we provide a systematic experiment setup that covers the literature, including open-source codes and datasets that primarily address WiFi-based HOD.

1) RADAR BASED
In contrast to BLE and WiFi, radar-based HOD could be performed in non-ISM bands with frequencies ranging from a few MHz to a few GHz. For HOD, radar systems with SAR less than 4 W /kg must be used [90]. Experiments for radarbased systems are typically carried out with real-time data, and the datasets are not adequately addressed in the literature. Therefore, we present a sample experiment setup that covers the reviewed radar-based HOD in the paper. The radar-based HOD, as shown in Fig. 8, is made up of several major components, including a signal generator and a frequency converter. The radar system is designed and implemented based on the operating frequency, antenna gain, covered range, desired resolution, and target. To reduce energy consumption in radar systems, high-gain antennas or beam-forming techniques are commonly used. Because these systems may be designed with specific goals, there are no well-publicized datasets or open-source codes addressing HOD. The general operation of the radar-based HOD is similar to that of other RF-based systems in that the presence of a human can alter the transmitted signal in the form of reflections that can be detected using the proper algorithms. Certain radars are capable of detecting minute changes in human presence, such as breathing. As a result, low-cost, low-energy radar systems that meet World Health Organization standards are an excellent choice for non-WiFi-based HOD.

2) WiFi BASED
WiFi sensing is in its early phases, with a long road ahead before commercialized goods. A typical experiment setup includes two distinct transmitters and receivers, as shown in Fig. 9 that operate in ISM band. In the case of CSI collection, the special access points (those that support CSI and MIMO) are linked to a computer that runs CSI gathering software, such as PicoScenes [94], Atheros CSI [92], and Linux 802.11n CSI [93]. Some data packets are sent while one or more people are present in the room. Almost all of the available research assumes that the human is not still and is doing something, such as slow walking. The information gathered is saved. The research presented in this paper suggests that as data collecting duration rises, more patterns can be preserved. When the data-gathering phase is complete, it is time to employ a machine learning model, which necessitates pre-processing, training, and testing. In order to avoid overfitting and under-fitting, the acquired data is separated into two categories: training and testing. It has been demonstrated that pre-processing can increase the overall performance of an ML-based model. After training, we have a model that can be tested using test data. The training process is monitored. After successfully training a model, the system is ready to execute categorization. This test scenario does not fully reflect the real-world requirements, which are explained further in Section V.

C. DATASETS AND CODES
The majority of the research discussed conducting experiments using data they have obtained themselves. We provide a few of the addressed datasets from the literature that are openly accessible below. The majority of these datasets are available via the zenodo open repositories, which are commonly used by researchers to store datasets, software, reports, and other research-related digital artifacts.
• This dataset 1 is used to calculate the size of a crowd based on the effect it has on wireless sensor network radio frequency communication lines. We gather the signal intensities across sub-GHz communication Three festival days were used to collect the metrics at each location. The dataset files have a comma-separated values (CSV) format [98].
• This data collection 2 consists of CSI and RSSI data collected from antennas. The Intel CSI Tools have been used to collect both kinds of data [99]. The size of this dataset is 2.8 GB.
• This dataset 3 includes 980 CSI captures for 11 actions carried out by 1 person in a tiny apartment. Each capture is 3 seconds of CSI recorded at a sample rate of 100Hz for 80MHz 802.11ac frames. A WiFi access point, a Raspberry Pi 4, and a desktop computer were used to collect this data. The desktop computer was linked to the AP, which was operating as a controlled network. The Raspberry Pi 4 hears the desktop's outgoing frames [100].
various obfuscation schemes [101]. It has numerous CSI traces that were gathered under various circumstances in an indoor setting. All of the data was gathered using IEEE 802.11ac and 80 MHz wide channels on commercial WiFi networks [102].
• This data collection 5 includes the measurements over the course of 25 months on two floors of the library building from Spain's Universitat Jaume I, primarily using an Android smartphone. 103,584 WiFi fingerprints are contained there, and they are arranged into datasets. Each dataset is the outcome of a campaign for data collection [103].
• Open-access data 6 for RSSI measurements with BLE signals for contact tracing and proximity detection [104].
• The dataset 7 of WACA WiFi 5-GHz, is composed of 11 scenarios. The RSSI is stored for the different duration and different locations [105]. Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
• The dataset 10 of wireless channel measurements contains WiFi RSSI measurements collected by robots outside of an unknown area that needs to be imaged.
• Data 11 for converting video footage to RF signals that includes example data files for converting vision data (video footage) to RF signals. This method enables training RF sensing systems without collecting any RF training data and by relying solely on publicly accessible online videos of relevant activities [107].
• DeepSeg dataset 13 aims at segmenting activities for WiFi CSI based recognition [109]. This project has both dataset and open-source code available for the public.
Many researchers publish their open-source codes to be a baseline for new research directions. Some of the related evaluation software is presented in the following. Most of these codes are accessible on GitHub, a website hosting service that offers access control, bug tracking, software feature requests, task management, continuous integration, and wikis in addition to Git's distributed version control.
• This software's 14 primary objective is to demonstrate how to use ESP-WIFI-CSI. The system for detecting human bodies is currently being refined. Through machine learning, neural networks, and other algorithms based on the original CSI data, you can obtain more accurate findings.
• The goal of this project 15 is to make it possible for the ESP32 WiFi equipped micro-controller to gather CSI. We may use this information for activities like WiFi Sensing and Device-free Localization from the small, independent ESP32 micro-controller by gathering this data-rich signal source.
• For WiFi applications, human recognition utilizing channel state information this straightforward Tensorflow 2.0+ model with one Attention Layer and bidirectional LSTMs is provided by this code 16 [110].
• To gather the gait dataset, the authors employed the Intel CSI Tool and the Atheros CSI Tool. The codes 17 in the repository transform CSI data into spectrograms and employs deep learning techniques to identify users [111].
• Human occupancy detection based on WiFi signals and prediction using machine learning code in Python is provided in this project. 18 • Bluetooth Low Energy is used by HomeKit BLE occupancy detection 19 to identify adjacent devices and determine a room's occupancy status based on their presence and signal strength.
• iBeaconOccupancy uses Bluetooth for HOD. This is an active method that uses Android smartphones on the project. 20 • This code 21 presents three distinct occupancy detection models, one of which utilizes semi-supervised Bluetooth clustering and two of which use supervised Bluetooth fingerprinting.
• The goal of the research was to create a BLE-based system for detecting human presence. The Nordic NRF5 SDK was used to flash the unique firmware onto the ruvvi tags, which served as the BLE device in this application. 22 • This project Contains code related to HOD using vibration sensors and machine learning for HVAC monitoring. The code is written in Matlab. 23

D. CHANNEL PERTURBATIONS MODELING
Human activity recognition and occupancy detection rely heavily on modeling the channel perturbations caused by humans. The majority of the covered studies in this paper mainly use machine learning methods to learn the effect of an activity or movement on the channel. However, there are several tools based on geometrical, statistical, and physical/electromagnetic methods to create such models. Geometrical methods predict channel perturbations by using geometric models of the environment. Some examples are presented in the following: • Ray-tracing: This method is the simulation of electromagnetic wave propagation in an environment using a computer program. The program predicts how waves will be reflected, refracted, and scattered by various surfaces, including the human body, using geometric models of the environment. Ray-tracing can be used to predict how people's movements will perturb electromagnetic waves, and how this perturbation can be used to detect the presence and activities of people. The author in a recent study, addresses the tools, dataset, and models for IEEE 802.11 CSI sensing [112]. In another recent study, the authors use Ray-tracing and compare the performance in 28 GHz millimeter waves [113].
• Channel impulse response (CIR) modeling: This involves predicting the effect of human body movement on channel perturbations using CIRs, which are time-domain representations of the channel impulse response. CIRs can be measured using channelsounding techniques and used to predict how the human movement will affect electromagnetic waves. Usually, researchers use CIR when they demand higher resolution, which means a higher bandwidth of the radio-frequency signals. For instance, authors in [114] use the CIR modeling for UWB indoor movement tracking.
• Shadowing analysis: This is the process of predicting how the presence of people will cause shadowing effects on electromagnetic waves using geometric models of the environment. When an object, such as a human body, blocks the propagation of electromagnetic waves, this is referred to as shadowing. Shadowing analysis can be used to predict how people's movements will change the shadowing effects, and how this can be used to detect the presence of people and their activities [115]. Channel perturbations caused by human movements can also be predicted using statistical methods. These methods employ statistical models to forecast the effect of movement on electromagnetic waves. Some examples of the statistical methods are as follows: • Hidden Markov models (HMMs): HMMs are probabilistic models for analyzing time series data. HMMs can be trained on channel measurements and used to predict how human body movement affects electromagnetic waves. The model can detect the presence of people as well as their activities [116], [117].
• GMMs (Gaussian mixture models): GMMs are statistical models that can be used to estimate the probability distributions of a set of observations. The effects of human body movement on electromagnetic waves can be modeled using GMMs. They can be trained on channel measurements and used to predict the likelihood of people's presence and activities [117].
• Kalman filters: These are time-series models that can be used to estimate a system's state based on noisy measurements. They can be used to predict how the human body's movement will affect electromagnetic waves. Kalman filters can be trained using channel measurements and used to estimate system state (i.e., the presence of people and their activities). Kalman filters are usually employed for continuous activity monitoring and tracking [21]. Physical models and electromagnetic theory are also employed to predict the effect of body movements on electromagnetic wave scattering. Some physical/electromagnetic methods for predicting channel perturbations based on human body movement are as follows: • Analytical models: Analytical models are built on the physical properties of the environment and the human body. The human body, for example, can be modeled as a set of point scatterers, and electromagnetic wave propagation can be modeled using electromagnetic theory. The effect of body movements on channel perturbations can be predicted using analytical models [120]. We believe that some of the methods mentioned above, combined with existing literature, can be used to improve the robustness and resolution of HOD and HAR.

V. LESSON LEARNED AND FUTURE RESEARCH DIRECTIONS A. RSSI VERSUS CSI
According to our review, CSI and RSSI are two signalprocessing techniques that are commonly used in indoor environments for occupancy detection and activity recognition. RSSI is a technique that is supported by the vast majority of hardware devices (IoT, BLE, IEEE 802.15.4, WiFi, and so on), whereas CSI processing is supported by WiFi devices that have multiple antennas and carrier frequencies. This section includes a comparison of RSSI and CSI. CSI processing has several benefits, including: • High accuracy: CSI provides detailed information about signal propagation characteristics such as phase shifts and attenuation, allowing it to detect the presence and activities of people with high accuracy.
• Non-invasive: CSI processing is non-invasive. It is possible to implement it by utilizing WiFi infrastructure, which is widely available in indoor environments.
• Robustness: CSI is based on the physical properties of the signal, and therefore is resistant to environmental changes such as temperature and humidity. However, CSI processing has also some limitations including: • Limited range: The range of WiFi signals, which may not cover the entire indoor environment, limits CSI processing.
• Sensitivity to signal interference: Signal interference from other devices, such as microwaves and Bluetooth devices, can degrade the accuracy of occupancy detection.
• Limited scalability: Scalability is limited in CSI processing because it requires significant processing power to handle large amounts of data. On the other hand, RSSI processing has a number of advantages, including: • Simpleness: RSSI processing is a simple and easy-toimplement technique for detecting occupancy because it only requires measuring the strength of the received signal (total strength), whereas in CSI processing, even if phase information is ignored (which is common), the signal strength of all sub-carriers should be considered.
• Low power consumption: RSSI processing is a lowpower technique because it requires little processing power and can be implemented with low-cost hardware.
• Large coverage: Because RSSI processing can detect signals from multiple access points, it can cover a large area with a single device. RSSI processing, on the other hand, has several limitations, including: • Low accuracy: RSSI processing is less accurate than CSI processing because it only provides information about signal strength and ignores other signal characteristics.
• Limited resolution: RSSI processing has limited resolution because it only provides a rough estimate of the location of the signal source.
• High node density: In order to achieve accurate results, RSSI processing may necessitate a high node density, which can increase the system's cost and complexity. Overall, both CSI and RSSI processing has advantages and disadvantages that you should consider carefully when selecting a method for detecting people inside. The main trade-off when deciding between RSSI and CSI is between accuracy, complexity, and implementation cost. Other implementation parameters, however, should be considered as well. WiFi networks, for example, are typically based on a star topology with arbitrary deployments and can include phase information in addition to signal amplitudes.

B. ENERGY MANAGEMENT IN SMART BUILDINGS
Sensor-based HOD solutions now require calibration, maintenance, and optimal engineering implementation, whereas vision-based methods raise concerns about privacy. A variety of systems, including active WiFi, BLE, and radar-based techniques, have been proposed for building occupancy monitoring. Although current active sensing approaches that rely on user participation appear to be more effective, they cannot be used in all scenarios due to a variety of security and privacy concerns. Passive WiFi detection approaches, on the other hand, remain in their infancy and do not provide the system with the required reliability. We believe that the WiFisensory hybrid methods could provide a reliable estimate while addressing the shortcomings of both methodologies as a solution and future research direction. We strongly advise installing a minimum number of IoT-based sensors rather than all possible CO2, O2, light, temperature, and humidity sensors. As WiFi sensor technology progresses, the hybrid technique may be gradually supplanted. A time series of CSI measurements must capture how wireless signals flow through neighboring objects and people in the temporal, frequency, and spatial domains in order to conduct effective occupancy detection.

C. TRANSFER LEARNING
WiFi and Bluetooth Low Energy radio waves are especially vulnerable to a wide range of circumstances, including network setup, surroundings, objects, and human activity. As a result, current radio frequency sensing techniques, particularly those utilized in passive mode, are not completely dependable in a wide range of real-world scenarios. The user's distance from the WiFi connection point, for example, may change. Individual attitudes and behaviors toward the WiFi access point may also change. There may be multiple persons present, as well as other moving objects. The person or other items may obstruct the direct path between the transmitter and the receiver. It is more challenging to achieve the ability of WiFi sensing algorithms to generalize and accurately and automatically respond to new and previously unknown data.
Experiments employed in contemporary studies are completely unrealistic. For example, in passive WiFi sensing, it is believed that the present access points in the environment cover the full region based on the multi-path data received and the CSI computed. In contrast, the researchers use two access points in the experiments as a transmitter and receiver, and both are connected to a computer that is running a datagathering program. The retrieved data and, as a result, the trained machine learning model could not be used in many cases that required some human intervention.
To the best of our knowledge, the literature does not address this gap. As a possible approach, we propose employing self-tuned models with appropriate transfer learning techniques. The technique of learning a new activity more effectively by using what has already been learned about a related one is known as transfer learning. We believe that the learned human occupancy detection can be generalized using transfer learning.

D. PRE AND POST PROCESSING
Raw CSI data have disturbances and anomalies that can severely degrade WiFi sensing performance. Raw CSI measurements in real-world WiFi systems have phase offsets caused by hardware and software faults. Sampling Time/Frequency Offsets (STO/SFO) are caused by unsynchronized sampling clocks/frequencies of the receiver and transmitter, for example.
A simple way is to use the CSI phase differences of nearby time samples or subcarriers. It cancels CSI phase offsets because phase offsets are consistent across packets and subcarriers. While it cannot provide accurate phases, it can recover phase change patterns that can be fed into outlier removal algorithms for categorization. Moving average and median filters are simple and widely used techniques for removing high-frequency noise.

E. TEMPORAL DYNAMICS
To combat the impacts of environmental and temporal dynamics on WiFi sensing performance, domain-invariant kernels that minimize the difference between the training and testing phases are proposed.
We recommend employing generative networks such as GAN. We use an adversarial loss, also known as adversarial domain adaptation (ADA), to adjust the domain shift in particular. The created unsupervised ADA technique can be utilized to reduce environmental disparity and allow the source classifier to be used instantly without the need for labeled data gathering and new classifier creation.

F. SECURITY
With the exception of radar-based sensing, which is difficult to utilize for civil applications and inside environments, other radio frequency-based approaches are exceedingly sensitive. The CSI and RSSI data could be intercepted by anyone. With advancements in WiFi detection, it is necessary to consider security considerations in addition to the application. Some solutions that take advantage of chaos or encryption techniques have been proposed in the literature. We have no doubts about the viability of those techniques. In our perspective, a novel application of generative networks like GANs is the generation of synthetic data (unreal data) with a similar profile to real data and the prevention of illegal signaling intercept vulnerabilities. Given that WiFi sensing is anticipated to become commercially available in the near future, this security feature may be critical for clients who are concerned.

G. EMERGING TOPICS
Human activity recognition and occupancy detection are fields that are rapidly evolving, with several new topics and techniques being investigated for improved accuracy and reliability. The researchers are attempting to broaden the range of activity detection (for example, walking, sitting, running, falling, eating, and so on) while improving detection accuracy and robustness. Pose tracking, breath detection, smart flooring, and thermal imaging are some of the emerging topics. Meanwhile, some of these issues are addressed by using radio-frequency-based and WiFi signals, as explained below: • Human pose tracking: This involves the real-time tracking of human body positions and movements. It can be used to detect and track the presence of people in a room or building, providing valuable information for occupancy detection. The current literature mainly focuses on using computer vision techniques while recent studies also address radio-based methods [121], [122].
• Breath detection: This entails measuring respiratory signals, which can reveal the presence and number of people in a room or building. This can be useful for detecting occupancy in situations where visual or auditory detection is not possible or desirable. Several radio-based methods for breath detection have been proposed [123], but because it requires the detection of a very small movement in the body, a very complex setup with high-frequency, resolution, and beamforming is usually required, making it a challenging open issue.

VI. CONCLUSION
Security, intrusion detection, energy management systems for smart buildings, and e-health systems are some of the applications for human occupancy detection. The literature explores a number of sensor-and vision-based methods for detecting the human presence in interior situations, which use basic detection methods or machine learning-based algorithms. Sensor-based approaches usually necessitate additional equipment, data collection and recording tools, and analysis software for decision-making, whereas vision-based methods frequently cause privacy issues. In the actual world, optimal sensor placement, installation, and maintenance all create challenges. Researchers have paid close attention to radio-based sensing technologies such as WiFi and Bluetooth in recent years. We examined the state of the art in radio frequency occupancy detection and explored its key principles, practices, and system designs in this paper. We classified the material covered into categories based on their methodologies and applications. We investigated the practical challenges of using open-source code, existing datasets, and data-gathering methods for performance evaluations. Our review of studies from August 2018 to August 2022 showed that WiFi sensing is still a prominent research topic connected to practical applications. We also discussed WiFi sensing in terms of adapting taught machine learning models to diverse environmental situations, as well as potential security issues that could impair WiFi sensing. We proposed future directions for occupancy detection research. We also advised employing hybrid sensor-WiFi frameworks as the principal application for human occupancy detection in smart buildings.