key: cord-0621838-bne8lykq authors: Korany, Belal; Mostofi, Yasamin title: Nocturnal Seizure Detection Using Off-the-Shelf WiFi date: 2021-03-25 journal: nan DOI: nan sha: 03144d8be9de55151500c1c97b601ef99f2036e8 doc_id: 621838 cord_uid: bne8lykq Detection of nocturnal seizures in epilepsy patients is essential, both for the quick management of the seizure complications, and for the assessment of the ongoing seizure treatment. Traditional seizure detection products (e.g., wearables), however, are either very costly, uncomfortable, or unreliable. In this paper, we then propose to utilize everyday WiFi signals for robust, fast, and non-invasive detection of nocturnal seizures. We first present a new and rigorous mathematical characterization for the spectral content/bandwidth of the WiFi signal, measured on a WiFi device placed near a sleeping patient, during different kinds of sleep motions: seizures, normal movements (e.g. posture adjustments), and breathing. Based on this mathematical modeling, we propose a novel pipeline for processing the received WiFi signals to robustly detect all nocturnal non-breathing movements, and then classify them into normal body movements or seizures. In order to validate this, we carry out extensive experiments in 7 different typical bedroom locations, where a set of 20 actors simulate the state of having seizures (total of 260 instances), as well as normal sleep movements (total of 410 instances). Our proposed system detects 93.85% of the seizures with a mean response time of only 5.69 seconds since the onset of the seizure. Moreover, our proposed system achieves a probability of false alarm of only 0.0097, when classifying normal sleep movements. Overall, our new mathematical modeling and experimental results show the great potential the ubiquitous WiFi signals have for detecting nocturnal seizures, which can provide better support for epilepsy patients and their caregivers. Epilepsy is a neurological disorder that causes a patient to have different kinds of seizures. It has gained a lot of attention in the public health domain since it is one of the most common neurological disorders, causing a large number of people to suffer from persistent health and socioeconomic issues. The World Health Organization (WHO) estimates that 50 million people around the world suffer from epilepsy, as of 2019 [1] . Epilepsy is treated using different Anti-Epileptic Drugs (AEDs), depending on the specific type of seizure it is causing. Assessment of the ongoing seizure treatment requires the caregivers of the patient to continuously monitor and document the seizures (i.e., their frequency and duration). Seizures which take place during night sleep (medically known as Nocturnal Seizures) then pose a higher risk for epilepsy patients, since they can go unobserved by the caregivers [2] . This necessitates the need for in-home seizure monitoring devices that can detect nocturnal seizures in epilepsy patients and alert their B caregivers. The presence of a caregiver during a seizure is also very important so that they can help the patient, prevent them from falling, administer rescue medications (if necessary), and/or call for medical help if the seizure is lasting for too long. Moreover, patients who continue to have unattended nocturnal seizures have a higher risk of death due to the complications caused by the unattended seizures, a condition that is medically known as Sudden Unexpected Death in Epilepsy (SUDEP) [2] . SUDEP has been found to usually follow a specific type of seizures called tonic-clonic seizures, which happens more frequently than other types during sleep [3] . Tonic-clonic seizures are characterized by a tonic phase, in which the body muscles stiffen for a few seconds, followed by a clonic phase, in which the body muscles rapidly and rhythmically jerk for 1-3 minutes [4] . 1 In order to detect nocturnal seizures, several products have been made available, such as smart watches [5] , smart mattresses [6] , and cameras [7] . Smart watches measure the acceleration of the wrist to detect violent jerky movements, while smart mattresses measure the changes in the pressure on the mattress. However, the large cost of these products prohibits their widespread use. For instance, smart watches (e.g., Apple Watch and Embrace2 [5] ), and the MP5 bed motion monitoring unit [6] all cost more than $250 per unit. Moreover, the comfort of patients and the reliability of detection of some of these products have been questioned by several studies, as we shall discuss in Sec. II. On the other hand, Radio Frequency (RF) signals (e.g., WiFi) have become ubiquitous these days, due to the rapid growth of the number of wireless devices. These signals interact and bounce off of different objects in the environment, thereby carrying crucial information about them. Consequently, researchers in the RF sensing community have utilized RF signals to realize various applications, e.g. localization and tracking [8] , imaging [9] , health monitoring [10] , occupancy estimation [11] , activity recognition [12] , and others. In this paper, we propose to utilize RF signals to detect nocturnal seizures in epilepsy patients. Using everyday RF signals, i.e. WiFi signals, for such a task has several advantages. First, it is an affordable solution when compared to the high cost of existing approaches. It is also contactless since it does not require the patient to wear any device or have units installed under their mattress. Moreover, an RFbased system, unlike cameras, does not require any lighting conditions to accurately achieve its task. In this paper, we then propose to use a pair of WiFi transceivers to detect nocturnal seizures. More specifically, we propose a robust, fast, and theoretically-driven approach to process the WiFi Channel State Information (CSI) measured on a WiFi receiver device placed near a sleeping patient, in order to extract their motion information and decide whether the motion indicates a seizure or not. By "robust", we mean that our proposed framework has a very low probability of false alarm, i.e., it has a very low probability of declaring a seizure when there is none, while detecting all the seizures with a high probability. This is important as the sleeping person may have several normal body movements, such as pose adjustments, and they should not be classified as a seizure. By "fast", we mean that our system detects a seizure in a very short time since its onset, in order to alert the caregiver in a timely manner. Finally, by "theoretically-driven", we mean that our proposed approach is backed by a new and rigorous mathematical characterization of the spectral content of the received signal during sleep-related movements: seizure, normal body movements, and breathing. In our setup, a pair of WiFi transceivers (e.g., two laptops) are placed near the patient's bed. The WiFi receiver measures both the WiFi CSI squared magnitude signal and the phase difference between the antennas of the receiver (total of 3 antennas) for the purpose of seizure detection. We then propose a new mathematical characterization for the spectral content of the received WiFi signal during motions relevant to sleep, i.e., seizure, normal sleep movements, and breathing, and show how our spectral analysis can be used to design a new and robust seizure detection pipeline. We next explicitly discuss the contributions of this paper. Statement of Contributions: 1. We develop a novel and rigorous mathematical model for the received CSI squared magnitude signal as well as the CSI antenna phase difference during different kinds of motions relevant to sleep: seizure, normal body movements, and breathing. More specifically, we first show that both the WiFi CSI squared magnitude and phase difference signals are frequency-modulated by the body motion. We then show our main theoretical contribution: to mathematically characterize the spectral content/bandwidth of the WiFi CSI signal during the aforementioned motions. Based on this new spectral analysis, we then show that the bandwidth of the received WiFi signal can be used to robustly and efficiently differentiate seizure events from normal sleep movements. 2. Based on our theoretical analysis, we propose a new pipeline for the detection of nocturnal seizures using WiFi CSI, which consists of the following 3 steps. First, our data pre-processing pipeline denoises the raw measured CSI and selects the least noisy data streams of different receiver antennas/subcarriers using our spectral analysis findings. Then, our event detection algorithm detects any kind of non-breathing motion, based on the spectral content of the denoised CSI. Finally, an event classification algorithm decides whether a detected event is a seizure or normal body movement, based on the bandwidth of the WiFi signal during the event. 3 . In order to validate our proposed framework, we carry out extensive experiments on 20 test subjects (5 females and 15 males) in 7 different locations of typical bedrooms, where the subjects act out seizures and normal sleep movements while we collect WiFi CSI data. In total, we collect 260 different seizure instances and 410 different normal non-breathing sleep movement instances. Our system was able to detect 93.85% of the seizures with an average response time of 5.69 seconds since the onset of the seizure, which is much less than the state of the art, as we shall see in Sec. VII. Moreover, in terms of false alarm rate (the probability that a normal sleep event is classified as seizure), our system had a false alarm probability of 0.0097, which indicates its robust performance. We further study the impact of varying several different parameters (e.g., TX/RX positions) on the performance of our proposed system. Overall, our results establish that our proposed mathematically-motivated system is fast and robust and is also independent of person's pose/orientation. As we shall see, our derivations can also contribute beyond seizure detection, in the general area of breathing-based RF sensing, since they show that a common assumption regarding the frequency content of the received signal during normal breathing is not always correct, explaining some of the unexplained observations in the corresponding literature. Remark 1: In this paper, we use the term normal sleep events to refer to normal non-breathing body movements during sleep, such as pose adjustments, stretching, scratching, coughing, sneezing, jerking, and others. To the best of our knowledge, this work is the first to use RF signals for seizure detection. In this section, we summarize the state-of-the-art related to different aspects of our problem of interest. There has been a great body of work on utilizing wireless signals for vital signs monitoring, e.g. using high-bandwidth radar [13] , mmWave [14] , or WiFi. In this paper, we are interested in utilizing off-the-shelf WiFi devices for seizure detection. Several papers have utilized the fine-grained WiFi CSI magnitude data for breathing rate and/or heart rate estimation [15] , [16] . Other researchers utilized the CSI phase difference between receiver antennas to achieve the same task [17] , [18] . None of such RF-based existing work, however, is on seizure detection. Nevertheless, our findings can have a significant impact on such work for the following reason. All the existing WiFi CSI-based breathing rate estimation work assume that the bandwidth of the received CSI signal, in the vicinity of a person who is breathing normally, is the same as the breathing rate. In order for us to develop a robust nocturnal seizure detection system, we also need to fundamentally understand and characterize the spectral content of normal breathing in this paper. As we shall see, using our proposed rigorous mathematical analysis, the bandwidth of the WiFi signal caused by normal breathing is not necessarily the same as the breathing rate and can be higher. As such, this paper can contribute to the ongoing research that is using breathing signals for other health monitoring applications. In fact, our mathematical analysis can immediately explain the observation made in [16] that the quality of the breathing rate estimation, which was designed assuming the signal bandwidth is the same as the breathing rate, degrades at some locations relative to others. Similarly, it can explain the unexplained frequency peaks that were observed in [19] and were attributed to noise. In-home seizure detection is an important topic that has gained a lot of attention in the research community. Most seizure detection algorithms in the literature rely on the detection of the motion of the clonic phase of the tonicclonic seizure via accelerometry [20] , [21] , [22] , and/or video analysis [23] , [24] . In accelerometry, a wearable accelerometer is attached to one or more of the patient's body parts, such as wrist, ankle, and/or chest. In addition to their high cost, wearable devices are usually not well tolerated by certain groups of patients, such as children and people with intellectual disabilities, who usually try to dislodge the devices [24] . Furthermore, the authors of [25] concluded that commercial wrist-worn watches have a seizure detection accuracy of 89.7%, which is not very high. Video-based seizure detection has shown good detection accuracy of more than 95%, but with a high false alarm rate of 0.78 events per night [24] , [23] . However, video-based detection requires a clear unobstructed view of the patient with good lighting conditions, which may not always be possible, and further invade the patient's privacy. Overall, an accurate, non-invasive, comfortable, and affordable way of detecting nocturnal seizures is lacking, which is the main motivation for this paper. People engage in different kinds of normal non-breathing movements during sleep, such as posture adjustments and limb jerks. An important aspect of our proposed system is to minimize false alarms by identifying such normal events and distinguishing them from seizure events. Hence, we utilize some of the results of the sleep analysis medical literature in order to design our system. For instance, [26] , [27] study the duration and rate of normal events during sleep, using accelerometry and video analysis, concluding that these events typically happen at a rate of 3 events per hour, last for an average of 8 to 10 seconds, and can go up to 15 seconds. The authors of [28] have published an online dataset of accelerometry data of 31 healthy adults during their sleep. We shall utilize such results/data in this paper for our spectral analysis of WiFi signals during normal sleep. In this section, we develop a mathematical model for the received WiFi CSI in a general setting, an example of which is shown in Fig. 1 . More specifically, a person is lying down on a bed in any generic pose while a WiFi transmitter (Tx) emits wireless signals that are reflected off of the person's body and received by a WiFi receiver (Rx). We first derive closed-form expressions for the WiFi CSI squared magnitude and the WiFi CSI phase difference signals, during a generic motion pattern of the body, in this part. In Sec. IV, we then use this model to provide a new and rigorous mathematical analysis of the spectral content of the WiFi signals during specific kinds of sleep motions relevant to this paper, i.e., breathing, seizures, and normal sleep movements. Let c(t) denote the complex baseband received signal at the Rx, which can be decomposed into the direct path from the Tx to the Rx, and the reflected path off of the person's moving body. More specifically, c(t) can be written as [8] where α d and µ d are the amplitude and phase of the direct path from the Tx to the Rx, α r is the amplitude of the reflected path arriving at the Rx, µ r is the phase of the reflected path at time t = 0, ψ = 2 cos(φ) is a scale parameter that depends on the location of the bed/person with respect to the Tx and Rx. Consider the ellipse whose foci are the Tx and Rx, which passes through the person's body, φ is then the angle between the line connecting the person to the Tx (or Rx) and the perpendicular line to this ellipse at the point that it passes through the person's body (see Fig. 1 ). v(t) is the instantaneous speed component of the body motion along the perpendicular line to the ellipse, and λ is the wavelength. Note that the value of ψ depends on the scene configuration, i.e., the relative location of the bed with respect to the Tx and Rx, and does not depend on the person's posture and orientation while sleeping. In other words, if the width of the bed is small as compared to the Tx-Rx distance, or the person does not drastically move from one side of the bed to the other (which is common in practice), the sleeping person's general location with respect to the Tx and the Rx does not drastically change, and hence, ψ can be taken as a constant and can be calculated only once upon Tx-Rx placement. The person can change their pose/orientation several times, but those movements will not affect the value of ψ. For simplicity of notation, we define β = 2πψ λ , and d(t) = v(t)dt. Hence, the phase of the reflected path at the Rx becomes µ r + βd(t). Next, we derive closed-form expressions for the squared magnitude and phase of c(t) to understand the information they carry about the body's motion. Remark 2: The static multipath in the environment does not affect this analysis since all the static multipath can be integrated into the first term of Eq. 1. This indicates that the performance of the system is agnostic to the deployment environment. This observation will be further validated by our extensive experiments in several different locations and realworld scenarios, as we shall see in Sec. VII. Squared Magnitude of c(t): The squared magnitude of c(t) can be written, after a straightforward derivation, as follows, where A m = 2α d α r , and ∆µ m = µ r − µ d is the difference between the initial phase of the reflected path and the phase of the direct path. Since the DC component of |c(t)| 2 does not carry any information about the motion of the body, we subtract the DC term (which can be easily implemented in practice) to have the following, For the ease of discussion, we then refer to s m (t) as the squared magnitude signal in the rest of the paper. Phase of c(t): Without loss of generality, we analyze the phase of the scaled signal c ′ (t) = e −jµ d c(t)/α d . This scaling shifts the phase of c(t) by a constant amount, preserving the timevarying behavior of the phase of c(t) which carries the motion information of the body. Let θ(t) be the phase of c ′ (t). It is easy to confirm that Due to its longer length and the reflection loss at the body, we can assume that the amplitude of the reflected path is much less than that of the direct path, i.e. αr α d ≪ 1. In such a case, θ(t) can be approximated as where the first order Taylor approximation In practice, the phase measurements on off-the-shelf WiFi devices are corrupted by multiple sources of error, such as Carrier Frequency Offset (CFO) and Sampling Time Offset (STO), rendering these phase measurements unreliable [29] . However, since different antennas of the same WiFi card share the same oscillator, those errors are common to all the antennas of the same card, and as such, the phase difference between two antennas of the same card carries stable phase information, as has been used in the literature. In this paper, we also rely on the phase difference between the antennas of one receiver WiFi card. Let θ i (t) be the phase of the CSI at the i-th antenna of the Rx. The phase difference between the i-th and j-th receiver antennas can then be written as where A p = 2(α r /α d ) sin (0.5(∆µ m,i − ∆µ m,j )), ∆µ p = 0.5(∆µ m,i + ∆µ m,j ), and ∆µ m,i and ∆µ m,j are the values of ∆µ m at the i-th and j-th receiver antennas, respectively. Eq. 6 shows that as long as ∆µ m,i = ∆µ m,j (which depends on the direct and reflected path lengths to the receiver antennas as well as the wavelength), the phase difference between the receiver antennas has a similar structure, in terms of the information it carries about the body movements, as the squared magnitude of the received signals (Eq. 3). Body Acting as an FM Radio: Frequency Modulation (FM) is a classic analog transmission technique, introduced in 1902 [30] , to ensure robust transmissions for radio applications. A typical FM transmitted signal will have the form is the signal of interest to be transmitted, f c is the carrier frequency, and k f is the modulation index constant. As can be seen, both the squared magnitude signal of Eq. 3 and the phase difference signal of Eq. 6 can be interpreted as FM signals, in which v(t) is the modulating signal and f c = 0. In other words, the moving body part (e.g., the chest) can be thought of as modulating the body motion into an FM signal that is then received by the WiFi receiver. This way of interpretation allows us to delve into the classic mathematical analysis of FM signals for our system design, as we shall see in the next section. However, one difference with a typical FM signal is the existence of the ∆µ m term in Eq. 3 (or ∆µ p in Eq. 6). We shall see the impact of such a term in the spectral analysis of the next section. In this section, we analyze the received squared magnitude signal (or, equivalently, the phase difference signal) of Sec. III, for different kinds of nocturnal body movements: breathing, seizures, and normal sleep events (e.g., posture shifts, moving limbs, etc.). More specifically, we develop our first major contribution: to mathematically characterize the spectral content/bandwidth of the received signal for each of the aforementioned three types of motions. We shall see that, due to the different body motion characteristics during a seizure as compared to normal sleep events, the spectral content of the received signals can be used to design a robust nocturnal seizure detection system, as we shall see in Sec. V. Let y(t) = A cos(β v(t)dt + ∆µ) represent a general form for either the squared magnitude signal of Eq. 3 or the phase difference signal of Eq. 6. First, assume that v(t) is a sinusoidal signal of the form v(t) = v max cos(ω o t). This assumption applies to both the seizure and respiration cases. The following characterizes the Fourier response of y(t). The spectrum of this signal, i.e., its Fourier transform, can be written as follows, where J n (.) is the n-th order Bessel function, where β ′ = βv max /ω o , R{.} is the real part of the argument, and I{.} is the imaginary part of the argument. The exponential term e jβ ′ sin(ωot) is periodic with a period 2π/ω o , and can be expanded by its Fourier Series as [31] where J n (.) is the n-th order Bessel function. By substituting Eq. 9 into Eq. 8, we get By making use of the fact that J −n (x) = (−1) n J n (x), y(t) can be written as By taking the Fourier transform of y(t), we get Eq. 7. Theorem 1 states that the spectrum of y(t) consists of an infinite number of deltas, located at the fundamental frequency of v(t) and its harmonics. We next characterize the bandwidth of this signal. In order to do so, we need to find the frequency point after which the power of the subsequent delta functions has become negligible, as compared to the earlier terms. Theorem 2. The bandwidth of y(t) can be characterized as follows, for β ′ ≥ 1, where f o is the fundamental frequency of v(t). Moreover, for β ′ < 1, the bandwidth of y(t) is best characterized as follows, Proof. It is well established in the literature that J n (β ′ ) is negligible for n > β ′ + 1 [31] . By applying this to Eq. 7, we can then estimate the bandwidth as follows: BW = (β ′ +1)f o for β ′ ≥ 1 since some even and odd terms are both present for β ′ ≥ 1 and terms can be compared accordingly within each even and odd groups. When β ′ < 1, however, the previous result implies that the term n = 1 is the only dominating term in the spectrum of y(t). However, due to the different scaling factors of the even and odd terms in Eq. 7, there could exist cases (e.g., small ∆µ) where the term corresponding to n = 1 is suppressed by the sin(∆µ) factor. In such cases, even though J 2 (β ′ ) is small as compared to J 1 (β ′ ), cos(∆µ)J 2 (β ′ ) can be comparable or larger than sin(∆µ)J 1 (β ′ ). Higher order terms can always be neglected with respect to the first two terms. Hence, the bandwidth of y(t) for the case of β ′ < 1 is 2f o . Remark 3: In his seminal paper of [32] , J. Carson was the first to theoretically characterize the bandwidth of an FM signal and show that it can be larger than the bandwidth of the modulating signal. Carson has shown that his bandwidth rule is exact for sinusoidal modulating signals, but can be generalized to approximate the bandwidth for general nonsinusoidal modulating signals as well. As mentioned earlier, our received signal y(t) has a close resemblance to an FM signal, except for the ∆µ terms. As such, our bandwidth analysis has some resemblance to Carson's derivations except for the impact of ∆µ. Following a similar argument to Carson's, we will then also use Theorem 2 to approximate the bandwidth of y(t) when v(t) is a general non-sinusoidal signal in the next section. In such a case, f o would denote the bandwidth of the signal v(t). Theorem 2 states that the bandwidth of y(t) depends on motion parameters such as v max and f o (or the bandwidth of v(t) for non-sinusoidal signals). We next utilize Theorem 2 to estimate the bandwidth of the WiFi CSI 2 during three specific kinds of sleep-related motions: breathing, seizure, and normal sleep movements. A sleeping person's chest volume expands and shrinks during the inhalation and exhalation phases of respiration. It is established in the literature that the instantaneous chest speed, i.e., v(t) of Sec. III, can be approximated by a sinusoid of frequency f o,br , where f o,br is the number of breathing cycles per second [33] . As such, Eq. 7 can describe the spectrum of the WiFi signal during breathing. In order to characterize the bandwidth for the case of normal breathing, we need to estimate β ′ br = ψvmax,br λfo,br , where f o,br is the breathing rate of the person, which is typically in the range of 0.2 to 0.3 Hz [34] . By integrating v(t), it can be easily confirmed that v max,br /2πf o,br is equal to the maximum chest displacement during respiration, which has been reported in the literature to be around 5 mm [16] . This results in β ′ br ≈ 0.55 when using WiFi channel 48, which has a carrier frequency f c = 5.24 GHz, and ψ = 1. 3 By using Theorem 2, we can then estimate the bandwidth of the received WiFi CSI during normal breathing as BW br = 2f o,br . Note that if the maximum chest displacement is not along the perpendicular line to the ellipse whose foci are the Tx and Rx (see Fig. 1 ), e.g., if the person is in a different pose, the chest speed will have a smaller velocity component along that line (i.e. smaller v max,br ). In such a case, the value of β ′ will be even smaller and thus still less than 0.55. Thus, according to Theorem 2, the bandwidth still remains BW br = 2f o,br for all the cases. It is worth noting that the previous literature on breathing monitoring using WiFi signals (either magnitude [35] , [15] , [33] or phase difference [17] ) assume that the received WiFi signal rises and falls with the same frequency as the rise and fall (inhalation and exhalation) of the chest during the breathing process. Hence, they assume that the received signal has the same spectral content/bandwidth as that of the physical chest motion (i.e. they take BW br to be f o,br ). However, Theorem 2 shows that the received WiFi signals can have a spectral content that is different from the physical breathing rate, depending on the value of ∆µ, with a maximum bandwidth of 2f o,br . To see this in effect, Fig. 2 shows the phase difference of the measured WiFi signals between the Rx antennas in a sample experiment, where a person was breathing with a frequency of f o,br ≈ 0.18 Hz. It can be seen that while the measured phase difference between antennas 3 and 1 of the Rx has a sinusoid-like pattern similar to that of the breathing motion, the phase difference between antennas 2 and 1 (due to having a different ∆µ) is experiencing a different pattern, which has a strong frequency component at 2f o,br . As described earlier, a tonic-clonic seizure consists of a tonic phase, in which the body muscles stiffen for a few seconds, immediately followed by a clonic phase, which is a strong, fast, and repeated stiffening and relaxing of the body muscles that can last for 1 to 3 minutes [4] . Several medical studies have been conducted to analyze body motion during a tonic-clonic seizure through data obtained by accelerometry. These studies have found that during the clonic phase of a tonic-clonic seizure, the body muscles rhythmically stiffen and 3 In our experiments, we use WiFi channel 48 (fc = 5.24 GHz) in a setup in which ψ ≈ 1 (see Sec. VI for the detailed scene configuration). Extension to different values of ψ is straightforward, as we shall discuss in Sec. VII-B where we show experiments with different ψs. Hence, we set λ = 5.72 cm and ψ = 1 for our numerical calculations in the rest of the paper up to Sec. VII-B. relax with a frequency f o,sz between 1.5 and 5 Hz [36] , [37] , [20] , thus making a sinusoid a good approximation for v(t). Therefore, Eq. 7 also characterizes the frequency spectrum of the WiFi CSI during a seizure. In order to find the value of the parameter v max , and thus β ′ , we have looked extensively into the medical literature on seizures. Several papers have found that the maximum acceleration, a max , of the body parts during a tonic-clonic seizure typically exceeds 15 m/s 2 [21] , [22] . Since v(t) is sinusoidal, then v max,sz = amax 2πfsz , and a lower bound for the value of v max,sz can be calculated as v max,sz ≥ 15 2π×5 = 0.48 m/s. Based on the aforementioned seizure motion parameters, one can estimate a lower bound for the bandwidth of the WiFi CSI during a seizure using Theorem 2 as BW sz = (β ′ sz + 1)f sz = ψvmax,sz λ + f o,sz . More specifically, by using WiFi channel 48 and ψ = 1, v max,sz = 0.48 m/s and f o,sz = 1.5 Hz, a lower bound for the bandwidth of the WiFi signal during the seizure is estimated as BW sz ≥ 9.9 Hz. Note that the aforementioned characterization of the CSI bandwidth during a seizure assumes that the motion of at least one body part is aligned with (or has a strong component on) the perpendicular line to the Tx-Rx ellipse of Fig. 1 . This assumption is practical since the uncontrolled muscle jerks during the seizure result in the body parts moving randomly in all different directions. Moreover, it has been shown in the medical literature that a patient's body posture can change to many different positions during a seizure [38] . Therefore, there will at least be one body part whose motion direction is aligned with the perpendicular line to the Tx/Rx ellipse. It is worth stressing that the traditional assumption that the WiFi signal rises and falls with the same frequency of the body motion will result in a bandwidth estimation of BW sz = f o,sz , which is far off from the true bandwidth during a seizure. We next delve into the medical literature on sleep motion analysis in order to characterize the parameters relevant for signal bandwidth characterization during normal sleep events, such as position adjustments and jerking in limbs, which people tend to make during different stages of sleep. It is found that these normal sleep events occur at an average rate of 3 events per hour [27] , and can last for up to 15 seconds each [26] . Furthermore, other studies have performed time-frequency analysis of the accelerometry data of normal sleep and established that most of the power of normal sleep event signals (e.g. v(t)) is concentrated below f o,nm = 2 Hz [39] . While v(t) is non-sinusoidal, and no exact closed-form expression exists for the spectrum of the CSI signals for a general v(t), Theorem 2 can still be used to approximate the bandwidth of the WiFi CSI, as discussed in Remark 3. In order to calculate an upper bound for the WiFi CSI bandwidth in case of normal sleep events, we focus on wrist movements during sleep, which can have higher speeds due to its relatively lower mass as compared to other body parts. We utilize the online dataset published by the authors of [28] for the accelerometry data of 31 adults during their sleep, collected from wrist-worn Apple watches. By integrating this acceleration data over time, we get the instantaneous speeds of the wrist during sleep. We then use the 99-th percentile value of the speeds calculated from the dataset, which is found to be 0.33 m/s, as an estimate for the maximum possible speed of body parts during normal sleep events. 4 To estimate an upper bound for v max during normal sleep events, we assume that the body part with the fastest motion is aligned with the perpendicular line to the Tx-Rx ellipse of Table I summarizes the results of our WiFi CSI bandwidth analysis during the three considered nocturnal movements: breathing, seizure, and normal sleep events. It can be seen from the table that the bandwidth of the WiFi signal during a movement can be used as a distinguishing feature that differentiates seizures from normal sleep events. We make use of this observation to design a robust nocturnal seizure detection system in the next section. In this section, we describe our proposed framework for nocturnal seizure detection using WiFi CSI signals based on the mathematical analysis of Sec. IV. Fig. 3 shows the block diagram of our proposed system, which starts by preprocessing the WiFi CSI input data to denoise the measured CSI signal and extract the part that carries the information about the human motion. Then, the denoised signal is passed to an event detection module, which decides whether the person is moving or is staying still. In case a movement event is detected (other than breathing), the CSI data during the event is then forwarded to an event classification module, which determines whether this event is a normal sleep event or a seizure. In the latter case, the system alarms the caregiver to take the necessary action. We next describe each of these components in details. As discussed in Sec. III, we utilize both the CSI squared magnitude and phase difference since they both carry crucial information about the body motion. In this paper, we consider off-the-shelf WiFi devices that can be used to extract the complex WiFi CSI information, e.g. Intel 5300 or Atheros AR9580 WiFi cards. In any of these devices, the receiver has N R receiver antennas, which measure the WiFi CSI information on N sc subcarriers. Therefore, we extract a total of N R ×N sc CSI squared magnitude streams, and (N R −1)×N sc phase difference streams (i.e. the phase difference between each antenna and antenna 1, for all the N sc subcarriers). In total, we get N D = (2N R − 1) × N sc data streams that can be used to extract the motion information. The Intel 5300 WiFi card, for instance, has N R = 3 receiver antennas and N sc = 30 subcarriers, resulting in a total of N D = 150 data streams carrying the motion information of the body. We next show how we process these N D data streams to extract the informative part about the body motion. Outlier Removal: We use the Hampel identifier [15] to remove the sudden and very short abrupt changes that happen in the data streams due to hardware imperfections [15] . Stream Selection: Different subcarriers on the same Rx antenna have different carrier frequencies (or wavelengths), and consequently, they undergo different levels of fading, making some subcarriers noisier than others. To enhance the system's robustness, it is then important to select only the most informative/least noisy data streams to be subsequently used in the rest of the seizure detection algorithm. In order to do so, we use the data of a short calibration period, in which the sleeping person is only breathing and not doing any movements or having a seizure. This one-time calibration can be easily administered by a caregiver prior to system deployment, and recalibration can be done as needed. The stream selection algorithm works as follows. Since the calibration period is known to have only breathing motion, the CSI data contains frequency components only in the band f ≤ BW br , where BW br is the maximum bandwidth for WiFi CSI during breathing, which we have shown in Sec. IV to be 2f o,br . Any frequency content above BW br is thus due to noise. Hence, given all the data streams in a calibration window of duration T cal , we calculate the Signal-to-Noise Ratio (SNR) of the i-th data stream as follows where S i (f ) = | t s i (t)e −j2πf t | 2 , s i (t) is the i-th data stream, BW br = 2f o,br , and f o,br is the maximum normal breathing frequency, which is equal to 0.3 Hz in adults. We then select the K data streams with the highest SNRs from the calibration data, and use only this set of streams in the operation phase until after a major event happens (for instance, a seizure). The system can then re-calibrate by processing all the data streams again and re-selecting the new top K streams in terms of SNR in the new person's pose/orientation. For the implementation of our system (see details in Sec. VI), we set T cal = 13 sec and K = 15. PCA denoising: After extracting the set of the best K data streams, we further denoise these streams during operation phase using Principal Component Analysis (PCA) as described in [40] . More specifically, we extract the first principal component p(t) of the data, which carries the motion information since it is common to all the data streams, while the noise is distributed among all the different principal components [40] . In order to show the performance of the preprocessing module, we conduct an overnight sleep experiment, where WiFi transceivers are placed on both sides of a bed on which a subject sleeps. An accelerometer is attached to the upper right arm of the subject to collect ground truth sleep motion data. Fig. 4 shows a 4-hour snippet of the processed WiFi data p(t) as well as the accelerometer output during the same period. A 13-second calibration period is chosen right after the subject goes to sleep and the selected streams are then used for the rest of the night. It can be clearly seen that the preprocessed WiFi data p(t) carries the same motion information as the accelerometer. In the right part of the figure, we zoom in to one of the movements, where the breathing signal, as well as the motion, can be clearly seen in the WiFi data. As described in the previous section, the data pre-processing module outputs a signal p(t) which is the denoised version of the CSI measurements at the receiver. This signal is then fed to an event detection module. By "event", we mean the state of the sleeping person engaging in any kind of nonbreathing movement. More specifically, the movement can be normal sleep events, e.g., posture adjustments, or abnormal, e.g. a seizure. The nature of the event (whether it is normal or abnormal) will be decided in a later stage, which we shall describe in Sec. V-C. In order to detect an event in the signal p(t), we use a moving window of duration T ED win . If the person was only breathing during an instance of the moving window, the signal p(t) during that window will have a frequency spectrum that is concentrated below BW br , as discussed in Sec. V-A. On the other hand, if the person engages in any type of non-breathing movement, the signal p(t) within the time window will have non-negligible frequency content above BW br . Therefore, we can utilize the energy content of the spectrum of p(t) above the frequency BW br to indicate the presence of an event. More specifically, let H 1 denote the hypothesis of having an event, and H o denote otherwise. To decide if there is an event at time t = τ , we use the decision rule where w(t, τ ) is a rectangular window of length T ED win ending at time t = τ . Note that due to the time-windowing of the signal p(t), the frequency spectrum of the windowed signal is that of the original signal convolved with a sinc function, which increases the bandwidth of the signal by an amount of 1/T ED win . Hence, the value of BW br is adjusted to be BW br, adj = 2f o,br + 1/T ED win , where f o,br is the maximum normal breathing frequency. 5 In order to determine the value of γ th , we utilize the processed data of the calibration period (whose duration is T cal ) described in Sec. V-A to evaluate the following, where p c (t) is the processed data of the calibration period. σ 2 c is then the maximum energy content of the calibration data above BW br,adj , which is an estimate of the noise power in the band of f > BW br,adj when there is no event. We then set γ th = q σ 2 c , where q is a design parameter. The zoomed-in part of Fig. 4 shows a sample normal sleep movement from a sleeping subject. The vertical red dashed line shows the start of the detected event using our proposed event detection module, while the vertical red dashed-dotted line shows its end. It can be seen that our event detection module was able to accurately localize the start and the end of the event. Once an event has been detected, the processed data p(t) during the event is then passed to an event classification module that determines whether this event is normal or abnormal. As discussed in Sec. IV, the duration of a seizure is usually longer than that of any normal event. However, relying solely on event duration for deciding whether the event is a seizure or not induces an unfavorable delay in the system response, as the system would have to wait for a relatively long period of time before declaring an event as a seizure, which can lead to undesirable complications for the patient. It is then crucial to analyze the detected events in terms of their frequency content, using the analysis and parameters derived in Sec. IV, in order to have an early and robust detection. We next describe our event classification algorithm. First, any event whose duration is less than a tolerable value T min is declared as a normal event. This step is important to avoid the unnecessary computational overhead of analyzing very short events, such as sleep jerks or very quick limb movements, since it is almost impossible for a tonic-clonic seizure to have such a short duration [37] . It is noteworthy that this comes at the expense of a small delay in the response time, since a seizure would only be declared at least T min after its onset. As a design choice, we set T min = 5 sec for our system implementation. We will show the effect of varying T min on the system performance in Sec. VII. For the rest of the events (whose durations are larger than T min ), let p e (t) denote the processed CSI measurements during the event. We divide p e (t) to consecutive overlapping windows of length T EC win , and estimate the bandwidth of p e (t) as the median of the bandwidths of the signals in the overlapping windows. More specifically, the bandwidth of p e (t) is estimated as where w ′ (t, τ ) is a rectangular window of length T EC win ending at t = τ , and the quantity inside the braces is the 90-th percentile bandwidth of the signal within the window ending at t = τ . For an ongoing long event, the bandwidth B pe is updated by adding more time windows of the new data to the calculation of Eq. 13. This method of estimating the bandwidth of the signal p e (t) is favorable for real-time operation, since it requires a fixed-length FFT operation for a window of size T EC win to update the bandwidth of an ongoing event. We declare a seizure if the bandwidth B pe exceeds a threshold f th . By using the spectral analysis of Sec. IV and the corresponding bandwidth calculations of Table I , we set f th = 9.9+7.8 2 = 8.85 Hz, since this value optimally separates the bandwidths of the WiFi signal during seizures from the ones during normal events. We will study the effect of changing f th on the system performance in Sec. VII. In this section, we describe the experimental setup we shall use as a proof-of-concept for our proposed seizure detection system. Experimental Setup: For the WiFi CSI data collection, we use two laptops equipped with Intel 5300 WiFi cards. One of the laptops (the Tx) transmits WiFi packets at a rate of 200 packets per second on WiFi channel 48, which has a carrier frequency of 5.24 GHz. The other laptop (the Rx) uses CSItool [41] to measure the CSI data of 30 WiFi subcarriers on 3 Rx antennas. The CSI magnitude data and the phase difference data with respect to antenna 1 (i.e. θ 2 (t) − θ 1 (t) and θ 3 (t) − θ 1 (t)) are then logged and processed offline using MATLAB. We collect the WiFi data in 7 different dorm rooms/bedrooms (some of which are shown in Fig. 5 ). In all the locations, we start by placing the Tx and Rx on two different sides of the bed on which the test subject lies down (with Tx-Rx distance of ∼ 2.5 m). The antennas of the Tx and Rx are both elevated by 70 cm above the bed level. We then study the impact of different Tx/Rx configurations in Sec. VII. Note that for the Rx, external tripod-mounted antennas may be used in order to make the Rx at the same height as the Tx. This configuration for the relative positioning of the Tx, the Rx, and the bed results in ψ ≈ 1 (the angle φ in Fig. 1 is ∼ 60 • ), independent of the person's pose or orientation on the bed. Test Subjects and Experiment Protocol: We recruited a total of 20 student actors (5 females and 15 males) to participate in our experiments, where each subject participates in one or more of the experimental locations. In total, the number of subjects participating in each of the 7 locations are 11, 6, 4, 2, 1, 1, and 1 subjects, respectively. 6 Each participant was consensually trained on how to simulate a tonic-clonic seizure and shown public online YouTube videos explaining how tonic-clonic seizures look like. It is worth noting that seizure acting is a common practice in medical schools, where healthy persons (known as standardized patients) are recruited to act out different medical conditions to provide introductory training opportunities for medical students [42] , [43] . Hence, testing a system on simulated seizures is an important step towards more advanced clinical trials. For each subject, the receiver starts logging the CSI data when the subject is in a sleep state (only breathing and in any generic position) for at least 15 seconds (part of which to be used as one-time calibration data). Then the subject starts simulating seizures and normal sleep movements. Each seizure instance is simulated for at least 20 seconds. 7 In total, each participant does 10 seizure simulations per location, resulting in a total of 260 independent instances of seizure data across all the locations. Similarly, each subject performs several normal non-breathing sleep movements spontaneously in each experiment. By observing the subjects' movements, they included posture adjustments (e.g. switching from lying on their side to lying on their back), limb-only movements (e.g. stretching or tucking the knee), scratching, stretching, coughing, sneezing, and sleep jerks. Overall, we collected a total of 410 independent normal sleep events from all subjects in all the locations. 8 Performance Metrics: We test the performance of our system according to the following two performance metrics: Algorithm Parameter Values: We set the following values for different algorithm parameters, T cal = 13 sec, T ED win = 2 sec, T EC win = 4 sec, T min = 5 sec, K = 15, and q = 2. The optimum classification threshold, f th , is then found based on our proposed mathematical framework to be f th = 8.85 Hz, as shown in Sec. IV. It is worth stressing that this threshold is found based on our rigorous theoretical characterization of the bandwidth, and not based on empirical data. The effect of varying some of these parameters on system performance is shown in Sec. VII. 7 An actual tonic-clonic seizure can last for 1 to 3 minutes. However, it is a physically-challenging task for a healthy person to simulate it for such a long time. 8 Sample data files and detection/classification codes are available in this URL https://doi.org/10.21229/M9ZT09 In this section, we present the performance evaluation results of our proposed seizure detection algorithm. For the seizure data instances in all the locations, our proposed system was able to detect 244 out of the 260 seizures, resulting in a seizure detection rate (SDR) of 93.85%. It is worth noting that the event detection module was able to detect all the 260 seizures. However, the event classification module misclassified 16 out of the detected 260 events. Fig. 6 (left) shows the CDF of the response times of the detected seizures, showing that our system achieves a Mean Response Time (MRT) of 5.69 sec. Such an early detection is important for the caregiver to provide the needed medical assistance as soon as possible. In terms of locations, the seizure detection rate in the 7 locations was 93.6%, 95%, 90%, 90%, 100%, 100%, and 100%, while the mean response time in the 7 locations was 5.8, 5.8, 5.68, 5.58, 5.65, 5 and 5.1 sec, respectively. This shows that the system's performance is insensitive to the deployment environment, since the static multipath does not affect the information-bearing parts of the received WiFi signal, as discussed in Remark 2. In terms of normal events, our event detection module was able to detect 406 out of the 410 normal events. It is worth noting that it is irrelevant if the system misses some normal events, as the main purpose of the system is seizure detection with as few false alarms as possible. Out of the detected normal events, only 4 events were incorrectly classified as seizures, resulting in a probability of false alarm P FA = 0.0097. Fig. 6 (right) shows the densities of the measured bandwidths of the WiFi signals during seizure events as well as normal sleep events. The distributions of the bandwidths show a clear gap in the band of 7-9 Hz, which validates the theoretical bandwidth characterization of Sec. IV. Processing time: It takes 18 ms, on average, to process one second of collected data, using our algorithm of Sec. V. Comparison to state-of-the-art: [44] provides a survey for in-home tonic-clonic seizure detection algorithms that use different modalities, e.g. accelerometry, mattress units, and video, to detect tonic clonic seizures on real epilepsy patients. Table II compares the performance of our proposed system to the performance of the different detection techniques reported in the survey of [44] , as well as other multimodal seizure detection papers. Overall, our results show the robustness of our proposed system, in terms of achieving a very good seizure detection rate, probability of false alarm, and a fast average response time of 5.69 seconds to detect a seizure, while being non-invasive, and privacy preserving. We note that part of the contribution of this paper was also to develop a new mathematical model that can enable seizure detection using WiFi signals, while most of the existing work is mainly either testing an existing product, or utilizing straightforward modalities, e.g. accelerometry. Furthermore, our approach is the only privacy-preserving one that is also non-invasive. While our results are based on simulated seizures, they constitute a strong proof-of-concept for our proposed idea/mathematical models, which shows how RF signals (e.g. WiFi) can be used as a non-invasive, robust, and affordable alternative for nocturnal seizure detection. Hence, our proposed algorithms serve as a basis for a system that can be subsequently tested in clinical settings, towards the ultimate goal of making such technology available to the public. Based on our theoretical analysis of Sec. IV, we concluded that a threshold of f th = 8.85 Hz optimally separates the bandwidth of the WiFi signals during normal sleep movements from that during seizures. In this section, we study the effect of varying f th , while keeping all other system parameters at their default values. Fig. 7 (left) shows (1-SDR) and P FA as a function of f th . It can be seen that SDR decreases (becomes worse) when increasing f th , since more seizure events can go undetected due to their bandwidth being less than the higher f th . On the other hand, increasing f th improves P FA , since it becomes less likely for the bandwidth of the WiFi signal during a normal sleep event to exceed a higher f th . We can see that the mathematically-driven value of 8.85 Hz strikes a good balance between SDR and P FA . Next, we study the effect of varying T min , which is the minimum duration for an event to be passed to the event classification module. Fig. 7 (right) shows MRT and P FA as a function of T min . Expectedly, increasing T min increases MRT, since a higher T min means that the event classification module (which determines whether the event is a seizure or not) is not activated for a longer time after the seizure onset. On the other hand, increasing T min improves P FA , since a higher portion of the normal events are declared normal by default due to their short duration. It can be seen that the chosen value of T min = 5 sec strikes a good balance in the MRT-P FA tradeoff. It is worth noting that SDR does not change as a function of T min in Fig. 7 , and as such is not plotted. For all the previous results, we considered a setting (henceforth denoted by C#1) where the position of the Tx/Rx with respect to the bed resulted in a value of ψ ≈ 1 (see Fig. 5 ). In this section, we test our system with different Tx/Rx positions resulting in different ψs. Based on our analysis of Sec. III, ψ impacts the bandwidth characterization of seizure and normal sleep movements as follows: where v max and f o denote the v max and f o of the corresponding cases. To test the sensitivity of our system to different Tx/Rx positions and their corresponding ψ, we carry out extensive experiments on one test subject (in location 4 of Fig. 5 ) by changing either the Tx/Rx locations in the same horizontal plane (to which we refer as changing their configuration), or changing their heights. Changing Tx/Rx configuration: In order to test the sensitivity of the system to the placement of the Tx/Rx in the horizontal plane, we conduct experiments in two additional configurations, C#2 and C#3. In C#2, the Tx and the Rx are placed on one side of the bed, such that the line connecting the Tx and Rx is parallel to the edge of the bed and 70 cm away from it. Such a configuration can be of particular interest in practical situations in which one side of the bed is not accessible, e.g. if the bed is placed next to a wall. The distance between the Tx and the Rx is 2 m, and both are elevated by 70 cm above the bed level. This setup results in ψ ≈ 1.4, which will result in BW sz ≥ 13.23 Hz, and BW nm ≤ 10.06 Hz using our mathematical derivations. We thus use f th = 13.23+10.06 2 = 11.64 Hz for this configuration. On the other hand, in C#3, the Tx and Rx are placed on two different sides of the bed, with a Tx-Rx distance of 3.6 m, while they are elevated by 70 cm above the bed level. This setup results in ψ ≈ 0.7, and f th = 7.36+6.03 2 = 6.69 Hz. In each of the configurations, the test subject simulates a total of 10 seizure instances and 125 normal sleep events. We summarize the evaluation results of these experiments in Table III . It can be seen that the performance of the system in C#2 and C#3 is comparable to that of the main configuration (C#1), showing that the performance of our proposed pipeline is robust to different Tx/Rx configurations. Changing Tx/Rx heights: In order to test the sensitivity of the system to antenna heights, we conduct experiments in two additional settings, C#4 and C#5. In both settings, the Tx and Rx are placed ∼2.5 m apart on both sides of the bed (similar to C#1), but their heights are elevated to 1.3 m above the bed level in C#4, and 1.7 m above the bed level in C#5. Using simple geometry, it can be verified that in C#4, ψ = 1.44 (f th = 11.94 Hz), while in C#5, ψ = 1.61 (f th = 13.15 Hz). Again, in both settings, the test subject simulates a total of 10 seizure instances and 125 normal sleep events. Table III shows that the performance of the system in C#4 and C#5 is comparable to that of the other configurations, indicating that our proposed pipeline is robust to different Tx/Rx heights. In-home seizure detection systems are primarily designed for caregivers who do not share the same bed (or bedroom) as the patient, since, otherwise, they would be alerted by the patient's seizure movements. However, in order to show the robustness of our proposed system, we next show that it can still be deployed in a multi-person setting where multiple people share the same bed. In such a case, the event detection module detects any movement done by any of the sleeping persons. In order to test this, we conducted a 10-minute experiment where two people lie down next to each other on a bed. Person 1 simulates seizures at the 6 and 9-minute marks. Otherwise, both people frequently simulate normal sleep movements. As such, there are a number of instances where both people move at the same time, or one person moves normally while the other one is simulating a seizure. Fig. 8 (top) shows the PCAdenoised stream p(t), in which perturbations are clearly visible whenever either persons engages in any kind of movement, while Fig. 8 (bottom) shows the bandwidth of the WiFi signals during the detected events. It can be seen that the bandwidth exceeds f th for an extended period of time only during the seizure instances, which are correctly classified as seizures, even though the second person was moving during the second seizure instance. Otherwise, during normal movements, even if both persons are moving simultaneously, the events are not classified as seizures. VIII. FURTHER DISCUSSIONS Robustness to movements by other people: In Sec. VII-C, we have shown that our proposed system is robust to movements by other sleeping people in the same environment, since their normal sleeping movements have the same characteristics as those of the patient. Next, consider the case where other simultaneous movements happen, such as those of a walking person. The spectrogram of the signal reflected off of a walking person has specific characteristics. Thus, as part of future work, one can study the differentiability of the signals induced by walking from those induced by seizures. Furthermore, the reflected signals off of other moving targets can also be filtered out at the Rx by exploiting more signal dimensions. For instance, multiple antennas at the Rx can separate the received signals based on their Angle-of-Arrival (AoA). Clinical trials: In this paper, we proposed the first RFbased system for nocturnal seizure detection, by developing mathematical models that can enable this. We also validated our proposed approach by extensive experiments on seizures simulated by actors. The results of this preliminary validation show the great potential of using WiFi signals as an appealing alternative to the currently available products, which are costly, uncomfortable, or unreliable. Towards the ultimate goal of making this technology available to the public, the next step is to develop a prototype of the proposed system, which can then undergo extensive clinical trials on real patients, and become available to the epilepsy patients and their caregivers. In this paper, we have considered the problem of nocturnal seizure detection in epilepsy patients using WiFi signals measured on a device placed in the vicinity of the sleeping patient. We first provided a mathematical analysis for the spectral content/bandwidth of the WiFi signal during different kinds of sleep body movements (e.g., seizure, normal movements, and breathing), showing that the bandwidth of the signal can be used to robustly differentiate a seizure from normal movements. We then utilized this analysis to design a robust seizure detection system, which detects all non-breathing body motion events and classifies them, based on their spectral content, to normal movements and seizures. We experimentally validated our proposed system using WiFi CSI data collected from 20 actors in 7 different locations, where they simulated a total of 260 seizures as well as 410 normal sleep movements. Our proposed system achieved a very low probability of false alarm of 0.0097, while being very responsive to seizure events, detecting 93.85% of the seizure instances with an average response time of only 5.69 seconds. These promising results show the potential of using WiFi signals as an accurate and cheap alternative to traditional seizure detection systems. World Health Organization Nocturnal supervision and SUDEP risk at different epilepsy care settings Nonseizure SUDEP: sudden unexpected death in epilepsy without preceding epileptic seizures How long do most seizures last? a systematic comparison of seizures recorded in the epilepsy monitoring unit Embrace2 Mp5 seizure movement detection monitor The sleep activity monitor Magnitude-based angleof-arrival estimation, localization, and target tracking Cooperative robotic structure mapping using wireless measurements-a comparison of random and coordinated sampling patterns Contactless sleep apnea detection on smartphones Crowd counting through walls using wifi Teaching rf to sense without rf training measurements Smart homes that monitor breathing and heart rate Monitoring vital signs using millimeter wave Contactless respiration monitoring via off-the-shelf wifi devices Human respiration detection with commodity wifi devices: do user location and body orientation matter? Phasebeat: Exploiting csi phase data for vital sign monitoring with commodity wifi devices Resbeat: Resilient breathing beats monitoring with realtime bimodal csi data Respiration tracking for people counting and recognition Accelerometry based detection of epileptic seizures Tracking generalized tonic-clonic seizures with a wrist accelerometer linked to an online database Automated detection of convulsive seizures using a wearable accelerometer device Automatic segmentation of episodes containing epileptic clonic seizures in video sequences Automated video-based detection of nocturnal convulsive seizures in a residential care setting Detection of generalized tonic-clonic seizures by a wireless wrist accelerometer: a prospective, multicenter study Movement distribution: a new measure of sleep fragmentation in children with upper airway obstruction Sleep positions and position shifts in five age groups: an ontogenetic picture Sleep stage prediction with raw acceleration and photoplethysmography heart rate data derived from a consumer wearable device Identifying a new non-linear csi phase measurement error with commodity wifi devices The invention of frequency modulation in 1902 Modern Digital and Analog Communication Systems Notes on the theory of modulation Wicare: Towards in-situ breath monitoring Ganong's review of medical physiology Tracking vital signs during sleep leveraging off-theshelf wifi Frequency evolution during tonic-clonic seizures Semiological seizure classification Prone, lateral, or supine positioning at seizure onset determines the postictal body position: A multicenter video-eeg monitoring cohort study Time-frequency analysis of accelerometry data for detection of myoclonic seizures Understanding and modeling of wifi signal based human activity recognition Tool release: Gathering 802.11n traces with channel state information An overview of the uses of standardized patients for teaching and evaluating clinical skills Interprofessional simulation to improve safety in the epilepsy monitoring unit Non-eeg based ambulatory seizure detection designed for home use: What is available and how will it influence epilepsy care? A novel portable seizure detection alarm system: preliminary results Prospective study of the emfit movement monitor Multimodal nocturnal seizure detection in a residential care setting: A long-term prospective trial