Method and apparatus for Wi-Fi-based presence detection

By filtering Wi-Fi channel state information and using machine learning models for detection, the problem of balancing latency and accuracy in Wi-Fi presence detection technology has been solved, achieving low-latency and high-accuracy detection of human presence and motion, adapting to detection needs in static states.

CN120917331APending Publication Date: 2025-11-07SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480022635.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-03-04
Filing Date
2024-04-02
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing Wi-Fi presence detection technologies struggle to balance low latency and high accuracy, and face challenges such as Wi-Fi signal interference and difficulties in detecting human presence and movement in stationary states, making it impossible to effectively utilize existing Wi-Fi signals for human presence and movement detection.

Method used

By obtaining Wi-Fi Channel State Information (CSI), filtering it to remove radio frequency interference, and using machine learning models to detect macro-movement, micro-movement, and breathing signals within different observation windows, combined with a state machine architecture, the presence and movement of the human body can be detected, providing spatial indication.

Benefits of technology

It achieves low latency and high accuracy in human presence and motion detection, solves the problem of Wi-Fi signal interference, and adapts to detection needs in static states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120917331A_ABST
    Figure CN120917331A_ABST
Patent Text Reader

Abstract

A method of presence detection by a device is provided. The method comprises the following steps: obtaining channel state information (CSI) related to wireless fidelity (Wi-Fi); filtering the CSI to remove radio frequency (RF) interference; detecting motion in the space during the first observation window based on determining whether a macro shift exists in the filtered CSI; in response to detecting the motion in the space, determining, during the second observation window, whether a micro-movement and a respiratory signal are present in the filtered CSI; providing an indication that the space is occupied based on a determination that micro-movement and respiratory signals are present in the filtered CSI; and providing an indication that the space is not occupied based on a determination that micro-movement and respiratory signals are absent in the filtered CSI.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates generally to wireless communication systems. Embodiments of the present disclosure relate to methods and apparatuses for wireless fidelity (Wi-Fi) based presence detection. BACKGROUND

[0002] Presence detection is a useful feature in many current smart home devices. Presence detection underpins other features such as smart control of lighting, heating, ventilation and air conditioning. This feature is currently implemented using different modalities, including cameras and infrared (IR) sensors, but each approach has its own drawbacks. Wi-Fi, as a widely used wireless communication technology, is already present in many smart home devices. Many companies are very interested in developing methods to leverage existing Wi-Fi signals for presence detection, but current techniques have many limitations. SUMMARY

[0003] SOLUTION TO THE PROBLEM

[0004] Embodiments of the present disclosure provide methods and apparatuses for Wi-Fi based human presence and motion detection.

[0005] In one embodiment, a method of presence detection by a device is provided. The method can include obtaining channel state information (CSI) related to wireless fidelity, Wi-Fi. The method can include filtering the CSI to remove radio frequency (RF) interference. The method can include detecting motion in a space during a first observation window based on determining whether macro movements are present in the filtered CSI. The method can include determining whether micro movements and breathing signals are present in the filtered CSI during a second observation window in response to detecting motion in the space. The method can include providing an indication that the space is occupied based on determining that micro movements and breathing signals are present in the filtered CSI. The method can include providing an indication that the space is unoccupied based on determining that micro movements and breathing signals are not present in the filtered CSI.

[0006] The second observation window can be longer than the first observation window.

[0007] The method can further include providing an indication that the space is occupied based on detecting motion in the space. Providing the indication that the space is occupied based on determining that micro movements and breathing signals are present in the filtered CSI can include retaining the indication provided based on detecting motion in the space.

[0008] A duration of the first observation window can be less than 2 seconds. A duration of the second observation window can be between 10 seconds and 90 seconds.

[0009] Determining whether macro movements are present in the filtered CSI can include determining, for each subcarrier in the Wi-Fi spectrum, a standard deviation of the filtered CSI over the first observation window, determining a median of the standard deviations over all subcarriers in the Wi-Fi spectrum, and determining whether macro movements are present in the filtered CSI based on the median of the standard deviations over all subcarriers.

[0010] Determining whether micro movements and breathing signals are present in the filtered CSI can include determining, for each subcarrier in the Wi-Fi spectrum, a standard deviation of the filtered CSI over a third observation window, wherein the third observation window is longer than the first observation window and shorter than the second observation window, determining a median of the standard deviations over all subcarriers in the Wi-Fi spectrum, determining one or more breathing indicators based on an energy of the filtered CSI over a given frequency range and over the second observation window, determining a feature vector based on the median of the standard deviations over all subcarriers and the one or more breathing indicators, and determining whether micro movements and breathing signals are present in the filtered CSI based on the feature vector and using a machine learning model.

[0011] The machine learning model can include a random forest model or an XGBoost model.

[0012] Filtering the CSI to remove RF interference can include dividing the Wi-Fi spectrum of the CSI into subbands, for each subband, determining a number of peaks, a number of high peaks, and a peak prominence ratio, and filtering out the CSI in response to determining that any one of the number of peaks, the number of high peaks, or the peak prominence ratio exceeds a respective threshold for any one of the subbands.

[0013] The method can further include adapting a first threshold for breathing signal detection or a second threshold for motion detection based on the average inter-packet time.

[0014] In one embodiment, an apparatus for presence detection is provided. The apparatus can include a memory that stores instructions and at least one processor configured to cause the apparatus to perform operations when executing the instructions. The operations can include obtaining channel state information (CSI) related to wireless fidelity (Wi-Fi), filtering the CSI to remove radio frequency (RF) interference. The operations can include detecting motion in a space during a first observation window based on determining whether macro movements are present in the filtered CSI. The operations can include determining whether micro movements and breathing signals are present in the filtered CSI during a second observation window in response to detecting motion in the space. The operations can include providing an indication that the space is occupied based on determining that micro movements and breathing signals are present in the filtered CSI. The operations can include providing an indication that the space is unoccupied based on determining that micro movements and breathing signals are not present in the filtered CSI.

[0015] In one embodiment, a non-transitory computer-readable storage medium storing instructions is provided. The instructions, when executed by at least one processor of an apparatus for presence detection, can cause the apparatus to perform operations. The operations can include obtaining channel state information (CSI) related to wireless fidelity (Wi-Fi), filtering the CSI to remove radio frequency (RF) interference. The operations can include detecting motion in a space during a first observation window based on determining whether macro movements are present in the filtered CSI. The operations can include determining whether micro movements and breathing signals are present in the filtered CSI during a second observation window in response to detecting motion in the space. The operations can include providing an indication that the space is occupied based on determining that micro movements and breathing signals are present in the filtered CSI. The operations can include providing an indication that the space is unoccupied based on determining that micro movements and breathing signals are not present in the filtered CSI.

[0016] Other technical features can be readily apparent to one skilled in the art from the following figures, descriptions, and claims. BRIEF DESCRIPTION OF DRAWINGS

[0017] For a more complete understanding of the present disclosure and its advantages, reference is now made to the following description taken in conjunction with the accompanying drawings in which like reference numerals represent like parts:

[0018] Figure 1 An example wireless network is illustrated in accordance with various embodiments of the present disclosure;

[0019] Figure 2A An example AP is illustrated in accordance with various embodiments of the present disclosure;

[0020] Figure 2BAn example STA according to various embodiments of the disclosure is shown

[0021] Figure 3 An example system in which Wi-Fi CSI data collection can be performed according to various embodiments of the disclosure is shown;

[0022] Figure 4 An example state machine-based Wi-Fi presence detection system according to various embodiments of the disclosure is shown;

[0023] Figure 5A , Figure 5B , Figure 5C and Figure 5D A process for Wi-Fi presence detection according to various embodiments of the disclosure is shown;

[0024] Figure 6 An example process for human occupancy detection according to various embodiments of the disclosure is shown;

[0025] Figure 7 An example moving observation window for generating snapshot features according to various embodiments of the disclosure is shown;

[0026] Figure 8 An example process for sub-band based CSI filtering according to various embodiments of the disclosure is shown;

[0027] Figure 9A , Figure 9B and Figure 9C Example filtering results using CSI sub-band filtering according to various embodiments of the disclosure are shown;

[0028] Figure 10 An example technique for sub-band based CSI filtering according to various embodiments of the disclosure is shown; and

[0029] Figure 11 A flowchart of a method for human presence and motion detection based on Wi-Fi according to various embodiments of the disclosure is shown. DETAILED DESCRIPTION

[0030] Before undertaking a detailed description of the foregoing, it can be advantageous to set forth definitions of certain terms and phrases used throughout this patent document. The term "coupled" and its derivatives refer to any direct or indirect communication between two or more elements, whether or not those elements are in physical contact with one another. The terms "transmit," "receive," and "communicate," as well as derivatives thereof, encompass both direct and indirect communication. The terms "include" and "comprise," as well as derivatives thereof, mean inclusion without limitation. The term "or" is inclusive, meaning and / or. The phrase "associated with," as well as derivatives thereof, means to include, be included within, interconnect with, contain, be contained within, connect to or with, couple to or with, be communicable with, cooperate with, interleave, be proximate to, be bound to or with, have a property of, have relations with, or the like. The term "controller" means any device, system or part thereof that controls at least one operation. Such a controller can be implemented in hardware or a combination of hardware and software and / or firmware. The functionality associated with any particular controller can be centralized or distributed, whether locally or remotely. The phrase "at least one of," when used with respect to a listing of items, means that one or more of the listed items can be utilized, and that no additional item not listed can be utilized. For example, "at least one of A, B, and C" includes: A; B; C; A and B; A and C; B and C; and A, B, and C. As used herein, terms such as "first" and "second," or "third" and "fourth," etc. can be used to simply distinguish one component from another and not to limit other aspects of the components (e.g., importance or order). It will be appreciated that if one element (e.g., a first element) is referred to as being "coupled," "coupled to," "connected," "connected to," "connected with," or "connected to" another element (e.g., a second element), it is meant that the element can be directly or indirectly connected to the other element, whether or not the other element is physically contacting it.

[0031] As used herein, the term "module" can include a unit implemented in hardware, software, or firmware, and can interchangeably be used with other terms, for example, "logic," "logic block," "part," or "circuitry." The module can be a single integral component, or a minimum unit or part thereof, adapted to perform one or more functions. For example, according to an embodiment, the module can be implemented in a form of an application-specific integrated circuit (ASIC).

[0032] Furthermore, various functions described below can be implemented or supported by one or more computer programs, each of which is formed from computer readable program code and embodied in a computer readable medium. The terms "application" and "program" refer to one or more computer programs, software components, sets of instructions, procedures, functions, objects, classes, instances, related data, or a portion thereof adapted for implementation on a suitable computer readable program code. The phrase "computer readable program code" includes any type of computer code, including source code, object code, and executable code. The phrase "computer readable medium" includes any type of medium capable of being accessed by a computer, such as read only memory (ROM), random access memory (RAM), a hard disk drive, a compact disc (CD), a digital video disc (DVD), or any other type of memory. A "non-transitory" computer readable medium excludes wired, wireless, optical, or other communication links. Non-transitory computer readable media include media where data is permanently stored and media where data is stored and later overwritten, such as a rewritable optical disc or an erasable memory device.

[0033] Definitions for other certain words and phrases are provided throughout this patent document. Those of ordinary skill in the art will understand that such

[0034] The following discussion Figures 1 to 11 The various embodiments described for describing the principles of the present disclosure are merely examples and should not be construed as limiting the scope of the present disclosure in any way. Those skilled in the art will understand that the principles of the present disclosure can be implemented in any suitably arranged system or device.

[0035] Aspects of the present disclosure, features and advantages of the present disclosure will become apparent from the following detailed description, simply by way of illustration of a number of particular embodiments and implementations, including the best mode contemplated for carrying out the present disclosure. The present disclosure is also capable of other and different embodiments, and its several details can be modified in various obvious respects, all without departing from the spirit and scope of the present disclosure. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive. The disclosure is shown by way of example, and not limitation, in the drawings and description.

[0036] The present disclosure covers several components that can be used in conjunction or combination with each other or can operate as standalone solutions. Certain embodiments of the present disclosure can be derived by utilizing a combination of several embodiments listed below. Furthermore, it should be noted that further embodiments can be derived by utilizing a particular subset of the operational steps disclosed in each of these embodiments. The present disclosure should be understood to cover all such embodiments.

[0037] Figure 1 An example wireless network 100 in accordance with various embodiments of the present disclosure is shown. Figure 1 The illustrated embodiment of the wireless network 100 is merely an example. Other embodiments of the wireless network 100 can be used without departing from the scope of the present disclosure.

[0038] The wireless network 100 includes access points (APs) 101 and 103. The APs 101 and 103 are in communication with at least one network 130, such as the Internet, a proprietary Internet Protocol (IP) network, or other data network. The AP 101 provides wireless access to the network 130 for a plurality of stations (STAs) 111-114 within a coverage area 120 of the AP 101. The APs 101-103 can communicate with each other and with the STAs 111-114 using Wi-Fi or other WLAN (wireless local area network) communication techniques. The STAs 111-114 can communicate with each other using a peer-to-peer protocol such as TDLS (Tunneled Direct Link Setup).

[0039] Other well-known terms can be used instead of “access point” or “AP” depending on the network type, such as “router” or “gateway.” For convenience, the term “AP” is used in the present disclosure to refer to a network infrastructure component that provides wireless access to remote terminals. In a WLAN, an AP can also be called a STA, assuming the AP also contends for the wireless channel. Also, other well-known terms can be used instead of “station” or “STA” depending on the network type, such as “mobile station,” “subscriber station,” “remote terminal,” “user device,” “wireless terminal,” or “user equipment.” For convenience, the terms “station” and “STA” are used in the present disclosure to refer to a remote wireless equipment that wirelessly accesses an AP or contends for the wireless channel in a WLAN, whether the STA is a mobile device such as a mobile telephone or smartphone or a generally stationary device such as a desktop computer, an AP, a media player, a fixed sensor, a television, etc.

[0040] Dotted lines show the approximate extents of the coverage areas 120 and 125, which are shown as approximately circular for the purposes of illustration and explanation only. It should be clearly understood that the coverage areas associated with APs, such as the coverage areas 120 and 125, can have other shapes including irregular shapes, depending on the configuration of the APs and variations in the radio environment associated with natural and man-made obstructions.

[0041] As described in more detail below, one or more APs can include circuitry and / or programming to implement Wi-Fi based human presence and motion detection. Although Figure 1 One example of a wireless network 100 is shown, but various changes can be made Figure 1 For example, the wireless network 100 can include any number of APs arranged in any suitable arrangement and any number of STAs. In addition, the AP 101 can communicate directly with any number of STAs and provide those STAs with wireless broadband access to the network 130. Similarly, each AP 101 and 103 can communicate directly with the network 130 and provide STAs with direct wireless broadband access to the network 130. Further, the AP 101 and / or 103 can provide access to other or additional external networks, such as an external telephone network or other types of data networks.

[0042] Figure 2A An example AP 101 according to various embodiments of the present disclosure is shown. Figure 2A The illustrated embodiment of the AP 101 is for purposes of illustration and Figure 1 The AP 103 can have the same or similar configuration. However, APs have a wide variety of configurations and Figure 2A The scope of the present disclosure is not limited to any particular implementation of an AP.

[0043] The AP 101 includes multiple antennas 204a-204n and multiple transceivers 209a- 209n. The AP 101 also includes a controller / processor 224, a memory 229, and a backhaul or network interface 234. The transceivers 209a-209n receive incoming radio frequency (RF) signals from the antennas 204a-204n, such as signals transmitted by the STAs 111-114 in the network 100. The transceivers 209a-209n down-convert the incoming RF signals to generate IF or baseband signals. The IF or baseband signals are processed by receive (RX) processing circuitry in the transceivers 209a-209n and / or the controller / processor 224, which generates processed baseband signals by filtering, decoding, and / or digitizing the baseband or IF signals. The controller / processor 224 can further process the baseband signals.

[0044] Transmit (TX) processing circuitry in the transceiver 209a-209n and / or controller / processor 224 receives analog or digital data (such as voice data, web data, e-mail, or interactive game data) from the controller / processor 224. The TX processing circuitry encodes, multiplexes, and / or digitizes the outgoing baseband data to generate processed baseband or IF signals. The transceiver 209a-209n up-converts the baseband or IF signals to RF signals, which are transmitted via the antennas 204a-204n.

[0045] The controller / processor 224 can include one or more processors or other processing devices to manage the overall operation of the AP 101. For example, the controller / processor 224 can control the reception of forward channel signals and the transmission of reverse channel signals by the transceiver 209a-209n in accordance with well-known principles. The controller / processor 224 can support additional functions as well, such as more sophisticated wireless communication functions. For instance, the controller / processor 224 can support beam forming or directional routing operations in which outgoing signals from multiple antennas 204a-204n are weighted differently to effectively steer the outgoing signals in a desired direction. The controller / processor 224 can also support OFDMA (Orthogonal Frequency-Division Multiple Access) operations in which outgoing signals are assigned to different sub-carrier subsets of the available frequency bands for transmission to different recipient STAs 111-114. Any of a wide variety of other functions may

[0046] The controller / processor 224 is also coupled to a backhaul or network interface 234. The backhaul or network interface 234 allows the AP 101 to communicate with other devices or systems via a backhaul connection or over a network. Interface 234 can support communication via any suitable wired or wireless connection(s). For example, interface 234 can allow the AP 101 to communicate via a wired or wireless local area network or via a wired or wireless connection to a larger network, such as the Internet. Interface 234 includes any suitable architecture supporting communication via wired or wireless connections, such as Ethernet or an RF transceiver. Memory 229 is coupled to the controller / processor 224. A portion of memory 229 may include RAM, and another portion of memory 229 may include flash memory or other ROM.

[0047] As described in more detail below, AP 101 may include circuitry and / or programming for Wi-Fi-based human presence and motion detection. Although Figure 2A An example of AP 101 is shown, but it is also possible to see... Figure 2A Various changes can be made. For example, AP 101 may include... Figure 2A Each component can be represented in any number of quantities. As a specific example, an access point may include multiple interfaces 234, and the controller / processor 224 may support routing functions for routing data between different network addresses. Alternatively, as in a conventional AP, only one antenna and transceiver path may be included. Furthermore, components can be combined, further subdivided, or omitted. Figure 2A It includes various components and allows for the addition of additional components as needed.

[0048] Figure 2B Example STA 111 is shown according to various embodiments of the present disclosure. Figure 2B The embodiment of STA 111 shown is for illustrative purposes only, and Figure 1 STAs 112-114 can have the same or similar configurations. However, STAs come in a wide variety of configurations, and Figure 2B This disclosure is not intended to limit the scope of any particular implementation of STA.

[0049] STA 111 includes antenna(s) 205, transceivers(s) 210, microphone 220, speaker 230, processor 240, input / output (I / O) interface (IF) 245, input terminals 250, display 255, and memory 260. Memory 260 includes operating system (OS) 261 and one or more applications 262.

[0050] The transceiver(s) 210 receive incoming RF signals, such as signals transmitted by the AP 101 of the network 100, from the antennas 205. The transceiver(s) 210 down-convert the incoming RF signals to generate intermediate frequency (IF) or baseband signals. The IF or baseband signals are processed by RX processing circuitry in the transceiver(s) 210 and / or the processor 240, which generates processed baseband signals by filtering, decoding, and / or digitizing the baseband or IF signals. The RX processing circuitry transmits the processed baseband signals to the speaker 230, such as for voice data, or to the processor 240 for processing, such as for web browsing data.

[0051] The TX processing circuitry in the transceiver(s) 210 and / or processor 240 receives analog or digital voice data from the microphone 220 or other outgoing baseband data (such as web data, e-mail, or interactive game data) from the processor 240. The TX processing circuitry encodes, multiplexes, and / or digitizes the outgoing baseband data to generate processed baseband or IF signals. The transceiver(s) 210 up-convert the baseband or IF signals to RF signals that are transmitted via the antenna(s) 205.

[0052] The processor 240 can include one or more processors and execute a basic OS program 261 stored in the memory 260 in order to control the overall operation of the STA 111. In one such operation, the processor 240 controls the reception of forward channel signals by the transceiver(s) 210 and the transmission of reverse channel signals, in accordance with well-known principles. The processor 240 can also include processing circuitry configured to implement Wi-Fi based human presence and motion detection. In some embodiments, the processor 240 includes at least one microprocessor or microcontroller.

[0053] The processor 240 is also capable of executing other processes and programs resident in the memory 260, such as operations to implement Wi-Fi based human presence and motion detection. The processor 240 can move data into or out of memory 260 as required by the processes being executed. In some embodiments, the processor 240 is configured to execute a plurality of applications 262, such as an application to implement Wi-Fi based human presence and motion detection. The processor 240 can operate the plurality of applications 262 based on the OS program 261 or in response to signals received from an AP. The processor 240 is also coupled to the I / O interface 245, which provides the STA 111 with the ability to connect to other devices such as laptop computers and handheld computers. The I / O interface 245 is the communication path between these accessories and the processor 240.

[0054] The processor 240 is also coupled to an input 250 and a display 255. The input 250 includes, for example, a touchscreen, keypad, or the like. The operator of the STA 111 can use the input 250 to enter data into the STA 111. The display 255 can be a liquid crystal display, light emitting diode display, or other display capable of rendering text and / or at least limited graphics, such as from web sites. The memory 260 is coupled to the processor 240. A portion of the memory 260 can include random access memory (RAM), and another portion of the memory 260 can include flash memory or other read-only memory (ROM).

[0055] Although Figure 2B One example of a STA 111 is shown, but various changes can be made Figure 2B to the components in Figure 2B can be combined, further subdivided, or omitted, and additional components can be added according to particular needs. In a particular example, the STA 111 can include any number of antenna(s) 205 for MIMO (multiple input multiple output) communication with the AP 101. In another example, the STA 111 can not include voice communication, or the processor 240 can be partitioned into multiple processors, such as one or more central processing units (CPUs) and one or more graphics processing units (GPUs). Also, while Figure 2B The STA 111 is shown configured as a mobile, or cellular, telephone or smartphone, but the STA can also be configured to operate as other types of mobile devices or fixed devices.

[0056] As previously mentioned, presence detection is a useful feature in many current smart home devices. Presence detection underpins smart control of lighting, heating, ventilation, and air conditioning, among other features. This feature is currently implemented using different modalities, including cameras and infrared (IR) sensors, but each approach has its own drawbacks. Wi-Fi, as a widely used wireless communication technology, is already present in many smart home devices. Many companies are very interested in developing methods to leverage existing Wi-Fi signals for presence detection, but current techniques have many limitations. In order to effectively leverage and process Wi-Fi signals for human presence detection, several key challenges need to be addressed.

[0057] First, for practical applications, a Wi-Fi presence detection system needs to have low latency and high accuracy. However, low latency usually means a short observation time window, while high accuracy usually requires a relatively long observation window.

[0058] Second, when a person is in a room, it can be difficult for the system to continuously detect the presence of the person if the person remains absolutely still, such as lying in bed. This can be a challenging problem because there is a lack of typical human motion in this scenario.

[0059] Third, Wi-Fi signals can suffer from severe interference in different sub-bands. How to detect that the Wi-Fi signals are contaminated in certain sub-bands and how to filter out and utilize clean Wi-Fi signals can be a problem. In addition, RF interference can also cause Wi-Fi packets to be dropped by the receiver, resulting in large gaps between Wi-Fi packets and an increase in the inter-packet time, which will affect the decision threshold for Wi-Fi presence detection.

[0060] To address these and other issues, the present disclosure provides systems and methods for Wi-Fi-based human presence and motion detection. As described in more detail below, the disclosed embodiments use Wi-Fi signals to perform presence and motion detection, which can enable presence detection in current smart home devices without any additional cost of new or modified hardware. The disclosed embodiments provide a number of advantageous benefits over conventional systems that perform presence detection. For example, the disclosed embodiments enable low latency and high accuracy to meet the needs of real-world users for presence detection. In addition, the disclosed embodiments address various problems with interfering signals to Wi-Fi signals, such as those discussed above.

[0061] Note that while some of the embodiments discussed below are described in the context of a smart home device, these are merely examples. It will be appreciated that the principles of the present disclosure can be implemented in any number of other suitable contexts or systems, including other stationary or portable electronic devices (e.g., tablets, laptops, etc.).

[0062] Figure 3 An example system 300 in which Wi-Fi Channel State Information (CSI) data collection can be performed in accordance with various embodiments of the present disclosure is shown. Figure 3 The illustrated embodiment of the system 300 is for illustration only. Other embodiments of the system 300 can be used without departing from the scope of the present disclosure.

[0063] As Figure 3As shown, system 300 includes a Wi-Fi STA 301 and an AP 302 that communicate via a wireless network. Both Wi-Fi STA 301 and AP 302 are located in a space 312 (such as a room). In some embodiments, Wi-Fi STA 301 may represent... Figure 1 STA 111 (or represented by it), and AP 302 can represent Figure 1 AP 101 (or represented by it).

[0064] In Wi-Fi, CSI can be used for sensing applications. To obtain CSI information, STA 301 can send an empty data packet to AP 302, and AP 302 can then reply to STA 301 using an Ack packet. STA 301 can then extract the CSI from the Ack packet. The CSI can then be used for presence detection. In some embodiments, the period between sending the empty data packet and receiving the Ack packet can be from 1 millisecond to 2 seconds (although other period values ​​are also possible and within the scope of this disclosure).

[0065] Figure 4 Examples of a state machine-based Wi-Fi presence detection system 400 according to various embodiments of the present disclosure are shown. Figure 4 The embodiment of system 400 shown is for illustrative purposes only. Other embodiments of system 400 may be used without departing from the scope of this disclosure. For ease of explanation, system 400 will be described as... Figure 3 The system 400 is implemented in STA 301. However, the system 400 can be implemented in any other suitable device or system, such as AP 302.

[0066] like Figure 4 As shown, system 400 includes a motion detection module 401 and an occupancy detection module 402. As described in more detail below, motion detection module 401 can detect a person's macro-movement (i.e., large movements) in a room (or other space) based on the presence of macro-movement in the filtered CSI. Motion detection module 401 can perform detection with low latency and high accuracy. Occupancy detection module 402 can detect a person's micro-movement (i.e., small movements, such as waving, stretching a leg, etc.) based on the presence of micro-movement, breathing signals, or both in the filtered CSI. Occupancy detection module 402 can perform detection with high accuracy. Motion detection module 401 and occupancy detection module 402 are linked together via a dual-state machine architecture to achieve presence detection functionality. State 1 corresponds to motion detection module 401, and state 2 corresponds to occupancy detection module 402.

[0067] When the room is currently empty, the state machine is in state 1 ("empty room"), and the motion detection module 401 continuously detects any motion signals with an observation window (i.e., detection interval) ti. Here, ti can be a short observation window, such as less than 2 seconds. When motion is detected, the motion detection module 401 can provide an indication that the room is now occupied, and the state machine transitions to state 2 ("room occupied"). In state 2, the occupancy detection module 402 is activated to detect whether a person is still in the room with a longer observation window t2. Here, t2 is a longer observation window than ti. In some embodiments, t2 can be 10 to 90 seconds. Of course, other values of ti and t2 are possible and within the scope of the present disclosure. If the occupancy detection module 402 detects that the room is still occupied, the occupancy detection module 402 can maintain the indication that the room is occupied. However, if the occupancy detection module 402 detects that the room is no longer occupied, the occupancy detection module 402 can provide an indication that the room is no longer occupied.

[0068] For the motion detection module 401, the mean or median of the standard deviation of the CSI amplitudes over the ti time window can be determined and used as a feature, which can be represented by:

[0069]

[0070] where i is the index of the subcarrier, A i is the CSI amplitude of subcarrier i, and std ti (A i ) means the standard deviation of A i over the time window ti.

[0071] For the occupancy detection module 402, the same motion detection feature as above can be used but with a longer observation window t3, where t3 is typically greater than ti and less than t2, to detect micro-movements:

[0072]

[0073] In addition to micro-movements, human respiration signals can also be computed, such as with the metric Breath SNR or Respiration Energy Ratio (RER). These will be discussed in more detail below.

[0074] In some embodiments, the raw CSI data can be filtered to eliminate any contaminated CSI data. The CSI filtering can include two stages. The first stage is to filter out high peak CSI, and the second stage is to filter out any abnormal CSI. A detailed discussion of the CSI filtering is provided below.

[0075] Figures 5A to 5DA process 500 for Wi-Fi presence detection according to various embodiments of the present disclosure is illustrated. Figures 5A to 5D The embodiment of process 500 shown is for illustrative purposes only. Other embodiments of process 500 may be used without departing from the scope of this disclosure. For ease of explanation, process 500 will be described as... Figure 3 The process 500 is implemented in STA 301. However, the process 500 can be implemented in any other suitable device or system, such as AP 302.

[0076] like Figure 5A As shown, process 500 includes a CSI filtering routine 501, a motion detection routine 502, and an occupancy detection routine 503. A more detailed view of routines 501-503 is available in... Figures 5B to 5D As shown in the diagram, CSI filtering routine 501 is executed to filter out bad CSIs, and the filtered (or clean) CSIs are accumulated for further processing. After obtaining the raw CSIs, STA 301 obtains the latest timestamp of the CSI packets to update T. latest Then, STA 301 checks if the currently collected CSIs contain peak values, which indicate that the CSIs are corrupted. If a peak CSI is detected, the current CSI packet is discarded. Otherwise, STA 301 uses the current timestamp to update the latest non-peak CSI timestamp T. noPeak The latest CSI is then pushed into the non-peak CSI buffer. STA 301 can then move to motion detection routine 502.

[0077] Simultaneously, STA 301 can continue to check if a normal_CSI_template has been created. If no normal_CSI_template exists, STA 301 can use an algorithm (such as DBSCAN (Density-Based Spatial Clustering of Applications with Noise)) to separate normal CSIs into clusters and add them to the normal_CSI_template. If the number of normal CSIs in the template is greater than 10, the normal_CSI_template flag is set to "true," indicating that a normal CSI template has been created. STA 301 then queues all normal CSIs in the normal_CSI_template into a normal CSI buffer and sets the latest normal CSI time T. normal Updated to the latest CSI package time T latest. After normal_CSI_template is created, the new off-peak CSI is compared to normal_CSI_template to determine if it is similar enough to be considered normal CSI. If so, the new CSI is pushed into the queue of the normal CSI buffer and the normal CSI time is updated. If the CSI is not similar to normal_CSI_template, then STA 301 checks if the difference between the current time T latest and the last time a motion detection decision was made (T normal ) is greater than 10 seconds. If so, normal_CSI_template is discarded and the normal_CSI_template flag is set to "false".

[0078] The motion detection routine 502 is executed to detect macro movements and if the current room state is "empty", the room state is changed to "occupied". If a new off-peak CSI is detected, the current off-peak CSI total C S is updated. If the current time T latest is greater than 1.5 seconds from the last time a motion detection decision was made (T S ) and the current off-peak CSI count is greater than 6, the standard deviation of the off-peak CSI in the buffer is calculated, T S is set to T latest and C S is reset to zero. If the current room state is "empty", STA 301 checks if the standard deviation of the off-peak CSI STD_CSI_amp_S is greater than a threshold to determine if motion is detected. If motion is detected, the room state is set to "occupied".

[0079] The occupancy detection routine 503 utilizes detection of micro movements and human vital signals (such as breathing) to determine if the current room is occupied. The occupancy detection routine 503 is operable if the current room state is "occupied" and it will change the room state to "empty" if no motion or human vital signals are detected. STA 301 first checks three conditions: (1) if the normal CSI buffer has accumulated data for more than 30 seconds; (2) if the buffer has accumulated more than 80 packets in the last 30 seconds; and (3) if the current time T latest is greater than 1.5 seconds from T L , where T Lis the time at which the breathing signal was last detected. If all three conditions are met, then the STA 301 interpolates the CSI for each subcarrier in the time domain. The STA 301 then calculates the RER for the breathing signal and the standard deviation of the CSI amplitudes, STD_CSI_amp_L, and sets T L is reset to T latest If the current room state is "occupied," then the STA 301 uses the statistics of the RER and STD_CSI_amp_L to determine whether there is motion using a heuristic method or a machine learning method (as described in more detail below). If no motion is detected, then the room state is changed to "empty."

[0080] For occupancy detection, it is important to detect the presence of a person, even if that person can remain absolutely still within the room. Thus, a process for human occupancy detection is described below in which the presence of a human breathing signal is detected while a person is located within the room. For example, the breathing signal can be estimated from the spectrum of the CSI amplitudes.

[0081] Figure 6 An example process 600 for human occupancy detection according to various embodiments of the disclosure is shown. Figure 6 The illustrated embodiment of the process 600 is for illustration only. Other embodiments of the process 600 can be used without departing from the scope of the disclosure. In some embodiments, the process 600 can be part of the occupancy detection module 402, the occupancy detection routine 503, or both. To facilitate explanation, the process 600 will be described as being implemented in the STA 301. However, the process 600 can be implemented in any other suitable device or system, such as the AP 302. Figure 3

[0082] The STA 301 can perform the process 600 to detect the presence of one or more persons within a room. The process 600 combines detection of small movements (such as waving, kicking a leg, etc.) and micro-movements (such as human respiration) to decide the occupancy state of the room. As discussed in more detail below, the process 600 extracts Wi-Fi signal features for micro-movement and breathing signal detection, then extracts statistics from the micro-movement and breathing features and forms time series features. A heuristic method or a machine learning-based method can then be used with the time series features to detect occupancy.

[0083] As Figure 6 ​As shown, the process 600 begins at operation 605, where the STA 301 obtains the raw CSI magnitude. At operation 610, the STA 301 normalizes the raw CSI magnitude with the overall packet power computed across subcarriers to offset the effect of Automatic Gain Control (AGC) compensation. Normalization can be described by the equation shown below, where CSI i is the CSI of the i-th subcarrier:

[0084]

[0085] AGC will increase / decrease the magnitude of the CSI based on whether the received packet power is too weak / strong. If the CSI is normalized with the overall packet power after AGC, the effect of AGC can be minimized.

[0086] At operation 615, in the time domain, the STA 301 performs linear interpolation on the CSI magnitude data to get uniformly time spaced data samples. At operation 620, the STA 301 computes the frequency spectrum.

[0087] At operation 625, the STA 301 computes the small motion feature Fea smotion (as defined above) and at operation 630, the STA 301 saves the small motion feature Fea smotion in a buffer. At operation 635, the STA 301 computes the respiration signal feature fea breath to estimate the respiration energy, and at operation 640, the STA 301 saves the respiration signal feature fea breath in a buffer. In some embodiments, the size of the FIFO (first in first out) Fea smotion buffer and the size of the FIFO Fea breath buffer is M1, although other sizes are possible.

[0088] The STA 301 can use 4 Wi-Fi signal features to extract the feature fea breath . Each of the following features is computed on the CSI magnitude for each subcarrier over a time window t2.

[0089] The breathSNR feature is defined as the ratio of the breath energy to the noise energy. The breath frequency is typically between 8 to 30 breaths per minute. From the spectrum of the CSI amplitudes in the breath frequency range, the STA 301 can find the peak of the spectrum that represents the breath energy. Here, the noise frequency range is defined as the frequency range between the maximum breath frequency to half of the inverse of the average inter-packet time. Then, the STA 301 computes the average noise energy by taking the average energy in the noise frequency range, as shown in the following equation:

[0090]

[0091] The respiratory energy ratio (RER) is defined as the ratio of the peak energy in the breath frequency range to the total energy in the breath frequency range:

[0092]

[0093] The breath peak prominence ratio is defined as the ratio of the prominence of the maximum prominence peak in the breath frequency range to the average prominence of the top N maximum prominence peaks in the noise frequency range, where the typical value of N is greater than 2:

[0094]

[0095] The differential prominence ratio is defined as the ratio of the difference of the breath peak prominence and the noise peak prominence to the average difference among the noise peak prominences:

[0096]

[0097] The overall breath signal feature is defined as:

[0098]

[0099] where breathFea can be any of the 4 breath signal features defined above, and the median operation is taken across all subcarriers.

[0100] By combining fea smotion and fea breath , the occupancy state of the room can be determined. At operation 650, the STA 301 determines whether an occupancy is detected in the room. For occupancy detection based on the heuristic method, the STA 301 can use the following two criteria to determine whether a human occupancy is detected.

[0101] Criterion 1 : If Fea smotions and Fea breath buffer has at least the last Ml data points, and there are more than M2 Fea smotion less than thresh smotions and Feabreath Less than thresh breath Data points.

[0102] Standard 2: If Fea smotions and Fea breath The buffer has at least the last M1 data points and has more than M3 Fea. smotions Less than thresh smotions And Fea breath Less than thresh breath Continuous data points.

[0103] In Standard 1 and Standard 2, example values ​​for M1 can be integers between 10 and 20 (inclusive). Example values ​​for M2 can be integers between 7 and 19 (inclusive). Example values ​​for M3 can be integers between 3 and 10 (inclusive).

[0104] If criterion 1 or criterion 2 is met, STA 301 determines that no occupancy has been detected, then clears both buffers (operation 655) and changes the room status to "empty" (operation 660).

[0105] In addition to the heuristic methods mentioned above, machine learning-based methods can also be used to determine room occupancy. The input to the machine learning model can be snapshot features or time-series features as defined below.

[0106] For snapshot characteristics, at each snapshot, a series of Wi-Fi signal characteristics can be determined as follows:

[0107]

[0108] The median, mean, and variance are calculated along the subcarrier. Small motion features are calculated starting from the last t3 seconds, and other respiratory signal features are calculated starting from the last t2 seconds, based on the moving observation window. Figure 7 An example moving observation window 700 for generating snapshot features according to various embodiments of the present disclosure is shown. Figure 7 As shown, multiple (K) observation time windows 705 can be extracted as K snapshots to generate time series features. Each observation time window 705 can have a duration of t3 (for small motion features) or t2 (for breathing features). Each observation time window 705 is a FIFO buffer that is updated every 1 second. Therefore, new snapshot features can be generated every 1 second.

[0109] To generate time series features, K snapshot features are recorded. For example, Fea can be... smotion The five snapshot records are as follows:

[0110]

[0111] Fea smotion may then be computed as:

[0112]

[0113] where the max operation, the min operation, the variance operation, and the mean operation are performed along the time series of the snapshot.

[0114] The STA 301 can use the snapshot features or the time series features to feed into a machine learning model, such as an XGBoost model or a random forest model, and then train the machine learning model to perform room occupancy detection.

[0115] Note that in an environment with RF interference, the Wi-Fi CSI can be contaminated by the interference signal, which can lead to false presence detection. In addition, in an environment with RF interference, Wi-Fi packets can be dropped, which can affect the human presence detection threshold. Therefore, to detect and filter RF interference in each subband of the CSI, it is helpful to process the raw CSI data.

[0116] To filter the contaminated Wi-Fi signal and make full use of the clean Wi-Fi signal in each subband, the STA 301 can use a subband-based Wi-Fi signal filtering method to filter out the contaminated Wi-Fi signal in each subband using the unusually high peak in the Wi-Fi subcarrier domain. In addition, the STA 301 can implement an inter-packet time-based adaptive threshold system to counter the impact of lost Wi-Fi packets on the presence detection threshold.

[0117] Figure 8 An example process 800 for subband-based CSI filtering is shown, in accordance with various embodiments of the present disclosure. Figure 8 The embodiment of the process 800 shown is for illustration. Other embodiments of the process 800 can be used without departing from the scope of the present disclosure. The process 800 will be described as being implemented in the STA 301 of the system 300. However, the process 800 can be implemented in any other suitable device or system, such as the AP 302. Figure 3

[0118] As Figure 8 ​As shown, at operation 805, the STA 301 obtains raw CSI. The raw CSI typically contains high peak CSI, which is contaminated CSI. At operation 810, the STA 301 filters out the high peak CSI using any suitable filtering technique. After filtering out the high peak CSI, at operation 815, the STA 301 creates a normal CSI template. In some embodiments, the STA 301 classifies the CSI based on the cosine distance of the CSI, and selects the cluster with the most CSI as the normal CSI template. The STA 301 then compares new CSI to the mean of the CSI template using the cosine distance metric to filter out abnormal CSI, resulting in normal CSI 820.

[0119] To filter out the high peak CSI (operation 810) and abnormal CSI (operation 815) while preserving the maximum amount of useful information, the STA 301 can use a sub-band based CSI filtering method. As one example method, the Wi-Fi CSI can be decomposed into several CSI sub-bands, each with a bandwidth of, for example, 20 MHz. On each 20 MHz sub-band, the STA 301 checks three metrics on the CSI amplitude across the subcarriers.

[0120] 1. The number of peaks of the CSI amplitude across the 20 MHz, Numpeaks.

[0121] 2. The number of high peaks of the CSI amplitude across the 20 MHz, NumHighPeaks. Here, a high peak is defined as a peak that exceeds a threshold Th peak .

[0122] 3.

[0123] A 20 MHz sub-band CSI is considered contaminated and high peak CSI if any of the following three conditions are met.

[0124] 1. NumPeaks > P1.

[0125] 2. NumHighPeaks > P2.

[0126] 3. The peak prominence ratio > P3.

[0127] Here, P1, P2, and P3 are predetermined thresholds. Then, for the entire usage band of the CSI, if none of the 20 MHz sub-bands is high peak CSI, then the entire usage band of the CSI is not high peak CSI. Here, the CSI that is not high peak CSI is referred to as non-high peak CSI.

[0128] Figures 9A to 9CExample filtering results using CSI sub-band filtering are shown in accordance with various embodiments of the present disclosure. Figure 9A Raw CSI is depicted. Figure 9B The number of non-peak CSI after filtering is shown for the entire 80MHz band and each 20MHz band. Figure 9C Filtered non-peak CSI over 80MHz bandwidth is depicted, which represents the final filtering result. Compared to filtering over the entire 80MHz bandwidth in one step, filtering CSI over each 20MHz bandwidth and then finding non-peak CSI over the entire bandwidth can significantly increase the number of available CSI.

[0129] In some embodiments, to maximize the utilization of non-peak CSI, CSI is first filtered in each sub-band using the above condition, and then the non-peak CSI of each sub-band is separately stored in their corresponding buffer. Then, CSI features over each subcarrier are separately calculated over time. Finally, the calculated CSI features are combined across subcarriers via median or mean operation. A representative example of this technique is shown in Figure 10

[0130] As mentioned above, RF interference can also cause CSI packets to be dropped or lost. Thus, the threshold used for respiration signal detection or motion detection can be affected. Accordingly, in some embodiments, STA 301 can use a linear adaptive threshold method to dynamically change the detection threshold based on the average inter-packet time, as follows:

[0131]

[0132] where a and b are heuristic parameters, which are obtained by regression on the best threshold for each inter-packet time (interpktTime).

[0133] Although Figures 3 to 10 Example techniques for Wi-Fi based human presence and motion detection are shown, as well as related details, various changes can be made to Figures 3 to 10 For example, various components in Figures 3 to 10 may be combined, further subdivided, or omitted, and additional components can be added in accordance with the particular needs of the application. Further, while shown as a series of steps, various operations in Figures 3 to 10 may overlap, occur in parallel, occur in a different order, or occur any number of times. In another example, steps can be omitted or replaced by other steps.

[0134] Figure 11 ​A flowchart of a method 1100 for Wi-Fi based human presence and motion detection is shown, in accordance with various embodiments of the present disclosure, where the method 1100 can be performed by one or more components of the system 300 (e.g., the STA 301 or the AP 302). Figure 11 The illustrated embodiment of the method 1100 is for illustration only. Figure 11 The illustrated one or more components can be implemented in specialized circuitry configured to perform the recited functions, or one or more components can be implemented by one or more processors executing instructions to perform the recited functions.

[0135] As Figure 11 shown, the method 1100 begins at step 1101. At step 1101, the STA 301 obtains Wi-Fi based CSI. This can include, for example, the STA 301 extracting the CSI from an Ack packet, as Figure 3 shown.

[0136] At step 1103, the STA 301 filters the CSI to remove RF interference. This can include, for example, the STA 301 filtering the CSI using the filtering techniques disclosed above. In some embodiments, the STA 301 can filter the CSI by: dividing the Wi-Fi spectrum of the CSI into sub-bands; for each sub-band, determining a number of peaks, a number of high peaks, and a peak prominence ratio; and responsive to determining that any one of the number of peaks, the number of high peaks, or the peak prominence ratio exceeds a respective threshold for any one of the sub-bands, filtering out the CSI.

[0137] At step 1105, the STA 301 executes a motion detection module. The motion detection module determines whether macro movement is present in the filtered CSI, detects motion in a space based on whether macro movement is present in the filtered CSI, and provides an indication that the space is occupied when motion in the space is detected. The motion detection module detects motion during a first observation window. This can include, for example, the STA 301 executing the motion detection module 401, as Figure 4 shown.

[0138] In some embodiments, the motion detection module can determine whether macro movement is present in the filtered CSI by: determining, for each subcarrier in the Wi-Fi spectrum, a standard deviation of the filtered CSI over the first observation window; determining a median of the standard deviations over all subcarriers in the Wi-Fi spectrum; and determining whether macro movement is present in the filtered CSI based on the median of the standard deviations over all subcarriers.

[0139] At step 1107, in response to the indication that the space is occupied, the STA 301 executes an occupancy detection module. The occupancy detection module detects whether the space is still occupied based on whether micro-movement and breathing signals are present in the filtered CSI, retains the indication that the space is occupied when it is detected that the space is still occupied, and provides an indication that the space is unoccupied when it is detected that the space is no longer occupied. The occupancy detection module detects motion during a second observation window, which is longer than the first observation window. This can include, for example, the STA 301 executing the occupancy detection module 402 as shown in Figure 4

[0140] In some embodiments, the occupancy detection module can determine whether micro-movement and breathing signals are present in the filtered CSI by determining, for each subcarrier in the Wi-Fi spectrum, a standard deviation of the filtered CSI over a third observation window, where the third observation window is longer than the first observation window and shorter than the second observation window; determining a median of the standard deviations over all subcarriers in the Wi-Fi spectrum; determining one or more breathing indicators based on the energy of the filtered CSI over a given frequency range and over the second observation window; determining a feature vector based on the median of the standard deviations over all subcarriers and the one or more breathing indicators; and determining, based on the feature vector and using a machine learning model, whether micro-movement and breathing signals are present in the filtered CSI.

[0141] Although Figure 11 one example of a method 1100 for Wi-Fi-based human presence and motion detection is shown, various changes can be made to Figure 11 For example, while shown as a series of steps, various steps in Figure 11 could overlap, occur in parallel, occur in a different order, or occur any number of times.

[0142] The embodiments described herein can be implemented in a wide variety of usage scenarios. For example, the disclosed embodiments can be used for room-level presence detection using a single hub device placed within a room. As another example, the disclosed embodiments can be used for smart home automation with presence detection. For example, when a person enters (or leaves) a room, the devices can automatically turn on (or off) the lights, television, etc. As yet another example, the disclosed embodiments can be used for home security monitoring (e.g., detecting intruders entering a home) or baby sleep monitoring (e.g., detecting breathing signals of a sleeping baby in a room, and triggering an alarm if the breathing signals become weak). As still another example, the disclosed embodiments can be used for home positioning, such as detecting the location of a person based on the occupancy status of each room.

[0143] ​While the present disclosure has been described with example embodiments, various changes and modifications can be suggested to one skilled in the art. It is intended that the present disclosure encompass such changes and modifications as fall within the scope of the appended claims. None of the description in this application should be read in the alternative unless expressly so stated. The scope of the patent is defined by the claims.

Claims

1. A method of presence detection by a device (111), the method comprising: obtaining (1101) channel state information, CSI, related to wireless fidelity, Wi-Fi; filtering (1103) the CSI to remove radio frequency, RF, interference; detecting motion in a space during a first observation window based on determining whether macro movements are present in the filtered CSI; in response to detecting motion in the space, determining whether micro movements and breathing signals are present in the filtered CSI during a second observation window; based on determining that the micro movements and the breathing signals are present in the filtered CSI, providing an indication that the space is occupied; and based on determining that the micro movements and the breathing signals are not present in the filtered CSI, providing an indication that the space is unoccupied. The second observation window is longer than the first observation window.

2. The method of claim 1, wherein, 3. The method of claim 1, further comprising: based on detecting motion in the space, providing an indication that the space is occupied, wherein based on determining that the micro movements and the breathing signals are present in the filtered CSI, providing an indication that the space is occupied comprises retaining the indication provided based on detecting motion in the space.

4. The method of claim 1, wherein: a duration of the first observation window is less than 2 seconds, and a duration of the second observation window is between 10 seconds and 90 seconds. Determining whether the macro movements are present in the filtered CSI comprises:

5. The method of claim 1, wherein, determining, for each subcarrier in a Wi-Fi spectrum, a standard deviation of the filtered CSI over the first observation window; determining a median of the standard deviations over all subcarriers in the Wi-Fi spectrum; and based on the median of the standard deviations over all subcarriers, determining whether the macro movements are present in the filtered CSI. Determining whether the micro movements and the breathing signals are present in the filtered CSI comprises:

6. The method of claim 1, wherein, determining, for each subcarrier in a Wi-Fi spectrum, a standard deviation of the filtered CSI over a third observation window, wherein the third observation window is longer than the first observation window and shorter than the second observation window; determining a median of the standard deviations over all subcarriers in the Wi-Fi spectrum; determining one or more breathing indicators based on an energy of the filtered CSI over a given frequency range and over the second observation window; determining a feature vector based on the median of the standard deviations over all subcarriers and the one or more breathing indicators; and based on the feature vector and using a machine learning model, determining whether small movements and breathing signals are present in the filtered CSI. The machine learning model comprises a random forest model or an XGBoost model.

7. The method of claim 6, wherein, Filtering the CSI to remove the RF interference comprises:

8. The method of claim 1, wherein, dividing a Wi-Fi spectrum of the CSI into subbands; for each subband, determining a number of peaks, a number of high peaks, and a peak prominence ratio; and ​ filtering out the CSI in response to determining that any one of the peak quantity, the high peak quantity, or the peak prominence ratio exceeds a respective threshold for any one sub-band.

9. The method of claim 1, further comprising: adapting a first threshold for respiration signal detection or a second threshold for motion detection based on an average inter-packet time.

10. A device (111) for presence detection, comprising: a memory (260) storing instructions; and at least one processor (240) configured to, upon execution of the instructions, cause the device to perform operations comprising: obtaining channel state information, CSI, related to wireless fidelity, Wi-Fi, filtering the CSI to remove radio frequency, RF, interference, detecting motion in a space during a first observation window based on determining whether macro movements are present in the filtered CSI, and in response to detecting the motion in the space, determining whether micro movements and respiration signals are present in the filtered CSI during a second observation window; based on determining that the micro movements and the respiration signals are present in the filtered CSI, providing an indication that the space is occupied; and based on determining that the micro movements and the respiration signals are not present in the filtered CSI, providing an indication that the space is unoccupied.

11. The apparatus of claim 10, wherein, the second observation window is longer than the first observation window.

12. The apparatus of claim 10, wherein, the operations further comprise, based on detecting the motion in the space, providing an indication that the space is occupied, wherein providing the indication that the space is occupied based on identifying that the micro movements and the respiration signals are present in the filtered CSI comprises preserving the indication provided based on detecting the motion in the space.

13. The apparatus of claim 10, wherein, the operations further comprise at least one operation of the method of any one of claims 4 to 9.

14. A non-transitory computer-readable storage medium storing instructions that, when executed by at least one processor (240) of a device (111) for presence detection, cause the device to perform operations comprising: obtaining channel state information, CSI, related to wireless fidelity, Wi-Fi; filtering the CSI to remove radio frequency, RF, interference; detecting motion in a space during a first observation window based on determining whether macro movements are present in the filtered CSI; in response to detecting the motion in the space, determining whether micro movements and respiration signals are present in the filtered CSI during a second observation window; based on determining that the micro movements and the respiration signals are present in the filtered CSI, providing an indication that the space is occupied; and based on determining that the micro movements and the respiration signals are not present in the filtered CSI, providing an indication that the space is unoccupied. the operations further comprise at least one operation of the method of any one of claims 2 to 9.

15. The non-transitory computer-readable storage medium of claim 14, wherein, ​